Power consumption distribution method and device, electronic equipment and readable storage medium

By judging and updating the control level of the cooling equipment, the problem of inaccurate power consumption allocation caused by inaccurate control levels in the prior art is solved, and more efficient and accurate power consumption allocation is achieved, ensuring the normal operation of electronic equipment.

CN120103941APending Publication Date: 2025-06-06PHYTIUM TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510179471.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-18
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

In the prior art, due to the inaccurate regulation level of the cooling equipment, the power consumption distribution results are inaccurate, which affects the normal operation of the electronic equipment.

Method used

By obtaining the control levels of each cooling equipment and determining whether it is correct. If it is incorrect, update the control levels; if it is correct, allocating the operating power consumption based on the control levels.

Benefits of technology

It improves the accuracy of power consumption distribution, ensures the normal operation of electronic equipment, and improves the accuracy of the regulation level in the next power consumption distribution cycle, and improves the power consumption distribution efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120103941A_ABST
    Figure CN120103941A_ABST
Patent Text Reader

Abstract

The invention provides a power consumption distribution method and device, electronic equipment and a readable storage medium, and is applied to the technical field of computers. According to the method, after the regulation and control level of each piece of cooling equipment is obtained, whether the regulation and control level of each piece of cooling equipment is correct or not is judged, and under the condition that the regulation and control level of each piece of cooling equipment is correct, power consumption distribution is carried out. Compared with the prior art that the power consumption is distributed only based on the regulation and control level determined in the initialization process, the method confirms whether the regulation and control level is correct or not, and only under the condition that the regulation and control level of each cooling device is correct, the operation power consumption of each cooling device is distributed. The operation power consumption of each cooling device is distributed based on the regulation and control level of each cooling device, so that inaccurate power consumption distribution caused by a regulation and control level error is avoided, and normal operation of the electronic device is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a power consumption allocation method, device, electronic device and readable storage medium. Background Art

[0002] Linux technology uses a thermal zone architecture to perform thermal management on electronic devices. The temperature of each cooling device on the computer motherboard is collected by a thermal zone device, and the operating status of each cooling device is controlled according to the obtained temperature.

[0003] In the existing device, the performance parameters of the cooling device, such as power consumption, frequency point and operating status, are limited by the control level. For any cooling device, there are at least two corresponding control levels, and the minimum power consumption of the cooling device is different under different control levels. Based on this, the temperature control strategy component under the existing device obtains the control level of each cooling device during the initialization process of the electronic device, and allocates the power consumption corresponding to each cooling device based on the obtained control level.

[0004] However, the inventors have found that the control level obtained by the temperature control strategy component during the initialization process is sometimes inaccurate, resulting in inaccurate power consumption allocation based on the control level. It may even affect the normal operation of electronic equipment due to excessive power consumption of some cooling devices. Summary of the invention

[0005] In view of this, the present application is committed to providing a power consumption allocation method, device, electronic device and readable storage medium to solve the problem in the prior art that the power consumption allocation result is low in accuracy due to inaccurate control level of the cooling equipment, affecting the reliable operation of the electronic device.

[0006] In a first aspect, the present application provides a power consumption allocation method, which is applied to an electronic device configured with at least one cooling device, the method comprising:

[0007] In response to the power consumption allocation instruction, obtaining the control level of each cooling device;

[0008] Determine whether the control level of each cooling device is correct;

[0009] If the control level of at least one cooling device is wrong, update the control level of each cooling device;

[0010] If the control level of each cooling device is correct, the operating power consumption of each cooling device is allocated based on the control level of each cooling device.

[0011] In an optional implementation, the process of determining whether the regulation level of any cooling device is correct includes:

[0012] Extract the maximum control level and the minimum control level from the control levels of the cooling equipment;

[0013] If the maximum control level is equal to the minimum control level, it is determined that the control level of the cooling device is wrong;

[0014] If the maximum control level is greater than the minimum control level, it is determined that the control level of the cooling device is correct.

[0015] In an optional implementation, updating the control level of each cooling device includes:

[0016] After the configuration information of each cooling device is configured, a first notification instruction is generated;

[0017] In response to the first notification instruction, obtaining a current maximum control level and a current minimum control level of a target cooling device, wherein the target cooling device includes any one of the cooling devices;

[0018] If the current maximum control level is equal to the current minimum control level, the control level of the target cooling device is updated based on the configuration information.

[0019] In an optional implementation, updating the control level of each cooling device includes:

[0020] After the configuration information of each cooling device is configured, a first notification instruction is generated;

[0021] In response to the first notification instruction, obtaining a target control level of a target cooling device recorded in the configuration information, wherein the target cooling device includes any one of the cooling devices;

[0022] If the target regulation level is inconsistent with the current regulation level of the target cooling device, the regulation level of the target cooling device is updated to the target regulation level.

[0023] In an optional implementation, updating the control level of each cooling device includes:

[0024] Acquire configuration information of each cooling device according to a preset update cycle, wherein the configuration information includes a control level corresponding to the cooling device;

[0025] The control level of each cooling device is updated according to the configuration information.

[0026] In an optional implementation, allocating the operating power consumption of each cooling device based on the regulation level of each cooling device includes:

[0027] Determine the minimum power consumption of each cooling device at the maximum control level;

[0028] Determining the total power consumption of the electronic device in the current state based on the minimum power consumption corresponding to each cooling device;

[0029] The operating power consumption of each cooling device is allocated based on the total power consumption.

[0030] In an optional implementation, the power consumption allocation method provided in the first aspect of the present application further includes: collecting the operating temperature of the electronic device according to a preset temperature control cycle;

[0031] If the operating temperature is greater than a preset temperature threshold in any of the preset temperature control cycles, the power consumption allocation instruction is generated.

[0032] In an optional implementation, the cooling device includes a processor core.

[0033] In a second aspect, the present application provides a power consumption allocation device, which is applied to an electronic device configured with at least one cooling device, the device comprising a temperature control strategy unit and an advanced configuration power management interface ACPI driver unit, wherein:

[0034] The temperature control strategy unit is used to respond to the power consumption allocation instruction, obtain the control level of each cooling device and determine whether the control level of each cooling device is correct;

