Energy value determination method and device, electronic equipment and computer readable storage medium

By combining the chip's operating frequency and load information and the expected energy value calculated by the PID algorithm, the target energy value of the chip is determined, which solves the problem of insufficient chip short-term performance caused by traditional IPA algorithms, ensuring the reasonable allocation of energy values.

CN119512726APending Publication Date: 2025-02-25GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311077259.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-24
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The energy allocated based on traditional IPA algorithms may lead to short-term insufficient performance of the chip.

Method used

The target energy value allocated to the chip is determined by determining the actual energy value based on the chip's operating frequency and load information, and combining the expected energy value calculated by the proportion-integral-differential control PID algorithm.

Benefits of technology

Ensure that the energy value allocated to the chip is the actual energy value it needs, avoiding the short-term performance problem of the chip due to insufficient energy value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119512726A_ABST
    Figure CN119512726A_ABST
Patent Text Reader

Abstract

The invention relates to an energy value determination method and device, electronic equipment and a computer readable storage medium. The method comprises the following steps: determining an actual energy value required for meeting the performance of a chip according to the running frequency and load information of the chip; determining a target energy value allocated to the chip according to the actual energy value and the expected energy value; wherein the expected energy value is obtained through calculation according to a proportion-integration-differentiation (PID) control algorithm. By adopting the method, the problem of short-term performance insufficiency of the chip can be avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electronic equipment, and in particular to an energy value determination method, device, electronic equipment and computer-readable storage medium. Background Art

[0002] The Intelligent Power Allocation (IPA) algorithm is a software algorithm developed by ARM that complies with the temperature control related modules under the Linux kernel. It is designed to maximize performance under the condition of meeting the temperature control effect. The IPA algorithm contains two core functions: the Proportional-Integral-Derivative Control algorithm for determining energy and the energy allocation algorithm for energy allocation.

[0003] However, the energy allocated based on the traditional IPA algorithm may cause the chip to have short-term performance problems. Summary of the invention

[0004] The embodiments of the present application provide a method, device, electronic device and computer-readable storage medium for determining an energy value, which can avoid the problem of short-term performance deficiency of a chip.

[0005] In a first aspect, an embodiment of the present application provides a method for determining an energy value, comprising:

[0006] Determine the actual energy value required to meet the performance of the chip according to the operating frequency and load information of the chip;

[0007] According to the actual energy value and the expected energy value, a target energy value allocated to the chip is determined; wherein the expected energy value is calculated according to a proportional-integral-differential control PID algorithm.

[0008] In a second aspect, an embodiment of the present application provides an energy value determination device, including:

[0009] A first determination module, used to determine an actual energy value required to meet the performance of the chip according to the operating frequency and load information of the chip;

[0010] The second determination module is used to determine the target energy value allocated to the chip according to the actual energy value and the expected energy value; wherein the expected energy value is calculated according to the proportional-integral-differential control PID algorithm.

[0011] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the energy value determination method as described in the first aspect.

[0012] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.

[0013] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which implements the steps of the method described in the first aspect when executed by a processor.

[0014] The above-mentioned energy value determination method, device, electronic device and computer-readable storage medium can determine the actual energy value required to meet the chip performance according to the operating frequency and load information of the chip, and can calculate the expected energy value required for the chip according to the proportional-integral-differential control PID algorithm, so that the target energy value allocated to the chip can be determined according to the determined actual energy value and expected energy value. Since the expected energy value calculated according to the PID algorithm is not the only consideration in the process of determining the target energy value allocated to the chip, but the actual energy value required to meet the chip performance is also combined, it can ensure that the energy value allocated to the chip is the actual energy value required by the chip, thereby avoiding the problem of short-term performance deficiency of the chip due to insufficient allocated energy value. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the embodiments of the present application 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 only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0016] Figure 1 is a flow chart of a method for determining an energy value in one embodiment;

[0017] Figure 2 A flow chart of a method for determining an energy value in another embodiment;

[0018] Figure 3 A flow chart of a method for determining an energy value in another embodiment;

[0019] Figure 4 A flow chart of a method for determining an energy value in another embodiment;

[0020] Figure 5is a structural block diagram of an energy value determination device in one embodiment;

