Calibration method and device of energy model

By calibrating the energy model in energy-aware scheduling and determining the calibrated power consumption value of the CPU core based on the current running information, the scheduling error problem caused by the energy model relying on fixed configuration values ​​is solved, and more accurate and efficient task scheduling is achieved.

CN119493642APending Publication Date: 2025-02-21HONOR DEVICE CO LTD

Patent Information

Application Number
CN202311055621.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-21
Publication Date
2025-02-21

AI Technical Summary

Technical Problem

In the existing energy-aware scheduling technology, the energy model relies on fixed configuration values ​​for task scheduling, resulting in large errors between the actual power consumption value of the CPU core and the fixed value, affecting the scheduling effect.

Method used

By detecting trigger conditions such as running applications, running scenarios, and CPU core temperature, the calibrated power consumption values ​​of each CPU core under the current running information are determined and inputted into the energy model to perform task scheduling more accurately.

Benefits of technology

By calibrating the energy model, the actual power consumption value of the CPU core can be more accurately matched, thereby improving the effectiveness of task scheduling and improving the accuracy and efficiency of energy-aware scheduling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119493642A_ABST
    Figure CN119493642A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of task scheduling, in particular to an energy model calibration method and equipment. The method is applied to the electronic equipment, the electronic equipment comprises a plurality of CPU cores, and the method comprises the steps that a condition used for triggering energy model calibration is detected; determining the calibrated power consumption value of each CPU core under the current operation information of the electronic equipment; and inputting the calibrated power consumption value of each CPU core into an energy model, so that the energy model performs task scheduling on each CPU core. According to the embodiment of the invention, the calibration of the EM is supported, the calibrated power consumption value of each CPU core can be determined according to the current operation information of the electronic equipment when the EM is calibrated, task scheduling is carried out according to the calibrated power consumption value of each CPU core, and the task scheduling effect of the EAS is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] 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

[0002] Energy Aware Scheduling (EAS) is a basic function for electronic devices to schedule tasks. EAS is mainly used on heterogeneous multi-core CPU architectures, and it relies on the Energy Model (EM) to select a power-saving CPU core for each task. When selecting a CPU core or CPU frequency for a task, EM is mainly based on the fixed configuration value of the CPU core, which may not be very accurate, thus affecting the task scheduling effect of EAS. Summary of the invention

[0003] The present application provides an energy model calibration method and device. The embodiments of the present application support the calibration of EM, and when calibrating EM, the power consumption value of each CPU core after calibration can be determined according to the current operation information of the electronic device, and task scheduling is performed according to the power consumption value of each CPU core after calibration, which helps to improve the task scheduling effect of EAS.

[0004] 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, the electronic device including a plurality of CPU cores, the method comprising:

[0005] A condition for triggering energy model calibration is detected;

[0006] Determine the calibrated power consumption value of each CPU core under the current operation information of the electronic device;

[0007] 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.

[0008] In some embodiments, when a combination of one or more of the following information is detected, it is determined that a condition for triggering energy model calibration is detected, including:

[0009] Detecting that the electronic device is running a specified application;

[0010] It is detected that the application running on the electronic device belongs to the specified running scenario;

[0011] It is detected that the junction temperature of the CPU core of the electronic device is within a specified temperature range.

[0012] In some embodiments, when a combination of the following information is detected, it is determined that calibration of the energy model is triggered, including:

[0013] 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.

[0014] In some embodiments, the application running on the electronic device belongs to a specified running scenario, including:

[0015] The application running on the electronic device belongs to a game scenario, a video playback scenario or a video call scenario.

[0016] In some embodiments, the detecting of a condition for triggering energy model calibration includes:

[0017] The electronic device displays an energy model calibration interface;

[0018] 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.

[0019] In some embodiments, the current operation information of the electronic device includes a combination of one or more of the following:

[0020] 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.

[0021] In some embodiments, determining the calibrated power consumption value of each CPU core under the current operation information of the electronic device includes:

[0022] Determine the power consumption deviation value of each CPU core under the current operation information of the electronic device;

[0023] 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.

[0024] In some embodiments, determining the calibrated power consumption value of each CPU core under the current operation information of the electronic device includes:

