Processor power consumption control method and device for relaxed execution time

By dividing the application into multiple program segments and controlling the processor frequency based on historical performance characteristics data, the contradiction between processor power consumption and running speed is solved, and power consumption reduction is achieved while meeting the application duration requirements.

CN118444766BActive Publication Date: 2025-08-19BEIJING KAPULA SCI&TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410597285.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-14
Publication Date
2025-08-19
Estimated Expiration
2044-05-14

AI Technical Summary

Technical Problem

When the prior art reduces processor power consumption, it is easy to cause the application to run slowly and the calculation cannot be completed within a specified time, especially for applications that have an important impact on life, such as weather forecasts.

Method used

The application is divided into multiple program segments. The processor maintains the same frequency within the same program segment. It determines the energy consumption-time sensitivity based on the historical performance characteristic data of each program segment, obtains the slack execution time threshold, and controls the processor frequency to meet the running time requirements while reducing power consumption.

Benefits of technology

Without affecting the operation time of the application, it effectively reduces processor power consumption and avoids the problem of running slow speed caused by frequency reduction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118444766B_ABST
    Figure CN118444766B_ABST
Patent Text Reader

Abstract

An embodiment of the present invention provides a method and device for controlling processor power consumption for relaxed execution time, relating to the field of data processing technology. The method comprises: dividing an application into multiple program fragments, wherein a processor maintains the same operating frequency within the same program fragment; determining the energy consumption-duration sensitivity of each program fragment based on historical performance characteristic data of each program fragment, wherein the energy consumption-duration sensitivity is used to quantify the degree of impact on the operating power consumption when the program fragment runtime is changed by changing the processor operating frequency; obtaining a relaxed execution time threshold of the application, wherein the relaxed execution time threshold is used to indicate the maximum acceptable runtime of the application; and controlling the operating frequency of the processor when running each program fragment based on the relaxed execution time threshold of the application and the energy consumption-duration sensitivity of each program fragment, thereby reducing the power consumption of the processor as much as possible while meeting the runtime requirements of the application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of data processing technology, and in particular to a method and device for controlling processor power consumption for relaxing execution time. Background Art

[0002] Modern high-performance computers or data processing centers utilize a large number of computing nodes and multi-core processors, resulting in enormous power consumption. This not only creates difficulties in computer room construction and urban power supply, but also leads to high operational and maintenance costs for these computers and data processing centers. In some areas, there is even a situation where supercomputing centers or data processing centers have the money to build but not the money to maintain them. Therefore, reducing power consumption is of vital importance and imperative.

[0003] The processor is one of the components on a computer that consumes the most power, and its power consumption is closely related to its operating frequency. Therefore, reducing the processor's operating frequency is often used as an important means to reduce power consumption. A commonly used technical solution is to reduce the processor's operating frequency throughout the entire application's execution. Some applications running on high-performance computers not only need to be started regularly at a certain frequency, but also need to complete calculations within a specified time. For example, applications such as weather forecasts, which have a significant impact on people's daily lives, usually need to be started daily (e.g., at midnight each day) and complete calculations within a specified wall-clock time (e.g., 2 hours). Reducing the processor's operating frequency throughout the application's execution can easily cause the application's execution speed to slow down significantly, significantly increase its execution time, and even prevent applications such as weather forecasts from completing calculations within the specified wall-clock time. Summary of the Invention

[0004] The embodiments of the present invention provide a method and apparatus for controlling processor power consumption with a relaxed execution duration, so as to reduce the power consumption of the processor as much as possible while meeting the application program execution duration requirement.

[0005] In a first aspect, an embodiment of the present invention provides a method for controlling processor power consumption for a relaxed execution time, comprising:

[0006] Divide the application into multiple program fragments, and the processor maintains the same operating frequency within the same program fragment;

[0007] Determining the energy consumption-duration sensitivity of each program fragment based on historical performance characteristic data of each program fragment, wherein the energy consumption-duration sensitivity is used to quantify the impact of changing the program fragment's running time by changing the processor's operating frequency on the running power consumption;

[0008] Obtain the slack execution time threshold of the application, which indicates the maximum acceptable runtime of the application.

[0009] According to the relaxed execution time threshold of the application program and the energy consumption-duration sensitivity of each program fragment, the operating frequency of the processor when running each program fragment is controlled.

[0010] In one embodiment, the energy consumption-duration sensitivity is used to represent the amount of energy consumption that can be reduced by increasing the unit running time or the amount of energy consumption that can be increased by reducing the unit running time. The energy consumption-duration sensitivity S of the program segment is determined according to the following expression:

[0011]

[0012] Among them, T1 represents the running time of the processor running the program fragment at the first operating frequency; W1 represents the power of the processor when running the program fragment at the first operating frequency; T2 represents the running time of the processor running the program fragment at the second operating frequency; W2 represents the power of the processor when running the program fragment at the second operating frequency; the first operating frequency is different from the second operating frequency.

[0013] In one embodiment, controlling the operating frequency of a processor when running each program fragment based on a relaxed execution time threshold of an application program and the energy consumption-duration sensitivity of each program fragment includes:

[0014] Reduce the operating frequency of the processor when the program fragment has a running energy consumption-duration sensitivity greater than a preset first sensitivity threshold, and / or increase the operating frequency of the processor when the program fragment has a running energy consumption-duration sensitivity less than a preset second sensitivity threshold, and make the total running time of the application less than or equal to the relaxed execution time threshold, and the preset first sensitivity threshold is greater than the preset second sensitivity threshold.

[0015] In one embodiment, controlling the operating frequency of a processor when running each program fragment based on a relaxed execution time threshold of an application program and the energy consumption-duration sensitivity of each program fragment includes:

[0016] Determining a baseline launch execution from a historical launch execution database of the application, the historical launch execution database including the total runtime of each run in multiple launch executions, the operating frequency and runtime of each program fragment;

[0017] The operating frequency of the processor when running each program fragment is controlled according to the benchmark startup execution, the relaxation execution time threshold and the energy consumption-duration sensitivity of each program fragment.

[0018] In one embodiment, controlling the operating frequency of the processor when executing each program fragment includes:

[0019] When the total running time of the benchmark startup execution is less than or equal to the relaxation execution time threshold and the relative difference between the two is less than the preset ratio threshold, the operating frequency of each program fragment in the benchmark startup execution is determined as the operating frequency of the processor when the respective program fragments are currently running.

