CN112799848B - A control method and device - Google Patents
A control method and device Download PDFInfo
- Publication number
- CN112799848B CN112799848B CN202110185314.3A CN202110185314A CN112799848B CN 112799848 B CN112799848 B CN 112799848B CN 202110185314 A CN202110185314 A CN 202110185314A CN 112799848 B CN112799848 B CN 112799848B
- Authority
- CN
- China
- Prior art keywords
- application process
- target
- identified
- load
- parameter
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
- G06F9/505—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5083—Techniques for rebalancing the load in a distributed system
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/50—Indexing scheme relating to G06F9/50
- G06F2209/508—Monitor
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The application discloses a control method, which comprises the steps of obtaining a first load parameter of each thread of an application process to be identified, wherein the first load parameter is the time of the thread consuming a target processor in unit time, determining that the application process to be identified is a target application process if the first load parameter meets a load condition, and adjusting the running mode of electronic equipment according to a determined control strategy. The application also discloses a control device.
Description
Technical Field
The present application relates to computer technology, and in particular, to a control method and apparatus.
Background
Mobile device hardware performance has now been relatively powerful, but the device cannot always remain in a high power consumption mode of operation due to battery capacity limitations. However, if a better standby and use time is desired, the problem of maintaining low power consumption while simultaneously compromising device performance is faced, so that many mobile devices are provided with multiple performance modes for the user to choose from. The performance of the central processing unit (Central Processing Unit, CPU), the screen brightness, the vibration setting, the sound effect setting and other different settings can be adjusted under different performance modes to achieve different user experiences.
When an application program (APP) has higher requirements on a CPU, the mobile device operates in a high-performance mode, and when the APP has smaller requirements on the CPU performance, the device operates in a low-performance mode, so that the normal operation of the application program is ensured while the low power consumption is maintained.
In the related art, the performance requirements of the application program are identified according to the white list, but there are cases of misidentification.
Disclosure of Invention
In view of this, the embodiment of the application provides a control method and a control device.
The technical scheme of the embodiment of the application is realized as follows:
in one aspect, a control method provided by an embodiment of the present application includes:
Obtaining a first load parameter of each thread of an application process to be identified, wherein the first load parameter is the time of consuming a target processor by the thread in unit time;
And if the first load parameter meets the load condition, determining the application process to be identified as a target application process, and adjusting the running mode of the electronic equipment according to the determined control strategy.
In one aspect, an embodiment of the present application provides a control device, including:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a first load parameter of each thread of an application process to be identified, wherein the first load parameter is the time of the thread consuming a target processor in unit time;
and the adjusting module is used for determining the application process to be identified as a target application process if the first load parameter meets a load condition, and adjusting the running mode of the electronic equipment according to the determined control strategy.
In one aspect, the embodiment of the application also provides electronic equipment, which comprises a processor and a memory for storing a computer program capable of running on the processor, wherein the processor is used for executing the steps of the control method when running the computer program.
In one aspect, an embodiment of the present application further provides a storage medium having a computer program stored thereon, which when executed by a processor, implements the above-described control method.
In the embodiment of the application, a first load parameter of each thread of an application process to be identified is obtained, wherein the first load parameter is the time of the thread consuming a target processor in unit time, if the first load parameter meets a load condition, the application process to be identified is determined to be the target application process, and the running mode of the electronic equipment is adjusted according to a determined control strategy, so that the state of the application process is determined according to the time of the thread consuming the target processor in unit time, the performance requirement of the application process on the electronic equipment is accurately judged, the running mode of the electronic equipment is adjusted according to the state of the application process, the performance requirement of the application process is timely met, the processing effect of the electronic equipment on the process is improved, and the user experience is improved.
Drawings
FIG. 1 is a schematic flow chart of an alternative control method according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of an alternative control method according to an embodiment of the present application;
FIG. 3 is a schematic flow chart of an alternative control method according to an embodiment of the present application;
FIG. 4 is a diagram illustrating a relationship between threads and a processor according to an embodiment of the present application;
FIG. 5 is a diagram illustrating a relationship between threads and a processor according to an embodiment of the present application;
FIG. 6 is a diagram illustrating a thread versus processor in accordance with an embodiment of the present application;
FIG. 7 is a schematic view of an alternative structure of a control device according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the application.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples. It is to be understood that the examples provided herein are for the purpose of illustration only and are not intended to limit the application. In addition, the embodiments provided below are some of the embodiments for carrying out the present application, but not all of the embodiments for carrying out the present application, and the technical solutions described in the embodiments of the present application may be implemented in any combination without conflict.
In various embodiments of the application, a first load parameter of each thread of an application process to be identified is obtained, wherein the first load parameter is the time of consuming a target processor by the thread in unit time;
And if the first load parameter meets the load condition, determining the application process to be identified as a target application process, and adjusting the running mode of the electronic equipment according to the determined control strategy.
The embodiment of the application provides a control method, which is applied to a control device, wherein each functional module in the control device can be cooperatively realized by hardware resources of electronic equipment (such as terminal equipment, a server or a server cluster), such as computing resources of a processor and the like, detection resources of a sensor and the like, and communication resources.
The electronic device may be any electronic device having information processing capabilities, and in one embodiment, the electronic device may be an intelligent terminal, for example, a mobile terminal such as a notebook having wireless communication capabilities. In another embodiment, the electronic device may also be a terminal device with computing capabilities that is not portable, such as a desktop computer, server, or the like.
In practical application, a control application program is run in the electronic device, and the control method provided by the embodiment of the application can be realized by the control application program.
Of course, the embodiment of the present application is not limited to being provided as a method and hardware, but may be implemented in various manners, such as being provided as a storage medium (storing instructions for executing the control method provided by the embodiment of the present application).
Fig. 1 is a schematic implementation flow chart of a control method according to an embodiment of the present application, as shown in fig. 1, where the control method includes:
s101, obtaining first load parameters of each thread of the application process to be identified.
The first load parameter is the time that the thread consumes the target processor per unit time.
The electronic equipment acquires an application process list, wherein the application process list comprises the current running application process of the electronic equipment. Wherein one application corresponds to one application process, and different applications correspond to different application processes. Here, the application process in the application process list may include an application process corresponding to the monitoring application program.
The electronic device can monitor creation and exit of application processes in the electronic device through a Windows management architecture (Windows Management Instrumentation, WMI) component, and update an application process list according to a monitoring result of the monitoring WMI component.
The application process to be identified may be all or part of the application processes in the application process list. After the electronic device determines the application process list, the application processes in the application process list may be filtered to obtain an application process to be identified, where the application process to be identified may be all or part of the application processes in the application process list. Wherein the application process to be identified comprises one or more application processes.
The filtering policy of the electronic device for filtering the application process to be identified from the application process list comprises at least one of the following:
the first filtering strategy is to take an application process selected by a user as an application process to be identified;
Filtering a second strategy, and selecting an application process corresponding to a foreground application program as an application process to be identified;
and thirdly, selecting an application process to be identified according to the identification list.
In the first filtering strategy, the electronic device can provide an application process selection page to be identified, output the application process in the application process list in the application process selection page, receive the selection operation of the user, and take the application process selected by the selection operation of the user as the application process to be identified.
In the second filtering policy, the electronic device may determine an application program to which each application process in the application process list belongs, and determine whether each application program is running in the foreground or the background, where when the application program to which each application process belongs runs in the foreground, the application process is a foreground application process, and when the application program to which each application process belongs runs in the background, the application process is a background application process, and is not an application process to be identified.
Here, the foreground application is an application running in a display interface of the electronic device that is interacting with the user.
In the third filtering strategy, the electronic equipment is provided with an identification list, the identification list comprises application programs to be identified, when an application process to which the application process belongs in the application process list is located in the identification list, the application process is the application process to be identified, and otherwise, the application process is not the application process to be identified.
According to the embodiment of the application, the filtering strategy for filtering the application process to be identified from the application process currently running in the electronic equipment is not limited, and the user can set according to actual requirements.
After the electronic equipment determines the application process to be identified, calculating first load parameters of each thread in the application process to be identified. Here, the first load parameter is a time that the thread consumes the target processor in a unit time, and the first load parameter may include a load rate of the thread.
One application process includes one or more threads, and for each thread, the electronic device can calculate a first load parameter for each thread separately.
When an application process to be identified includes multiple threads, the first load parameters of each thread can be obtained respectively, where the target processors consumed by different threads of the same application process may be different or the same. In an example, the application process to be identified includes 3 threads, namely thread 1, thread 2 and thread 3, the electronic device includes two processors, namely processor 1 and processor 2, the target processor consumed by thread 1 and thread 2 is processor 1, and the target processor consumed by thread 3 is processor 2. In one example, the application process to be identified includes 3 threads, namely thread 1, thread 2 and thread 3, the electronic device includes two processors, namely processor 1 and processor 2, and the target processor consumed by thread 1, thread 2 and thread 3 is processor 1.
For a thread, the electronic device obtains a time that the thread consumes the target processor within a first set period of time, and calculates a first load parameter based on the obtained time and a duration of the first set period of time. Wherein the target processor is the processor consumed by the thread.
In an example, the target processor consumed by the thread a is the processor 1, and the load factor of the thread a is 100% if the time that the thread a consumes the processor 1 within 5 seconds is 5 seconds, which can be said to be 100.
In an example, where the target processor consumed by thread B is processor 2 and the time that thread a consumed processor 2 within 5 seconds is 3 seconds, the load factor of thread B is 60%, which may be noted as 60.
S102, if the first load parameter meets the load condition, determining that the application process to be identified is a target application process, and adjusting the operation mode of the electronic equipment according to the determined control strategy.
And for the application process to be identified, after the electronic equipment acquires the first load parameter of the thread of the application process to be identified, judging whether the first load parameter of the thread meets the load condition, and determining that the application process to be identified is the target application process when the first load parameter of the thread of the application process to be identified meets the load condition. And when the first load parameter of the thread of the application process to be identified does not meet the load condition, the application process to be identified is not the target application process.
In the embodiment of the application, the load condition may be a condition set based on the first load parameter of the thread. In one example, the load condition is that a first load parameter of the thread meets a first threshold. In one example, the sum of the first load parameters of all threads of the same process meets a second threshold.
When the application process of the application program is the target application process, the application program is indicated to be the application program with high requirement on the processor resource.
According to the embodiment of the application, when one or more application processes to be identified are the target application process, the running mode of the electronic equipment is adjusted according to the determined control strategy.
In an example, when there is one application process to be identified as a target application process, the operation mode of the electronic device is adjusted according to the determined control policy.
In an example, when there are a plurality of application processes to be identified as target application processes, and the number of target application processes is greater than a reference value, the operation mode of the electronic device is adjusted according to the determined control policy. The reference values can be 1,2 and the like, and the size of the reference values can be set according to actual requirements.
The electronic equipment adjusts the operation mode of the electronic equipment according to the control strategy, so that the operation performance of the electronic equipment can be improved. In one example, the electronic device includes three performance modes, a high performance mode, a normal mode, and a quiet mode, and when the electronic device is currently in the normal mode, the electronic device is adjusted to the high performance mode.
In one example, if a target application process exists, the operating parameters of a target component in the electronic device are adjusted, such as increasing the brightness of a display screen, increasing the main frequency of a target processor, adjusting the vibration frequency of a vibration sensor, increasing the sound effect of an audio processor, and the like, and the heat dissipation mode of a heat dissipation assembly is adjusted.
In one example, first attribute information of a target application process is obtained, and an operating parameter of a target component is adjusted according to the first attribute information.
In an example, a second load parameter of an application process to be identified running on a different processor is determined, whether the second load parameter of the application process to be identified reaches an upper limit of processing capacities of a plurality of processors is determined, if so, parameters of a target component are adjusted, and if not, threads to be identified processed by the processors are balanced.
In the embodiment of the application, the content of the control strategy is not limited at all, and the control strategy can be set according to actual requirements.
The control method provided by the embodiment of the application can be applied to the following scenes:
The method comprises the steps that an application program 1, an application program 2 and an application program 3 are operated in the electronic equipment, the application program 1 is a foreground application program, the electronic equipment determines that an application process 1 corresponding to the application program 1 is an application process to be identified, calculates a first load parameter of a thread of the application process 1, determines that the application process 1 is a target application process when the first load parameter of the thread of the application process 1 meets a load condition, and adjusts operation parameters of the electronic equipment, so that the processing performance of the electronic equipment is improved, and the processing efficiency of the application process 1 is improved.
In the embodiment of the application, a first load parameter of each thread of an application process to be identified is obtained, wherein the first load parameter is the time of the thread consuming a target processor in unit time, if the first load parameter meets a load condition, the application process to be identified is determined to be the target application process, and the running mode of the electronic equipment is adjusted according to a determined control strategy, so that the state of the application process is determined according to the time of the thread consuming the target processor in unit time, the performance requirement of the application process on the electronic equipment is accurately judged, the running mode of the electronic equipment is adjusted according to the state of the application process, the performance requirement of the application process is timely met, the processing effect of the electronic equipment on the process is improved, and the user experience is improved.
In an embodiment, if the first load parameter meets the load condition in S102, it is determined that the application process to be identified is the target application process, including one of the following cases:
In the first case, if a first load parameter of a first thread of the application process to be identified meets a first threshold value, determining that the application process to be identified is a target application process;
Calculating a second load parameter of the application process to be identified according to the first load parameter of each thread of the application process to be identified, and determining that the application process to be identified is a target application process if the second load parameter meets a second threshold;
And thirdly, if the first load parameter of the second thread of the application process to be identified meets a third threshold value and the second load parameter of the application process to be identified meets a fourth threshold value, determining that the application process to be identified is a target application process.
In the first case, the load condition is that the first load parameter meets a first threshold value, and when the first load parameter of the thread of the application process to be identified meets the first threshold value, the application process to be identified is determined to be the target application process.
Here, when one or more threads whose first load parameter is greater than the first threshold value are threads of the application process to be identified, the first load parameter of the thread satisfies the first threshold value.
In one example, the first threshold is 90, the application process 1 includes a thread 1 and a thread 2, and the first load parameter of the thread 1 is 95, and then the application process 1 is the target application process.
In an example, the first threshold is 90, the application process 1 includes a thread 1 and a thread 2, the first load parameter of the thread 1 is 95, and the first load parameter of the thread 2 is 92, and then the application process 1 is the target application process.
In the second case, the load condition is that the sum of the first load parameters of all threads of the same process, namely, the second load parameter, meets a second threshold value, and the application process to be identified is determined to be the target application process.
For an application process to be identified, the second load parameter of the application process to be identified is the sum of the first load parameters of all threads of the application process to be identified. In practice, the second load parameter of the application to be identified may be calculated by the first load parameters of all threads, or may be directly read.
In an example, the second threshold is 300, when the second load parameter of the application process to be identified is 260, the application process to be identified is not the target application process, and when the second load parameter of the application process to be identified is 360, the application process to be identified is the target application process.
In practical application, the second threshold may be related to the number of threads included in the application process to be identified, for example, the second threshold is 300 when the number of threads included in the application process to be identified is less than 6, and the second threshold is 400 when the number of threads included in the application process to be identified is greater than 6. The second threshold may be independent of the number of threads included in the application process to be identified, such as 400.
In the third case, the load condition is that the first load parameter meets a first threshold value, and the sum of the first load parameters of all the threads of the process to which the thread belongs, namely, the second load parameter meets a second threshold value, and then the application process to be identified is determined to be the target application process.
At this time, the process to be identified is judged from two dimensions of the thread and the process, and when the second load parameter of the process to be identified meets the second threshold and the thread of the process to be identified comprises the thread of which the first load parameter meets the first threshold, the application process to be identified is the target application process.
In one example, the first threshold is 90, the second threshold is 350, and when the second load parameter of the application process is 300, the application process includes 5 threads below the second load parameter, and the first load parameters of the threads are 80, 90, 20, 50 and 60 respectively, the application process is not the target application process.
In one example, the first threshold is 90, the second threshold is 350, when the second load parameter of the application process is 400, the lower part of the application process comprises 6 threads, and the first load parameters of each thread are respectively 80, 90, 85, 55, 60 and 30, the application process is not a target application process, and the application process is a target application process.
In one embodiment, the adjusting policy for adjusting the operation mode of the electronic device according to the determined control policy in S102 includes:
adjusting the mode A1, and if the application process to be identified is determined to be a target application process, adjusting the operation parameters of a target component in the electronic equipment;
And adjusting the mode A2, obtaining first attribute information of a target application process and/or obtaining environmental parameters of the environment where the electronic equipment is located, and adjusting operation parameters of target components in the electronic equipment according to the first attribute information and/or the environmental parameters.
In the adjustment modes A1 and A2 described above, the operation parameters of the target component are adjusted. The target components may include a processor, a display, a speaker, a vibration sensor, a heat sink assembly, and the like. When the target component includes a processor, the operating parameters may include one or more of a main frequency, a frequency multiplication, an external frequency, a bus frequency, a secondary cache, an operating voltage, and the like. When the target component comprises a display, the operating parameters may include one or more of resolution, brightness, color temperature, etc. When the target component includes a speaker, the operating parameters may include one or more of volume, sound effects, and the like. When the target component includes a vibration sensor, the operating parameters may include one or more of vibration frequency, vibration amplitude, etc.
The embodiments of the present application do not limit the target component and the operating parameters of the target component.
In the adjustment mode A2, the operation parameters of the target component are adjusted according to one or a combination of two of the first attribute information of the target application process and the environmental parameters of the environment in which the electronic device is located.
The first attribute information of the target application process includes an image name, a user name, a dependent processor, a memory, description information, and the like. The image name can indicate an application program to which the target application process belongs, and whether the first attribute information includes a user name can indicate whether the target application process is a system process or a third party application process. The environmental parameters of the environment in which the electronic device is located include temperature, brightness, sound, etc.
In an example, the current target application process is determined to be a foreground application process according to the first attribute information of the target application process, and the operation parameters of the target component are adjusted.
In one example, the operating parameters of the target component are adjusted based on temperature.
In an embodiment, in the adjusting mode A1, adjusting the operation parameter of the target component in the electronic device includes controlling the operation parameter of the target processor in the electronic device to be adjusted from the first operation parameter to the second operation parameter, wherein the processing capability of the target processor under the second operation parameter is stronger than the processing capability of the target processor under the first operation parameter.
In adjustment policy one, the target component includes a target processor, i.e., a processor that is to identify the thread consumption of the application process. At this point, the operating parameters may include one or more of primary frequency, frequency multiplication, external frequency, bus frequency, secondary buffer, operating voltage, etc.
At this time, the operation parameters of the target processor are adjusted from the first operation parameters to the second operation parameters, so that the processing of the target processor can be improved.
In the adjustment mode A2, adjusting the operation parameters of the target component in the electronic device includes:
and controlling a target processor in the electronic equipment to adjust from the current operation parameter to a target operation parameter corresponding to the first attribute information and/or the environment parameter, and/or controlling a target heat dissipation module in the electronic equipment to adjust from a current heat dissipation mode to a first target heat dissipation mode corresponding to the target operation parameter or a second target heat dissipation mode corresponding to the first attribute information and/or the environment parameter.
Here, the target component includes a target processor and/or a heat dissipation module.
And when the operation mode of the electronic equipment is adjusted, adjusting the operation parameters of the target processor, namely target operation parameters, wherein the target operation parameters are adaptive to the first attribute information and/or the environment parameters, so that the performance of the target processor is adaptive to the first attribute information and/or the environment parameters of the target application process.
And for the target heat dissipation module, adjusting the heat dissipation mode of the target heat dissipation module into a first heat dissipation mode or a second heat dissipation mode, wherein the first heat dissipation mode is suitable for the target operation parameters of the target processor, and the second heat dissipation mode is suitable for the first attribute information and/or the environmental parameters of the target application process. The target heat dissipation assembly has different heat dissipation effects, emitted noise and the like in different heat dissipation modes.
According to the embodiment of the application, when the target component is adjusted, the target component is adjusted according to the first attribute information and/or the environmental parameters of the target application process, so that the adjusted target component is adapted to the current environment where the target application process or the electronic equipment is located.
In an embodiment, the adjustment manners for adjusting the operation mode of the electronic device according to the determined control policy in S102 include an adjustment manner B, as shown in fig. 2, where the adjustment manner B includes:
s1211, determining a target processor on which an application process to be identified depends;
S1212, if the first application process to be identified runs on the first target processor and the second application process to be identified runs on the second target processor, obtaining a first sub-load parameter of the first application process to be identified and a second sub-load parameter of the second application process to be identified;
s1213, if the sum of the first sub-load parameter and the second sub-load parameter meets the load condition, adjusting the operation parameter of the target component in the electronic equipment.
In an embodiment, in the adjustment mode B, as shown in fig. 3, in S102, the operation mode of the electronic device is adjusted according to the determined control policy, and further includes:
s1214, if the sum of the first sub-load parameter and the second sub-load parameter does not meet the load condition, running a part of threads of the first application process to be identified on the second target processor, or running a part of threads of the second application process to be identified on the first target processor.
The electronic equipment determines the processor consumed by each application process to be identified, namely, determines the target processor corresponding to each application process to be identified. Here, the application processes to be identified may be grouped according to the target processors relied upon. For example, the electronic device runs application processes to be identified, namely a process 1, a process 2, a process 3 and a process 4, wherein the processors consumed by the process 1 and the process 2 are the processor 1, the process 1 and the process 2 are classified as a first application process to be identified into a group, the processors consumed by the process 3 and the process 4 are the processor 2, and the process 3 and the process 4 are classified as a second application process to be identified into a group.
And adding the second load parameters of each application process to be identified in the first identification application process and the second application process to be identified, adjusting the operation parameters of the target component when the addition result meets the load condition, and not adjusting the parameters of the target component when the addition result does not meet the load condition, wherein at the moment, the application process with identification processed by one processor is transferred to the other processor. The second load parameter of the first identified application process is called a first sub-load parameter, and the second load parameter of the second identified application process is called a second sub-load parameter.
The load condition here is a condition set based on the second load parameter, such as being greater than a fifth threshold.
In one example, the fifth threshold is 500, and as shown in fig. 4, the processors consumed by process 1 and process 2 are processor 1, and the processors consumed by process 3 and process 4 are processor 2. When the second load parameter of the process 1 is 100, the second load parameter of the process 2 is 200, the second load parameter of the process 3 is 100, and the second load parameter of the process 4 is 150, the sum of the second load parameters of the process 1 and the process 2, and the second load parameters of the process 3 and the process 4 is 550, and the fifth threshold is satisfied, and the operation parameters of the target component are adjusted. When the second load parameter of the process 1 is 50, the second load parameter of the process 2 is 50, the second load parameter of the process 3 is 100, and the second load parameter of the process 2 is 150, the sum of the second load parameters of the process 1 and the process 2, and the second load parameters of the process 3 and the process 4 is 350, and the fifth threshold is not satisfied, the process 3 processed by the processor 2 is run to the processor 1, and the adjustment result is as described in fig. 5.
Here, when the electronic device includes at least two processors and the sum of the second load parameters (including the first load sub-parameter and the second load sub-parameter) of the application process to be identified consuming different processors satisfies the load condition, the target component is subjected to parameter adjustment, and when the load condition is not satisfied, the target component is not subjected to parameter adjustment, but the target processor consumed by the thread processed by one of the processors is switched to the other target processor, so that the processing resources of the electronic device are balanced, and the improvement of the processing capability of the thread is realized under the condition that the running parameter does not need to be adjusted.
In one embodiment, the operation mode of the electronic device is adjusted in S102 according to the determined control policy, including adjustment mode C1 and/or adjustment mode C2, wherein,
The method comprises the steps of adjusting a mode C1, obtaining a second load parameter of a target application process, and adjusting operation parameters of a target component in the electronic equipment according to the second load parameter;
And C2, obtaining a third load parameter of the target processor, and adjusting the operation parameters of the background application process in the electronic equipment according to the third load parameter.
In the adjustment mode C1, the operation parameters of the target component in the electronic device are adjusted according to the second load parameter of the target application process. Wherein one or more of the type of the target component, the type of the operating parameter, the magnitude of the operating parameter, which are adjusted, may be determined in accordance with the magnitude of the second load parameter.
In an example, the target component is determined to be the processor when the second load parameter is within the first load range, the target component is determined to be the heat sink when the second load parameter is within the second load range, and the target component is determined to be the display when the second load parameter is within the third load range. Wherein the first load range, the second load, and the third load range are numerically sequential.
In one example, the target component is a processor that determines the operating parameter as a dominant frequency when the second load parameter is within the first load range and determines the operating parameter as a voltage when the second load parameter is less than the first load range.
In one example, where the type of the target component, the type of the operating parameter, is determined, the magnitude of the operating parameter may be determined based on the second load parameter.
In adjustment mode C2, a third load parameter of the target processor is determined, wherein the third load parameter characterizes the operating time of the target processor per unit time. When multiple target processors are included, a sum of third load parameters for each target processor may be determined.
Here, the operation parameters of the background application process are adjusted according to the third load parameter of one target processor or the sum of the third load parameters of a plurality of target processors, so as to control the operation of the background application process. The background application process is an application process corresponding to the background application program. The operating parameters of the background application process may include operating state, number of operating threads, consumed processors, etc.
In one example, when the sum of the third load parameters of the target processor meets a sixth threshold, the running state of the background application process is adjusted to stop running.
In one embodiment, adjusting mode C2 includes adjusting the processor cores on which the background application process is running based on the total utilization of the target processor.
And adding the third load parameters of each target processor to obtain the total utilization rate of the target processor, adjusting the processor core relied by the background application process when the total utilization rate of the target processor meets the adjustment condition, and not adjusting the processor core relied by the background application process if the total utilization rate of the target processor does not meet the adjustment condition.
Here, the adjustment condition may be that the total usage rate of the target processor is smaller than the usage rate threshold, and it is determined that the usage of the target processor of the current processor does not reach the upper usage limit of the target processor, and the processor resource may be vacated for the target application process through adjustment of the processor core on which the background application process runs, so as to improve the processing efficiency of the target application process.
In one embodiment, adjusting the adjustment mode of the processor core on which the background application process depends according to the total utilization rate of the target processor comprises monitoring the total utilization rate of the target processor, and adjusting the processor core on which the background application process depends according to the adjustment mode one or the adjustment mode two if the adjustment condition is determined to be met according to the total utilization rate, wherein,
The method comprises the steps of adjusting a first sub-mode, running all current background application processes in a first target processor kernel set of the target processor, wherein the first target processor kernel set comprises at least one processor kernel of the target processor;
And adjusting a second sub-mode, obtaining second attribute information of the background application process, and operating a target background application process in a second target processor kernel set of the target processor according to the second attribute information, wherein the second target processor kernel set comprises at least one processor kernel of the target processor.
In the first adjustment mode, all background application processes are run in the first target processor kernel set, so that the background application processes are limited in the processor kernels in the first target processor kernel set.
For example, the target processors are 8-core processors, namely, a core 1 and a core 2 to a core 8, and the first target processor core set comprises the core 1, the core 2 and the core 4, and when all background application processes run in the core 1, the core 2 and the core 4, the background application processes do not occupy processor cores outside the first target processor core set.
In the second adjustment mode, searching a background non-system application process according to the second attribute information of the background application program, and limiting the background non-system application process to the processor cores in the second target processor core set.
For example, the target processors are 8-core processors, namely, a core 1 and a core 2 to a core 8, the first target processor core set comprises a core 1, a core 2 and a core 3, and when the background non-system application process runs in the core 1, the core 2 and the core 3, the background application process does not occupy the processor cores outside the second target processor core set.
In the embodiment of the application, the processor cores on which all background application processes or background non-system application processes depend are limited in the fixed processor cores, so that the background application processes or the background non-system application processes cannot occupy other processor cores except the fixed processor cores, the processor cores can be completely used for processing the target application process, and the processing performance of the target application process is improved.
The control method provided by the embodiment of the application is further described below by taking the load parameter as an example of the load factor.
In order to bring more intimate performance power consumption schemes to users, many devices support multiple setting levels, different setting levels provide different device performance levels, and consume different power consumption. Such as a device support level of high performance mode (high performance mode), normal mode (normal mode), and quiet mode (quiet mode), wherein device performance of the high performance mode, normal mode, quiet mode is sequentially reduced for device performance, and power consumption required for the high performance mode, normal mode, quiet mode is sequentially reduced for power consumption. When the running APP has higher demand on CPU, the device runs at high performance mode, when the running APP has smaller demand on CPU performance, the device runs at quiet mode, how to identify the running APP as the Creator APP which consumes higher energy and has higher demand on CPU operation performance is a key technical point,
Currently, whether an APP is a Creator APP is identified by using a white list mode, and for an APP, energy consumption and performance requirements of the APP are dynamically changed, so that misjudgment is possible when the APP is judged by using the white list mode.
In the related art, there is also a judgment by the CPU utilization of the process corresponding to the APP, which is generally the ratio of the CPU time or cycle period (CYCLE TIMES) per unit time of the process and the total CPU time or CYCLE TIMES of the device.
However, the logic processors (logical processors) of different CPUs are different, so that the total CPU time of each CPU unit time is directly influenced or CYCLE TIMES, the CPU use rate difference of the same APP in equipment with different CPUs is relatively large, and when an application program only has one thread and the thread runs at full load (the full-power running does not have any stop), the CPU use rate is low compared with the situation that one application program corresponds to a plurality of threads but the load rate is not very high (each thread does not need to run at full-power and has more dormancy waiting time), so that the CPU use rate cannot accurately reflect the requirement of the program on the CPU performance.
In the embodiment of the present application, the following definitions are performed:
the load factor, process or thread consumes CPU time per unit time, wherein the load factor is independent of the CPU logic processor.
Process load rate, CPU time consumed by a process in a unit time.
Thread load factor, CPU time consumed by threads in unit time.
Wherein, the load rate is the CPU time consumed in unit time, the CPU utilization rate is the ratio of the CPU time consumed in unit time to the total time of the CPU, and the utilization rate and the parallel capability provided by the CPU are in great relation. For example, a CPU with 8 cores and 16 threads can provide 16 seconds of parallel operation in one second, for example, if the threads run at full load, the thread load rate is 100, and the CPU usage rate of the threads is 1/16=6.25%. For another example, a full thread runs in a 2-core 4-thread machine, the thread load rate is 100, and the CPU utilization of the thread is 1/4=25%.
The CPU utilization rate and the specific CPU relationship are quite large, and the CPU occupancy rate of the same APP in different machines is quite different. For example, an APP with only one thread running at full load is actually tested, the CPU occupancy rate in a dual-core CPU is 22.5%, the CPU occupancy rate in a 16-core CPU is 5.6%, and the number of threads of the APP also affects the CPU occupancy rate, so that it is not possible to accurately determine whether the APP has run at full load and whether faster or more CPU resources are needed.
Taking the thread load rate to measure the demand of APP on CPU as an example, when the thread load rate of the thread in the process is greater than a preset threshold value, the thread is indicated to run at full power and has higher demand on the execution speed of CPU, the performance of CPU is improved at the moment, thereby improving the execution efficiency of the thread in unit time, otherwise, if the thread load rate is lower, the thread is indicated to be in idle state in unit time, the execution efficiency of APP is not greatly improved due to high CPU speed, and the performance of CPU is not required to be improved.
When the demand of the APP for CPU resources in the unit time is measured by combining the thread load rate and the process load rate, the demand of the APP for CPU performance can be more accurately reflected. Here, the thread load rate may be used as a core condition, and the process load rate may be used as an assist condition.
In the embodiment of the application, when the front-stage Creator APP is running, if the CPU utilization rate of the system is too high, threads of the Creator APP can not be scheduled in time, and programs occupying high CPU resources in background non-system processes are limited to run in fixed CPU cores, so that the CPU occupation rate of the processes is reduced, the front-stage Creator APP is ensured to have sufficient CPU resources, and the available CPU resources of the front-stage Creator APP are ensured.
The control method provided by the embodiment of the application, as shown in fig. 6, includes:
S601, initializing a process list and a thread list.
And controlling the starting of an application program, initializing a process list, and acquiring all current processes and threads of each process in the system.
S602, filtering a process list.
Here, the foreground process is filtered out of the process list.
S603, updating the process list based on the creation or the exit of the process.
The electronic equipment monitors the process creation and exit of the system by using the event mode of the WMI600, and updates the current process list according to the monitoring result.
S604, updating the thread list based on the creation or release of the thread.
The electronic device monitors the creation and release of the threads of the system by using the event mode of the WMI600, and updates the current thread list according to the monitoring result.
S605, calculating the load rate of the process.
When the load factor of the process is greater than a certain process threshold, S607 is executed, otherwise S605 is continued
S606, calculating the load rate of the threads.
If the load rate of the thread is greater than a certain thread threshold, and it is determined that the process is the target process, S607 is executed, otherwise S605 is continued to be executed.
In practical applications, S606 may be executed after the load factor of the thread is greater than a certain threshold.
S607, judging whether the process is a target application process.
Here, whether the process is the target application process may be determined when the load rate of the thread is greater than a certain thread threshold, whether the process is the target application process may be determined when the load rate of the process is greater than a certain process threshold, or whether the process is the target application process may be determined when the load rate of the thread is greater than a certain thread threshold and the load rate of the process is greater than a certain process threshold.
Here, the application to which the target process belongs is a Creator APP.
S608, monitoring the CPU utilization rate of the background APP;
s609, limiting a background APP with high CPU utilization rate;
S610, setting the CPU in a high-performance mode.
In one example, the process is considered the target process when the following exists:
When the load of one thread in the process is greater than the threshold 1=98, and the load of the process is greater than 198;
When two threads load is greater than threshold 2=88 in the process, and the process load is greater than 276;
when three threads load is greater than threshold 3=80 in the process, and the process load is greater than 340;
When four threads in the process have load capacity greater than threshold value threshold 4=70, and the process load capacity is greater than 380;
when five threads in the process have load greater than threshold 5=60, and the process load is greater than 400;
when six threads in the process load is greater than the threshold 6=50, and the process load is greater than 400.
The control method provided by the embodiment of the application has the following technical characteristics:
1. the Creator APP is identified by combining the thread load rate and the process load rate, and the CPU utilization rate of threads or processes is not used, so that the demand of the APP on the CPU capacity is more accurately embodied.
2. The demand of the Creator APP for CPU resources can be accurately acquired in real time.
3. The Creator APP is identified, the operation mode of the electronic equipment is adjusted, the CPU occupancy rate is managed, the system fluency is improved, the risk of high power consumption is reduced, and sufficient CPU resources are provided.
Fig. 7 is a schematic structural diagram of a control device according to an embodiment of the present application, as shown in fig. 7, an apparatus 700 includes:
an obtaining module 701, configured to obtain a first load parameter of each thread of an application process to be identified, where the first load parameter is a time that the thread consumes a target processor in a unit time;
and the adjusting module 702 is configured to determine that the application process to be identified is a target application process if the first load parameter meets a load condition, and adjust an operation mode of the electronic device according to the determined control policy.
In some embodiments, the adjustment module 702 is further configured to:
If the first load parameter of the first thread of the application process to be identified meets a first threshold value, determining that the application process to be identified is a target application process, or,
Calculating a second load parameter of the application process to be identified according to the first load parameter of each thread of the application process to be identified, and determining that the application process to be identified is a target application process if the second load parameter meets a second threshold value, or,
And if the first load parameter of the second thread of the application process to be identified meets a third threshold value and the second load parameter of the application process to be identified meets a fourth threshold value, determining that the application process to be identified is a target application process.
In some embodiments, the adjustment module 702 is further configured to:
If the application process to be identified is determined to be the target application process, adjusting the operation parameters of the target component in the electronic equipment, or,
And acquiring first attribute information of a target application process and/or acquiring environmental parameters of the environment where the electronic equipment is located, and adjusting operation parameters of target components in the electronic equipment according to the first attribute information and/or the environmental parameters.
In some embodiments, the adjustment module 702 is further configured to:
controlling an operating parameter of a target processor in an electronic device to be adjusted from a first operating parameter to a second operating parameter, wherein the target processor has a processing capacity at the second operating parameter that is greater than its processing capacity at the first operating parameter, or,
And controlling a target processor in the electronic equipment to adjust from a current operation parameter to a target operation parameter corresponding to the first attribute information and/or the environment parameter, and/or controlling a target heat dissipation module in the electronic equipment to adjust from a current heat dissipation mode to a first target heat dissipation mode corresponding to the target and the target operation parameter or to adjust from a current heat dissipation mode to a second target heat dissipation mode corresponding to the first attribute information and/or the environment parameter.
In some embodiments, the adjustment module 702 is further configured to:
Determining a target processor on which an application process to be identified depends;
If the first application process to be identified runs on the first target processor and the second application process to be identified runs on the second target processor, obtaining a first sub-load parameter of the first application process to be identified and a second sub-load parameter of the second application process to be identified;
and if the sum of the first sub-load parameter and the second sub-load parameter meets the load condition, adjusting the operation parameter of the target component in the electronic equipment.
In some embodiments, the adjustment module 702 is further configured to:
And if the sum of the first sub-load parameter and the second sub-load parameter does not meet the load condition, running part of the threads of the first application process to be identified on the second target processor, or running part of the threads of the second application process to be identified on the first target processor.
In some embodiments, the adjustment module 702 is further configured to:
Obtaining a second load parameter of a target application process, adjusting an operation parameter of a target component in the electronic equipment according to the second load parameter, and/or,
And obtaining a third load parameter of the target processor, and adjusting the operation parameter of a background application process in the electronic equipment according to the third load parameter.
In some embodiments, the adjustment module 702 is further configured to:
and adjusting the processor kernel on which the background application process runs according to the total utilization rate of the target processor.
In some embodiments, the adjustment module 702 is further configured to:
Monitoring the total utilization rate of the target processor, and if the adjustment condition is met according to the total utilization rate, running all current background application processes in a first target processor kernel set of the target processor, wherein the first target processor kernel set comprises at least one processor kernel of the target processor, or,
And obtaining second attribute information of the background application process, and operating the target background application process in a second target processor kernel set of the target processor according to the second attribute information, wherein the second target processor kernel set comprises at least one processor kernel of the target processor.
It should be noted that the control device provided in the embodiment of the present application includes each module, which may be implemented by a Processor in an electronic device, or may of course be implemented by a specific logic circuit, where in the implementation process, the Processor may be a central processing unit (CPU, central Processing Unit), a microprocessor (MPU, micro Processor Unit), a digital signal Processor (DSP, digital Signal Processor), a Field-Programmable gate array (FPGA), or the like.
The description of the apparatus embodiments above is similar to that of the method embodiments above, with similar advantageous effects as the method embodiments. For technical details not disclosed in the embodiments of the apparatus of the present application, please refer to the description of the embodiments of the method of the present application.
An embodiment of the present application provides an electronic device, and fig. 8 is a schematic diagram of a composition structure of the electronic device according to the embodiment of the present application, as shown in fig. 8, where the device 800 includes a processor 801, at least one communication bus 802, at least one external communication interface 804, and a memory 805. Wherein the communication bus 802 is configured to enable connected communication between these components. The device 800 includes, among other things, a user interface 803, the user interface 803 may include an API interface, and the external communication interface 804 may include standard wired and wireless interfaces.
Wherein the processor 801 is configured to execute a computer program stored in a memory to implement the steps of:
Obtaining a first load parameter of each thread of an application process to be identified, wherein the first load parameter is the time of consuming a target processor by the thread in unit time;
And if the first load parameter meets the load condition, determining the application process to be identified as a target application process, and adjusting the running mode of the electronic equipment according to the determined control strategy.
Accordingly, an embodiment of the present application further provides a storage medium, i.e., a computer readable storage medium, where a computer program is stored, where the computer program when executed by a processor implements the steps of the control method described above.
The description of the electronic device, storage system, and computer-readable storage medium embodiments above is similar to that of the method embodiments described above, with similar benefits as the method embodiments. For technical details not disclosed in the embodiments of the electronic device, the storage system and the computer readable storage medium of the present application, please refer to the description of the method embodiment of the present application.
In the embodiment of the present application, if the control method is implemented in the form of a software function module and sold or used as a separate product, it may also be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be embodied in essence or a part contributing to the prior art in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in the embodiments of the present application. The storage medium includes various media capable of storing program codes, such as a usb (universal serial bus), a removable hard disk, a Read Only Memory (ROM), a magnetic disk, or an optical disk. Thus, embodiments of the application are not limited to any specific combination of hardware and software.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in various embodiments of the present application, the sequence numbers of the foregoing processes do not mean the order of execution, and the order of execution of the processes should be determined by the functions and internal logic thereof, and should not constitute any limitation on the implementation process of the embodiments of the present application. The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is merely a logical function division, and there may be additional divisions of actual implementation, such as multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. In addition, the various components shown or discussed may be coupled or directly coupled or communicatively coupled to each other via some interface, whether indirectly coupled or communicatively coupled to devices or units, whether electrically, mechanically, or otherwise.
The units described as separate components may or may not be physically separate, and components displayed as units may or may not be physical units, may be located in one place or distributed on a plurality of network units, and may select some or all of the units according to actual needs to achieve the purpose of the embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of hardware plus a form of software functional unit.
It will be appreciated by those of ordinary skill in the art that implementing all or part of the steps of the above method embodiments may be implemented by hardware associated with program instructions, where the above program may be stored in a computer readable storage medium, where the program when executed performs the steps comprising the above method embodiments, where the above storage medium includes various media that may store program code, such as a removable storage device, a Read Only Memory (ROM), a magnetic disk, or an optical disk.
Or the above-described integrated units of the application may be stored in a computer-readable storage medium if implemented in the form of software functional modules and sold or used as separate products. Based on such understanding, the technical solutions of the embodiments of the present application may be embodied in essence or a part contributing to the prior art in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in the embodiments of the present application. The storage medium includes various media capable of storing program codes such as a removable storage device, a ROM, a magnetic disk, or an optical disk.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims (8)
1. A control method, the method comprising:
Obtaining a first load parameter of each thread of an application process to be identified, wherein the first load parameter is the time of consuming a corresponding target processor by the thread in unit time;
If the first load parameter meets the load condition, determining that the application process to be identified is a target application process, and adjusting the running mode of the electronic equipment according to the determined control strategy;
The adjusting the operation mode of the electronic equipment according to the determined control strategy comprises the following steps:
Acquiring first attribute information of the target application process and environment parameters of the environment where the electronic equipment is located, and adjusting operation parameters of target components in the electronic equipment according to the first attribute information and the environment parameters, wherein the first attribute information is used for indicating that the target application process is a system process or a third party application process;
And if the first load parameter meets a first condition, determining that the application process to be identified is a target application process comprises the following steps:
Taking the sum of the first load parameters of each thread of the application process to be identified as the second load parameter of the application process to be identified;
and if each first load parameter of the application process to be identified meets a first threshold value and the second load parameter meets a second threshold value, determining the application process to be identified as a target application process, wherein the second threshold value is related to the number of threads included in the application process to be identified.
2. The method of claim 1, wherein adjusting the operating parameters of the target component in the electronic device comprises:
controlling an operating parameter of a target processor in an electronic device to be adjusted from a first operating parameter to a second operating parameter, wherein the target processor has a processing capacity at the second operating parameter that is greater than its processing capacity at the first operating parameter, or,
And controlling a target processor in the electronic equipment to adjust from the current operation parameter to a target operation parameter corresponding to the first attribute information and/or the environment parameter, and/or controlling a target heat dissipation module in the electronic equipment to adjust from a current heat dissipation mode to a first target heat dissipation mode corresponding to the target operation parameter or a second target heat dissipation mode corresponding to the first attribute information and/or the environment parameter.
3. The method of any of claims 1-2, wherein adjusting the operating mode of the electronic device according to the determined control strategy further comprises:
Determining a target processor on which an application process to be identified depends;
If the first application process to be identified runs on the first target processor and the second application process to be identified runs on the second target processor, obtaining a first sub-load parameter of the first application process to be identified and a second sub-load parameter of the second application process to be identified;
and if the sum of the first sub-load parameter and the second sub-load parameter meets the load condition, adjusting the operation parameter of the target component in the electronic equipment.
4. A method according to claim 3, wherein if the sum of the first and second sub-load parameters does not meet the load condition, either part of the threads of the first application process to be identified are run on the second target processor or part of the threads of the second application process to be identified are run on the first target processor.
5. The method of claim 1, wherein adjusting the operating mode of the electronic device according to the determined control strategy further comprises:
Adjusting an operating parameter of a target component in the electronic device according to the second load parameter, and/or,
And obtaining a third load parameter of the target processor, and adjusting the operation parameter of a background application process in the electronic equipment according to the third load parameter.
6. The method of claim 5, wherein adjusting the operating parameters of the background application process in the electronic device according to the third load parameter comprises:
and adjusting the processor kernel on which the background application process runs according to the total utilization rate of the target processor.
7. The method of claim 6, the adjusting processor cores on which the background application process depends according to the total usage of the target processor, comprising:
Monitoring the total utilization rate of the target processor, and if the adjustment condition is met according to the total utilization rate, running all current background application processes in a first target processor kernel set of the target processor, wherein the first target processor kernel set comprises at least one processor kernel of the target processor, or,
And obtaining second attribute information of the background application process, and operating the target background application process in a second target processor kernel set of the target processor according to the second attribute information, wherein the second target processor kernel set comprises at least one processor kernel of the target processor.
8. A control apparatus comprising:
The system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a first load parameter of each thread of an application process to be identified, wherein the first load parameter is the time of consuming a corresponding target processor by the thread in unit time;
The adjustment module is used for determining the application process to be identified as a target application process if the first load parameter meets a load condition, and adjusting the operation mode of the electronic equipment according to the determined control strategy;
The adjustment module is further configured to use a sum of first load parameters of each thread of the application process to be identified as a second load parameter of the application process to be identified, determine that the application process to be identified is a target application process if each first load parameter of the application process to be identified meets a first threshold and the second load parameter meets a second threshold, wherein the second threshold is related to the number of threads included in the application process to be identified, obtain first attribute information of the target application process and obtain environmental parameters of an environment where the electronic device is located, and adjust operation parameters of a target component in the electronic device according to the first attribute information and the environmental parameters, and the first attribute information is used for indicating that the target application process is a system process or a third party application process.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110185314.3A CN112799848B (en) | 2021-02-10 | 2021-02-10 | A control method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110185314.3A CN112799848B (en) | 2021-02-10 | 2021-02-10 | A control method and device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN112799848A CN112799848A (en) | 2021-05-14 |
| CN112799848B true CN112799848B (en) | 2024-12-20 |
Family
ID=75815109
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202110185314.3A Active CN112799848B (en) | 2021-02-10 | 2021-02-10 | A control method and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN112799848B (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113842642B (en) * | 2021-09-29 | 2024-05-28 | 联想(北京)有限公司 | Method for distributing resources for game application and electronic equipment |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105528330A (en) * | 2014-09-30 | 2016-04-27 | 杭州华为数字技术有限公司 | Load balancing method and device, cluster and many-core processor |
| CN110347508A (en) * | 2019-07-02 | 2019-10-18 | Oppo广东移动通信有限公司 | Thread distribution method, device, equipment and the readable storage medium storing program for executing of application program |
| CN111666140A (en) * | 2020-05-28 | 2020-09-15 | 北京百度网讯科技有限公司 | Resource scheduling method, device, equipment and storage medium |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US10025641B2 (en) * | 2015-09-15 | 2018-07-17 | Qualcomm Incorporated | Workload differentiation for processor frequency scaling |
| CN107526640B (en) * | 2017-08-17 | 2020-03-27 | Oppo广东移动通信有限公司 | Resource management method, resource management device, mobile terminal and computer-readable storage medium |
| CN110609743A (en) * | 2018-06-15 | 2019-12-24 | 伊姆西Ip控股有限责任公司 | Method, electronic device and computer program product for configuring resources |
| CN110795323A (en) * | 2019-10-29 | 2020-02-14 | Oppo广东移动通信有限公司 | Load statistical method, device, storage medium and electronic equipment |
| CN111831414A (en) * | 2020-07-01 | 2020-10-27 | Oppo广东移动通信有限公司 | Thread migration method, device, storage medium and electronic device |
| CN112099599A (en) * | 2020-09-08 | 2020-12-18 | 合肥联宝信息技术有限公司 | Temperature control method and device for electronic equipment |
-
2021
- 2021-02-10 CN CN202110185314.3A patent/CN112799848B/en active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105528330A (en) * | 2014-09-30 | 2016-04-27 | 杭州华为数字技术有限公司 | Load balancing method and device, cluster and many-core processor |
| CN110347508A (en) * | 2019-07-02 | 2019-10-18 | Oppo广东移动通信有限公司 | Thread distribution method, device, equipment and the readable storage medium storing program for executing of application program |
| CN111666140A (en) * | 2020-05-28 | 2020-09-15 | 北京百度网讯科技有限公司 | Resource scheduling method, device, equipment and storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN112799848A (en) | 2021-05-14 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8788855B2 (en) | Cluster computational capacity level switching based on demand prediction and stability constraint and power consumption management | |
| CN115599513A (en) | Resource scheduling method and electronic device | |
| US7596705B2 (en) | Automatically controlling processor mode of multi-core processor | |
| CN106133641B (en) | Apparatus, system and method for dynamic power management between heterogeneous processors in a shared power domain | |
| US10064141B2 (en) | Core frequency/count decision-based thermal mitigation optimization for a multi-core integrated circuit | |
| US10168756B2 (en) | Backup power management for computing systems | |
| US20170085084A1 (en) | Accessory-Based Power Distribution | |
| US20170212581A1 (en) | Systems and methods for providing power efficiency via memory latency control | |
| KR20140103971A (en) | Thermally driven workload scheduling in a heterogeneous multi-processor system on a chip | |
| CN103037109B (en) | Multicore equipment energy consumption management method and device | |
| CN108664367B (en) | Power consumption control method and device based on processor | |
| CN112181124B (en) | Method for managing power consumption and related equipment | |
| KR20160085892A (en) | System and method for operating frequency adjustment and workload scheduling in a system on a chip | |
| CN106201707A (en) | Processor resource allocation method and device | |
| JP5568689B2 (en) | System and method for optimizing the composition of a set of performance scaling algorithms | |
| WO2017083170A1 (en) | Latency-based energy storage device selection | |
| US20060294401A1 (en) | Power management of multiple processors | |
| US20230205301A1 (en) | Dynamic adjustment of power modes | |
| CN112799848B (en) | A control method and device | |
| US20250264932A1 (en) | System agnostic autonomous system state management | |
| CN106406494B (en) | A kind of method and terminal of processor scheduling | |
| CN110795323A (en) | Load statistical method, device, storage medium and electronic equipment | |
| CN105045648B (en) | Physical host resource state prediction method under IaaS cloud environment | |
| CN112667478A (en) | Control method and control device | |
| WO2016180241A1 (en) | Energy-conservation management method and apparatus for terminal and terminal |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |