CN112799848A - Control method and device - Google Patents

Control method and device Download PDF

Info

Publication number
CN112799848A
CN112799848A CN202110185314.3A CN202110185314A CN112799848A CN 112799848 A CN112799848 A CN 112799848A CN 202110185314 A CN202110185314 A CN 202110185314A CN 112799848 A CN112799848 A CN 112799848A
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.)
Pending
Application number
CN202110185314.3A
Other languages
Chinese (zh)
Inventor
孟小龙
易贤群
鲁希达
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN202110185314.3A priority Critical patent/CN112799848A/en
Publication of CN112799848A publication Critical patent/CN112799848A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation 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/505Allocation 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/508Monitor

Abstract

The application discloses a control method, which comprises the following steps: 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; and 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. The application also discloses a control device.

Description

Control method and device
Technical Field
The present application relates to computer technologies, and in particular, to a control method and apparatus.
Background
Mobile devices have been robust in hardware performance, but due to battery capacity limitations, the devices cannot always remain in a high power consumption mode of operation. Many mobile devices provide users with multiple performance modes for selection, as they face the problem of maintaining low power consumption while maintaining device performance if they want better standby and use times. Under different performance modes, the performance of a Central Processing Unit (CPU), screen brightness, vibration setting, sound effect setting and other different settings can be adjusted to achieve different user experiences.
When an application program (APP) has a higher demand for a CPU, the mobile device operates in a high-performance mode, and when the APP has a smaller demand for the CPU, the device operates in a low-performance mode, so that the normal operation of the application program is ensured while low power consumption is maintained.
In the related art, the performance requirement of the application program is identified according to the white list, but the application program is identified by mistake.
Disclosure of Invention
In view of this, the present application provides a control method and apparatus.
The technical scheme of the embodiment of the application is realized as follows:
in one aspect, a control method provided in 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 the thread consuming a target processor in unit time;
and 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.
In one aspect, an embodiment of the present application provides a control apparatus, 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, and the first load parameter is the time for the thread to consume a target processor in unit time;
and the adjusting module is used for determining that the application process to be identified is a target application process if the first load parameter meets the load condition, and adjusting the operation mode of the electronic equipment according to the determined control strategy.
In one aspect, an embodiment of the present application further provides an electronic device, where the electronic device includes: a processor and a memory for storing a computer program operable on the processor, wherein the processor is adapted to perform the steps of the above-described control method when executing the computer program.
In one aspect, an embodiment of the present application further provides a storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the control method is implemented.
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 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; therefore, the state of the application process is determined according to the time that the thread consumes the target processor in unit time, the performance requirement of the application process on the electronic equipment is accurately judged, the operation 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 process processing effect of the electronic equipment is improved, and the user experience is improved.
Drawings
FIG. 1 is a schematic flow chart illustrating an alternative control method according to an embodiment of the present disclosure;
FIG. 2 is a schematic flow chart illustrating an alternative control method according to an embodiment of the present disclosure;
FIG. 3 is a schematic flow chart illustrating an alternative control method according to an embodiment of the present disclosure;
FIG. 4 is a diagram illustrating a relationship between a thread and a processor according to an embodiment of the present disclosure;
FIG. 5 is a diagram illustrating a relationship between a thread and a processor according to an embodiment of the present disclosure;
FIG. 6 is a diagram illustrating a relationship between a thread and a processor according to an embodiment of the present disclosure;
FIG. 7 is a schematic diagram of an alternative configuration 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 present application.
Detailed Description
The present application will be described in further detail below with reference to the accompanying drawings and examples. It should be understood that the examples provided herein are merely illustrative of the present application and are not intended to limit the present application. In addition, the following examples are provided as partial examples for implementing the present application, not all examples for implementing the present application, and the technical solutions described in the examples of the present application may be implemented in any combination without conflict.
In various embodiments of the present application: 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;
and 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.
The embodiment of the present application provides a control method, which is applied to a control device, and each functional module in the control device may be cooperatively implemented by hardware resources of an electronic device (such as a terminal device, a server, or a server cluster), such as a computing resource of a processor and the like, a detection resource of a sensor and the like, and a communication resource.
The electronic device may be any electronic device with information processing capability, and in one embodiment, the electronic device may be an intelligent terminal, for example, a mobile terminal such as a notebook with wireless communication capability. In another embodiment, the electronic device may also be a computing-capable terminal device that is not mobile, such as a desktop computer, a server, etc.
In practical application, a control application program runs in the electronic device, and the control method provided by the embodiment of the application can be implemented by the control application program.
Of course, the embodiments of the present application are not limited to being provided as methods and hardware, and may be provided as a storage medium (storing instructions for executing the control method provided by the embodiments of the present application) in various implementations.
Fig. 1 is a schematic flow chart of an implementation process of a control method provided in an embodiment of the present application, and as shown in fig. 1, the control method includes:
s101, obtaining a first load parameter of each thread of the application process to be identified.
The first load parameter is a time that the thread consumes a target processor in a 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. One application program corresponds to one application process, and different application programs correspond to different application processes. Here, the application process in the application process list may include an application process corresponding to the monitoring application.
The electronic device can monitor the creation and exit of the application process in the electronic device through a Windows Management architecture (WMI) component, and update the application process list according to the monitoring result of the 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 can be filtered to obtain the application processes to be identified, and the application processes to be identified can be all or part of the application processes in the application process list. The application process to be identified comprises one or more application processes.
The filtering strategy for the electronic equipment to filter the application process to be identified from the application process list comprises at least one of the following:
filtering a strategy I, and taking the application process selected by a user as an application process to be identified;
filtering strategy two, selecting the application process corresponding to the foreground application program as the application process to be identified;
and filtering the strategy III, and selecting the 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 processes 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 strategy, the electronic device may determine the application program to which each application process in the application process list belongs, and determine whether each application program runs in the foreground or the background, when the application program runs in the foreground, the application process is the foreground application process and is used as the application process to be identified, and when the application program runs in the background, the application process is the background application process and is not the application process to be identified.
Here, the foreground application is an application running in the display interface of the electronic device that is interacting with the user.
In the third filtering policy, the electronic device is provided with an identification list, the identification list includes the application program to be identified, when the application process to which an application process belongs in the application process list is located in the identification list, the application process is the application process to be identified, 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 at all, and a user can set the filtering strategy according to actual requirements.
After the electronic equipment determines the application process to be identified, calculating a first load parameter 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.
An application process includes one or more threads, and for each thread, the electronic device may calculate a first load parameter for the respective thread.
When one application process to be identified comprises a plurality of threads, the first load parameters of the threads can be respectively obtained, wherein target processors consumed by different threads of the same application process can be different or the same. In one example, the application process to be identified includes 3 threads: thread 1, thread 2, and thread 3, the electronic device includes two processors: processor 1 and processor 2, and 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: thread 1, thread 2, and thread 3, the electronic device includes two processors: processor 1 and processor 2, and the target processor consumed by thread 1, thread 2 and thread 3 is processor 1.
For one thread, the electronic device acquires the time that the thread consumes the target processor within a first set time period, and calculates a first load parameter based on the acquired time and the duration of the first set time period. Wherein the target processor is the processor consumed by the thread.
In one example, if the target processor consumed by thread A is processor 1, and the time that thread A consumes processor 1 within 5 seconds is 5 seconds, then the load rate of thread A is 100%, which can be written as 100.
In one example, the target processor consumed by thread B is processor 2, and the time that thread A consumes processor 2 within 5 seconds is 3 seconds, then the load rate of thread B is 60%, which can 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.
For the application process to be identified, after acquiring a first load parameter of a thread of the application process to be identified, the electronic device judges whether the first load parameter of the thread meets a load condition, and when the first load parameter of the thread of the application process to be identified meets the load condition, the application process to be identified is determined to be a target application process. 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 this embodiment, the load condition may be a condition set based on a first load parameter of the thread. In one example, the load conditions are: the first load parameter of the thread satisfies a first threshold. In an example, a sum of the first load parameters of all threads of the same process satisfies a second threshold.
When the application process of an application program is the target application process, the application program is indicated to be the application program with high demand on processor resources.
According to the method and the device, when one or more application processes to be identified exist as target application processes, the operation mode of the electronic equipment is adjusted according to the determined control strategy.
In an example, when there is an 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 a plurality of application processes to be identified exist as target application processes and the number of the target application processes is greater than a reference value, the operation mode of the electronic device is adjusted according to the determined control strategy. The reference value can be 1, 2, etc., and the size of the reference value can be set according to actual requirements.
The electronic equipment adjusts the operation mode of the electronic equipment according to the control strategy, and the operation performance of the electronic equipment can be improved. In one example, an electronic device includes three performance modes: the electronic device comprises a high-performance mode, a normal mode and a quiet mode, and when the electronic device is in the normal mode currently, the electronic device is adjusted to be in the high-performance mode.
In one example, if a target application process exists, the operating parameters of the target component in the electronic device are adjusted, such as: the brightness of the display screen is improved, the main frequency of the target processor is improved, the vibration frequency of the vibration sensor is adjusted, the sound effect of the audio processor is improved, and the heat dissipation mode of the heat dissipation assembly is adjusted.
In one example, first attribute information of a target application process is obtained, and operating parameters of a target component are adjusted according to the first attribute information.
In one example, a second load parameter of the application process to be identified running on different processors is judged, whether the second load parameter of the application process to be identified reaches an upper limit of the processing capacity of the processors is judged, if yes, the parameter of the target component is adjusted, and if not, the 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 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 electronic equipment runs an application program 1, an application program 2 and an application program 3, 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 the running parameter 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 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; therefore, the state of the application process is determined according to the time that the thread consumes the target processor in unit time, the performance requirement of the application process on the electronic equipment is accurately judged, the operation 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 process processing effect of the electronic equipment is improved, and the user experience is improved.
In an embodiment, the step S102 of determining that the application process to be identified is the target application process if the first load parameter satisfies the load condition includes one of the following cases:
in the first situation, 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 the application process to be identified as a target application process if the second load parameter meets a second threshold;
and in a third situation, if the first load parameter of the second thread of the application process to be identified meets a third threshold and the second load parameter of the application process to be identified meets a fourth threshold, determining that the application process to be identified is a target application process.
In the first case, the load conditions are: and if the first load parameter meets the first threshold, 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 first threshold.
Here, when one or more threads of which the first load parameters are greater than the first threshold value are selected from the threads of the application process to be identified, the first load parameters of the threads meet the first threshold value.
In one example, the first threshold is 90, the application process 1 includes thread 1 and thread 2, and the first load parameter of thread 1 is 95, 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, then the application process 1 is the target application process.
In the second case, the load conditions are: and if the sum of the first load parameters of all threads of the same process, namely the second load parameter, meets a second threshold value, determining that the application process to be identified is 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 read directly.
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 applications, the second threshold may be related to the number of threads included in the application process to be identified, such as: when the number of threads included in the application process to be identified is less than 6, the second threshold value is 300, and when the number of threads included in the application process to be identified is greater than 6, the second threshold value is 400. The second threshold may be independent of the number of threads included in the application process to be identified, such as: the second threshold is 400.
In case three above, the load conditions are: and if the first load parameter meets a first threshold value and the second load parameter, which is the sum of the first load parameters of all threads of the process to which the thread belongs, meets a second threshold value, determining that the application process to be identified is the target application process.
And judging the process to be identified from two dimensions of the thread and the process, wherein when the second load parameter of the process to be identified meets a second threshold value and the threads of the process to be identified comprise the threads of which the first load parameters meet the first threshold value, the application process to be identified is a target application process.
In an example, the first threshold is 90, the second threshold is 350, and when the second load parameter of the application process is 300, the following threads are included, and the first load parameters of the threads are: 80. 90, 20, 50, 60, then the application process is not the target application process.
In an example, the first threshold is 90, the second threshold is 350, when the second load parameter of the application process is 400, the following threads are included, and the first load parameters of the threads are: 80. 90, 85, 55, 60, 30, then the application process is not the target application process, then the application process is the target application process.
In an embodiment, the adjusting the operation mode of the electronic device according to the determined control strategy in S102 includes:
adjusting the mode A1, and 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;
and adjusting the mode A2, obtaining first attribute information of the target application process and/or obtaining environment parameters of the environment where the electronic equipment is located, and adjusting the operating parameters of the target component in the electronic equipment according to the first attribute information and/or the environment parameters.
In the above-described adjustment modes a1 and a2, the operation parameters of the target component are adjusted. The target component may include: a processor, a display, a speaker, a vibration sensor, a heat sink assembly, etc. 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, a working voltage, and the like. When the target component includes a display, the operating parameters may include: one or more of resolution, brightness, color temperature, etc. When the target component includes: the speaker, the operational parameters may include: one or more of volume, sound effects, etc. When the target component includes: the vibration sensor, the operating parameters may include: one or more of vibration frequency, vibration amplitude, etc.
The embodiment of the present application does not set any limit to the target component and the operating parameter of the target component.
In the above adjustment mode a2, the operation parameter of the target component is adjusted according to one or a combination of the first attribute information of the target application process and the environment parameter of the environment in which the electronic device is located.
The first attribute information of the target application process comprises: image name, user name, dependent processor, memory, description information, etc. The image name can indicate an application program to which the target application process belongs, and whether the first attribute information comprises 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 running parameters of the target component are adjusted.
In one example, an operating parameter of the target component is adjusted based on the temperature.
In an embodiment, in the adjusting mode a1, adjusting the operating parameter of the target component in the electronic device includes: the method comprises the steps of controlling an operation parameter of a target processor in the electronic equipment to be adjusted from a first operation parameter to a second operation parameter, wherein the processing capacity of the target processor under the second operation parameter is higher than that of the target processor under the first operation parameter.
In the first adjustment strategy, the target component comprises a target processor, namely a processor consumed by the thread of the application process to be identified. At this time, the operation parameters may include: one or more of a main frequency, a frequency multiplication, an external frequency, a bus frequency, a secondary cache, a working voltage, and the like.
At this time, the operation parameter of the target processor is adjusted from the first operation parameter to the second operation parameter, so that the processing of the target processor can be improved.
In the adjustment mode a2, adjusting the operating parameter of the target component in the electronic device includes:
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 environmental 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 to a second target heat dissipation mode corresponding to the first attribute information and/or the environmental parameter.
Here, the target component includes a target processor and/or a thermal module.
And for the target processor, when the operation mode of the electronic equipment is adjusted, adjusting the operation parameters and the target operation parameters of the target processor, wherein the target operation parameters are adaptive to the first attribute information and/or the environmental parameters, so that the performance of the target processor is adaptive to the first attribute information and/or the environmental parameters of the target application process.
And for the target heat dissipation module, adjusting the heat dissipation mode of the target heat dissipation module to be a first heat dissipation mode or a second heat dissipation mode, wherein the first heat dissipation mode is adaptive to the target operation parameters of the target processor, and the second heat dissipation mode is adaptive to the first attribute information and/or the environmental parameters of the target application process. The target radiating assembly has different radiating effects, different emitted noises and the like under different radiating modes.
According to the method and the device, when the target component is adjusted, the target component is adjusted according to the first attribute information and/or the environment parameter of the target application process, so that the adjusted target component is adaptive to the current target application process or the environment where the electronic device is located.
In an embodiment, the adjusting manner for adjusting the operation mode of the electronic device according to the determined control strategy in S102 includes an adjusting manner B, as shown in fig. 2, the adjusting manner B includes:
s1211, determining a target processor on which the application process to be identified depends;
s1212, if the first application process to be identified runs on a first target processor and the second application process to be identified runs on a 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 adjusting mode B, as shown in fig. 3, the adjusting the operation mode of the electronic device according to the determined control strategy in S102 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 processors consumed by the application processes to be identified, namely determines the target processors corresponding to the application processes to be identified. Here, the application processes to be identified may be grouped according to the target processor on which they depend. Such as: the electronic equipment runs an application process to be identified: the method comprises a process 1, a process 2, a process 3 and a process 4, wherein the processor consumed by the process 1 and the process 2 is the processor 1, the process 1 and the process 2 are taken as a first application process to be identified to be grouped into a group, the processor consumed by the process 3 and the process 4 is the processor 2, and the process 3 and the process 4 are taken as a second application process to be identified to be grouped into a group.
And adding the second load parameters of the application processes to be identified in the first identification application process and the second application processes 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, and at the moment, transferring the application processes with identification processed by one processor to the other processor. The second load parameter of the first identified application process is referred to as a first sub-load parameter, and the second load parameter of the second identified application process is referred to as a second sub-load parameter.
The load condition here is a condition set based on a second load parameter, such as: greater than a fifth threshold.
In one example, the fifth threshold is 500, as shown in FIG. 4, the processor consumed by process 1 and process 2 is processor 1, and the processor consumed by process 3 and process 4 is 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 if the fifth threshold is met, the operation parameter of the target component is 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 executed to the processor 1, and the adjustment result is as shown in fig. 5.
Here, when the electronic device includes at least two processors and the sum of second load parameters (including the first load sub-parameter and the second load sub-parameter) of the application processes to be identified, which consume 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 processing capability of the thread is improved without adjusting the operation parameters.
In one embodiment, the operation mode of the electronic device is adjusted according to the determined control strategy in S102, including the adjustment mode C1 and/or the adjustment mode C2, wherein,
adjusting the mode C1, obtaining a second load parameter of the target application process, and adjusting the operation parameter of the 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 running parameter of the background application process in the electronic equipment according to the third load parameter.
In the adjustment mode C1, the operating 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, and the size of the operating parameter may be determined based on the size of the second load parameter.
In an example, when the second load parameter is within the first load range, the target component is determined to be the processor, when the second load parameter is within the second load range, the target component is determined to be the heat dissipation assembly, and when the second load parameter is within the third load range, the target component is determined to be the display. Wherein the first load range, the second load range and the third load range are numerically consecutive.
In one example, the target component is a processor, and the operating parameter is determined to be the main frequency when the second load parameter is within a first load range, and the operating parameter is determined to be the voltage when the second load parameter is less than within the first load range.
In one example, when the type of the target component and the type of the operating parameter are determined, the size of the operating parameter may be determined according to the second load parameter.
In the adjustment mode C2, a third load parameter of the target processor is determined, wherein the third load parameter characterizes an operating time of the target processor per unit of time. When multiple target processors are included, a sum of the third load parameters for each target processor may be determined.
Here, the running parameter of the background application process is 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 running of the background application process. The background application process is an application process corresponding to the background application program. The running parameters of the background application process may include: running state, number of running threads, consumed processors, etc.
In an 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, the adjusting method C2 includes: and adjusting the processor kernel on which the background application process runs according to the total utilization rate of the target processor.
And adding the third load parameters of the target processors to obtain the total utilization rate of the target processors, adjusting the processor cores depended on by the background application process when the total utilization rate of the target processors meets the adjustment condition, and not adjusting the processor cores depended on by the background application process if the total utilization rate of the target processors does not meet the adjustment condition.
Here, the adjustment condition may be that the total utilization rate of the target processor is less than the utilization rate threshold, it is determined that the utilization of the target processor of the current processor does not reach the utilization upper limit of the target processor, and the processor resource may be freed for the target application process by adjusting the processor kernel on which the background application process runs, so as to improve the processing efficiency of the target application process.
In an embodiment, adjusting the processor core on which the background application process runs according to the total utilization of the target processor includes: monitoring the total utilization rate of the target processor, if the total utilization rate is determined to meet the adjustment condition, adjusting the processor kernel on which the background application process runs by an adjusting sub-mode I or an adjusting sub-mode II, wherein,
adjusting a first sub-mode, and 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 the second sub-mode, obtaining second attribute information of the background application process, and running 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.
In the first adjustment mode, all background application processes are run in the first target processor core set, so that the background application processes are limited in the processor cores in the first target processor core set.
Such as: the target processor is an 8-core processor: core 1, core 2 to core 8, the first set of target processor cores comprising: and the kernel 1, the kernel 2 and the kernel 4, and if so, all background application processes run in the kernel 1, the kernel 2 and the kernel 4, so that the background application processes do not occupy processor kernels except the first target processor kernel set.
In the second adjustment mode, the background non-system application process is searched according to the second attribute information of the background application program, and the background non-system application process is limited in the processor cores in the second target processor core set.
Such as: the target processor is an 8-core processor: core 1, core 2 to core 8, the first set of target processor cores comprising: and when the background non-system application process runs in the kernel 1, the kernel 2 and the kernel 3, the background application process does not occupy processor kernels except the second target processor kernel set.
In the embodiment of the application, 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 do not occupy other processor cores except the fixed processor cores, the processor cores can be completely used for processing the target application processes, and the processing performance of the target application processes is improved.
Next, the control method provided in the embodiment of the present application is further described by taking the load parameter as the load factor as an example.
In order to bring a more appropriate performance power consumption scheme to a user, many devices support multiple setting levels, and the device performance levels provided by different setting levels are different, and the consumed power consumption is different. Such as: device support level: a high performance mode (high performance mode), a normal mode (normal mode), and a quiet mode (quiet mode), in which, for device performance, the device performance of the high performance mode, the normal mode, and the quiet mode decreases in order, and for power consumption, the power consumption required for the high performance mode, the normal mode, and the quiet mode decreases in order. When the APP operated by the foreground has a higher demand on the CPU, the equipment is operated in a high performance mode, when the APP operated by the foreground has a smaller demand on the CPU performance, the equipment is operated in a quit mode, how to identify that the foreground application program is the APP with higher energy consumption of the Creator APP and a higher demand on the CPU operational performance, namely the Creator APP, is a key technical point,
at present, whether an APP is a Creator APP is identified by using a white list mode, for an APP, the energy consumption and performance requirements of the APP are dynamically changed, and when the APP is judged by the mode, misjudgment is possible.
In the related art, the CPU utilization rate of the process corresponding to the APP is determined, and the CPU utilization rate is generally a ratio of the CPU time or Cycle Times (Cycle Times) in the process unit time to the total CPU time or Cycle Times of the device.
However, different logical processors (local processors) of different CPUs directly affect the total CPU Times or Cycle Times per unit time of the CPUs, so that the difference of CPU utilization of the same APP in devices with different CPUs is large, and when an application program has only one thread and the thread is running at full load (without any stop in full running), the CPU utilization is low compared with the following cases: an application program corresponds to a plurality of threads but the load rate is not very high (each thread does not need to run with more sleep waiting time) or low, so the CPU utilization rate cannot accurately reflect the requirements of the program on the CPU performance.
In the examples of the present application, the following definitions are made:
load rate, CPU time consumed by a process or thread per unit time, wherein the load rate is independent of the CPU logical processor.
Process load rate, CPU time consumed by a process in a unit of time.
Thread load rate, CPU time consumed by a thread per unit time.
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 CPU time, and the relationship between the utilization rate and the parallel capability provided by the CPU is large. For example, an 8-core 16-thread CPU can provide 16 seconds of parallel operations within one second, for example, when the thread runs at full load, the thread load rate is 100, and the thread CPU usage rate is 1/16-6.25%. For another example, a full thread runs on a 2-core 4-thread machine, the thread load rate is 100, and the CPU usage of the thread is 1/4-25%.
The utilization rate of the CPU is greatly related to the specific CPU, and the CPU occupancy rates of the same APP in different machines are greatly different. For example, when 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 utilization rate, it cannot be accurately determined whether the APP is running at full load, and whether faster or more CPU resources are needed.
Taking the example of measuring the demand of APP on the CPU by the thread load rate, when the thread load rate of the thread in the process is greater than a preset threshold, it indicates that the thread runs fully and has a high demand on the execution speed of the CPU, the performance of the CPU is improved at this time, and thus the execution efficiency of the thread in unit time is improved, otherwise, if the load rates of the threads are all low, it indicates that the threads are all in an idle state in unit time, the execution efficiency of the APP is not greatly improved by the high speed of the CPU, and the performance of the CPU does not need to be improved.
When the requirements of the current APP on the CPU resources in unit time are measured by combining the thread load rate and the process load rate, the requirements of the APP on the CPU performance can be reflected more accurately. Here, the thread load rate may be used as a core condition and the process load rate may be used as an auxiliary condition.
In the embodiment of the application, when the current Creator APP operates, if the CPU utilization rate of the system is too high, the thread of the Creator APP can not be scheduled in time, here, the program occupying high CPU resources in background non-system processes is limited to operate in a fixed CPU core, so that the CPU occupancy rate of the processes is reduced, the foreground Creator APP is ensured to have sufficient CPU resources, and the available CPU resources of the foreground Creator APP are ensured.
The control method provided in the embodiment of the present 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 all the processes in the system.
S602, filtering the process list.
Here, foreground processes are filtered from the process list.
And S603, updating the process list based on the creation or quitting of the process.
The electronic device 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.
And S604, updating the thread list based on the creation or release of the thread.
The electronic device monitors the creation and release of threads of the system using the event mode of the WMI600, and updates the current thread list according to the monitoring result.
And S605, calculating the load rate of the process.
When the load rate of the process is larger than a certain process threshold value, executing S607, otherwise, continuing executing S605
And S606, calculating the load rate of the thread.
And when the load rate of the thread is larger than a certain thread threshold value, determining that the process is the target process, executing S607, and otherwise, continuing to execute S605.
In practical applications, the step S606 may be executed after the load rate of the thread is greater than a certain threshold.
S607, judging whether the process is the target application process.
Here, whether the process is the target application process may be determined if the load rate of the thread is greater than a certain thread threshold, whether the process is the target application process may be determined if the load rate of the process is greater than a certain process threshold, and whether the process is the target application process may be determined if 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 program 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 conditions exist:
when the load of one thread in the process is greater than the threshold1, the load of the process is greater than 198, and the load of the process is 98;
when the load of two threads in the process is greater than the threshold value of 2-88, and the load of the process is greater than 276;
when the load of three threads in the process is greater than the threshold value of 3-80, and the load of the process is greater than 340;
when the load of four threads in the process is greater than the threshold value threshold4, the load of the process is greater than 380;
when the load of five threads in the process is greater than the threshold value threshold5, 60, and the load of the process is greater than 400;
when the load of six threads in the process is greater than the threshold value of 6, the load of the process 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 the threads or the processes is not identified, so that the demand of the APP on the CPU capacity is embodied more accurately.
2. The CPU resource demand of the Creator APP 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, and as shown in fig. 7, the device 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 time for the thread to consume a target processor in unit time;
an adjusting module 702, 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 a determined control policy.
In some embodiments, the adjusting 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 the like, or, alternatively,
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 if the second load parameter meets a second threshold value, determining the application process to be identified as a target application process; or the like, or, alternatively,
and if the first load parameter of the second thread of the application process to be identified meets a third threshold and the second load parameter of the application process to be identified meets a fourth threshold, determining that the application process to be identified is a target application process.
In some embodiments, the adjusting module 702 is further configured to:
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; or the like, or, alternatively,
the method comprises the steps of obtaining first attribute information of a target application process and/or obtaining environment parameters of the environment where the electronic equipment is located, and adjusting operation parameters of a target component in the electronic equipment according to the first attribute information and/or the environment parameters.
In some embodiments, the adjusting module 702 is further configured to:
controlling an operation parameter of a target processor in the electronic equipment to be adjusted from a first operation parameter to a second operation parameter, wherein the processing capacity of the target processor under the second operation parameter is higher than that of the target processor under the first operation parameter; or the like, or, alternatively,
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 environmental 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 a second target heat dissipation mode corresponding to the first attribute information and/or the environmental parameter.
In some embodiments, the adjusting module 702 is further configured to:
determining a target processor on which the application process to be identified depends;
if a first application process to be identified runs on a first target processor and a second application process to be identified runs on a 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 a target component in the electronic equipment.
In some embodiments, the adjusting 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 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.
In some embodiments, the adjusting module 702 is further configured to:
obtaining a second load parameter of a target application process, and adjusting an operation parameter of a target component in the electronic equipment according to the second load parameter; and/or the presence of a gas in the atmosphere,
and acquiring a third load parameter of the target processor, and adjusting the running parameter of the background application process in the electronic equipment according to the third load parameter.
In some embodiments, the adjusting 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 adjusting module 702 is further configured to:
monitoring the total utilization rate of the target processor, and if the total utilization rate is determined to meet an adjustment condition, running all current background application processes in a first target processor core set of the target processor, wherein the first target processor core set comprises at least one processor core of the target processor; or the like, or, alternatively,
and obtaining second attribute information of the background application process, and running 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.
It should be noted that the control device provided in the embodiment of the present application includes each included module, which can be implemented by a processor in an electronic device; of course, the implementation can also be realized through a specific logic circuit; in the implementation process, the Processor may be a Central Processing Unit (CPU), a microprocessor Unit (MPU), a Digital Signal Processor (DSP), a Field Programmable Gate Array (FPGA), or the like.
The above description of the apparatus embodiments, similar to the above description of the method embodiments, has similar beneficial effects as the method embodiments. For technical details not disclosed in the embodiments of the apparatus of the present application, reference is made to the description of the embodiments of the method of the present application for understanding.
An embodiment of the present application provides an electronic device, fig. 8 is a schematic diagram of a composition structure of the electronic device according to the embodiment of the present application, and as shown in fig. 8, the device 800 includes: a processor 801, at least one communication bus 802, at least one external communication interface 804 and memory 805. Wherein the communication bus 802 is configured to enable connective communication between these components. The device 800 may further comprise a user interface 803, the user interface 803 may comprise an API interface, and the external communication interface 804 may comprise a standard wired interface and a wireless interface.
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 the thread consuming a target processor in unit time;
and 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.
Accordingly, an embodiment of the present application further provides a storage medium, i.e., a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the control method described above.
The above description of the electronic device, storage system and computer-readable storage medium embodiments is similar to the description of the method embodiments above, with similar beneficial effects 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, reference is made to the description of the embodiments of the method of the present application for understanding.
In the embodiment of the present application, if the control method is implemented in the form of a software functional module and sold or used as a standalone product, the control method 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 essentially implemented or portions thereof contributing to the prior art may be embodied in the form of a software product stored in a storage medium, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a magnetic disk, or an optical disk. Thus, embodiments of the present 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 the various embodiments of the present application, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application. The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits 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 an … …" 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 in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units; can be located in one place or distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media that can store program codes, such as a removable Memory device, a Read Only Memory (ROM), a magnetic disk, or an optical disk.
Alternatively, the integrated units described above in the present application may be stored in a computer-readable storage medium if they are implemented in the form of software functional modules and sold or used as independent products. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially implemented or portions thereof contributing to the prior art may be embodied in the form of a software product stored in a storage medium, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a removable storage device, a ROM, a magnetic or optical disk, or other various media that can store program code.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by 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 (10)

1. A method of controlling, 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 the thread consuming a target processor in unit time;
and 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.
2. The method of claim 1, wherein determining that the application process to be identified is a target application process if the first load parameter satisfies a first condition comprises:
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 the like, or, alternatively,
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 if the second load parameter meets a second threshold value, determining the application process to be identified as a target application process; or the like, or, alternatively,
and if the first load parameter of the second thread of the application process to be identified meets a third threshold and the second load parameter of the application process to be identified meets a fourth threshold, determining that the application process to be identified is a target application process.
3. The method of claim 2, wherein adjusting the operating mode of the electronic device in accordance with the determined control strategy comprises:
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; or the like, or, alternatively,
the method comprises the steps of obtaining first attribute information of a target application process and/or obtaining environment parameters of the environment where the electronic equipment is located, and adjusting operation parameters of a target component in the electronic equipment according to the first attribute information and/or the environment parameters.
4. The method of claim 3, wherein adjusting an operating parameter of a target component in an electronic device comprises:
controlling an operation parameter of a target processor in the electronic equipment to be adjusted from a first operation parameter to a second operation parameter, wherein the processing capacity of the target processor under the second operation parameter is higher than that of the target processor under the first operation parameter; or the like, or, alternatively,
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 environmental 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 a second target heat dissipation mode corresponding to the first attribute information and/or the environmental parameter.
5. The method of any of claims 1 to 4, wherein adjusting the operational mode of the electronic device in accordance with the determined control strategy comprises:
determining a target processor on which the application process to be identified depends;
if a first application process to be identified runs on a first target processor and a second application process to be identified runs on a 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 a target component in the electronic equipment.
6. The method of claim 5, wherein if the sum of the first and second sub-load parameters does not satisfy the load condition, running a partial thread of the first application process to be identified on the second target processor or running a partial thread of the second application process to be identified on the first target processor.
7. The method of claim 1, wherein adjusting the operating mode of the electronic device in accordance with the determined control strategy comprises:
obtaining a second load parameter of a target application process, and adjusting an operation parameter of a target component in the electronic equipment according to the second load parameter; and/or the presence of a gas in the atmosphere,
and acquiring a third load parameter of the target processor, and adjusting the running parameter of the background application process in the electronic equipment according to the third load parameter.
8. The method of claim 7, 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.
9. The method of claim 8, 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 total utilization rate is determined to meet an adjustment condition, running all current background application processes in a first target processor core set of the target processor, wherein the first target processor core set comprises at least one processor core of the target processor; or the like, or, alternatively,
and obtaining second attribute information of the background application process, and running 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.
10. A control device, 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, and the first load parameter is the time for the thread to consume a target processor in unit time;
and the adjusting module is used for determining that the application process to be identified is a target application process if the first load parameter meets the load condition, and adjusting the operation mode of the electronic equipment according to the determined control strategy.
CN202110185314.3A 2021-02-10 2021-02-10 Control method and device Pending CN112799848A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110185314.3A CN112799848A (en) 2021-02-10 2021-02-10 Control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110185314.3A CN112799848A (en) 2021-02-10 2021-02-10 Control method and device