[0025] Pre-store the power consumption table of each CPU core under different operating information;

[0026] Determine a target power consumption table corresponding to current operation information of the electronic device;

[0027] The calibrated power consumption value of each CPU core is determined according to the target power consumption table.

[0028] In some embodiments, determining the calibrated power consumption value of each CPU core under the current operation information of the electronic device includes:

[0029] The current value of each CPU core is collected through the preset chip;

[0030] The calibrated power consumption value of each CPU core is calculated according to the current value.

[0031] 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.

[0032] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored. 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.

[0033] The embodiment of the present invention supports calibration of EM. When it is determined to trigger calibration of EM, the calibrated power consumption value of each CPU core can be determined under the current operation information of the electronic device. The calibrated power consumption value of the CPU core is input into EM so that EM performs task scheduling according to the calibrated power consumption value. The calibrated power consumption value of the CPU core is determined according to the current operation information of the electronic device, and is more closely matched with the actual power consumption value of the CPU core, thus helping EM to perform task scheduling more reasonably. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 is a schematic diagram of an EAS model;

[0035] Figure 2 A schematic diagram of an EAS model provided by an embodiment of the present invention;

[0036] Figure 3 A schematic diagram of an electronic device provided by an embodiment of the present invention;

[0037] Figure 4 A software structure block diagram of an electronic device according to an embodiment of the present invention;

[0038] Figure 5 A flow chart of a method for calibrating an energy model provided by an embodiment of the present invention;

[0039] Figure 6 A flow chart of another energy model calibration method provided by an embodiment of the present invention;

[0040] Figure 7A flow chart of another energy model calibration method provided by an embodiment of the present invention;

[0041] Figure 8 A flow chart of another energy model calibration method provided by an embodiment of the present invention;

[0042] Fig. 9 A schematic diagram of an EAS model provided by an embodiment of the present invention;

[0043] Fig.10 A flow chart of another energy model calibration method provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0044] 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.

[0045] See also Figure 1 , is a schematic diagram of an EAS model. Figure 1 As shown, 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 usually configures 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.

[0046] When scheduling tasks, in addition to considering the task load, the computing power (capacity) and power consumption (power) of each CPU core must also be evaluated. In some examples, EAS relies on EM to evaluate the computing power and energy of each CPU core. In some examples, the computing power and power consumption of each CPU core are pre-configured 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 the fixed configuration of computing power and power consumption. In the actual operation of electronic devices, the computing power of the CPU core is less affected by the operating state of the electronic device. However, the power consumption of the CPU core may be greatly affected by the operating state of the electronic device. When EM schedules tasks based on the fixed value of power consumption, the fixed power consumption value of the CPU core may have a large error with the actual power consumption value of the CPU core, thereby affecting EM's estimation of the CPU core capacity, and then affecting the scheduling effect of the task.

[0047] Table 1 Power consumption values ​​corresponding to each frequency point of small core, medium core and large core

[0048] Small core Frequency Power consumption Medium core Frequency Power consumption big core Frequency Power consumption 0 614400 20 0 652800 56 0 768000 100 1 806400 31 1 940800 96 1 940800 137 2 902400 37 2 1132800 129 2 1094400 175 3 1094400 51 3 1382400 182 3 1286400 224 4 1228800 63 4 1555200 228 4 1401600 259 5 1363200 77 5 1651200 253 5 1612800 323 6 1555200 99 6 1804800 306 6 1766400 378 7 1651200 111 7 2054400 409 7 1977600 461 8 1804800 130 8 2208000 481 8 2169600 555 9 9 2361600 565 9 2361600 666

[0049] See also Figure 2 , is a schematic diagram of an EAS model provided by an embodiment of the present invention. The EAS model of the embodiment of the present invention supports the calibration of EM. Figure 2 As shown, when it is determined to trigger the calibration of EM, the calibrated power consumption value of each CPU core can be determined under the current operation information of the electronic device. The calibrated power consumption value of the CPU core is input into EM so that EM performs task scheduling according to the calibrated power consumption value. The calibrated power consumption value of the CPU core is determined according to the current operation information of the electronic device, which is more consistent with the actual power consumption value of the CPU core, thus helping EM to perform task scheduling more reasonably.