[0035] The ACPI driving unit is used to update the control level of each cooling device when the control level of at least one cooling device is wrong;

[0036] The temperature control strategy unit is further used to allocate the operating power consumption of each cooling device based on the regulation level of each cooling device when the regulation level of each cooling device is correct.

[0037] In an optional implementation, the power consumption allocation device provided in the second aspect of the present application further includes: a dynamic frequency modulation unit, wherein:

[0038] The dynamic frequency modulation unit is used to generate a first notification instruction after the configuration information of each cooling device is configured;

[0039] The ACPI driver unit is used to respond to the first notification instruction, obtain the current maximum control level and the current minimum control level of the target cooling device, and update the control level of the target cooling device based on the configuration information when the current maximum control level is equal to the current minimum control level. The target cooling device includes any one of the cooling devices.

[0040] In an optional implementation, the power consumption allocation device provided in the second aspect of the present application further includes: a temperature control core unit, wherein:

[0041] The temperature control core unit is used to collect the operating temperature of the electronic device according to a preset temperature control cycle, and generate the power consumption allocation instruction if the operating temperature is greater than a preset temperature threshold in any of the preset temperature control cycles.

[0042] In a third aspect, the present application provides an electronic device, including:

[0043] Memory, used to store programs;

[0044] A processor is used to call the program in the memory to execute the power consumption allocation method as described in any one of the first aspects of the present application.

[0045] In a fourth aspect, the present application provides a computer-readable storage medium having a program stored thereon, wherein the program enables a computer to execute the power consumption allocation method as described in any one of the first aspects of the present application.

[0046] Based on the above content, the power consumption allocation method provided by the present application, after obtaining the control level of each cooling device, judges whether the control level of each cooling device is correct. When the control level of each cooling device is correct, the operating power consumption of each cooling device is allocated based on the control level of each cooling device. Compared with the prior art that only allocates power consumption based on the control level determined during the initialization process, the present method confirms whether the control level is correct. Only when the control level of each cooling device is correct, the operating power consumption of each cooling device is allocated based on the control level of each cooling device, thereby avoiding inaccurate power consumption allocation due to incorrect control level and ensuring the normal operation of electronic equipment.

[0047] Furthermore, if the control level of at least one cooling device is wrong, this method will also update the control level of each cooling device to increase the possibility that the control level of each cooling device is correct in the next power consumption allocation cycle, which helps to complete the power consumption allocation as soon as possible and improve the power consumption allocation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0049] Figure 1 It is a structural schematic diagram of an electronic device provided by this application.

[0050] Figure 2 It is a schematic diagram of a temperature zone architecture applicable to the electronic device provided in this application.

[0051] Figure 3 This is a flow chart of a power consumption allocation method provided by the present application.

[0052] Figure 4 It is a schematic diagram of the relationship between the operating system and the energy consumption management architecture provided in this application.

[0053] Figure 5 This is a flow chart of a method for allocating power consumption of cooling equipment provided by the present application.

[0054] Figure 6 This is a flow chart of a control level updating method provided in this application.

[0055] Figure 7 This is a flow chart of another control level updating method provided in this application.

[0056] Figure 8 This is a structural block diagram of a power consumption allocation device provided in this application.

[0057] Fig. 9 This is a structural block diagram of another power consumption allocation device provided in this application.

[0058] Fig.10 This is a structural block diagram of another power consumption allocation device provided in the present application. DETAILED DESCRIPTION

[0059] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0060] The power consumption allocation method provided in this application is applied to electronic equipment, combined with Figure 1 As shown, the hardware layer of the electronic device 100 may include a processor 110 and a memory 120, the processor 110 is connected to the memory 120, the electronic device 100 may have a built-in or external temperature acquisition device 130 (thermal zone device), and the temperature acquisition device 130 can communicate or connect with the processor 110. The memory 120 is used to store programs, and the processor 110 is used to call the programs in the memory 120 to execute the power consumption configuration method provided in the subsequent embodiments of this application.

[0061] Furthermore, the software layer of the electronic device 100 may include a boot program, an operating system (OS), and an application program, etc., wherein the boot program may be a universal boot program (UBOOT, Universal Boot Loader), or a unified extensible firmware interface program (UEFI, Unified Extensible Firmware Interface), and of course, other types of boot programs, which are not described in detail here. The memory 120 also stores program instructions of the aforementioned boot program, operating system, and application program, which can realize the functions of the boot program, operating system, and application program when read and executed by the processor 110.

[0062] The processor 110 may be, but is not limited to, a CPU, a GPU, or other types. The processor 110 may include one or more processor cores. In specific applications, the boot program, the operating system, and the application program may run in different cores or the same core of the processor 110, respectively.

[0063] The temperature acquisition device 130 may be, but is not limited to, a temperature sensor, a thermistor (NTC), etc. In practical applications, the temperature acquisition device 130 is mainly used to acquire the operating temperature of a cooling device and obtain a temperature feedback value processor 110.

[0064] The electronic device 100 of the embodiment of the present application may be, but is not limited to, various electronic devices such as a personal computer (PC), a desktop, a server, a portable device, etc., and may also be, for example, a chip, etc. In particular, the electronic device of the embodiment of the present application may be a laptop computer, a desktop, etc. used by ARM chip system developers. The embodiment of the present application does not limit the specific implementation form of the electronic device in the embodiment of the present application.

[0065] In an optional embodiment, the operating system installed in the electronic device provided in the present application is a Linux system. The Linux system uses a temperature zone architecture to perform thermal management on the electronic device. The temperature of each cooling device configured in the electronic device is collected by a temperature acquisition device, and the operating status of each cooling device is controlled according to the obtained temperature.