[0021] Figure 6 It is a structural block diagram of an energy value determination device in another embodiment;

[0022] Figure 7 It is a structural block diagram of an energy value determination device in another embodiment;

[0023] Figure 8 It is a structural block diagram of an energy value determination device in another embodiment;

[0024] Fig. 9 It is a structural block diagram of an energy value determination device in another embodiment;

[0025] Fig.10 It is a structural block diagram of an energy value determination device in another embodiment;

[0026] Fig.11 FIG. 1 is a schematic diagram of the internal structure of an electronic device in an embodiment. DETAILED DESCRIPTION

[0027] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0028] The Intelligent Power Allocation (IPA) algorithm is a software algorithm developed by ARM that complies with the temperature control related modules under the Linux kernel. It aims to maximize performance under the condition of temperature control effect. The IPA algorithm is based on the following theory: the temperature of the system on a chip (SOC) is positively correlated with the power consumption. The higher the power consumption, the higher the temperature. The power consumption of the SOC is mainly consumed by the IP cores on it, such as the central processing unit (CPU) and the graphics processing unit (GPU). Therefore, the purpose of controlling the temperature can be achieved by controlling the power consumption of the SOC. By reasonably allocating power consumption among various IP cores, the performance under temperature control can be maximized. Based on the above theory, the implementation of the IPA algorithm includes two core functions: temperature closed-loop control based on proportional-integral-derivative control (PID) and energy allocation algorithm (Power Allocator, PA). For IPA, the main input is temperature and the performance requirements of each IP core. The temperature can come from SOC or the board temperature of the IP core. IPA uses the temperature difference between the collected temperature and the target control temperature as the control input. The performance requirements of each IP core are calculated by the current load, and then converted into energy requirements as the input of IPA using the <frequency, voltage> pair (Operating Performance Point, OPP) and energy model (Energy Model, EM) supported by SOC. The output of IPA is the actual allocated energy, which is then converted into performance indicators (such as maximum operating frequency) through OPP and EM. Such a cycle finally realizes the temperature control of the hardware. Among them, the PID temperature closed-loop control of the IPA algorithm has its control input as the difference e between the target temperature and the current temperature. The cumulative summation calculated by proportional, integral, and differential calculations and then added to sustainable_power is the maximum power consumption value allowed at the current temperature. Sustainable_power refers to the maximum power consumption value allowed under the condition of ensuring that the target temperature target_temerature is met. The control function of PID can be expressed as the following formula:

[0029] P max =k p *e+k i *integral err +k d *diff err +sustainable_power,

[0030] In the formula, k p ,k i ,k d is the weighting coefficient, P max is the actual energy distributed, integral err Indicates the integral, diff err Represents differential. It can be seen from the above formula that the energy calculation stage of actual allocation is calculated by the difference between the target temperature and the current temperature using the PID algorithm, which has nothing to do with the load of the current performance requirement and does not take into account the dimension of short-term performance requirements. If there is a protruding short-term heavy load demand and exceeds the total energy allocation, because the total allocated energy has been determined according to the temperature difference in the energy allocation stage, at this time, it can only be subdivided according to the performance requirements of each IP core according to the determined total energy, but it cannot solve the problem of insufficient total energy, and may cause the chip to have a short-term performance problem. Based on this, the embodiments of the present application provide an energy value determination method, device, electronic device and computer-readable storage medium, which can avoid the problem of insufficient short-term performance of the chip.

[0031] In one embodiment, Figure 1 As shown, a method for determining an energy value is provided. This embodiment uses the method applied to an electronic device as an example for illustration. It can be understood that the method can also be applied to a server, and can also be applied to a system including an electronic device and a server, and is implemented through the interaction between the electronic device and the server. In this embodiment, the method includes the following steps:

[0032] S201, determining the actual energy value required to meet the chip performance according to the chip's operating frequency and load information.

[0033] Among them, the operating frequency of the chip is related to the speed at which it processes data. The operating frequency of the chip is the main indicator to measure the operating speed of the chip. The load information of the chip refers to the statistical information of the sum of the number of processes being processed and waiting to be processed by the chip within a period of time. Optionally, in this embodiment, the electronic device can call the relevant interface of the Android system kernel layer to obtain the operating frequency and load information of the chip. Optionally, the energy value in this application can be the power consumption value of the chip, or it can also be the computing power of the chip, etc., which is not limited in this embodiment.