[0050] See also Figure 3 , is a schematic diagram of an electronic device provided by an embodiment of the present invention. Figure 3 As shown, the electronic device supports a multi-core system architecture, which includes multiple CPU cores, such as Core0, Core1, Core2, Core3, etc. Figure 3In the description, Core0, Core1, Core2, and Core3 are used as examples. More or fewer CPU cores may be included in an actual electronic device. In some embodiments, multiple CPU cores of an electronic device access a memory through a communication bus, and each CPU core communicates or exchanges data by accessing the memory. In some embodiments, an electronic device may adopt a heterogeneous multi-core architecture, that is, multiple CPU cores of an electronic device include cores with different structures, such as multiple CPU cores are respectively a main CPU core, an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and / or a neural-network processing unit (neural-network processing unit, NPU), etc. In some embodiments, any CPU core in an electronic device can execute the method of the embodiment of the present invention. In some embodiments, the main CPU core in an electronic device is used to execute the method of the embodiment of the present invention.

[0051] In some embodiments, the software system of the electronic device may adopt a layered architecture, an event-driven architecture, a micro-core 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.

[0052] See also Figure 4 , is a software structure block diagram of an electronic device in an embodiment of the present invention. The layered architecture divides the software into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into an application layer, a framework layer, and a kernel layer from top to bottom.

[0053] The application layer can include a series of application packages. Figure 4 As shown, 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.

[0054] The framework layer provides application programming interface (API) and programming framework for the application layer. The framework layer includes some predefined functions. Figure 4As shown, the framework layer may include a foreground information detection module. The foreground information detection module may, for example, determine the application running in the foreground, or may determine the running scenario to which the application running in the foreground belongs, or may determine the operation instruction triggered by the user in the foreground interface. Figure 4 As shown, 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 an application running in the foreground of the electronic device, an operating scenario to which the running application belongs, or a junction temperature of a CPU core.

[0055] The kernel layer is a layer between hardware and software. The kernel layer may include display drivers, camera drivers, audio drivers, sensor drivers, etc. In the embodiment of the present invention, Figure 4 As shown, the kernel layer is provided with a CPU temperature detection module, an EM calibration module and a task scheduling module. Among them, 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 the load information of 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 Figure 4 In some embodiments, when the EM calibration trigger module determines to trigger the calibration of the EM, the EM calibration module is used to obtain the power consumption value of each CPU core after calibration. The EM calibration module inputs the power consumption value of each CPU core after calibration into the task scheduling module. Optionally, the task scheduling module can run EM, and EM can perform task scheduling according to the power consumption value of each CPU core after calibration.

[0056] It should be understood that Figure 4 The division of the various modules of the electronic device shown is only a division of logical functions. In actual implementation, all or part of these modules can be integrated together, or they can be implemented independently.

[0057] See also Figure 5 , is a flow chart of a calibration method for an energy model provided by an embodiment of the present invention. Figure 5 As shown, the processing steps of the method include:

[0058] 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.

[0059] 102. When the EM calibration trigger module determines that the first application is a designated application for triggering EM calibration, the EM calibration trigger module determines to trigger calibration of the EM model. In some embodiments, the EM model calibration trigger 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 trigger module determines to trigger EM calibration.

[0060] 103, the EM calibration module determines the power consumption deviation value of each CPU core under the current operation information of the electronic device. In some embodiments, the current operation information of the electronic device may include a combination of one or more of the following: application information running in the foreground of the electronic device, scene information to which the running application belongs, junction temperature of the CPU core, task load information obtained through task tracking, power supply voltage information, chip quality information, and program type information running in the electronic device.

[0061] 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 the calibrated power consumption value of each CPU core.

[0062] Table 2 Power consumption of 2.4G core at different junction temperatures

[0063] Junction temperature Supply voltage Fixed power consumption value Power consumption deviation Power consumption after calibration 38 0.8654 652.57 0 652.57 46.8 0.8653 652.57 +1.16% 660.18 61.1 0.8654 652.57 +4.6% 682.73 70 0.8655 652.57 +7% 698.41