[0066] See also Figure 2 , Figure 2A schematic diagram of a temperature zone architecture 200 applicable to the present application is shown. The temperature zone architecture 200 may include: a temperature control core layer 210, a temperature control strategy layer 220 (thermal governor) and a cooling device layer 230, wherein the temperature control core layer 210 is provided with a temperature acquisition device 130 (thermal zone device), the temperature acquisition device 130 may be but not limited to a temperature sensor, a thermistor, etc., the cooling device layer 230 is provided with a cooling device (thermal cooling device), the cooling device may be but not limited to a fan, a CPU, a DDR, a GPU, etc. in the electronic device 100, and of course, it may also be each processor core inside the CPU, the temperature control strategy layer 220 may include power consumption allocation components for implementing temperature control, these power consumption allocation components may include step-wise intelligent allocation (ST), explosive intelligent allocation (bang bang), intelligent power consumption allocation (IPA, Intelligent Power Allocation) and other components, these power consumption allocation components are usually provided in the temperature control module in the operating system of the electronic device 100, and the processor 110 of the electronic device 100 reads and executes the program instructions of the operating system in the memory 120 to implement the functions of the above-mentioned power consumption allocation components. Of course, in order to realize the power consumption allocation of each cooling device in the electronic device, the operating system loaded by the electronic device also includes other components, such as the Advanced Configuration and Power Interface (ACPI) module, the Collaborative Processor Performance Control (CPPC) module, etc. These related modules will be specifically expanded in the subsequent content in combination with the power consumption allocation method provided in this application, and will not be described in detail here.

[0067] The temperature acquisition device 130 detects the current temperature in real time and provides the current temperature to the processor 110. The processor 110 reads and executes the program instructions of the operating system in the memory 120 to run the operating system, so that the operating system can call a power consumption allocation component in the temperature control strategy layer 220 according to the current temperature to execute the temperature control algorithm to control the corresponding cooling device in the cooling device layer 230 to adjust its frequency, voltage and other working parameters, and finally achieve the expected temperature control target.

[0068] Based on the above content, the present application provides a power consumption allocation method, which is applied to Figure 1 The electronic equipment shown, such as Figure 2 As shown, the electronic device is configured with at least one cooling device. It can be understood that when the electronic device is loaded with Figure 2In the case of the temperature zone architecture shown, the various steps included in the power consumption allocation method provided by the present application may be executed by different constituent modules in the temperature zone architecture. Furthermore, the various constituent modules exchange information with each other, thereby completely executing the power consumption allocation method provided by the present application. It should be noted that in the subsequent embodiments, the power consumption allocation method provided by the present application is introduced by taking the processor core as an example of a cooling device.

[0069] See also Figure 3 As shown, the power consumption allocation method provided by the present application includes the following steps.

[0070] S100: In response to a power consumption allocation instruction, obtain a control level of each cooling device.

[0071] In the present application, the power consumption allocation instruction is used to trigger the power consumption allocation control process. In practical applications, the power consumption allocation instruction can be generated in different ways, and the power consumption allocation instruction can also be issued by different execution entities. In an optional implementation, the operating temperature of the electronic device (specifically, the operating temperature of the corresponding cooling device in the electronic device) can be collected according to a preset temperature control cycle. If the operating temperature of the electronic device is greater than the preset temperature threshold in any preset temperature control cycle, a power consumption allocation instruction can be generated. After receiving the power consumption allocation instruction, the electronic device obtains the control level of each cooling device.

[0072] It should be noted that in actual applications, the specific selection of the preset temperature control cycle and the preset temperature threshold needs to be determined in combination with the operating environment, load conditions, performance parameters and specific control requirements of the electronic equipment. This application does not limit the specific values ​​of the preset temperature control cycle and the preset temperature threshold.

[0073] In an optional implementation, the electronic device loads the aforementioned UEFI energy management architecture, and the relationship between the energy management architecture and the electronic device operating system can be as follows: Figure 4 As shown, it may include but is not limited to: an ACPI driver module (ACPI driver), a temperature control module (Thermal zone), a dynamic frequency modulation module (CPUfreq) and an energy model (energymodel).

[0074] The ACPI driver module can perform operations based on the ACPI table provided by UEFI, which may include but is not limited to Figure 4The Thermal.c module and Processor_thermal.c module shown in the figure, where, when the cooling device is a processor core, the Processor_thermal.c submodule in the Thermal.c module is responsible for the related operations of the processor core, such as obtaining the resource description related to the thermal zone from the ACPI table, mainly including a large number of trigger point (trip) information, which describes the passive (passive state), active (active state) and critical (critical state) types of trigger points, and is also used to bind the cooling device to the thermal zone framework. Figure 4 The Processor_thermal.c module shown in FIG is responsible for managing the initialization operation of the processor core as a cooling device, and specifically registering the processor core to the thermal zone architecture. Furthermore, the ACPI driver module is also used to implement some power consumption-frequency conversion functions for the temperature control module to call.

[0075] The cpufreq driver in the dynamic frequency modulation module mainly manages the processor core, loads multi-core startup, initializes the processor policy information (cpu policy), and other tasks. In this application, the cpufreq driver also adds a notification chain mechanism to drive the control level update of each cooling device. This will be expanded in detail in the subsequent content and will not be described in detail here. The cppc module is a frequency modulation strategy integrated in ACPI. The temperature control strategy component in the temperature control module can call this module to implement the frequency modulation control of the cooling device. The frequency modulation strategy may include a description of related policy resources, for example, a resource description of the processor collaborative controller protocol CPPC cpufreq, and CPPC cpufreq is used to initialize the dynamic frequency modulation driver component (cpufreq driver) of the dynamic frequency modulation module in the operating system. For example, the CPPC cpufreq module can be the ACPICPPC CPUFreq driver provided by the Linux kernel, and the main application scenario is the ARM platform.

[0076] The energy model can create an energy model performance table corresponding to each cooling device. The energy model performance table can include the frequency and power consumption corresponding information of the cooling device. The energy model performance table can be used to implement the frequency and power consumption conversion of the cooling device. The energy model related nodes include the relevant resource description of the energy model, for example, the energy efficiency level information used to initialize the energy model. In one example, the energy model can be used to create an energy model performance table, which can include the correspondence between frequency and power consumption. For example, the energy model performance table can include two columns, one column for recording frequency values, and the other column for recording power consumption values. The frequency value and power consumption value in the same row are in a corresponding relationship.