Publications (1)

Publication Number Publication Date
CN112799848A true CN112799848A (en) 2021-05-14

Family

ID=75815109

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110185314.3A Pending CN112799848A (en) 2021-02-10 2021-02-10 Control method and device

Country Status (1)

Country Link
CN (1) CN112799848A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113842642A (en) * 2021-09-29 2021-12-28 联想(北京)有限公司 Method for allocating resources for game application and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
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
CN107526640A (en) * 2017-08-17 2017-12-29 广东欧珀移动通信有限公司 Method for managing resource, device, mobile terminal and computer-readable recording medium
CN110795323A (en) * 2019-10-29 2020-02-14 Oppo广东移动通信有限公司 Load statistical method, device, storage medium and electronic equipment
CN111666140A (en) * 2020-05-28 2020-09-15 北京百度网讯科技有限公司 Resource scheduling method, device, equipment and storage medium
CN111831414A (en) * 2020-07-01 2020-10-27 Oppo广东移动通信有限公司 Thread migration method and device, storage medium and electronic equipment
CN112099599A (en) * 2020-09-08 2020-12-18 合肥联宝信息技术有限公司 Temperature control method and device for electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
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
CN107526640A (en) * 2017-08-17 2017-12-29 广东欧珀移动通信有限公司 Method for managing resource, device, mobile terminal and computer-readable recording medium
CN110795323A (en) * 2019-10-29 2020-02-14 Oppo广东移动通信有限公司 Load statistical method, device, storage medium and electronic equipment
CN111666140A (en) * 2020-05-28 2020-09-15 北京百度网讯科技有限公司 Resource scheduling method, device, equipment and storage medium
CN111831414A (en) * 2020-07-01 2020-10-27 Oppo广东移动通信有限公司 Thread migration method and device, storage medium and electronic equipment
CN112099599A (en) * 2020-09-08 2020-12-18 合肥联宝信息技术有限公司 Temperature control method and device for electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113842642A (en) * 2021-09-29 2021-12-28 联想(北京)有限公司 Method for allocating resources for game application and electronic equipment