[0034] Optionally, in this embodiment, the electronic device can determine the actual energy value required to meet the chip performance through an energy model (EM) according to the operating frequency and load information of the chip. It can be understood that the actual energy value required to meet the chip performance in this embodiment is determined according to the operating frequency and load information of the chip. When the operating frequency and load information of the chip change, the actual energy value determined to meet the chip performance will also change. Therefore, the electronic device can accurately determine the actual energy value required to meet the chip performance in real time according to the operating frequency and load information of the chip.

[0035] S202, determining a target energy value allocated to the chip according to the actual energy value and the expected energy value; wherein the expected energy value is calculated according to a proportional-integral-differential control PID algorithm.

[0036] Among them, the proportional-integral-derivative control (PID) algorithm takes the difference between the target temperature and the current temperature as input, and adds the accumulated sum through proportional, integral, and differential calculations and then adds it to sustainable_power to obtain the maximum power consumption value allowed at the current temperature, that is, the expected energy value required to meet the chip performance is determined by the PID algorithm. Optionally, in this embodiment, the actual energy value determined may be greater than the expected energy value, or the actual energy value determined may be less than the expected energy value. This embodiment does not limit the size relationship between the actual energy value and the expected energy value.

[0037] Optionally, in this embodiment, the electronic device may determine the target energy value assigned to the chip based on the energy difference between the actual energy value and the expected energy value. For example, the electronic device may determine the target energy value assigned to the chip by adding the actual energy value to the energy difference, or the electronic device may determine the target energy value assigned to the chip by subtracting the energy difference from the actual energy value.

[0038] In the above energy value determination method, the actual energy value required to meet the chip performance can be determined according to the operating frequency and load information of the chip, and the expected energy value required by the chip can be calculated according to the proportional-integral-differential control PID algorithm, so that the target energy value allocated to the chip can be determined according to the determined actual energy value and the expected energy value. Since the expected energy value calculated according to the PID algorithm is not the only consideration in the process of determining the target energy value allocated to the chip, but the actual energy value required to meet the chip performance is also combined, it can ensure that the energy value allocated to the chip is the actual energy value required by the chip, thereby avoiding the problem of short-term performance deficiencies of the chip due to insufficient allocated energy value.

[0039] In the above scenario where the target energy value assigned to the chip is determined based on the actual energy value and the expected energy value, the electronic device can determine the target energy value assigned to the chip based on the comparison result between the actual energy value and the expected energy value. Figure 2 As shown, the above S202 includes:

[0040] S301, obtaining a comparison result between an actual energy value and an expected energy value.

[0041] Optionally, in this embodiment, the comparison result of the actual energy value and the expected energy value may be that the actual energy value is greater than the expected energy value, or that the actual energy value is less than or equal to the expected energy value. Optionally, in this embodiment, the electronic device may obtain the comparison result of the actual energy value and the expected energy value by obtaining the difference between the actual energy value and the expected energy value. For example, when the difference between the actual energy value and the expected energy value is greater than 0, it can be determined that the actual energy value is greater than the expected energy value, and when the difference between the actual energy value and the expected energy value is less than or equal to 0, it can be determined that the actual energy value is less than or equal to the expected energy value.

[0042] S302: Determine a target energy value allocated to the chip according to the comparison result.

[0043] Optionally, in this embodiment, as an optional implementation, if the comparison result between the actual energy value and the expected energy value is that the actual energy value is greater than the expected energy value, that is, the determined expected energy value cannot meet the performance requirements of the chip, then the electronic device can obtain the first adjusted energy value from the preset buffer pool, and determine the sum of the energy values ​​of the first adjusted energy value and the expected energy value as the target energy value allocated to the chip. Optionally, the above buffer pool can be set in the electronic device, or in a server connected to the electronic device, and this embodiment does not limit this.

[0044] Optionally, in this embodiment, as another optional implementation method, if the comparison result of the actual energy value and the expected energy value is that the actual energy value is less than or equal to the expected energy value, that is, the determined expected energy value has exceeded the performance requirements of the chip, and the actual energy value determined by the electronic device is an energy value sufficient to meet the chip performance, then the electronic device does not need to allocate the excess energy value to the chip. In this case, the electronic device can determine the above-mentioned determined actual energy value as the target energy value allocated to the chip.