[0077] The temperature control module can be used to manage various temperature control devices (for example, the cooling device and temperature acquisition device mentioned above) to achieve energy consumption management through temperature control. Figure 4 As shown, the temperature control module may include a temperature control core component, a temperature control strategy component and a cooling device component, wherein the temperature control core component is used to manage the temperature acquisition device, and can perform operations such as initialization and registration of the temperature acquisition device; the cooling device component is used to manage various cooling devices in the computing device, and can perform operations related to various cooling devices. The temperature control strategy component may include but is not limited to an IPA component, a BB (bang bang) component, an ST (stepwise) component, etc. These components may use different temperature control algorithms to implement power consumption regulation of the computing device. In the present application, the power consumption allocation algorithm provided in the present application may also be executed through the temperature control strategy component.

[0078] The ACPI system description table in UEFI can contain IPA resource descriptions and methods to provide them to the operating system. The IPA resource description includes the parameters required for the normal initialization and operation of the Linux kernel modules involved in the IPA component. Figure 4 The ACPI system description table in the embodiment of the present application may include a system description table (DSDT table) and an APIC table, wherein the DSDT table includes a trigger point resource description related to IPA. The APIC table includes an energy efficiency class field (efficiency_class), which can be used to initialize the energy model in the operating system.

[0079] In one possible implementation, the temperature control core component can be used to collect the operating temperature of the electronic device collected by each temperature acquisition device according to the aforementioned preset temperature control cycle. If the operating temperature obtained within any preset temperature control cycle is greater than the preset temperature threshold, the temperature control core component sends a power consumption allocation instruction to the temperature control strategy component, such as the IPA component. The IPA component responds to the power consumption allocation instruction and further executes the power consumption allocation method provided in the present application. In other words, the power consumption allocation method provided in the present application can be integrated into the IPA component.

[0080] Furthermore, in the case where the cooling device is a processor core, the control level of each cooling device is maintained by the Processor_thermal.c submodule in the ACPI driver module based on the processor policy information provided by the cpufreq driver submodule in the dynamic frequency modulation module. Therefore, the IPA component needs to access the ACPI driver module to obtain the control level of each cooling device. As for the specific process of the Processor_thermal.c submodule maintaining the processor core control level based on the processor policy information provided by the cpufreq driver submodule, it will be expanded in detail in the subsequent content and will not be described in detail here.

[0081] S110, determining whether the control levels of each cooling device are correct, if not, executing S120, if so, executing S130.

[0082] After obtaining the control level of each cooling device, determine whether the control level of each cooling device is correct. If the control level of at least one cooling device is wrong, execute S120. On the contrary, if the control level of each cooling device is correct, execute S130.

[0083] As mentioned above, for any cooling device, it is configured with at least two control levels (which can be understood as the gears of the fan). Under different control levels, the corresponding minimum power consumption of the cooling device is different. Based on this, as an optional implementation method, after obtaining all the control levels of the cooling device, the maximum control level and the minimum control level of the control level of the cooling device are extracted. When the control level is correct, the control levels corresponding to the cooling device are different. Therefore, if the obtained maximum control level is equal to the minimum control level, it can be determined that the control level of the cooling device is wrong. Correspondingly, if the obtained maximum control level is greater than the minimum control level, it can be determined that the control level of the cooling device is correct.

[0084] In another optional implementation, the minimum control level of the cooling device is represented by 0, and other control levels will increase successively. When the control level of the cooling device is abnormal, the maximum control level of the cooling device will be a negative number. Based on this, a new function get_max_state can be added to the temperature control strategy component, and the function is called to obtain the maximum control level of the cooling device. If the obtained value is a positive value greater than 0, it means that the control level of the cooling device is correct. On the contrary, if the obtained value is a negative value, it can be determined that the control level of the cooling device is wrong.

[0085] The method provided in the above content is applicable to each cooling device and can be flexibly selected according to needs in actual applications. Correspondingly, judging whether the control levels of all cooling devices are correct can also be achieved in a variety of ways.

[0086] In an optional implementation, the ACPI table records all cooling devices configured for the electronic device in the form of a thermalzone_list linked list. Based on this, all cooling devices recorded in the thermalzone_list linked list can be traversed to determine in turn whether the control level of each cooling device is correct, thereby obtaining a judgment result.

[0087] In another optional implementation, the above method is used to determine whether the control level of each cooling device is correct, and after obtaining the judgment result corresponding to any cooling device, the number of cooling devices with correct control levels is counted. If the number of cooling devices with correct control levels is equal to the number of all cooling devices configured by the electronic device, it is determined that the control levels of all cooling devices configured by the electronic device are correct; on the contrary, if the number of cooling devices with correct control levels obtained is not equal to the number of all cooling devices configured by the electronic device, it is determined that the control level of at least one cooling device is wrong. Among them, the number of all cooling devices configured by the electronic device can also be determined by traversing the information recorded in the aforementioned thermalzone_list linked list. In actual applications, corresponding variables can be set to count the number of cooling devices with correct control levels. The specific code implementation of the method provided in this embodiment can refer to the relevant technology and will not be described in detail here.

[0088] S120. Update the control level of each cooling device.

[0089] When the control level of at least one cooling device is wrong, the control level of each cooling device is updated. At the same time, the current power consumption allocation process is exited, and judgment is made again in the next power consumption allocation process until the control levels of each cooling device are correct. Then S130 is executed to complete the power consumption allocation.

[0090] In an optional implementation, the preset update period is determined based on factors such as the registration time of the cooling device in the electronic device, the preparation time of the processor core policy information, and the power consumption allocation efficiency requirements, and the configuration information of each cooling device is obtained according to the preset update period, wherein the configuration information at least includes the control level corresponding to the cooling device, and then the control level of each cooling device is updated according to the configuration information, that is, the control level of the cooling device is updated according to the preset update period. It should be noted that the preset update period can be selected according to actual needs, and this application does not limit the specific value of the preset update period.

[0091] As mentioned earlier, in Figure 4 In the energy management architecture shown, the Processor_thermal.c submodule maintains the control strategy of the cooling device based on the processor core policy information provided by the cpufreq driver submodule in the dynamic frequency modulation module. Based on this, the Processor_thermal.c submodule can perform this step, that is, access the cpufreq driver submodule according to the preset update cycle to obtain the processor core policy information and update the control strategy.

[0092] Furthermore, the present application also provides other methods for updating the control level of the cooling equipment, which will be specifically described in subsequent embodiments and will not be described in detail here.