[0064] As shown in Table 2, under the premise that the power supply voltage is basically the same, the fixed power consumption value of the mid-core CPU with a frequency of 2.4G is 652.57. According to experimental measurements, at different junction temperatures, the actual power consumption value of the mid-core CPU has different power consumption deviation values ​​from the fixed power consumption value. For example, at a junction temperature of 70 degrees, the mid-core CPU has a power consumption deviation value of 7% from the fixed power consumption value. By adding the 7% power consumption deviation value to the fixed power consumption value, the calibrated power consumption value of the mid-core CPU at a junction temperature of 70 degrees can be obtained.

[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 the electronic device runs a specified application, the calibration of the EM can be triggered. When the EM is calibrated, the power consumption deviation value of each CPU core can be determined according to the current operation information of the electronic device, and then the calibrated power consumption value of each CPU core can be obtained based on the fixed power consumption value of the CPU core. The EM can be calibrated based on the calibrated power consumption value of each CPU core, so that the task scheduling of the EM is more reasonable.

[0068] In some embodiments, the current operation information of the electronic device may include application information running in the foreground of the electronic device, scene information to which the running application belongs, junction temperature of the CPU core, task load information obtained through task tracking, power supply voltage information, and a combination of one or more of chip quality information. In some embodiments, the task load obtained through task tracking may be, for example, the utilization rate of the task (task utility), etc. The power supply voltage information may be, for example, the power supply voltage of the battery to the CPU core. The chip quality information may be, for example, chip quality parameters detected when the electronic device is produced, etc. The program type running in the electronic device may be, for example, a CPU calculation type, a register read and 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-mentioned operation information of the electronic device may affect the power consumption value of the CPU core. In some embodiments, different power consumption deviation values ​​may be configured corresponding to different operation information of the electronic device, and based on the power consumption deviation value on the basis of the fixed power consumption value of the CPU core, the power consumption value after calibration of the CPU core may be obtained, and the calibrated power consumption value is more in line with the current state of the electronic device.

[0069] See also Figure 6 , is a flow chart of another energy model calibration method provided by an embodiment of the present invention. Figure 6 As shown, 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 scene to which the first application belongs. In some embodiments, the foreground information detection module is provided with a scene classification rule for the foreground application. According to the scene classification rule, the foreground information detection module can determine the running scene to which the first application running in the foreground belongs.

[0072] 203, when the EM calibration trigger module determines that the first operation scene is a designated operation scene, the calibration of the EM model is triggered. In some embodiments, the EM model calibration trigger module can maintain operation scene information for triggering EM calibration. When the first application running in the foreground of the electronic device belongs to the designated operation scene, the EM calibration trigger module determines to trigger the calibration of the EM model. In some embodiments, the designated operation scene for triggering EM calibration may include: a game scene, a video playback scene, or a video call scene, etc.

[0073] 204, the EM calibration module determines a target power consumption table from a pre-stored power consumption table according to the current operation information of the electronic device. In some embodiments, the EM calibration module pre-stores power consumption tables of each CPU core under different operation information. When the EM calibration trigger module determines to trigger EM calibration, the EM calibration module determines the target power consumption table corresponding to the current operation information of the electronic device. The target power consumption table stores the calibrated power consumption values ​​of each CPU core under the current operation 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 belongs to a specified running scenario, the calibration of the EM is triggered. When calibrating the EM, a target power consumption table matching the current running 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 running information. The EM can be calibrated based on the calibrated power consumption values ​​of each CPU core, so that the task scheduling of the EM is more reasonable.

[0078] See also Figure 7 , is a flow chart of another energy model calibration method provided by an embodiment of the present invention. Figure 7 As shown, 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 scene to which the first application belongs. In some embodiments, the foreground information detection module is provided with a scene classification rule for the foreground application. According to the scene classification rule, the foreground information detection module can determine the running scene 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 triggering module obtains the 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 operation scenario is a specified operation scenario, the junction temperature of each CPU core is within a specified temperature range, and EM calibration has not been performed within the specified operation 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 the game or short video scenario, the junction temperature of the CPU core is divided into multiple temperature levels. If EM calibration has not been performed within any range, the EM calibration trigger module determines to trigger EM calibration. For example, in the game scenario, when it is detected that the junction temperature of the CPU core is <= 40 degrees, if EM calibration has not been performed, it is determined to trigger EM calibration. For another example, in the game scenario, when it is detected that the junction temperature of the CPU core is greater than 60 degrees and less than or equal to 70 degrees, if EM calibration has been performed, it is determined not to trigger EM calibration. For other examples in Table 3, refer to this section for description.

[0085] Table 3 EM calibration table under different scenarios and different junction temperatures

[0086]

[0087] 306, the EM calibration module determines the target power consumption table from various pre-stored power consumption tables according to the first operation scenario and the junction temperature of each CPU core. For example, when the first operation scenario is a game scenario and the junction temperature of the CPU core is <=40 degrees, it is determined to trigger the EM calibration. In this step, the target power consumption table of each CPU core in the game scenario and the junction temperature <=40 is determined from various pre-stored power consumption tables. The EM calibration module determines the power consumption value of each CPU core after calibration according to the target power consumption table.

[0088] 307 , the EM calibration module determines the power consumption value of each CPU core after calibration according to the target power consumption table.

[0089] 308, the EM calibration module inputs the calibrated power consumption value of each CPU core into the task scheduling module.

[0090] 309, in the task scheduling module, the EM performs task scheduling using the calibrated power consumption values ​​of each CPU.

[0091] In an embodiment of the present invention, when the application running in the electronic device belongs to a specified operation scenario and the junction temperature of the CPU core is at a specified level, the calibration of the EM is triggered. When calibrating the EM, a target power consumption table matching the current operation 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 operation information. The EM can be calibrated based on the calibrated power consumption values ​​of each CPU core, so that the task scheduling of the EM is more reasonable.

[0092] See also Figure 8 , is a flow chart of another energy model calibration method provided by an embodiment of the present invention. Figure 8 As shown, the processing steps of the method include:

[0093] 401. A foreground information detection module detects that a first application is running in the foreground of an electronic device.

[0094] 402, the foreground information detection module determines the first running scene to which the first application belongs. In some embodiments, the foreground information detection module is provided with a scene classification rule for the foreground application. According to the scene classification rule, the foreground information detection module can determine the running scene to which the first application running in the foreground belongs.

[0095] 403 , the CPU temperature detection module detects the junction temperature of each CPU core.

[0096] 404 , the EM calibration trigger module obtains the 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.

[0097] 405 , when the EM calibration triggering module determines that the first operation scenario is a specified operation scenario, the junction temperature of each CPU core is within a specified temperature range, and EM calibration has not been performed within the specified operation scenario and the specified temperature range, the EM calibration triggering module determines to trigger EM calibration.

[0098] 406, the EM calibration module collects the current value of each CPU core through the preset chip. Fig. 9 As shown, a SOC chip can be pre-installed in the electronic device, and the EM calibration module can collect the current value of each CPU core through the pre-installed chip.

[0099] 407 , the EM calibration module integrates and normalizes the collected current values ​​of each CPU core to obtain the calibrated power consumption value of each CPU core.

[0100] 408, the EM calibration module inputs the calibrated power consumption value of each CPU core into the task scheduling module.

[0101] 409, in the task scheduling module, the EM performs task scheduling using the calibrated power consumption values ​​of each CPU.

[0102] In the embodiment of the present invention, the actual leakage current of each CPU core can be collected through the SOC chip, and the calibrated power consumption value of each CPU core can be calculated according to the actual leakage current of each CPU core. The power consumption value of each CPU core calculated according to the actual leakage current of each CPU core is closer to its actual power consumption value, which is more helpful for EM to reasonably schedule each task.

[0103] See also Fig.10 , is a flow chart of another energy model calibration method provided by an embodiment of the present invention. Fig.10 As shown, the processing steps of the method include:

[0104] 501, the front-end interface of the electronic device displays an energy model calibration interface.

[0105] 502 , when the foreground information detection module detects a calibration instruction operation acting on the energy model calibration interface, it sends an EM calibration instruction to the EM calibration trigger module.

[0106] 503, the EM calibration trigger module determines to trigger EM calibration according to the EM calibration instruction.

[0107] 504, the EM calibration module collects the current value of each CPU core through the preset chip.

[0108] 505 , the EM calibration module integrates and normalizes the collected current values ​​of each CPU core to obtain the calibrated power consumption value of each CPU core.

[0109] 506, the EM calibration module inputs the calibrated power consumption value of each CPU core into the task scheduling module.

[0110] 507, in the task scheduling module, the EM performs task scheduling using the calibrated power consumption values ​​of each CPU.

[0111] In the embodiment of the present invention, the EM calibration can be triggered by the user's operation, thereby triggering the EM calibration more flexibly.

[0112] 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 a plurality of CPU cores, and the method includes:

[0113] A condition for triggering energy model calibration is detected;

[0114] Determine the calibrated power consumption value of each CPU core under the current operation information of the electronic device;

[0115] 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.

[0116] In some embodiments, when a combination of one or more of the following information is detected, it is determined that a condition for triggering energy model calibration is detected, including:

[0117] Detecting that the electronic device is running a specified application;

[0118] It is detected that the application running on the electronic device belongs to the specified running scenario;

[0119] It is detected that the junction temperature of the CPU core of the electronic device is within a specified temperature range.

[0120] In some embodiments, when a combination of the following information is detected, it is determined that calibration of the energy model is triggered, including:

[0121] 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.

[0122] 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.

[0123] In some embodiments, the detecting of a condition for triggering energy model calibration includes: the electronic device displaying an energy model calibration interface;

[0124] 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.

[0125] In some embodiments, the current operation information of the electronic device includes a combination of one or more of the following:

[0126] 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.

[0127] In some embodiments, determining the calibrated power consumption value of each CPU core under the current operation information of the electronic device includes:

[0128] Determine the power consumption deviation value of each CPU core under the current operation information of the electronic device;

[0129] 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.

[0130] In some embodiments, determining the calibrated power consumption value of each CPU core under the current operation information of the electronic device includes:

[0131] Pre-store the power consumption table of each CPU core under different operating information;

[0132] Determine a target power consumption table corresponding to current operation information of the electronic device;

[0133] The calibrated power consumption value of each CPU core is determined according to the target power consumption table.

[0134] In some embodiments, determining the calibrated power consumption value of each CPU core under the current operation information of the electronic device includes:

[0135] The current value of each CPU core is collected through the preset chip;

[0136] The calibrated power consumption value of each CPU core is calculated according to the current value.

[0137] The embodiment of the present invention further provides an electronic device, the electronic device comprising: 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 above Figure 2-Figure 10 The energy model calibration method described in any one of the above. In some embodiments, the current CPU core may be a main CPU core in the electronic device.

[0138] An embodiment of the present invention further provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a computer including multiple CPU cores, the computer executes the above-mentioned energy model calibration method.

[0139] 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.

[0140] An embodiment of the present invention further provides a chip, including 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.

[0141] Optionally, the chip also includes a memory, which is connected to the processor via a circuit or wire, and the processor is used to read and execute the computer program in the memory. Further optionally, the chip also includes a communication interface, and the processor is connected to the communication interface. The communication interface is used 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 can be an input and output interface.

[0142] The memory can 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 compressed optical discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), a magnetic disk storage medium or other magnetic storage device, or it can also be any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer.

[0143] 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.

[0144] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" 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 be represented by: 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.

[0145] Those of ordinary skill in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented in 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. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0146] Those skilled in the art can 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.

[0147] In several embodiments provided in the present application, any function can be stored in a computer-readable storage medium if it is implemented in the form of a software functional unit and sold or used as an independent product. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence or in other words, the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present 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.

[0148] The above is only a specific implementation of the present application. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. The protection scope of the present application should be based on the protection scope 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

  • High energy efficiency resource allocating method for isomorphic cluster system of computer

    CN102749987A

  • CPU energy efficiency model optimization method and device

    CN114327025A

  • Method and device for measuring power of processor core

    CN115298636A

  • Core selection method and device, electronic equipment and storage medium

    CN116449939A

Cited By

  • Task scheduling method and computer equipment

    CN121542020A