[0045] In this embodiment, since the process of obtaining the comparison result of the actual energy value and the expected energy value is relatively simple, the comparison result of the actual energy value and the expected energy value can be quickly obtained, so that the target energy value assigned to the chip can be quickly determined based on the comparison result of the actual energy value and the expected energy value, thereby improving the efficiency of determining the target energy value assigned to the chip.

[0046] In the above scenario where the actual energy value is less than or equal to the expected energy value, the electronic device can also store the portion of the expected energy value that exceeds the actual energy value. When the actual energy value required to meet the chip performance is greater than the expected energy value calculated by the PID algorithm, part of the energy value can be taken from the stored energy value to make up for the current shortfall, thereby meeting the current short-term high-load performance requirements. Figure 3 As shown, the above method also includes:

[0047] S401: Determine a second adjusted energy value according to the actual energy value and the expected energy value.

[0048] Optionally, in this embodiment, the electronic device can obtain the energy difference between the expected energy value and the actual energy value, and determine the energy difference between the expected energy value and the actual energy value as the second adjustment capacity value; or, the electronic device can also determine the part that exceeds the actual energy value from the expected energy value based on the actual energy value, and determine the excess energy value as the second adjustment energy value.

[0049] S402: Store the second adjusted energy value into a preset buffer pool.

[0050] In this embodiment, the electronic device stores the energy value that exceeds the actual energy value in the expected energy value into a preset buffer pool. When the actual energy value required to meet the chip performance is greater than the expected energy value calculated by the PID algorithm, part of the energy value is taken out from the buffer pool to make up for the current shortage, thereby meeting the current short-term high-load performance requirements and improving the performance experience, while also achieving the expected temperature control purpose.

[0051] Optionally, in this embodiment, an energy threshold of the buffer pool can be pre-set, that is, the storage capacity of the buffer pool cannot exceed the energy threshold. As an optional implementation, before storing the determined second adjusted energy value in the preset buffer pool, the electronic device can determine whether the energy value in the buffer pool is greater than the above energy threshold. When it is determined that the energy value in the buffer pool is not greater than the energy threshold, that is, the energy value stored in the buffer pool has not reached the storage upper limit, the electronic device can store the second adjusted capacity value in the buffer pool; when it is determined that the energy value in the buffer pool is greater than the energy threshold, that is, the energy value stored in the buffer pool reaches the storage upper limit, the electronic device can discard the determined second adjusted capacity value and no longer store it in the buffer pool. It can be understood that since the energy threshold is pre-set in the above buffer pool, the short-term high performance energy demand can be compensated by this method. After the cached energy value in the buffer pool is used up, it can only be allocated according to the expected energy value calculated by the PID algorithm. In this way, it can not only meet the chip's short-term energy allocation shortage, but also avoid the problem of excessive energy allocation for continuous high performance load causing temperature rise beyond the control range.

[0052] In this embodiment, when the actual energy value required to meet the chip performance is less than or equal to the determined expected energy value, the electronic device can determine a second adjusted energy value in the expected energy value that exceeds the actual energy value based on the actual energy value and the expected energy value, so that the determined second adjusted energy value can be stored in a preset buffer pool. When the actual energy value required to meet the chip performance is greater than the expected energy value calculated by the PID algorithm, part of the energy value can be taken out from the buffer pool to make up for the current shortage, thereby meeting the current short-term high-load performance requirements and improving the performance experience, while also achieving the expected temperature control purpose.

[0053] In this embodiment, the calculation process of the expected energy value is described in detail. In one embodiment, the method further comprises: obtaining the expected energy value according to the difference between the current temperature of the chip and the target temperature and the PID algorithm.

[0054] In this embodiment, the PID algorithm is one of the earliest developed control strategies. The PID algorithm belongs to closed-loop control. The input can be the difference between the current temperature of the chip and the target temperature, and the output is the expected energy value required by the chip. For example, the expression of the PID algorithm can be as follows:

[0055] P max =k p *e+k i *int egral err +k d *diff err +sustainable_power,

