Calibration method for energy model, and device
By calibrating the energy model in the energy perception scheduling system and determining the calibrated power consumption value of the CPU core based on the current running information, the problem that the fixed power consumption value in the energy model does not match the actual situation is solved, the task scheduling effect is improved, and the energy usage efficiency of the system is improved.
Patent Information
- Application Number
- PCT/CN2024/086547
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-08-21
- Filing Date
- 2024-04-08
- Publication Date
- 2025-02-27
AI Technical Summary
In the existing energy-aware scheduling technology, the energy model relies on the power consumption value of the CPU core in a fixed configuration, resulting in the power consumption value in actual operation that does not match the actual situation, affecting the task scheduling effect.
By detecting trigger conditions such as running applications, running scenarios, and CPU core temperature, determine the calibrated power consumption values of each CPU core under the current running information and input them into the energy model for more accurate task scheduling.
By calibrating the energy model, the actual power consumption value of the CPU core can be more accurately matched, thereby improving the task scheduling effect of energy-aware scheduling and improving the energy usage efficiency of the system.
Smart Images

Figure CN2024086547_27022025_PF_FP_ABST
Abstract
Description
Energy model calibration method and device
[0001] This invention claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on August 21, 2023, with application number 202311055621.5 and application name “Calibration method and device for energy model”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the technical field of task scheduling, and in particular to a method and device for calibrating an energy model. Background Art
[0003] Energy-Aware Scheduling (EAS) is a fundamental task scheduling function for electronic devices. EAS is primarily used on heterogeneous multi-core CPU architectures and relies on an Energy Model (EM) to select the most power-efficient CPU core for each task. When selecting a CPU core or CPU frequency for a task, EM primarily relies on fixed CPU core configuration values. These values can be inaccurate, impacting EAS's task scheduling effectiveness.
[0004] Summary of the Invention
[0005] The present application provides an energy model calibration method and device. The embodiments of the present application support the calibration of EM. When calibrating EM, the calibrated power consumption value of each CPU core can be determined based on the current operating information of the electronic device. Task scheduling is performed based on the calibrated power consumption value of each CPU core, which helps to improve the task scheduling effect of EAS.
[0006] In a first aspect, an embodiment of the present application provides a method for calibrating an energy model, the method being applied to an electronic device including multiple CPU cores, the method comprising:
[0007] detecting a condition for triggering energy model calibration;
[0008] Determine the calibrated power consumption value of each CPU core under the current operating information of the electronic device;
[0009] The calibrated power consumption values of the respective CPU cores are input into an energy model, so that the energy model is used to schedule tasks for the respective CPU cores.
[0010] In some embodiments, a condition for triggering energy model calibration is determined to have been detected when a combination of one or more of the following information is detected, including:
[0011] Detecting that an electronic device is running a specified application;
[0012] It is detected that the application running on the electronic device belongs to the specified running scenario;
[0013] It is detected that the junction temperature of the CPU core of the electronic device is within the specified temperature range.
[0014] In some embodiments, triggering calibration of the energy model is determined when a combination of the following information is detected, including:
[0015] When it is detected that the application running on the electronic device belongs to a specified operating scenario, the junction temperature of the CPU core is within a specified temperature range, and the energy model has not been calibrated within the specified temperature range of the specified operating scenario, it is determined to trigger calibration of the energy model.
[0016] In some embodiments, the application running on the electronic device belongs to a specified running scenario, including:
[0017] The application running on the electronic device belongs to a game scenario, a video playback scenario, or a video call scenario.
[0018] In some embodiments, detecting a condition for triggering energy model calibration includes:
[0019] The electronic device displays an energy model calibration interface;
[0020] When a calibration instruction operation acting on the energy model calibration interface is detected, it is determined to trigger calibration of the energy model.
[0021] In some embodiments, the current operation information of the electronic device includes one or more combinations of the following:
[0022] The electronic device includes application information running in the foreground, scenario information of the running application, junction temperature of the CPU core, task load information, power supply voltage information, chip quality information, and running program type information.
[0023] In some embodiments, determining the calibrated power consumption value of each CPU core under the current operating information of the electronic device includes:
[0024] Determine the power consumption deviation value of each CPU core under the current operation information of the electronic device;
[0025] The fixed power consumption value of each CPU core is calibrated according to the power consumption deviation value to obtain a calibrated power consumption value of each CPU core.
[0026] In some embodiments, determining the calibrated power consumption value of each CPU core under the current operating information of the electronic device includes:
[0027] Pre-store the power consumption table of each CPU core under different operating information;
[0028] Determine a target power consumption table corresponding to current operating information of the electronic device;
[0029] The calibrated power consumption value of each CPU core is determined according to the target power consumption table.
[0030] In some embodiments, determining the calibrated power consumption value of each CPU core under the current operating information of the electronic device includes:
[0031] The current value of each CPU core is collected through the preset chip;
[0032] The calibrated power consumption value of each CPU core is calculated according to the current value.
[0033] In a second aspect, an embodiment of the present invention provides an electronic device, comprising: multiple CPU cores and a memory for storing program instructions, wherein, when the program instructions are executed by the current CPU core, the electronic device is triggered to execute the method described in the first aspect or any one of the first aspects above.
[0034] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores a computer program. When the computer-readable storage medium is run on an electronic device comprising multiple CPU cores, the electronic device executes the method described in the first aspect or any one of the first aspects.
[0035] Embodiments of the present invention support EM calibration. When triggering EM calibration, the calibrated power consumption values of each CPU core can be determined based on the current operating information of the electronic device. These calibrated power consumption values of the CPU cores are input into the EM, allowing the EM to schedule tasks based on these calibrated power consumption values. These calibrated power consumption values of the CPU cores, determined based on the current operating information of the electronic device, more closely match the actual power consumption values of the CPU cores, thereby enabling the EM to more effectively schedule tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] FIG1 is a schematic diagram of an EAS model;
[0037] FIG2 is a schematic diagram of an EAS model provided by an embodiment of the present invention;
[0038] FIG3 is a schematic diagram of an electronic device provided by an embodiment of the present invention;
[0039] FIG4 is a block diagram of a software structure of an electronic device according to an embodiment of the present invention;
[0040] FIG5 is a flow chart of a method for calibrating an energy model provided by an embodiment of the present invention;
[0041] FIG6 is a flow chart of another energy model calibration method provided by an embodiment of the present invention;
[0042] FIG7 is a flow chart of another energy model calibration method provided by an embodiment of the present invention;
[0043] FIG8 is a flow chart of another energy model calibration method provided by an embodiment of the present invention;
[0044] FIG9 is a schematic diagram of an EAS model provided by an embodiment of the present invention;
[0045] FIG10 is a flow chart of another energy model calibration method provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0046] The terms used in the implementation section of this application are only used to explain the specific embodiments of this application and are not intended to limit this application.
[0047] Refer to Figure 1, which is a schematic diagram of an EAS model. As shown in Figure 1, the EAS model calculates the task load based on the load tracking algorithm, for example, it can calculate the task utility. Common load algorithms include Per-Entity Load Tracking (PELT) and Window-Assisted Load Tracking (WALT). EAS is usually configured with one of the two algorithms, PEIT or WALT. EAS can determine the task utility of each task based on PEIT or WALT. The purpose of tracking the utility of a task is to perform task scheduling. Among them, task scheduling includes selecting a suitable CPU core for the task based on the CPU capability, or selecting a suitable frequency for running the task on the CPU core.
[0048] When scheduling tasks, in addition to considering the task load, the computing capacity and power consumption of each CPU core must also be evaluated. In some examples, EAS relies on EM to perform computing capacity and energy evaluations on each CPU core. In some examples, the computing capacity and power consumption of each CPU core are preconfigured in the file node of the electronic device. As shown in Table 1, for different CPU cores, such as small cores, medium cores, and large cores, their different frequency points correspond to corresponding fixed power consumption values. EM performs task scheduling based on fixed configurations of computing capacity and power consumption. During the actual operation of an electronic device, the computing capacity of a CPU core is less affected by the operating state of the electronic device. However, the power consumption of a CPU core may be more affected by the operating state of the electronic device. When EM schedules tasks based on fixed power consumption values, the fixed power consumption value of the CPU core may differ significantly from the actual power consumption value of the CPU core, thereby affecting the EM's estimation of the CPU core capacity and, in turn, the effectiveness of task scheduling.
[0049] Table 1 Power consumption values corresponding to each frequency point of small core, medium core and large core
[0050] See Figure 2, which is a schematic diagram of an EAS model provided in an embodiment of the present invention. The EAS model in an embodiment of the present invention supports EM calibration. As shown in Figure 2, when it is determined that EM calibration is triggered, the calibrated power consumption value of each CPU core can be determined based on the current operating information of the electronic device. The calibrated power consumption value of the CPU core is input into the EM, so that the EM schedules tasks based on the calibrated power consumption value. The calibrated power consumption value of the CPU core is determined based on the current operating information of the electronic device and more closely matches the actual power consumption value of the CPU core, thereby helping the EM to schedule tasks more reasonably.
[0051] 3 is a schematic diagram of an electronic device provided in an embodiment of the present invention. As shown in FIG3 , the electronic device supports a multi-core system architecture, which includes multiple CPU cores, such as Core0, Core1, Core2, Core3, etc. FIG3 uses Core0, Core1, Core2, and Core3 as examples for illustration, and an actual electronic device may include more or fewer CPU cores. In some embodiments, the multiple CPU cores of the electronic device access a memory via a communication bus, and each CPU core communicates or exchanges data by accessing the memory. In some embodiments, the electronic device may adopt a heterogeneous multi-core architecture, that is, the multiple CPU cores of the electronic device include cores with different structures, such as the multiple CPU cores are a main CPU core, an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). In some embodiments, any CPU core in the electronic device can execute the method of the embodiment of the present invention. In some embodiments, the main CPU core in the electronic device is used to execute the method of the embodiment of the present invention.
[0052] In some embodiments, the software system of the electronic device may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present invention takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device.
[0053] See Figure 4, which is a block diagram of the software structure of an electronic device according to an embodiment of the present invention. A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other via software interfaces. In some embodiments, the Android system is divided, from top to bottom, into the application layer, the framework layer, and the kernel layer.
[0054] The application layer may include a series of application packages. As shown in FIG4 , the application package may include a first application, a second application, etc. The first application and the second application may be, for example, camera, gallery, video, game, and other applications.
[0055] The framework layer provides an application programming interface (API) and programming framework for the application programs in the application layer. The framework layer includes some predefined functions. As shown in Figure 4, the framework layer may include a foreground information detection module. The foreground information detection module may, for example, determine the application program running in the foreground, or may determine the operating scenario to which the application program running in the foreground belongs, or may determine the operation instruction triggered by the user in the foreground interface. As shown in Figure 4, the framework layer may also be provided with an EM calibration trigger module. The EM calibration trigger module is used to determine whether to trigger EM calibration. In some embodiments, the EM calibration trigger module may determine whether to trigger EM calibration based on the application running in the foreground of the electronic device, the operating scenario to which the running application belongs, or the junction temperature of the CPU core.
[0056] The kernel layer is the layer between hardware and software. The kernel layer may include display drivers, camera drivers, audio drivers, sensor drivers, and so on. In an embodiment of the present invention, as shown in Figure 4, the kernel layer is provided with a CPU temperature detection module, an EM calibration module, and a task scheduling module. The CPU temperature detection module is used to detect the junction temperature of each CPU core in the hardware layer and report it to the EM calibration trigger module in the framework layer. In some embodiments, the kernel layer may also include a load tracking module to obtain load information for each task. In some embodiments, the kernel layer may also include a voltage detection module to obtain the power supply voltage of the electronic device. Optionally, the load tracking module and the voltage detection module are not shown in Figure 4. In some embodiments, when the EM calibration trigger module determines to trigger EM calibration, the EM calibration module is used to obtain the calibrated power consumption value of each CPU core. The EM calibration module inputs the calibrated power consumption value of each CPU core into the task scheduling module. Optionally, the task scheduling module may run an EM, which can perform task scheduling based on the calibrated power consumption value of each CPU core.
[0057] It should be understood that the division of the modules of the electronic device shown in FIG4 is merely a division of logical functions. In actual implementation, all or part of these modules may be integrated together, or may be implemented separately.
[0058] Referring to FIG5 , which is a flow chart of a method for calibrating an energy model according to an embodiment of the present invention, the processing steps of the method include:
[0059] 101. A foreground information detection module detects that a first application is running in the foreground of an electronic device, and sends information about the first application to an EM calibration trigger module.
[0060] At 102, when the EM calibration triggering module determines that the first application is a designated application for triggering EM calibration, the EM calibration triggering module determines to trigger EM model calibration. In some embodiments, the EM model calibration triggering module may maintain a list of applications for triggering EM calibration. When the first application is included in the list of applications, the EM calibration triggering module determines to trigger EM calibration.
[0061] 103. The EM calibration module determines the power consumption deviation value of each CPU core under the current operating information of the electronic device. In some embodiments, the current operating information of the electronic device may include one or more of the following: information about applications running in the foreground of the electronic device, information about scenarios to which the running applications belong, junction temperature of the CPU core, task load information obtained through task tracking, power supply voltage information, chip quality information, and information about the type of programs running on the electronic device.
[0062] 104 , the EM calibration module calibrates the fixed power consumption value of each CPU core according to the power consumption deviation value of each CPU core to obtain a calibrated power consumption value of each CPU core.
[0063] Table 2 Power consumption of 2.4G core at different junction temperatures
[0064] As shown in Table 2, assuming the power supply voltage remains essentially the same, the fixed power consumption value for a 2.4GHz mid-core CPU is 652.57. Experimental measurements show that the actual power consumption of this mid-core CPU varies from the fixed power consumption value at different junction temperatures. For example, at a junction temperature of 70°C, the mid-core CPU has a 7% power consumption deviation from the fixed power consumption value. Adding this 7% power consumption deviation to the fixed power consumption value yields the calibrated power consumption value for this mid-core CPU at a junction temperature of 70°C.
[0065] 105 , the EM calibration module inputs the calibrated power consumption value of each CPU core into the task scheduling module.
[0066] 106. In the task scheduling module, the EM performs task scheduling using the calibrated power consumption values of each CPU core.
[0067] In an embodiment of the present invention, when an electronic device runs a designated application, EM calibration can be triggered. During EM calibration, the power consumption deviation value of each CPU core can be determined based on the current operating information of the electronic device. Calibrated power consumption values for each CPU core can then be obtained based on the fixed power consumption value of the CPU core. Based on the calibrated power consumption values of each CPU core, the EM can be calibrated, thereby optimizing EM task scheduling.
[0068] In some embodiments, the current operating information of an electronic device may include one or more of the following: information about applications running in the foreground of the electronic device, information about the scenarios to which the running applications belong, a junction temperature of a CPU core, task load information obtained through task tracking, power supply voltage information, and chip quality information. In some embodiments, the task load obtained through task tracking may be, for example, task utility. The power supply voltage information may be, for example, the voltage supplied by a battery to the CPU core. The chip quality information may be, for example, chip quality parameters detected during the manufacture of the electronic device. The type of program running in the electronic device may be, for example, a CPU calculation type, a register read / write type, a GPU acceleration type, etc. Optionally, the program type information running in the electronic device may be determined by an EM calibration trigger module. In some embodiments, the above-described operating information of the electronic device may affect the power consumption of the CPU core. In some embodiments, different power consumption offset values may be configured for different operating information of the electronic device. Based on the fixed power consumption value of the CPU core and the power consumption offset value, a calibrated power consumption value of the CPU core may be obtained, and the calibrated power consumption value may be more consistent with the current state of the electronic device.
[0069] Referring to FIG6 , which is a flow chart of another energy model calibration method provided by an embodiment of the present invention, the processing steps of the method include:
[0070] 201. A foreground information detection module detects that a first application is running in the foreground of an electronic device.
[0071] 202. The foreground information detection module determines the first running scenario to which the first application belongs. In some embodiments, the foreground information detection module is provided with a scenario classification rule for the foreground application. Based on the scenario classification rule, the foreground information detection module can determine the running scenario to which the first application running in the foreground belongs.
[0072] 203. When the EM calibration triggering module determines that the first operating scenario is a designated operating scenario, it triggers calibration of the EM model. In some embodiments, the EM model calibration triggering module may maintain operating scenario information for triggering EM calibration. When the first application running in the foreground of the electronic device belongs to a designated operating scenario, the EM calibration triggering module determines to trigger calibration of the EM model. In some embodiments, the designated operating scenarios for triggering EM calibration may include gaming scenarios, video playback scenarios, or video call scenarios.
[0073] At 204, the EM calibration module determines a target power consumption table from a pre-stored power consumption table based on the current operating information of the electronic device. In some embodiments, the EM calibration module pre-stores power consumption tables for each CPU core under different operating information. When the EM calibration triggering module determines to trigger EM calibration, the EM calibration module determines the target power consumption table corresponding to the current operating information of the electronic device. The target power consumption table stores the calibrated power consumption values of each CPU core under the current operating information. For example, the target power consumption table stores the calibrated power consumption values of each CPU core under the current junction temperature and application scenario.
[0074] 205 , the EM calibration module determines the calibrated power consumption value of each CPU core according to the target power consumption table.
[0075] 206 , the EM calibration module inputs the calibrated power consumption value of each CPU core into the task scheduling module.
[0076] 207 , in the task scheduling module, the EM performs task scheduling using the calibrated power consumption values of each CPU.
[0077] In an embodiment of the present invention, when an application running on an electronic device falls within a specified operating scenario, EM calibration is triggered. During EM calibration, a target power consumption table matching the current operating information can be determined from a pre-stored power consumption table. The target power consumption table stores the calibrated power consumption values of each CPU core under the current operating information. Based on the calibrated power consumption values of each CPU core, the EM can be calibrated, thereby optimizing EM task scheduling.
[0078] Referring to FIG7 , which is a flow chart of another energy model calibration method provided by an embodiment of the present invention, the processing steps of the method include:
[0079] 301. A foreground information detection module detects that a first application is running in the foreground of an electronic device.
[0080] 302. The foreground information detection module determines the first running scenario to which the first application belongs. In some embodiments, the foreground information detection module is provided with a scenario classification rule for the foreground application. Based on the scenario classification rule, the foreground information detection module can determine the running scenario to which the first application running in the foreground belongs.
[0081] 303 , the CPU temperature detection module detects the junction temperature of each CPU core.
[0082] 304 , the EM calibration trigger module obtains first operation scenario information from the foreground information detection module, and obtains the junction temperature of each CPU core from the CPU temperature detection module.
[0083] 305 , when the EM calibration triggering module determines that the first operating scenario is a specified operating scenario, the junction temperature of each CPU core is within a specified temperature range, and EM calibration has not been performed within the specified operating scenario and the specified temperature range, the EM calibration triggering module determines to trigger calibration of the EM model.
[0084] As shown in Table 3, in gaming or short video scenarios, the CPU core junction temperature is divided into multiple temperature ranges. If EM calibration has not been performed within any range, the EM calibration trigger module determines to trigger EM calibration. For example, in gaming scenarios, if the CPU core junction temperature is detected to be less than or equal to 40 degrees Celsius, EM calibration is triggered if EM calibration has not been performed. For another example, in gaming scenarios, if the CPU core junction temperature is detected to be greater than 60 degrees Celsius and less than or equal to 70 degrees Celsius, EM calibration is not triggered if EM calibration has been performed. For other examples in Table 3, see the descriptions in this section.
[0085] Table 3 EM calibration table under different scenarios and junction temperatures
[0086] At 306, the EM calibration module determines a target power consumption table from pre-stored power consumption tables based on the first operating scenario and the junction temperature of each CPU core. For example, if the first operating scenario is a gaming scenario and the junction temperature of the CPU core is less than or equal to 40 degrees Celsius, EM calibration is triggered. In this step, the target power consumption table for each CPU core in the gaming scenario and with a junction temperature less than or equal to 40 degrees Celsius is determined from the pre-stored power consumption tables. The EM calibration module determines the calibrated power consumption value for each CPU core based on the target power consumption table.
[0087] 307 , the EM calibration module determines the calibrated power consumption value of each CPU core according to the target power consumption table.
[0088] 308 , the EM calibration module inputs the calibrated power consumption value of each CPU core into the task scheduling module.
[0089] 309, in the task scheduling module, the EM performs task scheduling using the calibrated power consumption values of each CPU.
[0090] In an embodiment of the present invention, when an application running on an electronic device falls within a specified operating scenario and the junction temperature of a CPU core is within a specified range, EM calibration is triggered. During EM calibration, a target power consumption table matching the current operating information can be determined from a pre-stored power consumption table. The target power consumption table stores the calibrated power consumption values of each CPU core under the current operating information. Based on the calibrated power consumption values of each CPU core, the EM can be calibrated, thereby optimizing EM task scheduling.
[0091] Referring to FIG8 , which is a flow chart of another energy model calibration method provided by an embodiment of the present invention, the processing steps of the method include:
[0092] 401. A foreground information detection module detects that a first application is running in the foreground of an electronic device.
[0093] 402. The foreground information detection module determines the first running scenario to which the first application belongs. In some embodiments, the foreground information detection module is provided with a scenario classification rule for the foreground application. Based on the scenario classification rule, the foreground information detection module can determine the running scenario to which the first application running in the foreground belongs.
[0094] 403 , the CPU temperature detection module detects the junction temperature of each CPU core.
[0095] 404 , the EM calibration trigger module obtains first operation scenario information from the foreground information detection module, and obtains the junction temperature of each CPU core from the CPU temperature detection module.
[0096] 405 , when the EM calibration triggering module determines that the first operating scenario is a specified operating scenario, the junction temperature of each CPU core is within a specified temperature range, and EM calibration has not been performed within the specified operating scenario and the specified temperature range, the EM calibration triggering module determines to trigger EM calibration.
[0097] 406, the EM calibration module collects the current value of each CPU core through the pre-installed chip. As shown in FIG9, the electronic device may be pre-installed with a SOC chip, and the EM calibration module may collect the current value of each CPU core through the pre-installed chip.
[0098] 407 , the EM calibration module integrates and normalizes the collected current values of each CPU core to obtain a calibrated power consumption value of each CPU core.
[0099] 408 , the EM calibration module inputs the calibrated power consumption value of each CPU core into the task scheduling module.
[0100] 409 , in the task scheduling module, the EM performs task scheduling using the calibrated power consumption values of each CPU.
[0101] In embodiments of the present invention, the actual leakage current of each CPU core can be collected through the SOC chip, and a calibrated power consumption value for each CPU core can be calculated based on the actual leakage current of each CPU core. The power consumption value for each CPU core calculated based on the actual leakage current of each CPU core is closer to its actual power consumption value, which further facilitates the EM to properly schedule various tasks.
[0102] Referring to Figure 10, there is shown a flow chart of another energy model calibration method provided by an embodiment of the present invention. As shown in Figure 10, the processing steps of the method include:
[0103] 501. The front interface of the electronic device displays an energy model calibration interface.
[0104] 502 , when the foreground information detection module detects a calibration instruction operation on the energy model calibration interface, it sends an EM calibration instruction to the EM calibration trigger module.
[0105] 503 , the EM calibration triggering module determines to trigger EM calibration according to the EM calibration instruction.
[0106] 504, the EM calibration module collects the current value of each CPU core through the preset chip.
[0107] 505 , the EM calibration module integrates and normalizes the collected current values of each CPU core to obtain a calibrated power consumption value of each CPU core.
[0108] 506 , the EM calibration module inputs the calibrated power consumption value of each CPU core into the task scheduling module.
[0109] 507, in the task scheduling module, the EM performs task scheduling using the calibrated power consumption values of each CPU.
[0110] In the embodiment of the present invention, the EM calibration can be triggered by a user operation, thereby enabling more flexible triggering of the EM calibration.
[0111] From the above description, it can be seen that the energy model calibration method of the embodiment of the present invention is applied to an electronic device, wherein the electronic device includes multiple CPU cores, and the method includes:
[0112] detecting a condition for triggering energy model calibration;
[0113] Determine the calibrated power consumption value of each CPU core under the current operating information of the electronic device;
[0114] The calibrated power consumption values of the respective CPU cores are input into an energy model, so that the energy model is used to schedule tasks for the respective CPU cores.
[0115] In some embodiments, a condition for triggering energy model calibration is determined to have been detected when a combination of one or more of the following information is detected, including:
[0116] Detecting that an electronic device is running a specified application;
[0117] It is detected that the application running on the electronic device belongs to the specified running scenario;
[0118] It is detected that the junction temperature of the CPU core of the electronic device is within the specified temperature range.
[0119] In some embodiments, triggering calibration of the energy model is determined when a combination of the following information is detected, including:
[0120] When it is detected that the application running on the electronic device belongs to a specified operating scenario, the junction temperature of the CPU core is within a specified temperature range, and the energy model has not been calibrated within the specified temperature range of the specified operating scenario, it is determined to trigger calibration of the energy model.
[0121] In some embodiments, the application running on the electronic device belongs to a specified running scenario, including: the application running on the electronic device belongs to a game scenario, a video playback scenario, or a video call scenario.
[0122] In some embodiments, the detecting of a condition for triggering energy model calibration includes: the electronic device displaying an energy model calibration interface;
[0123] When a calibration instruction operation acting on the energy model calibration interface is detected, it is determined to trigger calibration of the energy model.
[0124] In some embodiments, the current operation information of the electronic device includes one or more combinations of the following:
[0125] The electronic device includes application information running in the foreground, scenario information of the running application, junction temperature of the CPU core, task load information, power supply voltage information, and running program type information.
[0126] In some embodiments, determining the calibrated power consumption value of each CPU core under current operating information of the electronic device includes:
[0127] Determine the power consumption deviation value of each CPU core under the current operation information of the electronic device;
[0128] The fixed power consumption value of each CPU core is calibrated according to the power consumption deviation value to obtain a calibrated power consumption value of each CPU core.
[0129] In some embodiments, determining the calibrated power consumption value of each CPU core under the current operating information of the electronic device includes:
[0130] Pre-store the power consumption table of each CPU core under different operating information;
[0131] Determine a target power consumption table corresponding to current operating information of the electronic device;
[0132] The calibrated power consumption value of each CPU core is determined according to the target power consumption table.
[0133] In some embodiments, determining the calibrated power consumption value of each CPU core under current operating information of the electronic device includes:
[0134] The current value of each CPU core is collected through the preset chip;
[0135] The calibrated power consumption value of each CPU core is calculated according to the current value.
[0136] An embodiment of the present invention further provides an electronic device comprising: multiple CPU cores and a memory for storing program instructions, wherein, when the program instructions are executed by a current CPU core, the electronic device is triggered to execute the energy model calibration method described in any of Figures 2 to 10 . In some embodiments, the current CPU core may be a main CPU core in the electronic device.
[0137] An embodiment of the present invention further provides a computer-readable storage medium, which stores instructions. When the instructions are executed on a computer including multiple CPU cores, the computer executes the above-mentioned energy model calibration method.
[0138] An embodiment of the present invention further provides a computer program product comprising instructions, which, when executed on a computer comprising multiple CPU cores or any at least one processor, enables the computer to execute the above-mentioned energy model calibration method.
[0139] An embodiment of the present invention further provides a chip, comprising a processor and a data interface, wherein the processor reads instructions stored in a memory through the data interface to execute corresponding operations and / or processes of the above-mentioned energy model calibration method.
[0140] Optionally, the chip further includes a memory, which is connected to the processor via a circuit or wire, and the processor is configured to read and execute a computer program in the memory. Further optionally, the chip further includes a communication interface, to which the processor is connected. The communication interface is configured to receive data and / or information to be processed, and the processor obtains the data and / or information from the communication interface and processes the data and / or information. The communication interface may be an input / output interface.
[0141] The memory may be a read-only memory (ROM), other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer.
[0142] The electronic device, computer storage medium or computer program product provided in the embodiments of the present application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above and will not be repeated here.
[0143] In the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can represent: a, b, c, a and b, a and c, b and c or a and b and c, where a, b, c can be single or multiple.
[0144] Those skilled in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented using a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0145] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0146] In the several embodiments provided in this application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of this application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0147] The above description is merely a specific embodiment of the present application. Any person skilled in the art may easily conceive of variations or substitutions within the technical scope disclosed in this application, and such variations or substitutions shall be within the scope of protection of this application. The scope of protection of this application shall be subject to the scope of protection of the claims.
Claims
1. A method for calibrating an energy model, characterized in that: The method is applied to an electronic device, the electronic device includes a plurality of CPU cores, and the method includes: A condition for triggering energy model calibration is detected; Determine the calibrated power consumption value of each CPU core under the current operation information of the electronic device; The calibrated power consumption values of the various CPU cores are input into an energy model so that the energy model is used to perform task scheduling on the various CPU cores.
2. The method according to claim 1, characterized in that A condition for triggering energy model calibration is determined to be detected when a combination of one or more of the following information is detected, including: Detecting that the electronic device is running a specified application; It is detected that the application running on the electronic device belongs to the specified running scenario; It is detected that the junction temperature of the CPU core of the electronic device is within a specified temperature range.
3. The method according to claim 2, characterized in that Calibration of the energy model is triggered when a combination of the following information is detected, including: When it is detected that the application running on the electronic device belongs to a specified running scenario, the junction temperature of the CPU core is within a specified temperature range, and the energy model has not been calibrated within the specified temperature range of the specified running scenario, it is determined to trigger the calibration of the energy model.
4. The method according to claim 2 or 3, characterized in that: The application running on the electronic device belongs to the specified running scenario, including: The application running on the electronic device belongs to a game scenario, a video playback scenario or a video call scenario.
5. The method according to claim 1, characterized in that The detecting of a condition for triggering energy model calibration includes: The electronic device displays an energy model calibration interface; When a calibration instruction operation acting on the energy model calibration interface is detected, it is determined to trigger the calibration of the energy model.
6. The method according to claim 1, characterized in that The current operation information of the electronic device includes one or more combinations of the following: The electronic device includes application information running in the foreground, scenario information of the running application, junction temperature of the CPU core, task load information, power supply voltage information, chip quality information, and running program type information.
7. The method according to any one of claims 1 to 6, characterized in that: The determining of the calibrated power consumption value of each CPU core under the current operation information of the electronic device includes: Determine the power consumption deviation value of each CPU core under the current operation information of the electronic device; The fixed power consumption value of each CPU core is calibrated according to the power consumption deviation value to obtain the calibrated power consumption value of each CPU core.
8. The method according to any one of claims 1 to 7, characterized in that: The determining of the calibrated power consumption value of each CPU core under the current operation information of the electronic device includes: Pre-store the power consumption table of each CPU core under different operating information; Determine a target power consumption table corresponding to current operation information of the electronic device; The calibrated power consumption value of each CPU core is determined according to the target power consumption table.
9. The method according to any one of claims 1 to 7, characterized in that: The determining of the calibrated power consumption value of each CPU core under the current operation information of the electronic device includes: The current value of each CPU core is collected through the preset chip; The calibrated power consumption value of each CPU core is calculated according to the current value.
10. An electronic device, characterized in that: The electronic device comprises: a plurality of CPU cores and a memory for storing program instructions, wherein when the program instructions are executed by the current CPU core, the electronic device is triggered to execute the method as described in any one of claims 1 to 9.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed on an electronic device comprising a plurality of CPU cores, enables the electronic device to execute the method as described in any one of claims 1 to 9 above.
Citation Information
Patent Citations
Scheduling method of multi-core processor and electronic equipment
CN113778663A
Power consumption determination method and device of electronic equipment, storage medium and electronic equipment
CN114461481A
Method and device for measuring power of processor core
CN115298636A
Resource scheduling method and electronic equipment
CN116027880A
Core selection method and device, electronic equipment and storage medium
CN116449939A