[0093] S130. Allocate operating power consumption of each cooling device based on the control level of each cooling device.

[0094] When the control level of each cooling device is correct, the operating power consumption of each cooling device can be allocated based on the control level of each cooling device. First, the minimum power consumption of each cooling device at the maximum control level is determined, and then the total power consumption of the electronic device in the current state is determined based on the minimum power consumption of each cooling device, and finally the operating power consumption of each cooling device is allocated based on the total power consumption.

[0095] In an optional implementation, based on the core idea of ​​the above power consumption allocation, the electronic device adopts Figure 4 In the case of the energy management architecture shown in the figure, Figure 5 The exemplary process shown allocates the operating power consumption of each cooling device.

[0096] S1301, allocator_power: calling the allocator_power function to calculate the power consumption that needs to be allocated to each cooling device (for example, processor core 1, processor core 2, ...);

[0097] S1302. Calculate the power consumption required by each cooling device to obtain a total power consumption:

[0098] Specifically, for each cooling device, its get_requested_power function is called, and after being called, the first callback function processor_get_requested_power in the ACPI driver module is called back to calculate the load of the cooling device. Specifically, the first callback function processor_get_requested_power calls state2power, and the member state2power in thermal_cooling_device_ops calls the second callback function processor_state2power to obtain the power consumption of the cooling device in the current state. Among them, after the second callback function processor_state2power is called, it will call the function get_level to obtain the current state level and the function processor_freq_to_power to convert the frequency to power consumption, so as to obtain the dynamic power consumption of the cooling device in the current state by running the function get_level to obtain the current state level and the function processor_freq_to_power to convert the frequency to power consumption.

[0099] As mentioned above, the program file of the ACPI driver module includes the conversion function between power consumption and frequency. The above-mentioned current state level function get_level and frequency conversion power consumption functions processor_freq_to_power, state2power and state2power are all pre-recorded in the ACPI driver module. When the temperature control strategy component executes this step, it needs to call the corresponding function or access the result to call the corresponding function, thereby realizing the above-mentioned calculation process. As for the specific implementation of the above-mentioned functions and the information not explained in this embodiment, they can all be realized by referring to the relevant technology and will not be described in detail here.

[0100] S1303, pid_controller: call the pid_controller algorithm, run the divvy_up_power and power_actor_set_power functions in the pid_controller algorithm, and calculate the power consumption value that meets the power consumption allocation requirement according to the total power consumption obtained in the above steps and the required power consumption of each cooling device.

[0101] S1304, divvy_up_power: This function is mainly used to add the value of the member get_requested_power in thermal_cooling_device_ops, the power consumption value that meets the power consumption allocation requirement calculated in the previous step, and the value of the member state2power in thermal_cooling_device_ops, calculate the actual allocated power consumption Divvy of each cooling device and output it.

[0102] After the actual allocated power consumption of each cooling device is determined, S1305 may be further performed to control the operating frequency of each cooling device.

[0103] S1305 , power_actor_set_power: call the member power2state in thermal_cooling_device_ops to convert the actual allocated power consumption of each cooling device into a level to achieve the final frequency reduction of each cooling device.

[0104] As mentioned earlier, in Figure 4In the energy management architecture shown, the cppc module in the dynamic frequency modulation module is configured with a frequency modulation function, based on which the actual processor core frequency reduction operation is implemented through the dynamic frequency modulation driver module. Specifically, the member power2state in thermal_cooling_device_ops calls the third callback function processor_power2state, and when the third callback function processor_power2state is called, it calls back the power consumption conversion frequency function processor_power_to_freq, the load rate calculation function get_load, and the current state level acquisition function get_level. After the power consumption conversion frequency function processor_power_to_freq, the load rate calculation function get_load, and the current state level acquisition function get_level are called, the actual allocated power consumption of the processor core is converted into a level.

[0105] It should be noted that for Figure 5 The specific implementation of each function involved in the illustrated embodiment and other contents not elaborated in detail in the foregoing contents can all be implemented by referring to relevant technologies and will not be described in detail here.

[0106] To summarize, through the power consumption allocation method provided by the present application, after obtaining the control level of each cooling device, it is judged whether the control level of each cooling device is correct. When the control level of each cooling device is correct, the operating power consumption of each cooling device is allocated based on the control level of each cooling device. Compared with the prior art that only allocates power consumption based on the control level determined during the initialization process, the present method confirms whether the control level is correct. Only when the control level of each cooling device is correct, the operating power consumption of each cooling device is allocated based on the control level of each cooling device, thereby avoiding inaccurate power consumption allocation due to incorrect control level and ensuring the normal operation of electronic equipment.

[0107] Furthermore, if the control level of at least one cooling device is wrong, this method will also update the control level of each cooling device to increase the possibility that the control level of each cooling device is correct in the next power consumption allocation cycle, which helps to complete the power consumption allocation as soon as possible and improve the power consumption allocation efficiency.

[0108] The inventor further discovered that in UEFI firmware, the initialization process of each temperature control strategy component in the temperature control module and the related initial conditions to ensure normal operation all depend on the ACPI driver module. Figure 4As shown in the figure, taking the processor core as a cooling device as an example, the processor core needs to be configured as a cooling device first. During this process, it is necessary to wait for the dynamic frequency modulation module to start working and initialize the processor policy (cpu policy) and other related information. At the same time, the thermal submodule in the ACPI driver module is responsible for obtaining relevant resource descriptions from the ACPI table. The Processor thermal submodule registers the processor core as a cooling device, and the registration process needs to rely on the processor policy information in the dynamic frequency modulation.

[0109] In actual applications, it may happen that: when registering the processor core as a cooling device, the processor policy information in the dynamic frequency modulation module is not yet ready, such as the maximum frequency, supported control level and other information are not loaded. This will cause the control level of the cooling device to be incorrect, which in turn leads to inaccurate power consumption allocation, and may even affect the normal operation of electronic equipment due to excessive power consumption of some cooling devices.

[0110] To solve the above problems, based on the power consumption allocation method provided in the above embodiments, the present application provides a method for updating the control level of each cooling device, so as to achieve more efficient updating of the control level of each cooling device.

[0111] In an optional implementation, the method for updating the cooling device control level provided in the present application may include: Figure 6 The following steps are shown.