[0056] Where, e is the difference between the target temperature and the current temperature, k p ,k i ,k d is the weighting coefficient, P max is the actual energy distributed, integral err Indicates the integral, diff err represents the differential, and sustainable_power refers to the maximum power consumption value allowed under the condition of ensuring that the target temperature target_temerature is met. It should be noted that the proportional term k p It can improve the response speed and steady-state accuracy of the PID algorithm, but excessive proportional control can easily lead to overshoot and oscillation of the PID algorithm, and simple proportional control cannot eliminate the steady-state error of the PID algorithm. p It can play a role in linear scaling of the control deviation e; the integral term is the accumulation of the temperature difference e, and the integral control term can start to eliminate the steady-state error; the differential control term is the changing trend of the temperature difference e, which has a certain predictive effect, can reduce the overshoot and improve the temperature control stability.

[0057] In this embodiment, the difference between the current temperature of the chip and the target temperature is used as the input of the PID algorithm to calculate the expected energy value required by the chip.

[0058] In this embodiment, the process of calculating the expected energy value required by the chip based on the difference between the current temperature of the chip and the target temperature and the PID algorithm is relatively simple. By obtaining the difference between the current temperature of the chip and the target temperature, the PID algorithm can be used to quickly calculate the expected energy value required by the chip, thereby improving the efficiency of calculating the expected energy value required by the chip.

[0059] In order to facilitate the understanding of those skilled in the art, Figure 4 As shown, the energy value determination method provided by the present application is described in detail below in combination with a complete embodiment:

[0060] S1, the expected energy value is calculated according to the difference between the current temperature of the chip and the target temperature and the PID algorithm.

[0061] S2, determining the actual energy value required to meet the chip performance according to the chip's operating frequency and load information.

[0062] S3, obtaining a comparison result between the actual energy value and the expected energy value.

[0063] S4, if the comparison result is that the actual energy value is greater than the expected energy value, a first adjustment energy value is obtained from a preset buffer pool, and a target energy value allocated to the chip is determined according to the first adjustment energy value and the expected energy value.

[0064] S5: If the comparison result is that the actual energy value is less than or equal to the expected energy value, the actual energy value is determined as the target energy value.

[0065] S6. If the comparison result is that the actual energy value is less than or equal to the expected energy value, determine the second adjusted energy value according to the actual energy value and the expected energy value, and determine whether the energy value in the buffer pool is greater than a preset energy threshold. If not, store the second adjusted energy value in the buffer pool.

[0066] S7: If the energy value of the buffer pool is greater than the energy threshold, discard the second adjusted energy value.

[0067] S8, allocating the determined target energy value allocated to the chip to each module according to the configuration parameters of the chip, and sending it to the specific hardware for execution.

[0068] It should be noted that for the description in the above S1-S7, reference may be made to the relevant description in the above embodiment, and the effects are similar, so this embodiment will not be repeated here.

[0069] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0070] Based on the same inventive concept, the embodiment of the present application also provides an energy value determination device for implementing the energy value determination method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more energy value determination device embodiments provided below can refer to the limitations of the energy value determination method above, and will not be repeated here.

[0071] In one embodiment, Figure 5 As shown, an energy value determination device is provided, comprising: a first determination module 10 and a second determination module 11, wherein:

[0072] The first determination module 10 is used to determine the actual energy value required to meet the chip performance according to the operating frequency and load information of the chip.

[0073] The second determination module 11 is used to determine the target energy value allocated to the chip according to the actual energy value and the expected energy value; wherein the expected energy value is calculated according to the proportional-integral-differential control PID algorithm.

[0074] The energy value determination device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0075] Based on the above embodiments, Figure 6 As shown, optionally, the second determining module 11 includes: an acquiring unit 111 and a first determining unit 112, wherein:

[0076] The acquisition unit 111 is used to acquire the comparison result between the actual energy value and the expected energy value.

[0077] The first determining unit 112 is used to determine a target energy value allocated to the chip according to the comparison result.

[0078] The energy value determination device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0079] Based on the above embodiment, optionally, the above first determination unit 112 is specifically used to obtain a first adjustment energy value from a preset buffer pool if the comparison result is that the actual energy value is greater than the expected energy value; and determine the target energy value allocated to the chip based on the first adjustment energy value and the expected energy value.