Similar Documents

Publication Publication Date Title
US8788855B2 (en) Cluster computational capacity level switching based on demand prediction and stability constraint and power consumption management
US8413154B2 (en) Energy-aware computing environment scheduler
US7596705B2 (en) Automatically controlling processor mode of multi-core processor
US7386743B2 (en) Power-managed server and method for managing power consumption
US8065541B2 (en) Server power consumption controller, and method and computer program for controlling server power consumption
US10168756B2 (en) Backup power management for computing systems
TWI475365B (en) Hierarchical power smoothing
US20090031153A1 (en) Power Management Server for Managing Power Consumption
US20100251254A1 (en) Information processing apparatus, storage medium, and state output method
TW200404199A (en) Method for managing power consumption in computer servers
US10064141B2 (en) Core frequency/count decision-based thermal mitigation optimization for a multi-core integrated circuit
KR101448974B1 (en) Systems and methods for optimizing the configuration of a set of performance scaling algorithms
KR20160085892A (en) System and method for operating frequency adjustment and workload scheduling in a system on a chip
US20160328349A1 (en) System and method for optimized thermal control for management controller offline
US20170212581A1 (en) Systems and methods for providing power efficiency via memory latency control
CN106650409B (en) A kind of terminal control method and terminal
CN112799848A (en) Control method and device
US20120240125A1 (en) System Resource Management In An Electronic Device
WO2016180241A1 (en) Energy-conservation management method and apparatus for terminal and terminal
CN110795323A (en) Load statistical method, device, storage medium and electronic equipment
WO2020206688A1 (en) Video playback method and apparatus, storage medium and electronic device
CN105100505A (en) Method and system for assigning battery level to terminal applications
US11556166B2 (en) Method for controlling energy saving, and apparatus therefor
CN113439252B (en) Terminal control method and device, storage medium and electronic equipment
KR100934243B1 (en) How to control CIFIL clock frequency in portable electronic devices

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