[0112] S200: After the configuration information of each cooling device is configured, a first notification instruction is generated.

[0113] As mentioned above, the registration of the control level of the cooling device depends on the configuration of the configuration information. If the configuration information has been configured when registering the control level, the correct control level can be registered. On the contrary, if the configuration information has not been configured when registering the control level, the wrong control level may be registered. In order to solve the problem that the configuration process of the configuration information is different from the registration process of the control level, the present application provides a notification mechanism, that is, after the configuration information of each cooling device is configured, a first notification instruction is generated to indicate that the configuration of the configuration information of the cooling device is complete through the first notification instruction.

[0114] It can be understood that, when the cooling device is a processor core, the configuration information refers to the processor policy information (cpu policy) corresponding to the processor core.

[0115] by Figure 4 Taking the application scenario shown as an example, the initialization process related to the Processor_thermal.c submodule may include the following steps.

[0116] S1, temperature control trigger point initialization;

[0117] Specifically, the acpi_thermal_get_info function in the ACPI driver module can be called to obtain a preset temperature control trigger point from the ACPIDSDT table of UEFI to initialize the temperature control trigger point of the temperature control module in the operating system, so that the IPA component in the thermal zone can be used.

[0118] S2. Register the temperature acquisition device, that is, initialize the temperature control core component;

[0119] Specifically, you can call the function in the ACPI driver module

[0120] acpi_thermal_register_thermal_zone completes the registration of each temperature acquisition device in the thermal zone.

[0121] S3, bind the temperature control core layer;

[0122] Specifically, the acpi_thermal_bind_cooling_device function in the ACPI driver module may be called to complete the binding of the temperature control core layer 210 .

[0123] S4. Register the cooling device, i.e. initialize the cooling device component;

[0124] Assume that the current cooling includes two or more processor cores. Specifically, the acpi_processor_start function in the ACPI driver module can be called to initialize each processor core. After that, acpi_processor_thermal_init is called to initialize the temperature control strategy of each cooling device. Then, the thermal_cooling_device_register function is further called to complete the registration of each processor core.

[0125] It should be noted that this method improves the aforementioned acpi_processor_thermal_init function, and sets a flag therein to indicate whether the dynamic frequency modulation module has completed the initialization process of the processor policy information. At the same time, a notification chain (notifier) ​​mechanism is added to the dynamic frequency modulation module, that is, when the cpufreq driver submodule in the dynamic frequency modulation module completes the configuration of the processor policy information, the aforementioned first notification instruction is generated to actively notify the ACPI driver module that the configuration of the processor policy information is complete. Correspondingly, the acpi_processor_thermal_init function responds to the first notification instruction and sets the aforementioned flag to indicate that the configuration of the processor policy information is complete. It can be understood that, in the case where the first notification instruction is not received, the default value of the flag is false.

[0126] It should be noted that when the cooling device is a processor core, IPA needs to use the energy model performance table (energy model performace table, emperf table) corresponding to the processor core in the energy model module when performing intelligent power consumption allocation. Therefore, in the scenario where UEFI is used to boot the operating system, the ACPI method is also required to complete the registration of the energy model performance table.

[0127] S210. In response to the first notification instruction, obtain the current maximum control level and the current minimum control level of the target cooling device.

[0128] Taking any one of the cooling devices as the target cooling device, in response to the first notification instruction, the current maximum control level and the current minimum control level of the target cooling device are obtained. In an optional implementation, the specific implementation process of obtaining the control level can refer to Figure 3 The relevant contents of S100 in the illustrated embodiment will not be repeated here.

[0129] It is understandable that in Figure 4 In the described architecture, this step can be specifically implemented by the ACPI driver module, that is, the ACPI module responds to the first notification instruction of the dynamic frequency modulation module.

[0130] S220, determine whether the current maximum control level is equal to the current minimum control level, if so, execute S230.

[0131] In an optional implementation, if the control level of the target cooling device is correct, the maximum control level should be greater than the minimum control level. Based on this, if the current maximum control level is equal to the current minimum control level, it means that the current control level of the target cooling device is wrong, and further execute S230. On the contrary, if the current maximum control level is greater than the current minimum control level, it can be determined that the current control level of the target cooling device is correct, and the current control level update process can be exited.

[0132] S230: Update the control level of the target cooling device based on the configuration information.

[0133] When it is determined that the current control level of the target cooling device is wrong, the control level of the target cooling device is updated based on the configuration information.

[0134] exist Figure 4 In the scenario shown, the ACPI driver module accesses the dynamic frequency modulation module to obtain the configuration information of the dynamic frequency modulation module, and further determines the control level of the cooling device according to the correct configuration information. As for the specific implementation process of updating the control level according to the configuration information, please refer to the above content and related technical implementations, which will not be described in detail here.

[0135] Furthermore, the present application also provides another method for updating the control level of the cooling device, see Figure 7 As shown, the method may include the following steps.

[0136] S300: After the configuration information of each cooling device is configured, a first notification instruction is generated.

[0137] In an optional implementation, the specific implementation of S300 can refer to Figure 6 The implementation of the relevant contents of S200 in the illustrated embodiment will not be repeated here.

[0138] S310. In response to the first notification instruction, obtain the target control level of the target cooling device recorded in the configuration information.

[0139] As an optional implementation, the configuration information includes the control level corresponding to each cooling device. Based on this, any one of the cooling devices is used as the target cooling device, and in response to the first notification instruction, the target control level of the target cooling device recorded in the configuration information is obtained.

[0140] In another optional implementation, if the configuration information does not directly record the control level corresponding to each cooling device, then after obtaining the first notification instruction, it is necessary to obtain the completed configuration information and determine the target control level corresponding to the target cooling device based on the obtained configuration information.

[0141] As for the specific implementation process of obtaining the control level or configuration information, please refer to Figure 3 The relevant contents of S100 in the illustrated embodiment will not be repeated here.

[0142] It is understandable that in Figure 4 In the described architecture, this step can be specifically implemented by the ACPI driver module, that is, the ACPI module responds to the first notification instruction of the dynamic frequency modulation module.

[0143] S320, determining whether the target control level is inconsistent with the current control level of the target cooling device, and if so, executing S330.