[0080] The energy value determination device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0081] On the basis of the above embodiment, optionally, the above first determination unit 112 is specifically configured to determine the actual energy value as the target energy value if the comparison result is that the actual energy value is less than or equal to the expected energy value.

[0082] The energy value determination device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0083] Based on the above embodiments, Figure 7 As shown, optionally, the above device further includes: a third determination module 12 and a cache module 13, wherein:

[0084] The third determination module 12 is used to determine a second adjusted energy value according to the actual energy value and the expected energy value.

[0085] The cache module 13 is used to store the second adjusted energy value in a preset buffer pool.

[0086] The energy value determination device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0087] Based on the above embodiments, Figure 8 As shown, optionally, the cache module 13 includes: a second determination unit 131 and a cache unit 132, wherein:

[0088] The second determining unit 131 is configured to determine whether the energy value in the buffer pool is greater than a preset energy threshold.

[0089] The cache unit 132 is configured to store the second adjusted energy value in the buffer pool when the energy in the buffer pool is less than or equal to a preset energy threshold.

[0090] The energy value determination device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0091] Based on the above embodiments, Fig. 9 As shown, optionally, the above device further includes: a discarding module 14, wherein:

[0092] The discarding module 14 is configured to discard the second adjusted energy value if the energy value of the buffer pool is greater than an energy threshold.

[0093] The energy value determination device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0094] Based on the above embodiments, Fig.10 As shown, optionally, the above device further includes: a calculation module 15, wherein:

[0095] The calculation module 15 is used to calculate the expected energy value according to the difference between the current temperature of the chip and the target temperature and the PID algorithm.

[0096] The energy value determination device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0097] Each module in the above energy value determination device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0098] In one embodiment, a computer device is provided. The computer device may be an electronic device, and its internal structure diagram may be as shown in FIG. Fig.11As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external electronic device in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, an energy value determination method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0099] Those skilled in the art will understand that Fig.11 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0100] In one embodiment, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0101] Determine the actual energy value required to meet the chip performance based on the chip's operating frequency and load information;

[0102] According to the actual energy value and the expected energy value, the target energy value allocated to the chip is determined; wherein the expected energy value is calculated according to the proportional-integral-differential control PID algorithm.

[0103] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0104] Obtaining a comparison result between the actual energy value and the expected energy value;

[0105] According to the comparison result, the target energy value allocated to the chip is determined.

[0106] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0107] If the comparison result is that the actual energy value is greater than the expected energy value, obtaining a first adjusted energy value from a preset buffer pool;

[0108] A target energy value allocated to the chip is determined according to the first adjusted energy value and the expected energy value.

[0109] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0110] If the comparison result is that the actual energy value is less than or equal to the expected energy value, the actual energy value is determined as the target energy value.

[0111] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0112] Determining a second adjusted energy value according to the actual energy value and the expected energy value;

[0113] The second adjusted energy value is stored in a preset buffer pool.

[0114] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0115] Determine whether the energy value in the buffer pool is greater than a preset energy threshold;

[0116] If not, the second adjusted energy value is stored in the buffer pool.

[0117] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0118] If the energy value of the buffer pool is greater than the energy threshold, the second adjusted energy value is discarded.

[0119] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0120] The expected energy value is calculated based on the difference between the current temperature of the chip and the target temperature and the PID algorithm.

[0121] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0122] Determine the actual energy value required to meet the chip performance based on the chip's operating frequency and load information;

[0123] According to the actual energy value and the expected energy value, the target energy value allocated to the chip is determined; wherein the expected energy value is calculated according to the proportional-integral-differential control PID algorithm.

[0124] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0125] Obtaining a comparison result between the actual energy value and the expected energy value;

[0126] According to the comparison result, the target energy value allocated to the chip is determined.

[0127] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0128] If the comparison result is that the actual energy value is greater than the expected energy value, obtaining a first adjusted energy value from a preset buffer pool;

[0129] A target energy value allocated to the chip is determined according to the first adjusted energy value and the expected energy value.

[0130] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0131] If the comparison result is that the actual energy value is less than or equal to the expected energy value, the actual energy value is determined as the target energy value.

[0132] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0133] Determining a second adjusted energy value according to the actual energy value and the expected energy value;