[0020] In one embodiment, controlling the operating frequency of the processor when executing each program fragment includes:

[0021] When the total running time of the baseline startup execution is less than the relaxed execution time threshold and the relative difference between the two is greater than or equal to the preset ratio threshold, the difference between the relaxed execution time threshold and the total running time of the baseline startup execution is determined as the execution time that can be increased;

[0022] Determining the operating frequency of each program fragment during the benchmark startup execution as the benchmark operating frequency of the processor when the respective program fragment is currently running;

[0023] determining a program segment whose base operating frequency is greater than the lowest operating frequency of the processor as a potential frequency reduction program segment;

[0024] Sorting all potential frequency reduction program segments according to energy consumption-duration sensitivity from large to small, or dividing all potential frequency reduction program segments into multiple subsets according to energy consumption-duration sensitivity from large to small and sorting them according to running time from large to small within each subset;

[0025] The increase in the running time of each potential frequency reduction program fragment after the operating frequency is reduced is determined in order of ranking. When the increase in the running time is less than or equal to the increaseable execution time, the reduced operating frequency is determined as the target operating frequency of the potential frequency reduction program fragment, and the increase in the running time is subtracted from the increaseable execution time.

[0026] In one embodiment, controlling the operating frequency of the processor when executing each program fragment includes:

[0027] When the total running time of the benchmark startup execution is greater than the relaxed execution time threshold, the difference between the total running time of the benchmark startup execution and the relaxed execution time threshold is determined as the execution time that should be reduced;

[0028] Determining the operating frequency of each program fragment during the benchmark startup execution as the benchmark operating frequency of the processor when the respective program fragment is currently running;

[0029] determining a program segment whose base operating frequency is lower than the maximum operating frequency of the processor as a potential frequency-upgrading program segment;

[0030] Sorting all potential upscaling program segments in ascending order of energy consumption-duration sensitivity, or dividing all potential upscaling program segments into multiple subsets in ascending order of energy consumption-duration sensitivity and sorting them in descending order of running time within each subset;

[0031] Determine the reduction in running time of each potential up-clocking program fragment after the operating frequency is increased in order of ranking, determine the increased operating frequency as the target operating frequency of the potential up-clocking program fragment, and subtract the reduction in running time from the execution time to be reduced until the execution time to be reduced is less than or equal to 0.

[0032] In one embodiment, the method further includes:

[0033] The historical startup execution database is updated using the total running time of the currently running application, the working frequency and running time of each program fragment.

[0034] In one embodiment, the application is divided into multiple program segments by inserting operating frequency control instructions into the application, and the operating frequency control instructions are inserted by one or more of the following methods:

[0035] In response to calling a program interface for adding an operating frequency control instruction, inserting an operating frequency control instruction into an application program;

[0036] Insert operating frequency control instructions before and after function calls, before and after loops, before and after I / O operations, or before and after communications through the compiler;

[0037] When the application is running, the operating frequency control command is inserted into the application at intervals according to the number of completed instructions;

[0038] Insert operating frequency control commands based on the performance characteristics of each program location in the application program obtained by the performance analysis tool.

[0039] In one embodiment, the method further includes:

[0040] When the ratio of the execution time of the operating frequency control instruction to the running time of the corresponding program segment is greater than a preset threshold, the program segment corresponding to the operating frequency control instruction is merged with the adjacent program segment.

[0041] In a second aspect, an embodiment of the present invention provides a processor power consumption control device for relaxing execution time, comprising:

[0042] A partitioning module is used to divide an application into multiple program segments, and the processor maintains the same operating frequency within the same program segment;

[0043] a processing module for determining an energy consumption-duration sensitivity of each program fragment based on historical performance characteristic data of each program fragment, wherein the energy consumption-duration sensitivity is used to quantify the impact of changing the program fragment's running time on running power consumption by changing the processor's operating frequency;

[0044] An acquisition module, configured to acquire a slack execution time threshold of an application program, where the slack execution time threshold is used to indicate a maximum acceptable running time of the application program;

[0045] The control module is used to control the operating frequency of the processor when running each program fragment according to the relaxed execution time threshold of the application program and the energy consumption-duration sensitivity of each program fragment.

[0046] In a third aspect, an embodiment of the present invention provides an electronic device, including:

[0047] at least one processor and memory;

[0048] Memory stores computer-executable instructions;

[0049] At least one processor executes computer-executable instructions stored in the memory, so that the at least one processor executes the processor power consumption control method for relaxed execution time as described in any one of the first aspects.

[0050] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer execution instructions, which, when executed by a processor, are used to implement the processor power consumption control method for relaxed execution time as described in any one of the first aspects.

[0051] The embodiments of the present invention provide a method and device for controlling processor power consumption for relaxed execution time. By dividing an application into multiple program fragments, the processor maintains the same operating frequency within the same program fragment; the energy consumption-duration sensitivity of each program fragment is determined based on historical performance characteristic data of each program fragment, and the energy consumption-duration sensitivity is used to quantify the degree of influence on the operating power consumption when the program fragment running time is changed by changing the processor operating frequency; the relaxed execution time threshold of the application is obtained, and the relaxed execution time threshold is used to indicate the maximum acceptable running time of the application; according to the relaxed execution time threshold of the application and the energy consumption-duration sensitivity of each program fragment, the operating frequency of the processor when running each program fragment is controlled, so as to reduce the power consumption of the processor as much as possible while meeting the application running time requirement. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0053] Figure 1 A flowchart of a method for controlling processor power consumption for relaxed execution time provided by an embodiment of the present invention;

[0054] Figure 2 A schematic diagram of the structure of a processor power consumption control device for relaxing execution time provided by an embodiment of the present invention;

[0055] Figure 3 A schematic structural diagram of an electronic device provided by an embodiment of the present invention.

[0056] The above drawings illustrate specific embodiments of the present invention, which will be described in more detail below. These drawings and the accompanying description are not intended to limit the scope of the present invention in any way, but rather to illustrate the concept of the present invention to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION

[0057] The present invention will be further described in detail below by means of specific embodiments in conjunction with the accompanying drawings. Similar elements in different embodiments are numbered with associated similar elements. In the following embodiments, many detailed descriptions are provided to enable the present application to be better understood. However, those skilled in the art will readily appreciate that some of the features may be omitted in different circumstances, or may be replaced by other elements, materials, or methods. In some cases, some operations related to the present application are not shown or described in the specification. This is to avoid the core portion of the present application being overwhelmed by excessive descriptions, and for those skilled in the art, it is not necessary to describe these related operations in detail. They will fully understand the related operations based on the description in the specification and the general technical knowledge in the art.

[0058] In addition, the features, operations, or characteristics described in the specification may be combined in any appropriate manner to form various embodiments. Furthermore, the steps or actions in the method description may be reordered or adjusted in a manner readily apparent to those skilled in the art. Therefore, the various sequences in the specification and drawings are provided solely for the purpose of clearly describing a particular embodiment and are not intended to be mandatory, unless otherwise specified.

[0059] The serial numbers assigned to components herein, such as "first," "second," etc., are used solely to distinguish the objects being described and do not convey any sequential or technical meaning. References to "connection" and "coupling" herein, unless otherwise specified, include both direct and indirect connections (couplings).

[0060] Applications that have a significant impact on people's daily lives, such as weather forecasting, typically need to start up daily (e.g., at midnight) and complete calculations within a specified wall-clock time (e.g., two hours). Furthermore, with increasing demands for forecast accuracy and sophistication, weather forecast programs are using tens or even hundreds of thousands of processor cores. This consumes significant amounts of power, making it imperative to reduce the power consumption of these applications. The processor is one of the most power-hungry components in a computer. Its power consumption is closely related to its operating frequency, and power consumption is often a superlinear function of operating frequency. For example, doubling the processor's operating frequency can nearly quadruple its power consumption. To reduce power consumption, many processors feature a low-frequency operating mode, allowing them to "standby" at their lowest frequency when no tasks are running. Some processors even offer multiple frequency settings. For example, a given processor may have three frequency settings: full frequency, 1 / 2 full frequency, and 1 / 4 full frequency, corresponding to power consumption of full, 2 / 7 full, and 1 / 10 full.

[0061] A complex application may be composed of many program fragments with different performance characteristics, and the degree of speed reduction of program fragments with different performance characteristics is different in sensitivity to the degree of reduction in the operating frequency of the processor: for example, computationally intensive program fragments are highly sensitive to a reduction in the operating frequency, while memory-intensive, communication-intensive, or I / O-intensive program fragments are less sensitive to a reduction in the operating frequency. Therefore, adopting different frequency reduction schemes for program fragments with different performance characteristics or formulating frequency reduction schemes for each program fragment separately can help achieve the goal of reducing power consumption as much as possible without reducing the program's running speed. Considering that in most cases, users can also accept a reduction in the running speed of the application within a certain range (even weather forecast programs are no exception). Of course, for different types of applications, different users of the same application, or in different application scenarios of the application, the acceptable range of running speed reduction is not the same. So how to reduce the power consumption of the processor as much as possible while meeting the application's running time requirements is the problem that this application is committed to solving. The following will further illustrate this application through specific embodiments.

[0062] Figure 1 This is a flowchart of a method for controlling processor power consumption for relaxed execution time provided by an embodiment of the present invention. Figure 1 As shown, the processor power consumption control method for relaxed execution time provided in this embodiment may include:

[0063] S101 , dividing an application program into multiple program segments, and maintaining a same operating frequency of the processor within the same program segment.

[0064] Considering that an application is typically composed of multiple program fragments with different performance characteristics, and that the degree of speed reduction in program fragments with different performance characteristics is differently sensitive to the degree of operating frequency reduction, the processor can be allowed to use different operating frequencies when running different program fragments. In this embodiment, the application can be divided into multiple program fragments. When running within the same program fragment, the processor's operating frequency remains the same. The processor's operating frequency can be different or the same between different program fragments, and this embodiment does not impose any restrictions on this.

[0065] Adjacent program fragments can be separated by a special instruction, called an operating frequency control instruction. This instruction can terminate the previous program fragment and start the next one. Considering that many applications perform recursive calls or iterative calculations throughout their code, a single program fragment may be executed multiple times throughout the application's execution.

[0066] The operating frequency control instructions can be added to the running process of the application program based on manual methods or automatic methods. For the manual method, a program interface for adding the operating frequency control instruction call can be provided to the application developer, so that the application developer can add the call according to the characteristics of the application. For the automatic method, the compiler can automatically add the operating frequency control instructions. For example, the compiler can add the operating frequency control instructions before and after function calls, before and after loops, before and after I / O operations, before and after communications, etc.; the operating frequency control instructions can also be added at intervals according to the threshold of the number of instructions completed when the program is running. In addition, some performance analysis tools can sample the operating overhead and performance characteristics of each program location of the application program based on the performance counters of the processor. Therefore, the operating frequency control instructions can be inserted based on the analysis results obtained by the performance analysis tool, so that the performance characteristics of different program locations in the same program segment are as similar as possible.

[0067] That is, in an optional implementation, the application program may be divided into multiple program segments by inserting an operating frequency control instruction into the application program, and the operating frequency control instruction may be inserted by one or more of the following methods:

[0068] In response to calling a program interface for adding an operating frequency control instruction, inserting an operating frequency control instruction into an application program;

[0069] Insert operating frequency control instructions before and after function calls, before and after loops, before and after I / O operations, or before and after communications through the compiler;

[0070] When the application is running, the operating frequency control command is inserted into the application at intervals according to the number of completed instructions;

[0071] Insert operating frequency control commands based on the performance characteristics of each program location in the application program obtained by the performance analysis tool.

[0072] S102. Determine the energy consumption-duration sensitivity of each program fragment based on historical performance characteristic data of each program fragment. The energy consumption-duration sensitivity is used to quantify the impact of changing the program fragment's running time by changing the processor's operating frequency on the running power consumption.

[0073] Many applications (such as weather forecasting programs) are repeatedly launched and executed on the same high-performance computer with similar inputs, and the performance characteristics between these launches are similar. This similarity in performance characteristics can be manifested in similar performance event data (such as the number of instructions completed, memory access performance and behavioral characteristics, instruction-level parallelism, etc.), similar total run time (a program fragment may run multiple times during a single application run), and similar total number of runs between multiple launches of a program fragment. Alternatively, it can be manifested in similar performance event data or similar run time between multiple runs of a program fragment during a single launch of an application.