[0144] If the obtained target control level is consistent with the current control level of the target cooling device, it means that the current control level of the target cooling device is correct and does not need to be updated. The current process can be exited directly. On the contrary, if the obtained target control level is inconsistent with the current control level of the target cooling device, it means that the current control level of the target cooling device is wrong and S330 needs to be further executed.

[0145] S330: Update the control level of the target cooling device to the target control level.

[0146] When the target control level is inconsistent with the current control level, the control level of the target cooling device is updated to the target control level, and the control level update of the target cooling device is completed.

[0147] In another possible implementation, the minimum control level of the cooling device is represented by 0, and other control levels will increase in sequence. When the control level of the cooling device is abnormal, the maximum control level of the cooling device will be a negative number. Based on this, after the configuration information of each cooling device is configured, a first notification instruction is generated. In response to the first notification instruction, the maximum control level of the target cooling device is obtained, wherein the target cooling device is any one of the cooling devices. If the maximum control level of the target cooling device is a positive value greater than 0, it means that the control level of the target cooling device is correct. On the contrary, if the obtained maximum control level is a negative value, it can be determined that the control level of the target cooling device is wrong. In the case where the control level of the target cooling device is wrong, the configuration information of the target cooling device is obtained, and the control level of the target cooling device is updated based on the obtained configuration information.

[0148] To summarize, in the method for updating the regulation level of a cooling device provided in any of the above embodiments, a notification chain mechanism is provided. After the configuration information of the cooling device is completed, the update process of the regulation level of the cooling device is actively triggered through the notification chain mechanism, thereby achieving efficient update of the regulation level of the cooling device, thereby ensuring that power consumption can be allocated according to the correct regulation level as soon as possible, improving power consumption allocation efficiency, and helping to improve the stability of the operation of electronic products.

[0149] The power consumption allocation device provided by the present invention is introduced below. The power consumption allocation device provided by the present invention is applied to an electronic device configured with at least one cooling device. It belongs to the same application concept as the power consumption allocation method provided in the embodiment of the present application, and can execute the power consumption allocation method provided in any embodiment of the present application. It has the corresponding functional modules and beneficial effects of executing the power consumption allocation method. For the technical details not described in detail in this embodiment, please refer to the power consumption allocation method provided in the embodiment of the present application, and will not be repeated here.

[0150] See also Figure 8 , Figure 8 The figure shows a structural block diagram of a power consumption allocation device provided by the present application. The power consumption allocation device provided by this embodiment includes: a temperature control strategy unit 10 and an ACPI driving unit 20.

[0151] The temperature control strategy unit 10 is used to respond to the power consumption allocation instruction, obtain the control level of each cooling device and determine whether the control level of each cooling device is correct;

[0152] The ACPI driving unit 20 is used to update the control level of each cooling device when the control level of at least one cooling device is wrong;

[0153] The temperature control strategy unit 10 is further used to allocate the operating power consumption of each cooling device based on the regulation level of each cooling device when the regulation level of each cooling device is correct.

[0154] In an optional implementation, the process of the temperature control strategy unit 10 determining whether the control level of any cooling device is correct includes:

[0155] Extract the maximum control level and the minimum control level from the control levels of the cooling equipment;

[0156] If the maximum control level is equal to the minimum control level, it is determined that the control level of the cooling device is wrong;

[0157] If the maximum control level is greater than the minimum control level, make sure that the control level of the cooling equipment is correct.

[0158] In an optional implementation, the process of the ACPI driver unit 20 updating the control level of each cooling device includes:

[0159] Acquire the configuration information of each cooling device according to a preset update cycle, the configuration information including the control level corresponding to the cooling device;

[0160] Update the control level of each cooling device according to the configuration information.

[0161] In an optional implementation, the process of the temperature control strategy unit 10 allocating the operating power consumption of each cooling device based on the regulation level of each cooling device includes:

[0162] Determine the minimum power consumption of each cooling device at the maximum control level;

[0163] Determine the total power consumption of the electronic device in the current state based on the minimum power consumption corresponding to each cooling device;

[0164] Allocate the operating power consumption of each cooling device based on the total power consumption.

[0165] Further, in Figure 8 On the basis of the illustrated embodiment, the present application also provides another power consumption allocation device. The power consumption allocation device provided in this embodiment further includes:

[0166] The dynamic frequency modulation unit 30 is used to generate a first notification instruction after the configuration information of each cooling device is configured;

[0167] The ACPI driver unit 20 is used to respond to the first notification instruction, obtain the current maximum control level and the current minimum control level of the target cooling device, and update the control level of the target cooling device based on the configuration information when the current maximum control level is equal to the current minimum control level. The target cooling device includes any one of the cooling devices.

[0168] In another optional implementation, the ACPI driver unit 20 is further configured to obtain, in response to the first notification instruction, a target control level of a target cooling device recorded in the configuration information, where the target cooling device includes any one of the cooling devices;

[0169] If the target control level is inconsistent with the current control level of the target cooling device, the control level of the target cooling device is updated to the target control level.

[0170] Furthermore, the present application also provides another power consumption allocation device, see Fig.10 As shown, based on any of the above embodiments (based on Fig. 9 Taking the embodiment shown as an example), the power consumption allocation device provided in this embodiment also includes:

[0171] The temperature control core unit 40 is used to collect the operating temperature of the electronic device according to a preset temperature control cycle, and generate a power consumption allocation instruction if the operating temperature is greater than a preset temperature threshold in any preset temperature control cycle.

[0172] In some embodiments, this embodiment further provides a computer-readable storage medium, such as a floppy disk, an optical disk, a hard disk, a flash memory, a USB flash disk, an SD (Secure Digital Memory Card) card, an MMC (Multimedia Card) card, etc., in which one or more instructions for implementing the above steps are stored, and when the one or more instructions are executed by one or more processors, the processors execute the power consumption allocation method described above. For the relevant specific implementation, please refer to the above description, which will not be repeated here.

[0173] In addition to the above-mentioned methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the power consumption allocation method according to various embodiments of the present application described in the above content of this specification.