[0134] The second adjusted energy value is stored in a preset buffer pool.

[0135] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0136] Determine whether the energy value in the buffer pool is greater than a preset energy threshold;

[0137] If not, the second adjusted energy value is stored in the buffer pool.

[0138] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0139] If the energy value of the buffer pool is greater than the energy threshold, the second adjusted energy value is discarded.

[0140] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0141] The expected energy value is calculated based on the difference between the current temperature of the chip and the target temperature and the PID algorithm.

[0142] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0143] Determine the actual energy value required to meet the chip performance based on the chip's operating frequency and load information;

[0144] According to the actual energy value and the expected energy value, the target energy value allocated to the chip is determined; wherein the expected energy value is calculated according to the proportional-integral-differential control PID algorithm.

[0145] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0146] Obtaining a comparison result between the actual energy value and the expected energy value;

[0147] According to the comparison result, the target energy value allocated to the chip is determined.

[0148] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0149] If the comparison result is that the actual energy value is greater than the expected energy value, obtaining a first adjusted energy value from a preset buffer pool;

[0150] A target energy value allocated to the chip is determined according to the first adjusted energy value and the expected energy value.

[0151] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0152] If the comparison result is that the actual energy value is less than or equal to the expected energy value, the actual energy value is determined as the target energy value.

[0153] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0154] Determining a second adjusted energy value according to the actual energy value and the expected energy value;

[0155] The second adjusted energy value is stored in a preset buffer pool.

[0156] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0157] Determine whether the energy value in the buffer pool is greater than a preset energy threshold;

[0158] If not, the second adjusted energy value is stored in the buffer pool.

[0159] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0160] If the energy value of the buffer pool is greater than the energy threshold, the second adjusted energy value is discarded.

[0161] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0162] The expected energy value is calculated based on the difference between the current temperature of the chip and the target temperature and the PID algorithm.

[0163] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0164] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0165] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for determining an energy value, characterized in that: include: Determine the actual energy value required to meet the performance of the chip according to the operating frequency and load information of the chip; According to the actual energy value and the expected energy value, a target energy value allocated to the chip is determined; wherein the expected energy value is calculated according to a proportional-integral-differential control PID algorithm.

2. The method according to claim 1, characterized in that The step of determining a target energy value allocated to the chip according to the actual energy value and the expected energy value includes: Obtaining a comparison result between the actual energy value and the expected energy value; According to the comparison result, a target energy value allocated to the chip is determined.

3. The method according to claim 2, characterized in that Determining a target energy value allocated to the chip according to the comparison result includes: If the comparison result is that the actual energy value is greater than the expected energy value, obtaining a first adjusted energy value from a preset buffer pool; A target energy value allocated to the chip is determined according to the first adjusted energy value and the expected energy value.

4. The method according to claim 2, characterized in that: Determining a target energy value allocated to the chip according to the comparison result includes: If the comparison result is that the actual energy value is less than or equal to the expected energy value, the actual energy value is determined as the target energy value.

5. The method according to claim 4, characterized in that The method further comprises: Determining a second adjusted energy value according to the actual energy value and the expected energy value; The second adjusted energy value is stored in a preset buffer pool.

6. The method according to claim 5, characterized in that The storing the second adjusted energy value into a preset buffer pool includes: Determining whether the energy value in the buffer pool is greater than a preset energy threshold; If not, the second adjusted energy value is stored in the buffer pool.

7. The method according to claim 6, characterized in that The method further comprises: If the energy value of the buffer pool is greater than the energy threshold, the second adjusted energy value is discarded.

8. The method according to any one of claims 1 to 7, characterized in that: The method further comprises: The expected energy value is calculated based on the difference between the current temperature of the chip and the target temperature and the PID algorithm.

9. An energy value determination device, characterized in that: include: A first determination module, used to determine an actual energy value required to meet the performance of the chip according to the operating frequency and load information of the chip; The second determination module is used to determine the target energy value allocated to the chip according to the actual energy value and the expected energy value; wherein the expected energy value is calculated according to the proportional-integral-differential control PID algorithm.

10. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the computer program is executed by the processor, the processor is caused to perform the steps of the energy value determination method according to any one of claims 1 to 8.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.