[0074] The performance characteristic data of running the same program fragment several times at different operating frequencies can be obtained in a variety of ways: 1) Run the application program multiple times using different operating frequencies (each time the application program fragments use the same operating frequency), and each time the performance characteristic data of each program fragment will be obtained; 2) In the process of running the application program once, the operating frequency of running a program fragment is continuously changed to obtain the performance characteristic data of the program fragment at different operating frequencies. Furthermore, the performance characteristic data of each program fragment at different operating frequencies can also be recorded and saved as the historical performance characteristic data of the application program for subsequent startup execution of the application program. For example, a historical startup execution database of the application program can be constructed based on the total running time, the operating frequency and the running time of each program fragment during the multiple historical startup executions of the application program. The performance characteristic data of the program fragment may, for example, include the operating frequency and running time of the program fragment, as well as the power corresponding to the operating frequency.

[0075] In this embodiment, the energy consumption-duration sensitivity can be used to quantify the impact of changing the runtime of a program segment on the running power consumption. On the one hand, the energy consumption-duration sensitivity can be used to quantify the degree of reduction in running power consumption when increasing the running time of a program segment; on the other hand, the energy consumption-duration sensitivity can be used to quantify the degree of increase in running power consumption when reducing the running time of a program segment. In other words, the energy consumption-duration sensitivity can be used to represent the amount of energy consumption that can be reduced by increasing the unit running time or the amount of energy consumption that can be increased by reducing the unit running time, so the unit of energy consumption-duration sensitivity can usually be kilowatt-hours per second or kilojoules per second.

[0076] For example, given a program fragment R, when the operating frequency is the first operating frequency F1 (first gear or highest gear), the total running time of R is T1, and when the operating frequency is the first operating frequency F2 (second gear or second highest gear), the total running time of R is T2, then the energy consumption-duration sensitivity when the operating frequency of R is reduced from F1 to F2 is: (T1*W1-T2*W2) / (T2-T1), where W1 and W2 are the power (usually in watts) when the operating frequencies are F1 and F2 respectively. It should be noted that the power mentioned here can cover not only the power of the processor, but also the power of other hardware in the computing node (such as memory and fans, etc.), and even the power of the entire high-performance computing system (including air conditioning and network, etc.). Therefore, based on the performance characteristic data of running a program fragment at different operating frequencies, the energy consumption-duration sensitivity of the program fragment when changing from one gear of the operating frequency to another can be determined. When a processor has multiple operating frequency levels to choose from, that is, a program fragment can have multiple operating frequency levels to choose from, and thus a program fragment can have multiple energy consumption-duration sensitivities. There may even be processors whose operating frequency can be set arbitrarily (i.e., the processor has an infinite number of operating frequency levels), in which case several operating frequency levels can also be set.

[0077] In an optional implementation, the energy consumption-duration sensitivity S of a program segment may be determined according to the following expression:

[0078]

[0079] Among them, T1 represents the running time of the processor running the program fragment at the first operating frequency; W1 represents the power of the processor when running the program fragment at the first operating frequency; T2 represents the running time of the processor running the program fragment at the second operating frequency; W2 represents the power of the processor when running the program fragment at the second operating frequency; the first operating frequency is different from the second operating frequency.

[0080] S103: Obtain a relaxed execution time threshold of the application program, where the relaxed execution time threshold is used to indicate a maximum acceptable running time of the application program.