[0174] The computer program product may be written in any combination of one or more programming languages ​​to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0175] Those skilled in the art will appreciate that the contents disclosed in this disclosure may be subject to various modifications and improvements. For example, the various devices or components described above may be implemented by hardware, or by software, firmware, or a combination of some or all of the three.

[0176] In addition, although the present disclosure makes various references to certain units in the system according to embodiments of the present disclosure, any number of different units can be used and run on the client and / or server. The units are only illustrative, and different aspects of the system and method can use different units.

[0177] Flowcharts are used in this disclosure to illustrate the steps of the method according to the embodiments of the present disclosure. It should be understood that the preceding or following steps are not necessarily performed precisely in order. On the contrary, various steps may be processed in reverse order or simultaneously. At the same time, other operations may also be added to these processes.

[0178] Those skilled in the art will appreciate that all or part of the steps in the above method can be completed by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, such as a read-only memory, etc. Optionally, all or part of the steps in the above embodiment can also be implemented using one or more integrated circuits. Accordingly, each module / unit in the above embodiment can be implemented in the form of hardware or in the form of a software functional module. The present disclosure is not limited to any particular form of combination of hardware and software.

[0179] Unless otherwise defined, all terms used herein have the same meaning as commonly understood by those of ordinary skill in the art to which the present disclosure belongs. It should also be understood that terms such as those defined in common dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant technology, and should not be interpreted in an idealized or highly formal sense, unless explicitly defined as such herein.

[0180] The above is an explanation of the present disclosure and should not be considered as a limitation thereof. Although several exemplary embodiments of the present disclosure are described, it will be readily understood by those skilled in the art that many modifications may be made to the exemplary embodiments without departing from the novel teachings and advantages of the present disclosure. Therefore, all such modifications are intended to be included within the scope of the present disclosure as defined in the claims. It should be understood that the above is an explanation of the present disclosure and should not be considered to be limited to the specific embodiments disclosed, and modifications to the disclosed embodiments and other embodiments are intended to be included within the scope of the appended claims. The present disclosure is defined by the claims and their equivalents.

Claims

1. A power consumption allocation method, characterized in that: Applicable to an electronic device configured with at least one cooling device, the method comprising: In response to the power consumption allocation instruction, obtaining the control level of each cooling device; Determine whether the control level of each cooling device is correct; If the control level of at least one cooling device is wrong, update the control level of each cooling device; If the control level of each cooling device is correct, the operating power consumption of each cooling device is allocated based on the control level of each cooling device.

2. The method according to claim 1, characterized in that: The process of determining whether the control level of any cooling equipment is correct includes: Extract the maximum control level and the minimum control level from the control levels of the cooling equipment; If the maximum control level is equal to the minimum control level, it is determined that the control level of the cooling device is wrong; If the maximum control level is greater than the minimum control level, it is determined that the control level of the cooling device is correct.

3. The method according to claim 1, characterized in that: The updating of the control level of each cooling device includes: After the configuration information of each cooling device is configured, a first notification instruction is generated; In response to the first notification instruction, obtaining a current maximum control level and a current minimum control level of a target cooling device, wherein the target cooling device includes any one of the cooling devices; If the current maximum control level is equal to the current minimum control level, the control level of the target cooling device is updated based on the configuration information.

4. The method according to claim 1, characterized in that The updating of the control level of each cooling device includes: After the configuration information of each cooling device is configured, a first notification instruction is generated; In response to the first notification instruction, obtaining a target control level of a target cooling device recorded in the configuration information, wherein the target cooling device includes any one of the cooling devices; If the target regulation level is inconsistent with the current regulation level of the target cooling device, the regulation level of the target cooling device is updated to the target regulation level.

5. The method according to claim 1, characterized in that The updating of the control level of each cooling device includes: Acquire configuration information of each cooling device according to a preset update cycle, wherein the configuration information includes a control level corresponding to the cooling device; The control level of each cooling device is updated according to the configuration information.

6. The method according to claim 1, characterized in that The allocating the operating power consumption of each cooling device based on the regulation level of each cooling device includes: Determine the minimum power consumption of each cooling device at the maximum control level; Determining the total power consumption of the electronic device in the current state based on the minimum power consumption corresponding to each cooling device; The operating power consumption of each cooling device is allocated based on the total power consumption.

7. The method according to claim 1, characterized in that Also includes: collecting the operating temperature of the electronic device according to a preset temperature control cycle; If the operating temperature is greater than a preset temperature threshold in any of the preset temperature control cycles, the power consumption allocation instruction is generated.

8. The method according to any one of claims 1 to 7, characterized in that: The cooling device includes the processor core.

9. A power consumption allocation device, characterized in that: An electronic device used to configure at least one cooling device, the device comprises a temperature control strategy unit and an advanced configuration power management interface ACPI driver unit, wherein: The temperature control strategy unit is used to respond to the power consumption allocation instruction, obtain the control level of each cooling device and determine whether the control level of each cooling device is correct; The ACPI driving unit is used to update the control level of each cooling device when the control level of at least one cooling device is wrong; The temperature control strategy unit is further used to allocate the operating power consumption of each cooling device based on the regulation level of each cooling device when the regulation level of each cooling device is correct.

10. The device according to claim 9, characterized in that Also includes: Dynamic frequency modulation unit, wherein The dynamic frequency modulation unit is used to generate a first notification instruction after the configuration information of each cooling device is configured; The ACPI driver unit is used to respond to the first notification instruction, obtain the current maximum control level and the current minimum control level of the target cooling device, and update the control level of the target cooling device based on the configuration information when the current maximum control level is equal to the current minimum control level. The target cooling device includes any one of the cooling devices.

11. The device according to claim 10, characterized in that Also includes: Temperature control core unit, where: The temperature control core unit is used to collect the operating temperature of the electronic device according to a preset temperature control cycle, and generate the power consumption allocation instruction if the operating temperature is greater than a preset temperature threshold in any of the preset temperature control cycles.

12. An electronic device, characterized in that: include: Memory, used to store programs; A processor, configured to call the program in the memory to execute the power consumption allocation method according to any one of claims 1 to 8.

13. A computer-readable storage medium, characterized in that: A program is stored thereon, and the program enables a computer to execute the power consumption allocation method according to any one of claims 1 to 8.