[0081] The relaxed execution time threshold in this embodiment indicates the maximum acceptable runtime of an application. It can be set manually by the user, for example, by providing the user with an excuse to set the relaxed execution time threshold. Alternatively, it can be automatically determined based on historical runtime data, for example, based on historical runtimes and user satisfaction with the runtime. It should be noted that the relaxed execution time threshold should be greater than the duration of a single startup execution of the application at its maximum operating frequency (the application's minimum runtime).

[0082] S104 : Controlling the operating frequency of the processor when running each program fragment according to the relaxed execution time threshold of the application program and the energy consumption-duration sensitivity of each program fragment.

[0083] When the application's slack execution duration threshold exceeds the application's current predicted runtime (based on historical runtime data), operating power consumption can be reduced by increasing the application's runtime. Energy-duration sensitivity indicates the amount of energy consumption that can be reduced by increasing the runtime per unit. Given a given increase in runtime, a greater energy-duration sensitivity results in a greater reduction in power consumption. Therefore, the processor's operating frequency is prioritized when executing program segments with high energy-duration sensitivity to minimize power consumption.

[0084] When the application's current predicted runtime (based on historical runtime data) exceeds the application's relaxed execution duration threshold (which is not permitted), the relaxed execution duration threshold can be met by reducing the application's runtime. Energy-duration sensitivity represents the amount of energy consumption that can be increased by reducing a unit of runtime. Given a fixed runtime reduction, the lower the energy-duration sensitivity, the less power consumption will be increased. Therefore, the processor's operating frequency is prioritized when running program segments with low energy-duration sensitivity to minimize the increase in power consumption.

[0085] To sum up, based on the relaxed execution time threshold of the application and the energy consumption-duration sensitivity of each program fragment, the operating frequency of the processor when running each program fragment is controlled. Specifically, it can include: reducing the operating frequency of the processor when running a program fragment whose energy consumption-duration sensitivity is greater than a preset first sensitivity threshold, and / or increasing the operating frequency of the processor when running a program fragment whose energy consumption-duration sensitivity is less than a preset second sensitivity threshold, and making the total running time of the application less than or equal to the relaxed execution time threshold, and the preset first sensitivity threshold is greater than the preset second sensitivity threshold.

[0086] The present embodiment provides a method for controlling processor power consumption for relaxed execution time. The method divides an application into multiple program fragments, and the processor maintains the same operating frequency within the same program fragment. The method determines the energy consumption-duration sensitivity of each program fragment based on historical performance characteristic data of each program fragment. The energy consumption-duration sensitivity is used to quantify the degree of impact on the operating power consumption when the program fragment running time is changed by changing the processor operating frequency. The relaxed execution time threshold of the application is obtained. The relaxed execution time threshold is used to indicate the maximum acceptable running time of the application. The method controls the operating frequency of the processor when running each program fragment based on the relaxed execution time threshold of the application and the energy consumption-duration sensitivity of each program fragment, so as to reduce the power consumption of the processor as much as possible while meeting the application running time requirements.

[0087] Based on the above embodiments, the specific implementation method for controlling the operating frequency of the processor when running each program fragment will be further described in detail below. The operating frequency can be controlled based on the historical startup execution of the application as a benchmark. Based on the above embodiments, in the processor power consumption control method for relaxed execution time provided in this embodiment, based on the relaxed execution time threshold of the application and the energy consumption-duration sensitivity of each program fragment, controlling the operating frequency of the processor when running each program fragment can specifically include: determining a benchmark startup execution from the application's historical startup execution database, the historical startup execution database including the total runtime of each run in multiple startup executions, the operating frequency of each program fragment, and the runtime; controlling the operating frequency of the processor when running each program fragment based on the benchmark startup execution, the relaxed execution time threshold, and the energy consumption-duration sensitivity of each program fragment. Specifically, determining the benchmark startup execution from the application's historical startup execution database can be one of the following methods: the startup execution with the total runtime closest to the relaxed execution time threshold among all historical startup executions; the startup execution with the startup execution time closest to the current time; or the startup execution with the highest operating frequency for all program fragments.

[0088] The following three cases illustrate how to start execution based on the benchmark and control the processor's operating frequency when running each program fragment.

[0089] In the first case, if the total running time of the benchmark history startup execution is very close to the relaxed execution time threshold (for example, the relative difference does not exceed a given ratio threshold such as 1%), the operating frequency of each program fragment currently started can be kept the same as that of the benchmark history startup execution. That is to say, in the processor power consumption control method for relaxed execution time provided in this embodiment, the operating frequency of the processor when running each program fragment is controlled, which can specifically include: when the total running time of the benchmark startup execution is less than or equal to the relaxed execution time threshold and the relative difference between the two is less than a preset ratio threshold, the operating frequency of each program fragment in the benchmark startup execution is determined as the operating frequency of the processor when currently running each program fragment. Among them, the relative difference can be obtained by dividing the absolute value of the difference between the total running time of the benchmark startup execution and the relaxed execution time threshold by the relaxed execution time threshold.

[0090] In the second case, the duration of the baseline historical startup execution is less than and not close to the relaxed execution duration threshold. The difference between the relaxed execution duration and the baseline historical startup execution duration is determined as the increaseable execution duration. Then, the operating frequency of each program fragment in the baseline historical startup execution is set as the benchmark, and combined with the historical performance characteristic data, the energy consumption-duration sensitivity of each program fragment when the operating frequency is reduced is determined. Then, based on the increaseable execution duration, the energy consumption-duration sensitivity of each program fragment, and the total running time information of each program fragment at various operating frequencies, the number of program fragments whose operating frequencies are to be reduced and the target operating frequency of each program fragment after the reduction are determined. A specific approach may be to first sort all program fragments whose operating frequency can still be reduced (the operating frequency cannot be further reduced when it has reached the lowest level) according to a certain sorting rule, and then check each sorted program fragment in turn until the remaining increaseable execution time becomes 0 (or the remaining increaseable execution time is less than the increase in execution time after the operating frequency of any program fragment is reduced); when checking a program fragment, determine the increase in execution time after its operating frequency is reduced, and then when the increase does not exceed the remaining increaseable execution time, determine the target operating frequency of the program fragment and reduce the remaining increaseable execution time accordingly. The sorting rule may be to sort from large to small according to energy consumption-duration sensitivity; or it may be to divide the energy consumption-duration sensitivity into several value ranges from large to small, and sort the multiple program fragments in each value range from large to small according to the various total running times.

[0091] That is, in the processor power consumption control method for relaxing execution time provided by this embodiment, controlling the operating frequency of the processor when running each program fragment may specifically include:

[0092] When the total running time of the baseline startup execution is less than the relaxed execution time threshold and the relative difference between the two is greater than or equal to the preset ratio threshold, the difference between the relaxed execution time threshold and the total running time of the baseline startup execution is determined as the execution time that can be increased;

[0093] Determining the operating frequency of each program fragment during the benchmark startup execution as the benchmark operating frequency of the processor when the respective program fragment is currently running;

[0094] determining a program segment whose base operating frequency is greater than the lowest operating frequency of the processor as a potential frequency reduction program segment;

[0095] Sorting all potential frequency reduction program segments according to energy consumption-duration sensitivity from large to small, or dividing all potential frequency reduction program segments into multiple subsets according to energy consumption-duration sensitivity from large to small and sorting them according to running time from large to small within each subset;

[0096] The increase in the running time of each potential frequency reduction program fragment after the operating frequency is reduced is determined in order of ranking. When the increase in the running time is less than or equal to the increaseable execution time, the reduced operating frequency is determined as the target operating frequency of the potential frequency reduction program fragment, and the increase in the running time is subtracted from the increaseable execution time.

[0097] In the third case, the baseline historical startup execution duration is greater than and not close to the relaxed execution duration threshold. The difference between the baseline historical startup execution duration and the relaxed execution duration is determined as the execution duration that should be reduced. Then, the operating frequency of each program fragment in the baseline historical startup execution is set as the benchmark, and combined with the historical performance characteristic data, the energy consumption-duration sensitivity of each program fragment when the operating frequency is increased is determined. Then, based on the execution duration that should be reduced, the energy consumption-duration sensitivity of each program fragment, and the total running time of each program fragment at various operating frequencies, the number of program fragments whose operating frequencies are to be increased and the target operating frequency of each program fragment after the increase are determined. A specific determination method may be to first sort all program fragments whose operating frequency can still be increased (the operating frequency cannot be further increased when it has reached the highest level) according to a certain sorting rule, and then check each sorted program fragment in turn until the remaining execution time that should be reduced is less than or equal to 0; when checking a program fragment, determine the amount of reduction in execution time after its operating frequency is increased, determine the target operating frequency of the program fragment, and reduce the remaining execution time that should be reduced accordingly, until the remaining execution time that should be reduced is less than or equal to 0. The sorting rule may be to sort from small to large according to energy consumption-duration sensitivity; or it may be to divide the energy consumption-duration sensitivity into several value ranges from small to large, and sort the multiple program fragments in each value range from large to small according to the various total running times.

[0098] That is, in the processor power consumption control method for relaxing execution time provided by this embodiment, controlling the operating frequency of the processor when running each program fragment may specifically include:

[0099] When the total running time of the benchmark startup execution is greater than the relaxed execution time threshold, the difference between the total running time of the benchmark startup execution and the relaxed execution time threshold is determined as the execution time that should be reduced;

[0100] Determining the operating frequency of each program fragment during the benchmark startup execution as the benchmark operating frequency of the processor when the respective program fragment is currently running;

[0101] determining a program segment whose base operating frequency is lower than the maximum operating frequency of the processor as a potential frequency-upgrading program segment;

[0102] Sorting all potential upscaling program segments in ascending order of energy consumption-duration sensitivity, or dividing all potential upscaling program segments into multiple subsets in ascending order of energy consumption-duration sensitivity and sorting them in descending order of running time within each subset;

[0103] Determine the reduction in running time of each potential up-clocking program fragment after the operating frequency is increased in order of ranking, determine the increased operating frequency as the target operating frequency of the potential up-clocking program fragment, and subtract the reduction in running time from the execution time to be reduced until the execution time to be reduced is less than or equal to 0.

[0104] Furthermore, the total running time of the currently running application, the working frequency and running time of each program segment may be used to update the historical startup execution database, so that the historical startup execution database can be updated in a timely manner.

[0105] It should be noted that executing the operating frequency control instruction will also bring overhead, and when the execution time of the program fragment is very small, the proportion of the overhead of executing the operating frequency control instruction will be relatively large. In order to improve the overall efficiency of the application program operation, the additional overhead brought by the execution of the operating frequency control instruction should be considered. On the basis of any of the above embodiments, the processor power consumption control method for relaxed execution time provided in this embodiment may also include: when the ratio of the execution time of the operating frequency control instruction to the running time of the corresponding program fragment is greater than a preset threshold, the program fragment corresponding to the operating frequency control instruction is merged with the adjacent program fragment.

[0106] Figure 2 This is a schematic diagram of the structure of a processor power consumption control device for relaxing execution time provided by an embodiment of the present invention. Figure 2As shown, the processor power consumption control device 20 for relaxed execution duration provided by this embodiment may include: a division module 201 , a processing module 202 , an acquisition module 203 and a control module 204 .

[0107] A division module 201 is used to divide the application into multiple program segments, and the processor maintains the same operating frequency within the same program segment;

[0108] A processing module 202 is configured to determine an energy consumption-duration sensitivity of each program fragment based on historical performance characteristic data of each program fragment, where the energy consumption-duration sensitivity is used to quantify the impact of changing the program fragment's runtime by changing the processor's operating frequency on the runtime power consumption.

[0109] An acquisition module 203 is configured to acquire a relaxed execution time threshold of an application program, where the relaxed execution time threshold is used to indicate a maximum acceptable running time of the application program;

[0110] The control module 204 is configured to control the operating frequency of the processor when executing each program fragment according to the relaxed execution time threshold of the application program and the energy consumption-duration sensitivity of each program fragment.

[0111] The device of this embodiment can be used to perform Figure 1 The technical solution of the method embodiment shown has similar implementation principles and technical effects, which will not be repeated here.

[0112] In one embodiment, the energy consumption-duration sensitivity is used to represent the amount of energy consumption that can be reduced by increasing the unit running time or the amount of energy consumption that can be increased by reducing the unit running time. The energy consumption-duration sensitivity S of the program segment is determined according to the following expression:

[0113]

[0114] Among them, T1 represents the running time of the processor running the program fragment at the first operating frequency; W1 represents the power of the processor when running the program fragment at the first operating frequency; T2 represents the running time of the processor running the program fragment at the second operating frequency; W2 represents the power of the processor when running the program fragment at the second operating frequency; the first operating frequency is different from the second operating frequency.

[0115] In an optional embodiment, the control module 204 is configured to control the operating frequency of the processor when running each program fragment based on the relaxed execution time threshold of the application program and the energy consumption-duration sensitivity of each program fragment, which may specifically include:

[0116] Reduce the operating frequency of the processor when the program fragment has a running energy consumption-duration sensitivity greater than a preset first sensitivity threshold, and / or increase the operating frequency of the processor when the program fragment has a running energy consumption-duration sensitivity less than a preset second sensitivity threshold, and make the total running time of the application less than or equal to the relaxed execution time threshold, and the preset first sensitivity threshold is greater than the preset second sensitivity threshold.

[0117] In an optional embodiment, the control module 204 is configured to control the operating frequency of the processor when running each program fragment based on the relaxed execution time threshold of the application program and the energy consumption-duration sensitivity of each program fragment, which may specifically include:

[0118] Determining a baseline launch execution from a historical launch execution database of the application, the historical launch execution database including the total runtime of each run in multiple launch executions, the operating frequency and runtime of each program fragment;

[0119] The operating frequency of the processor when running each program fragment is controlled according to the benchmark startup execution, the relaxation execution time threshold and the energy consumption-duration sensitivity of each program fragment.

[0120] In an optional implementation, the control module 204 is configured to control the operating frequency of the processor when executing each program fragment, which may specifically include:

[0121] When the total running time of the benchmark startup execution is less than or equal to the relaxation execution time threshold and the relative difference between the two is less than the preset ratio threshold, the operating frequency of each program fragment in the benchmark startup execution is determined as the operating frequency of the processor when the respective program fragments are currently running.

[0122] In an optional implementation, the control module 204 is configured to control the operating frequency of the processor when executing each program fragment, which may specifically include:

[0123] When the total running time of the baseline startup execution is less than the relaxed execution time threshold and the relative difference between the two is greater than or equal to the preset ratio threshold, the difference between the relaxed execution time threshold and the total running time of the baseline startup execution is determined as the execution time that can be increased;

[0124] Determining the operating frequency of each program fragment during the benchmark startup execution as the benchmark operating frequency of the processor when the respective program fragment is currently running;

[0125] determining a program segment whose base operating frequency is greater than the lowest operating frequency of the processor as a potential frequency reduction program segment;

[0126] Sorting all potential frequency reduction program segments according to energy consumption-duration sensitivity from large to small, or dividing all potential frequency reduction program segments into multiple subsets according to energy consumption-duration sensitivity from large to small and sorting them according to running time from large to small within each subset;

[0127] The increase in the running time of each potential frequency reduction program fragment after the operating frequency is reduced is determined in order of ranking. When the increase in the running time is less than or equal to the increaseable execution time, the reduced operating frequency is determined as the target operating frequency of the potential frequency reduction program fragment, and the increase in the running time is subtracted from the increaseable execution time.

[0128] In an optional implementation, the control module 204 is configured to control the operating frequency of the processor when executing each program fragment, which may specifically include:

[0129] When the total running time of the benchmark startup execution is greater than the relaxed execution time threshold, the difference between the total running time of the benchmark startup execution and the relaxed execution time threshold is determined as the execution time that should be reduced;

[0130] Determining the operating frequency of each program fragment during the benchmark startup execution as the benchmark operating frequency of the processor when the respective program fragment is currently running;

[0131] determining a program segment whose base operating frequency is lower than the maximum operating frequency of the processor as a potential frequency-upgrading program segment;

[0132] Sorting all potential upscaling program segments in ascending order of energy consumption-duration sensitivity, or dividing all potential upscaling program segments into multiple subsets in ascending order of energy consumption-duration sensitivity and sorting them in descending order of running time within each subset;

[0133] Determine the reduction in running time of each potential up-clocking program fragment after the operating frequency is increased in order of ranking, determine the increased operating frequency as the target operating frequency of the potential up-clocking program fragment, and subtract the reduction in running time from the execution time to be reduced until the execution time to be reduced is less than or equal to 0.

[0134] In an optional embodiment, the processor power consumption control device 20 for relaxed execution time may also include an update module (not shown in the figure) for updating the historical startup execution database using the total running time of the currently running application, the operating frequency and running time of each program fragment.

[0135] In an optional embodiment, the division module 201 is configured to divide the application into multiple program segments by inserting an operating frequency control instruction into the application, where the operating frequency control instruction is inserted by one or more of the following methods:

[0136] In response to calling a program interface for adding an operating frequency control instruction, inserting an operating frequency control instruction into an application program;

[0137] Insert operating frequency control instructions before and after function calls, before and after loops, before and after I / O operations, or before and after communications through the compiler;

[0138] When the application is running, the operating frequency control command is inserted into the application at intervals according to the number of completed instructions;

[0139] Insert operating frequency control commands based on the performance characteristics of each program location in the application program obtained by the performance analysis tool.

[0140] In an optional embodiment, the processor power consumption control device 20 for relaxed execution time may also include a merging module (not shown in the figure) for merging the program fragment corresponding to the operating frequency control instruction with the adjacent program fragment when the ratio of the execution time of the operating frequency control instruction to the running time of the corresponding program fragment is greater than a preset threshold.

[0141] The present invention also provides an electronic device. Figure 3 As shown, the embodiment of the present invention is only Figure 3 This is just an example for explanation, and it does not mean that the present invention is limited to this. Figure 3 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 3 As shown, the electronic device 30 provided in this embodiment may include: a memory 301, a processor 302 and a bus 303. The bus 303 is used to realize the connection between various components.

[0142] The memory 301 stores a computer program, which can implement the technical solution of any of the above method embodiments when executed by the processor 302.

[0143] The memory 301 and the processor 302 are electrically connected directly or indirectly to achieve data transmission or interaction. For example, these elements can be electrically connected to each other through one or more communication buses or signal lines, such as through bus 303. The memory 301 stores a computer program for implementing a method for controlling processor power consumption for relaxed execution time, including at least one software function module that can be stored in the memory 301 in the form of software or firmware. The processor 302 executes various functional applications and data processing by running the software programs and modules stored in the memory 301.

[0144] The memory 301 may be, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc. The memory 301 is used to store programs, and the processor 302 executes the programs after receiving execution instructions. Furthermore, the software programs and modules in the memory 301 may also include an operating system, which may include various software components and / or drivers for managing system tasks (e.g., memory management, storage device control, power management, etc.), and may communicate with various hardware or software components to provide an operating environment for other software components.

[0145] The processor 302 can be an integrated circuit chip with signal processing capabilities. The processor 302 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc. It can implement or execute the methods, steps, and logic diagrams disclosed in the embodiments of the present invention. The general-purpose processor can be a microprocessor or any conventional processor. It is understood that Figure 3 The structure is only for illustration and may also include Figure 3 More or fewer components than shown, or with Figure 3 Different configurations shown. Figure 3 Each component shown in the figure may be implemented using hardware and / or software.

[0146] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. The computer program is executed by a processor to implement the technical solution of any of the above method embodiments.

[0147] The various embodiments in the present disclosure are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments.

[0148] The scope of protection of the present disclosure is not limited to the above-described embodiments. Obviously, those skilled in the art may make various modifications and variations to the present disclosure without departing from the scope and spirit of the present disclosure. If such modifications and variations fall within the scope of the claims of the present disclosure and their equivalents, the present disclosure is intended to include such modifications and variations.

Claims

1. A method for controlling processor power consumption for relaxed execution time, characterized in that: include: Divide the application into multiple program fragments, and the processor maintains the same operating frequency within the same program fragment; Determining an energy consumption-duration sensitivity of each program fragment based on historical performance characteristic data of each program fragment, wherein the energy consumption-duration sensitivity is used to quantify the impact of changing the program fragment's running time on running power consumption by changing the processor's operating frequency; Obtaining a relaxed execution time threshold of the application, where the relaxed execution time threshold is used to indicate a maximum acceptable running time of the application; controlling the operating frequency of the processor when running each program fragment according to a relaxed execution time threshold of the application and an energy consumption-duration sensitivity of each program fragment; The energy consumption-duration sensitivity is used to indicate the amount of energy consumption that can be reduced by increasing the unit operating time or the amount of energy consumption that can be increased by reducing the unit operating time; The controlling the operating frequency of the processor when running each program fragment according to the relaxed execution time threshold of the application program and the energy consumption-duration sensitivity of each program fragment includes: The operating frequency of the processor is reduced when the program fragment has a running energy consumption-duration sensitivity greater than a preset first sensitivity threshold, and / or the operating frequency of the processor is increased when the program fragment has a running energy consumption-duration sensitivity less than a preset second sensitivity threshold, and the total running time of the application is made less than or equal to the relaxed execution time threshold, and the preset first sensitivity threshold is greater than the preset second sensitivity threshold.

2. The method according to claim 1, characterized in that The energy consumption-duration sensitivity S of a program fragment is determined according to the following expression: Among them, T1 represents the running time of the processor running the program fragment at the first operating frequency; W1 represents the power of the processor when running the program fragment at the first operating frequency; T2 represents the running time of the processor running the program fragment at the second operating frequency; W2 represents the power of the processor when running the program fragment at the second operating frequency; the first operating frequency is different from the second operating frequency.

3. The method according to claim 1, characterized in that The controlling the operating frequency of the processor when running each program fragment according to the relaxed execution time threshold of the application program and the energy consumption-duration sensitivity of each program fragment includes: Determining a baseline boot execution from a historical boot execution database of the application, the historical boot execution database including a total run time of each run in multiple boot executions, a working frequency and a run time of each program segment; The operating frequency of the processor when running each program fragment is controlled according to the benchmark startup execution, the relaxed execution time threshold, and the energy consumption-time sensitivity of each program fragment.

4. The method according to claim 3, characterized in that The control of the operating frequency of the processor when running each program fragment includes: When the total running time of the benchmark startup execution is less than or equal to the relaxed execution time threshold and the relative difference between the two is less than a preset ratio threshold, the operating frequency of each program fragment in the benchmark startup execution is determined as the operating frequency of the processor when the respective program fragments are currently running.

5. The method according to claim 3, characterized in that The control of the operating frequency of the processor when running each program fragment includes: When the total running time of the baseline startup execution is less than the relaxed execution time threshold and the relative difference between the two is greater than or equal to a preset ratio threshold, the difference between the relaxed execution time threshold and the total running time of the baseline startup execution is determined as the execution time that can be increased; Determining the operating frequency of each program fragment during the benchmark startup execution as the benchmark operating frequency of the processor when the respective program fragment is currently running; determining a program segment whose base operating frequency is greater than the lowest operating frequency of the processor as a potential frequency reduction program segment; Sorting all potential frequency reduction program segments according to energy consumption-duration sensitivity from large to small, or dividing all potential frequency reduction program segments into multiple subsets according to energy consumption-duration sensitivity from large to small and sorting them according to running time from large to small within each subset; According to the sorting, the increase in the running time of each potential frequency reduction program fragment after the operating frequency is reduced is determined in turn. When the increase in the running time is less than or equal to the increaseable execution time, the reduced operating frequency is determined as the target operating frequency of the potential frequency reduction program fragment, and the increase in the running time is subtracted from the increaseable execution time.

6. The method according to claim 3, characterized in that The control of the operating frequency of the processor when running each program fragment includes: When the total running time of the benchmark startup execution is greater than the relaxed execution time threshold, determining the difference between the total running time of the benchmark startup execution and the relaxed execution time threshold as the execution time that should be reduced; Determining the operating frequency of each program fragment during the benchmark startup execution as the benchmark operating frequency of the processor when the respective program fragment is currently running; determining a program segment whose base operating frequency is lower than the maximum operating frequency of the processor as a potential frequency-upgrading program segment; Sorting all potential upscaling program segments in ascending order of energy consumption-duration sensitivity, or dividing all potential upscaling program segments into multiple subsets in ascending order of energy consumption-duration sensitivity and sorting them in descending order of running time within each subset; According to the sorting, the reduction in the running time of each potential up-clocking program fragment after the operating frequency is increased is determined in turn, the increased operating frequency is determined as the target operating frequency of the potential up-clocking program fragment, and the reduction in the running time is subtracted from the execution time to be reduced until the execution time to be reduced is less than or equal to 0.

7. The method according to claim 3, characterized in that The method further comprises: The historical startup execution database is updated using the total running time of the currently running application program, the working frequency and running time of each program segment.

8. The method according to any one of claims 1 to 7, characterized in that The application is divided into a plurality of program segments by inserting an operating frequency control instruction into the application, wherein the operating frequency control instruction is inserted by one or more of the following methods: In response to calling a program interface for adding an operating frequency control instruction, inserting an operating frequency control instruction into the application program; Insert operating frequency control instructions before and after function calls, before and after loops, before and after I / O operations, or before and after communications through the compiler; When the application is running, inserting an increase operating frequency control command into the application at intervals according to the number of completed instructions; Insert operating frequency control commands based on the performance characteristics of each program location in the application program obtained by the performance analysis tool.

9. The method according to claim 8, characterized in that The method further comprises: When the ratio of the execution time of the operating frequency control instruction to the execution time of the corresponding program segment is greater than a preset threshold, the program segment corresponding to the operating frequency control instruction is merged with the adjacent program segment.

10. A processor power consumption control device for relaxing execution time, characterized in that: include: A partitioning module is used to divide an application into multiple program segments, and the processor maintains the same operating frequency within the same program segment; a processing module for determining an energy consumption-duration sensitivity of each program fragment based on historical performance characteristic data of each program fragment, wherein the energy consumption-duration sensitivity is used to quantify the impact of changing the program fragment's running time on running power consumption by changing the processor's operating frequency; an acquisition module, configured to acquire a relaxed execution time threshold of the application program, wherein the relaxed execution time threshold is used to indicate a maximum acceptable running time of the application program; a control module, configured to control the operating frequency of the processor when running each program fragment according to a relaxed execution time threshold of the application program and an energy consumption-duration sensitivity of each program fragment; The energy consumption-duration sensitivity is used to indicate the amount of energy consumption that can be reduced by increasing the unit operating time or the amount of energy consumption that can be increased by reducing the unit operating time; The control module is configured to control the operating frequency of the processor when running each program fragment according to the relaxed execution time threshold of the application program and the energy consumption-duration sensitivity of each program fragment, including: The operating frequency of the processor is reduced when the program fragment has a running energy consumption-duration sensitivity greater than a preset first sensitivity threshold, and / or the operating frequency of the processor is increased when the program fragment has a running energy consumption-duration sensitivity less than a preset second sensitivity threshold, and the total running time of the application is made less than or equal to the relaxed execution time threshold, and the preset first sensitivity threshold is greater than the preset second sensitivity threshold.

11. An electronic device, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the processor power consumption control method for relaxed execution duration according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the processor power consumption control method for relaxed execution time according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Working frequency control method and device for processor

    CN104424031A

  • Task scheduling method and device

    CN110543148A