Method for determining power consumption and electronic device

By dynamically adjusting the sampling rate to accurately measure the server's internal power consumption, the problem of inaccurate power consumption determination in existing technologies is solved, achieving higher precision energy management and optimization.

CN120723585BActive Publication Date: 2025-11-21INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511216752.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-28
Publication Date
2025-11-21
Estimated Expiration
2045-08-28

AI Technical Summary

Technical Problem

In existing technologies, the power consumption of internal server components is not accurately determined, which cannot meet the needs of refined energy consumption management and energy efficiency optimization.

Method used

The sampling rate is dynamically adjusted to accurately measure actual power consumption by determining the first sampling rate based on the standard power value of the current power-consuming component and calculating the sampling rate adjustment coefficient based on the standard power values ​​of multiple power-consuming components.

Benefits of technology

It improves the accuracy of power consumption measurement, enabling more precise capture of power consumption changes of components under different load scenarios, and supports more refined server energy efficiency management and cost control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120723585B_ABST
    Figure CN120723585B_ABST
Patent Text Reader

Abstract

The application discloses a power consumption determination method and electronic equipment, and relates to the technical field of computers, and comprises the following steps: determining a first sampling rate matched with a current power consumption component according to a standard power value of the current power consumption component, wherein the first sampling rate has a positive correlation with the standard power value; determining a target power value according to standard power values of a plurality of power consumption components, and determining a sampling rate adjustment coefficient of the current power consumption component according to a ratio between the target power value and the standard power value; correcting the first sampling rate according to the sampling rate adjustment coefficient to obtain a target sampling rate matched with the current power consumption component; and determining an actual power consumption of the current power consumption component according to actual power values of the current power consumption component collected at each collection time based on the target sampling rate, so that the technical problem that the power consumption is not accurately determined in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, and particularly relates to a power consumption determination method and electronic equipment. BACKGROUND

[0002] Nowadays, data centers and server clusters in cloud computing environments play a crucial role in supporting data processing, storage and transmission demands worldwide. With the rapid increase in the number of servers, the energy consumption management of each server has become one of the key factors to improve the overall energy efficiency of data centers and reduce operating costs. In particular, in high-density data centers, the consumption of electric energy is an important part of the total cost of ownership (TCO), directly affecting the sustainable development ability and economic benefits of data centers.

[0003] However, most of the existing technologies only focus on the overall power consumption of the server, and the current technical solutions have obvious shortcomings in the internal component-level energy consumption monitoring of the server, which cannot meet the growing needs of customers in energy consumption fine management, energy efficiency optimization and cost control. That is, there is a technical problem of inaccurate determination of power consumption in the prior art. SUMMARY

[0004] The present application provides a power consumption determination method and electronic equipment to at least solve the technical problem of inaccurate determination of power consumption in the prior art.

[0005] The present application provides a power consumption determination method, comprising: determining a first sampling rate matched with a current power consumption component according to a standard power value of the current power consumption component, wherein the first sampling rate and the standard power value have a positive correlation relationship; determining a target power value according to standard power values of a plurality of power consumption components, and determining a sampling rate adjustment coefficient of the current power consumption component according to a ratio between the target power value and the standard power value, wherein the plurality of power consumption components include the current power consumption component, and the sampling rate adjustment coefficient is used to indicate the sampling resource occupation situation of the sampling operation on the power value of the current power consumption component; correcting the first sampling rate according to the sampling rate adjustment coefficient to obtain a target sampling rate matched with the current power consumption component; and determining an actual power consumption of the current power consumption component according to actual power values of the current power consumption component collected at each collection time based on the target sampling rate.

[0006] The application further provides a power consumption determination device, comprising: a first determination unit configured to determine a first sampling rate matched with a current power consumption component according to a standard power value of the current power consumption component, wherein the first sampling rate has a positive correlation with the standard power value; a second determination unit configured to determine a target power value according to standard power values of a plurality of power consumption components, and determine a sampling rate adjustment coefficient of the current power consumption component according to a ratio between the target power value and the standard power value, wherein the plurality of power consumption components comprises the current power consumption component, and the sampling rate adjustment coefficient is used to indicate a sampling resource occupation condition of a sampling operation on a power value of the current power consumption component; a third determination unit configured to correct the first sampling rate according to the sampling rate adjustment coefficient to obtain a target sampling rate matched with the current power consumption component; and a fourth determination unit configured to determine an actual power consumption of the current power consumption component according to actual power values of the current power consumption component collected at each collection time based on the target sampling rate.

[0007] The application further provides an electronic device, comprising: a memory configured to store a computer program; and a processor configured to execute the computer program to implement steps of any of the power consumption determination methods.

[0008] The application further provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement steps of any of the power consumption determination methods.

[0009] The application further provides a computer program product, comprising a computer program, and the computer program is executed by a processor to implement steps of any of the power consumption determination methods.

[0010] According to the application, the first sampling rate matched with the current power consumption component is determined according to the standard power value of the current power consumption component, the first sampling rate has a positive correlation with the standard power value, and the power consumption characteristics of different components are preliminarily distinguished; the target power value is determined according to the standard power values of the plurality of power consumption components, and the sampling rate adjustment coefficient of the current power consumption component is determined according to the ratio between the target power value and the standard power value, so that the sampling strategy can be adjusted according to the dynamic change of the overall power consumption of the system; the first sampling rate is corrected according to the sampling rate adjustment coefficient to obtain the target sampling rate matched with the current power consumption component; and the actual power consumption of the current power consumption component is determined according to the actual power values of the current power consumption component collected at each collection time based on the target sampling rate, the system can more accurately capture the power consumption change of the component under different load scenarios by using the dynamically optimized sampling rate, thereby improving the accuracy of the power consumption measurement, and solving the technical problem that the power consumption determination is inaccurate in the prior art. BRIEF DESCRIPTION OF DRAWINGS

[0011] In order to more clearly illustrate the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. Obviously, the drawings described below only illustrate some of the embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort on the basis of these drawings.

[0012] Figure 1 The hardware structure block diagram of a server device for a power consumption determination method provided by the embodiments of the present application is shown in FIG. 1.

[0013] Figure 2 The flow chart of a power consumption determination method provided by the embodiments of the present application is shown in FIG. 2.

[0014] Figure 3 The flow chart of another power consumption determination method provided by the embodiments of the present application is shown in FIG. 3.

[0015] Figure 4 The hardware circuit block diagram of a power consumption determination method provided by the embodiments of the present application is shown in FIG. 4.

[0016] Figure 5 The module function block diagram of a power consumption determination method provided by the embodiments of the present application is shown in FIG. 5.

[0017] Figure 6 The structure schematic diagram of a power consumption determination device according to the embodiments of the present application is shown in FIG. 6.

[0018] Figure 7 The structure schematic diagram of an electronic device for determining the power consumption of a component according to the embodiments of the present application is shown in FIG. 7. DETAILED DESCRIPTION

[0019] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without any creative effort fall within the protection scope of the present application.

[0020] It should be noted that, in the description of the present application, the terms "comprise", "contain" or any other variants thereof are intended to cover the non-exclusive inclusion, so that the process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. The terms "first", "second" and the like in the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence.

[0021] In order to make the technical personnel in the technical field better understand the present application, the present application will be further described in detail below with the drawings and specific embodiments.

[0022] The method embodiments provided in the embodiments of the present application can be executed in a server device or similar computing device. Taking the case of running on a server device, Figure 1 is a hardware structure block diagram of a server device of a power consumption determination method according to an embodiment of the present application. As shown in Figure 1 , the server device can include one or more (only one is shown in Figure 1 ) processor 102 (the processor 102 can include but not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the above-mentioned server device can also include a transmission device 106 for communication function and an input and output device 108, those skilled in the art can understand, Figure 1 The structure shown is only schematic, which does not limit the structure of the above-mentioned server device. For example, the server device can also include more or less components than Figure 1 shown, or have a different configuration than Figure 1 shown.

[0023] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the power consumption determination method in the embodiments of the present application, and the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to realize the above-mentioned method. The memory 104 can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory 104 can further include a memory remotely arranged with respect to the processor 102, which can be connected to the server device through a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0024] The transmission device 106 is used to receive or send data via a network. The specific examples of the above-mentioned network can include a wireless network provided by the communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, RF) module, which is used to communicate with the Internet in a wireless manner.

[0025] Embodiments of the present application provide a power consumption determination method, which is described in detail in combination with an execution flow of the power consumption determination method.

[0026] In order to more clearly understand the technical solutions provided by the embodiments of the present application, first introduce the key terms related to the embodiments of the present application:

[0027] Central Processing Unit (CPU).

[0028] Complex Programmable Logic Device (CPLD).

[0029] Baseboard Management Controller (BMC), a microcontroller in a server, mainly responsible for monitoring and managing the hardware health status of the server, including temperature, voltage, current, etc., and can be remotely controlled through the network.

[0030] Inter-Integrated Circuit (I2C), BMC usually communicates with the sensors of the CPU and other monitoring modules in the system through I2C to collect monitoring data.

[0031] Embedded Fuse (EFUSE), in a server, EFUSE is often used to monitor the power supply state of devices (such as network cards, hard drives), combined with current monitoring circuits, power consumption can be calculated.

[0032] Alternating Current (AC).

[0033] Basic Input / Output System (BIOS), used to initialize hardware and load operating systems.

[0034] Advanced RISC Machines (ARM).

[0035] It should be noted that in the context of the present application, the two concepts of "power consumption" and "power" essentially refer to the same phenomenon. Power usually refers to the rate at which a device consumes electrical energy in a specific working state, measured in watts (Watt, abbreviated as W). Power consumption refers to the actual power consumption of a device during operation, which is also measured in the form of power (W). A component with a power consumption of 200W actually means that the component is consuming energy at a power of 200W.

[0036] As an optional implementation, as shown in Figure 2 The method for determining the power consumption includes:

[0037] S202, determining a first sampling rate matched with the current power-consuming component according to the standard power value of the current power-consuming component, wherein the first sampling rate has a positive correlation with the standard power value;

[0038] S204, determining a target power value according to the standard power values of the plurality of power-consuming components, and determining a sampling rate adjustment coefficient of the current power-consuming component according to a ratio between the target power value and the standard power value, wherein the plurality of power-consuming components includes the current power-consuming component, and the sampling rate adjustment coefficient is used to indicate an occupation of a sampling resource for sampling the power value of the current power-consuming component;

[0039] S206, correcting the first sampling rate according to the sampling rate adjustment coefficient to obtain a target sampling rate matched with the current power-consuming component;

[0040] S208, determining an actual power consumption of the current power-consuming component according to actual power values of the current power-consuming component collected at each collection time based on the target sampling rate.

[0041] As an optional implementation, in step S202, the first sampling rate matched with the current power-consuming component is determined according to the standard power value of the current power-consuming component, wherein the first sampling rate has a positive correlation with the standard power value; optionally, the standard power value can be a power consumption value of the component under standard or maximum working conditions; the first sampling rate can be a preliminarily set sampling frequency, which is used to collect the power consumption data of the current power-consuming component. The first sampling rate has a positive correlation with the standard power value, that is, the greater the power consumption of the component, the higher the sampling rate required for collection, so as to ensure that the component with greater power consumption can obtain more frequent sampling, thereby improving the accuracy of the data.

[0042] In step S204, the target power value is determined according to the standard power values of the plurality of power-consuming components, and the sampling rate adjustment coefficient of the current power-consuming component is determined according to a ratio between the target power value and the standard power value, wherein the plurality of power-consuming components includes the current power-consuming component, and the sampling rate adjustment coefficient is used to indicate an occupation of a sampling resource for sampling the power value of the current power-consuming component.

[0043] Optionally, the target power value can be a comprehensive reference value obtained by analyzing the standard power values of the plurality of power-consuming components, which is used to evaluate the overall power consumption of the system, such as the maximum power value, the minimum power value, the average power value, the weighted sum power value, etc. of the plurality of components.

[0044] As an optional implementation, the server has two CPUs, two hard disks, several memory modules, and fans, etc. The standard power values of all components are weightedly averaged or summed up, and then the target power value can be obtained.

[0045] The sampling rate adjustment coefficient is a factor determined according to the ratio between the target power value and the standard power value of the current power-consuming component, and is used to adjust the first sampling rate to reflect the relative importance of the current power-consuming component in the overall power consumption of the system.

[0046] As an optional implementation, for the CPU, if the target power value is 800W and the standard power value of the CPU is 400W, the adjustment coefficient can be calculated as the standard power value of the CPU / target power value, i.e. 400W / 800W=0.5. By converting the proportion of the power consumption of the component in the total power consumption of the system into an allocation coefficient of the sampling resource, the reasonable allocation of the sampling resource is realized.

[0047] In the step S206, the first sampling rate is corrected according to the sampling rate adjustment coefficient to obtain a target sampling rate matched with the current power-consuming component. Optionally, taking the CPU as an example, if the first sampling rate is 5Hz and the adjustment coefficient is 0.5, the target sampling rate can be 5Hz*0.5=2.5Hz. The calculation method of the target sampling rate is not specifically limited herein.

[0048] In the step S208, the actual power consumption of the current power-consuming component is determined according to the actual power values of the current power-consuming component collected at each collection time based on the target sampling rate. Optionally, the actual power value refers to the real power consumption data of the component at a certain moment collected at the target sampling rate; and the actual power consumption is the total power consumption of the component in a period of time calculated by integrating the actual power values of all collection time points, for example, by using the integral or weighted average method.

[0049] As an optional implementation, for the CPU, the actual power values thereof are collected at each time point using the target sampling rate 2.5Hz. Assuming that the actual power values of the CPU are recorded multiple times in one hour, the actual power consumption of the CPU in the time period can be calculated by weightedly averaging these power values (considering the variation of the power value with time).

[0050] According to the above-mentioned embodiments of the present application, the first sampling rate matched with the current power-consuming component is determined according to the standard power value of the current power-consuming component, the first sampling rate has a positive correlation with the standard power value, and the power consumption characteristics of different components are preliminarily distinguished; the target power value is determined according to the standard power values of the plurality of power-consuming components, and the sampling rate adjustment coefficient of the current power-consuming component is determined according to the ratio between the target power value and the standard power value, so that the sampling strategy can be adjusted according to the dynamic change of the overall power consumption of the system; the first sampling rate is corrected according to the sampling rate adjustment coefficient to obtain the target sampling rate matched with the current power-consuming component; and the actual power consumption of the current power-consuming component is determined according to the actual power values of the current power-consuming component collected at each collection time based on the target sampling rate, so that the system can more accurately capture the power consumption change of the component under different load scenarios, thereby improving the accuracy of the power consumption measurement and solving the technical problem of inaccurate determination of the power consumption in the prior art.

[0051] In an optional embodiment, determining the sampling rate adjustment coefficient of the current power-consuming component according to the ratio between the target power value and the standard power value further includes:

[0052] S1, determining running description information of the current power-consuming component at a current time, wherein the running description information is used to indicate the usage of the current power-consuming component at the current time;

[0053] S2, determining a running load index value of the current power-consuming component according to the running description information;

[0054] S3, calculating the ratio between the standard power value and the target power value;

[0055] S4, determining the sampling rate adjustment coefficient of the current power-consuming component according to the running load index value and the ratio.

[0056] In the above step S1, the running description information of the current power-consuming component at the current time is determined, wherein the running description information is used to indicate the usage of the current power-consuming component at the current time; the running description information can be detailed information for describing the running state and usage of the power-consuming component at the current time, including the load rate, temperature, running mode (such as whether a specific task is being executed), and running state of other related components in the system, etc. of the component, for example, the running description information of the CPU is acquired in real time during the running process of the server, such as the load rate, load change rate, type of task being executed (such as a large number of floating point operations, memory intensive operations, etc.), CPU core temperature, etc.

[0057] Further, in step S2, the operation load index value of the current power-consuming component is determined according to the operation description information. As an optional implementation, the operation description information of the CPU can be quantified to obtain the operation load index value. For example, if the CPU load rate exceeds 80%, a large number of floating-point operations are being performed, and the core temperature is close to the threshold, the operation load index value can be set to a higher value, indicating that the CPU is under high power consumption pressure at the current time.

[0058] In step S3, the ratio of the standard power value to the target power value is calculated. For example, the maximum standard power value in the server is 800W, and the standard power value of the CPU is 400W, so the calculated ratio is 400W / 800W=0.5.

[0059] In step S4, the sampling rate adjustment coefficient of the current power-consuming component is determined according to the operation load index value and the ratio; the sampling rate adjustment coefficient is a factor for adjusting the first sampling rate, which ensures that the sampling frequency is reasonably adjusted according to the relative power consumption proportion and real-time load state of the component in the system. For example, a higher adjustment coefficient may mean that more sampling resources will be allocated to the current power-consuming component.

[0060] Specifically, a comprehensive function or algorithm can be used to determine the sampling rate adjustment coefficient of the CPU. For example, if the operation load index value is 0.8 (representing high load), the ratio of the standard power value (MP_i) to the target power value (MP_max) is 0.5 (i.e. MP_i / MP_max), and the sampling rate adjustment coefficient can be 1+(0.8x0.5)=1.4.

[0061] The above implementation not only considers the static power consumption characteristics of the component, but also dynamically reflects its real-time load state during system operation, thereby ensuring the efficiency and accuracy of the sampling strategy. By intelligently adjusting the sampling frequency, high-precision monitoring of power consumption data is achieved, while avoiding excessive occupation of storage space and computing resources, thereby improving the accuracy of power consumption determination.

[0062] In an optional implementation, determining the operation load index value of the current power-consuming component according to the operation description information comprises:

[0063] S1, determining the usage rate index value and the usage rate change rate index value of the current power-consuming component indicated by the operation description information, wherein the usage rate index value is used to indicate the load degree of the current power-consuming component at the current time, and the usage rate change rate index value is used to indicate the load change trend of the current power-consuming component at the current time;

[0064] S2, determining a running load indicator value of the current power-consuming component according to a weighted sum result of the usage rate indicator value and the usage rate change rate indicator value.

[0065] In step S1, the usage rate indicator value and the usage rate change rate indicator value of the current power-consuming component indicated by the running description information are determined, wherein the usage rate indicator value is used to indicate the load degree of the current power-consuming component at the current time, and the usage rate change rate indicator value is used to indicate the load change trend of the current power-consuming component at the current time.

[0066] Optionally, the usage rate indicator value U_i(t) reflects the load degree of the power-consuming component at the current time, and is usually represented as a value between 0 and 1, and 1 indicates that the component is running at full load; the usage rate change rate indicator value dU_i / dt is used to describe the trend of the load change of the power-consuming component, i.e. the change amount of the usage rate per unit time, and the unit is usually percentage per second (% / s), a positive value indicates that the load is increasing, and a negative value indicates that the load is decreasing. In this application, the absolute value can be taken for subsequent calculation.

[0067] For example, if the usage rate of the CPU is 80% at a certain time, the usage rate indicator value U_i(t) can be set to 0.80. By comparing the usage rates of the CPU at two consecutive time points, the usage rate change rate indicator value can be calculated. If the usage rate increases from 70% to 80% in 10 seconds, then dU_i / dt=(80%-70%) / 10s=1% / s.

[0068] In step S2, the running load indicator value of the current power-consuming component is determined according to a weighted sum result of the usage rate indicator value and the usage rate change rate indicator value.

[0069] Optionally, the running load indicator value DLCR_i(t) is used to measure the overall running load of the current power-consuming component at the current time, and combines the information of the usage rate indicator value and the usage rate change rate indicator value; the formula for determining the running load indicator value can be set as DLCR_i(t)=α×|dU_i / dt|+β×U_i(t), wherein α and β are weight coefficients, and are used to adjust the influence of the usage rate indicator value and the usage rate change rate indicator value on the running load indicator value.

[0070] By monitoring and comprehensively evaluating the load state of the CPU in real time, the sampling strategy can be adjusted more accurately, and more accurate power consumption data can be obtained without increasing additional resource consumption, thereby supporting more fine server energy efficiency management and TCO optimization.

[0071] In an optional embodiment, after determining the actual power consumption of the current power-consuming component according to the actual power values of the current power-consuming component collected at each collection time based on the target sampling rate, the method further comprises:

[0072] S1, determining a predicted power value of the current power-consuming component according to the operation description information;

[0073] S2, determining weight values respectively matched with the usage rate index value and the usage rate change rate index value according to the predicted power value and the actual power value.

[0074] In the step S1, the predicted power value of the current power-consuming component is determined according to the operation description information. Optionally, the predicted power value P_(pred,i) is the power of the CPU in the future time based on the load change, the usage rate trend and other information in the operation description information of the current power-consuming component; for example, if the usage rate index value of the CPU is 0.80, the usage rate change rate index value is 1% / s, and the current temperature is 60℃, then the power value of the CPU in the next minute is predicted to be 350W.

[0075] In the step S2, the weight values respectively matched with the usage rate index value and the usage rate change rate index value are determined according to the predicted power value and the actual power value. Optionally, the weight values α and β are factors assigned to the usage rate change rate index value and the usage rate index value, which are used to adjust the proportion of the influence of the two indexes on the operation load index value according to the closeness of the predicted power value and the actual power value when calculating the operation load index value.

[0076] If the predicted power value of the CPU is 350W and the actual power value is 340W, it indicates that the prediction accuracy is high, and the weight of the usage rate index value can be appropriately increased and the weight of the usage rate change rate index value can be appropriately reduced, because the current load state has a relatively stable influence on the power consumption of the CPU.

[0077] As an optional implementation, it is assumed that the actual power value of the CPU in a server at a certain time is 340W, and the predicted power value based on the operation description information is 350W. Considering that (350W-340W) / 340W≈0.029, i.e., the error is less than the set error range ε (for example, ε=0.05), it indicates that the prediction is relatively accurate, and for example, the weight of the usage rate index value can be increased and the weight of the usage rate change rate index value can be reduced, for example, from α=0.7 and β=0.3 to α=0.6 and β=0.4.

[0078] By adjusting the weight values, the formula for calculating the operation load index value can be optimized, and the sampling strategy can be more accurately adjusted. The system can better dynamically adjust the sampling frequency according to the actual operation state and the power consumption trend of the component, which not only ensures the accuracy of data collection and the accuracy of power consumption results, but also reasonably controls the data volume and the computing resources.

[0079] In an alternative embodiment, the first sampling rate matched with the current power-consuming component is determined according to the standard power value of the current power-consuming component, comprising:

[0080] S1, determining the first calibration coefficient and the bias parameter value corresponding to the current power-consuming component;

[0081] S2, calculating the product of the logarithmic value of the standard power value and the first calibration coefficient to obtain a product result;

[0082] S3, summing the product result and the bias parameter value to obtain the first sampling rate matched with the current power-consuming component.

[0083] In the above step S1, the first calibration coefficient and the bias parameter value corresponding to the current power-consuming component are determined; alternatively, the above first calibration coefficient k is a coefficient (for example, 0.8) for adjusting the sampling rate calculation formula, which is used to optimize the relationship between the sampling frequency and the component standard power value, and ensure the rationality of the sampling strategy; the above bias parameter value c is used to fine-tune the product result (for example, 1.2), which ensures that the result is within a suitable range and reflects the basic sampling needs of the component. It can be understood that the first calibration coefficient and the bias parameter value may be different for different power-consuming components, such as CPU, hard disk, memory, etc.

[0084] In the above step S2, the product of the logarithmic value of the standard power value and the first calibration coefficient is calculated to obtain a product result; alternatively, for example, the natural logarithm or the logarithm with base 10 can be used to calculate the standard power value of the current power-consuming component, and then the result is multiplied by the first calibration coefficient k determined in step 1. Taking the CPU as an example, if its standard power value is 400W, the calculation process is as follows:

[0085] The above product result = k x logarithmic value = 0.8 x .

[0086] In the above step S3, the product result is summed with the bias parameter value to obtain the first sampling rate matched with the current power-consuming component. Alternatively, for example, the above first sampling rate = 0.8 x + 1.2 ≈ 3.3 Hz.

[0087] The calculation of the first sampling rate matched with the power-consuming component according to the standard power value of the power-consuming component is completed by determining the calibration coefficient, calculating the logarithmic product, and summing, so as to ensure that the sampling frequency is adapted to the power consumption characteristics of the component, and the flexibility and effectiveness of the sampling strategy are ensured.

[0088] In an alternative embodiment, after determining the actual power consumption of the current power-consuming component according to the actual power value of the current power-consuming component collected at each collection time based on the target sampling rate, the method further comprises:

[0089] S1, determining predicted power values of the current power-consuming component at a plurality of collection times according to the operation description information;

[0090] S2, determining an average error rate according to the actual power values and the predicted power values collected at the plurality of collection times;

[0091] S3, determining a first calibration coefficient according to the average error rate.

[0092] In the above step S1, the predicted power values of the current power-consuming component at a plurality of collection times are determined according to the operation description information; optionally, for example, the running description information of the CPU can be combined, including the average usage rate of the CPU, the type of tasks being executed (such as whether it is a compute-intensive or I / O-intensive task), the CPU core temperature and other factors, to predict the power consumption at a plurality of future time points.

[0093] In the above step S2, the average error rate is determined according to the actual power values and the predicted power values collected at the plurality of collection times; as an optional implementation, for the data of the CPU at three consecutive collection time points: the actual power value at the first time point is 350W, the predicted power value is 355W, the error rate is (355W-350W) / 350W; the actual power value at the second time point is 330W, the predicted power value is 325W, the error rate is (325W-330W) / 330W; the actual power value at the third time point is 370W, the predicted power value is 365W, the error rate is (365W-370W) / 370W; then, the above three error rates are added and divided by 3 to obtain the average error rate E_err.

[0094] In the above step S3, the first calibration coefficient is determined according to the average error rate; for example, the above first calibration coefficient k can be adjusted by the following formula:

[0095] k=k×(1+λ×E_err), where λ is an adaptive learning rate (default 0.1), which can automatically calibrate the parameters every 5 minutes to make the dynamic load changes simulated by the above model conform to the actual situation, so that the sampling rate strategy is more in line with the actual situation.

[0096] It should be noted that the present application optimizes the first calibration coefficient by continuously evaluating and adjusting the error between the predicted and actual power consumption, thereby improving the sampling strategy, ensuring the accuracy of power consumption monitoring and effective use of resources, improving the accuracy of the sampling rate, and thereby improving the accuracy of the power consumption result.

[0097] In an optional implementation, the target power value is determined according to the standard power values of a plurality of power-consuming components, comprising:

[0098] S1, determining a maximum standard power value from the standard power values of the plurality of power-consuming components;

[0099] S2, determining the maximum standard power value as the target power value.

[0100] As an optional embodiment, in the server, the power-consuming components can include CPU, memory, hard disk, fan, network card, etc. For example, the standard power value of CPU is 400W, the standard power value of memory is 20W, the standard power value of hard disk is 15W, the standard power value of fan is 10W, and the standard power value of network card is 10W. The maximum standard power value in the server is determined as 400W, and the maximum standard power value is determined as the above-mentioned target power value, i.e. 400W.

[0101] Through the above-mentioned embodiments described in the present application, the maximum standard power value is set as the target power value, which serves as a reference point for subsequent dynamic adjustment of the sampling rate strategy. Furthermore, the system can intelligently adjust the sampling frequencies of the components according to the relative proportions of the power consumptions of the components in actual operation and the reference point, thereby improving the accuracy of the calculation of the power consumption.

[0102] In an optional embodiment, the target power value is determined according to the standard power values of the plurality of power-consuming components, comprising:

[0103] S1, determining the component weight values of the plurality of power-consuming components, wherein the component weight values are determined according to the influence degrees of the power-consuming components on the total power consumption of the system;

[0104] S2, performing weighted summation on the standard power values of each power-consuming component and the corresponding component weight values to obtain the target power value.

[0105] It can be understood that the weight values of the components are determined based on the contribution degrees of each component to the total power consumption of the system. For example, CPU can be given a larger weight value due to its high power consumption.

[0106] As an optional embodiment, the above-mentioned steps are described. It is assumed that the server system contains the following power-consuming components, as well as their respective standard power values and weight values: the standard power value of CPU is 400W, and the weight value is 0.5; the standard power value of memory is 20W, and the weight value is 0.2; the standard power value of hard disk is 15W, and the weight value is 0.1; the standard power value of fan is 10W, and the weight value is 0.1; and the standard power value of network card is 10W, and the weight value is 0.1.

[0107] The standard power value of each component is multiplied by the corresponding weight value, and then the products are summed to obtain the above-mentioned target power value = 0.5×400W + 0.2×20W + 0.1×15W + 0.1×10W + 0.1×10W = 200W + 4W + 1.5W + 1W + 1W = 207.5W.

[0108] Through the above-mentioned embodiments described in the present application, the target power value obtained by weighted summation reflects the comprehensive power consumption level of the system at any time, which is dynamically changed and can reflect the fluctuation of system power consumption in real time. Based on the target power value, the sampling strategy is adjusted to ensure the accuracy and reliability of the power consumption measurement of the system under different load conditions.

[0109] In an optional embodiment, the actual power consumption of the current power consumption component is determined according to the actual power value of the current power consumption component collected at each collection time based on the target sampling rate, comprising:

[0110] S1, collecting the actual power value of the current power consumption component at a plurality of collection times according to the target sampling rate;

[0111] S2, based on the sampling interval matched with the target sampling rate, respectively integrating each actual power value at the plurality of collection times to determine the actual power consumption of the current power consumption component.

[0112] As an optional embodiment, the above steps S1-S2 are described. After calculating the sampling rate of each component, the corresponding sampling rate is used to collect data by the component power consumption collection module. After weighting and summarizing the collected data by time, the power consumption of each component is obtained. For example, in the time window [t0, tn], the power consumption of component i is , wherein, is the sampling time interval, and P(t) is the power value of component i at time t. In order to minimize the accumulation of data volume and affect the storage space, the calculation record is performed once every minute to cover the preceding collection data, the minute data is summarized once every hour to cover the hour data, the hour data is summarized once every day to cover the day data, and the total recording time is maximized to 180 days. Record in units of days, that is, after 180 days, the data of the 181st day will cover the power consumption data of the 1st day.

[0113] As an optional embodiment, assuming that the target sampling rate of the CPU is 5.44 Hz, the sampling interval should be about 0.184 seconds (1 / 5.44 Hz). In this sampling interval, about 326 power data points can be collected every minute.

[0114] Assuming that in a 10-second time window, 350W at the 1st second, 360W at the 2nd second, 370W at the 3rd second, 380W at the 4th second, and 390W from the 5th second to the 10th second are collected.

[0115] If the sampling interval caused by the target sampling rate is 0.184 seconds, the actual power consumption in 10 seconds can be calculated according to the integral method, such as the following formula:

[0116] The actual power consumption is P_1×Δt+P_2×Δt+P_3×Δt+P_4×Δt+P_5×Δt×5≈627.44 Joules (J).

[0117] Compared with a fixed sampling rate or a lower frequency sampling, the dynamic sampling mode of the present application can more comprehensively and more meticulously capture the situation of the power consumption of the components changing over time, and ensure the authenticity and integrity of the power consumption data.

[0118] The determination method of the power consumption described in the present application is described below in one complete embodiment:

[0119] As shown in the flowchart Figure 3 Firstly, S302 is performed, and based on the different maximum power consumptions of the components, a certain weight is used to establish the base sampling rate of each component. Specifically, the base sampling rate (BSR) of the component is , wherein BSR_i is the base sampling rate (Hz) of component i, MP_i is the maximum power consumption (W) of component i, and k and c are system-level calibration coefficients (by default, k=0.8 and c=1.2).

[0120] Taking the calculation of the BSR of the CPU as an example, the maximum power consumption MP_i of the CPU is 400 W, ≈3.28 Hz.

[0121] S304, the dynamic load change rate is calculated; according to the load change situation of each component in the actual operation process, the real-time load size of each component, and the weight of the type of the component itself, the dynamic load change rate is calculated. The formula is DLCR_i(t)=α×|dU_i / dt|+β×U_i(t), wherein DLCR_i(t) is the load change rate index (dimensionless) at time t, U_i(t) is the utilization rate of component i at time t (0-1.0), dU_i / dt is the utilization rate change rate (% / s), and α and β are the component type weight coefficients (for example, CPU: α=0.7, β=0.3; memory: α=0.5, β=0.5).

[0122] Taking the CPU as an example, the utilization rate of the CPU at a certain time is 80% (i.e. U_i(t)=0.80), and in a short period of time, the utilization rate of the CPU changes by 30% (i.e. |dU_i / dt|=0.30), then the DLCR_i(t) of the CPU is 0.7×0.30+0.3×0.80=0.45.

[0123] S306, calculate the power consumption change sensitive coefficient of each component, for example, the power consumption change sensitive coefficient PSF_i=(1+γ×MP_i / MP_max)×δ_i, where γ is the maximum power consumption weight factor (default 0.6), MP_max is the power consumption of the largest component in the system, and δ_i is the component basic sensitivity (for example, CPU=1.8, fan=1.5, network card=1.0, hard disk=0.7).

[0124] Taking CPU as an example, assuming that the power consumption MP_max of the largest component in the server is 400W, MP_i / MP_max=400W / 400W=1, and PSF_i=(1+0.6×1)×1.8=2.88.

[0125] S308, calculate the final sampling rate of each component: final sampling rate ASR_i(t)=BSR_i×[1+η×DLCR_i(t)×PSF_i], where η is the system-level scaling factor (default 0.5). Taking CPU as an example, ASR_i(t)=3.28×[1+0.5×0.45×2.88]≈5.4Hz.

[0126] Satisfy the constraint condition ASR_min≤ASR_i≤ASR_max (such as 0.5Hz-50Hz).

[0127] It should be noted that S302-1, parameter calibration, can also be performed before step S304, such as calibrating the parameters by the following formula:

[0128] k=k×(1+λ×E_err), where λ is the adaptive learning rate (default 0.1), and E_err is the average error rate of the last 10 times of predicted power consumption and actual power consumption. The parameters can be automatically calibrated every 5 minutes to make the dynamic load change simulated by the above model consistent with the actual situation, so that the sampling rate strategy is more in line with the actual situation.

[0129] where P_(pred,i) represents the i-th predicted power value, P_(mease,i) is the i-th average power value, and P_(max,i) is the maximum power value of the power-consuming component.

[0130] S310, use the corresponding sampling rate to collect power consumption data. Specifically, after calculating the sampling rate of each component according to the above model, the power consumption sampling and recording of each component is performed by using the corresponding sampling rate through the power consumption collection module of each component;

[0131] S312, the collected data is weighted and summed according to time, which is the power consumption of each component. For example, in the time window [t0, tn], the power consumption of component i is where, is the sampling time interval, Pi is the power value of component i at time t. In order to minimize the accumulation of data volume, affecting storage space, the calculation record is performed once every minute to cover the aforementioned collected data, the minute data is summarized once every hour to cover the minute data, the hour data is summarized once every day to cover the hour data, the total recording time is maximized to 180 days, and the recording is performed in units of days, i.e. after 180 days, the data of the 181st day will cover the power data of the 1st day.

[0132] A device and equipment for detecting and recording the power consumption of a server system component. Specifically composed of a hardware circuit supporting the power consumption or current collection of each component, a power consumption processing module for calculating the sampling rate of each component, performing sampling data processing and recording, a storage module supporting the storage of power consumption data of each component, etc. Figure 4 As shown in the figure, as the control center of the entire hardware circuit, the baseboard management controller BMC communicates with the CPU power consumption register through the integrated circuit bus (i.e. I2C bus) to read the current power consumption information of the CPU. Similarly, the baseboard management controller BMC reads the data of the memory power consumption register through the integrated circuit bus (i.e. I2C bus), and also includes reading the data of the complex programmable logic device (CPLD) through the integrated circuit bus (i.e. I2C bus) based on the power consumption collection circuit of each component, such as network card power supply voltage detection, network card power supply current monitoring, hard disk power supply voltage detection, hard disk power supply current monitoring, fan speed detection, fan power supply voltage detection, and power supply current monitoring.

[0133] The hardware circuit for collecting the power consumption or current of each component, the main components in the server are CPU, memory, fan, network card, and hard disk. The main principle of power consumption collection of each component is:

[0134] CPU: Read CPU register through BMC to get CPU power consumption; Memory: Read CPU register through BMC to get memory power consumption; Fan: Calculate through fan speed or use current monitoring circuit with fan power supply chip to collect fan power supply current, voltage, and calculate fan power consumption; Network card: Use current monitoring circuit with EFUSE to collect network card power supply current, voltage, and calculate network card power consumption; Hard disk: Use current monitoring circuit with EFUSE to collect all hard disk power supply current, voltage, and calculate the power consumption of all hard disks in the system.

[0135] The system management module with the substrate management controller (BMC) as the core is an ARM small system, has the communication with the CPU register through the I2C, and collects the monitoring information through the I2C, and is used as a power consumption processing module of each component. Each calculation model formula involved in the power consumption detection and recording method of the above component can be realized, the calculation of the sampling rate of each component is realized, the command can be sent to the corresponding detection module or the relevant register based on the sampling rate, the collection and summary of the power consumption data are realized, the power consumption data are calculated to obtain the power consumption data of each component, the data are recorded and stored in the module, the data can be viewed through the web page, and the data statistics and processing are performed.

[0136] As shown in Figure 5 The storage module function block diagram is shown. The storage module includes an enumeration information storage unit, the enumeration information storage unit communicates with the management module (BMC) through the integrated circuit bus (for example, I2C1), the enumeration information storage unit communicates with the mainboard (BIOS) through the integrated circuit bus (for example, I2C2), the access priority of I2C1 is greater than that of I2C2, the storage module supports the reading and writing of the BMC and the reading of the BIOS, the BMC has the priority operation permission, and the BIOS can only read. The mainboard is designed to record and store the power consumption data of each component. After the BIOS reads, the data can be transmitted to the operation and maintenance program under the system, the power consumption of each component is displayed through the operation and maintenance program, and the management module (BMC) can display the power consumption of each component using the web browser.

[0137] The storage module supports 3.3V, S5 power supply, that is, AC power supply, so that the relevant data can be completely saved even if the power is cut off, and the storage space occupied by the BMC is reduced.

[0138] According to another aspect of the embodiment of the application, a power consumption determination device for implementing the power consumption determination method is also provided. As shown in Figure 6 The device includes:

[0139] The first determination unit 602 is configured to determine a first sampling rate matched with the current power consumption component according to the standard power value of the current power consumption component, and the first sampling rate has a positive correlation with the standard power value.

[0140] The second determination unit 604 is configured to determine a target power value according to the standard power values of a plurality of power consumption components, and determine a sampling rate adjustment coefficient of the current power consumption component according to the ratio between the target power value and the standard power value, wherein the plurality of power consumption components include the current power consumption component, and the sampling rate adjustment coefficient is used to indicate the sampling resource occupation of the sampling operation of the power value of the current power consumption component.

[0141] The third determining unit 606 is configured to correct the first sampling rate according to the sampling rate adjustment coefficient to obtain a target sampling rate matched with the current power consumption component.

[0142] The fourth determining unit 608 is configured to determine an actual power consumption of the current power consumption component according to actual power values of the current power consumption component collected at the respective collection times based on the target sampling rate.

[0143] Optionally, the second determining unit 604 includes a fifth determining module configured to determine running description information of the current power consumption component at the current time, wherein the running description information is used to indicate a usage of the current power consumption component at the current time, determine a running load index value of the current power consumption component according to the running description information, calculate a ratio of the standard power value to the target power value, and determine the sampling rate adjustment coefficient of the current power consumption component according to the running load index value and the ratio.

[0144] Optionally, the fifth determining module is configured to determine a usage index value and a usage change rate index value of the current power consumption component indicated by the running description information, wherein the usage index value is used to indicate a load degree of the current power consumption component at the current time, and the usage change rate index value is used to indicate a load change trend of the current power consumption component at the current time, and determine the running load index value of the current power consumption component according to a weighted sum result of the usage index value and the usage change rate index value.

[0145] Optionally, the fourth determining unit 608 is further configured to determine a predicted power value of the current power consumption component according to the running description information, and determine a weight value matched with the usage index value and the usage change rate index value according to the predicted power value and the actual power value.

[0146] Optionally, the first determining unit 602 includes a sixth determining module configured to determine a first calibration coefficient and a bias parameter value corresponding to the current power consumption component, calculate a product of a logarithmic value of the standard power value and the first calibration coefficient to obtain a product result, and sum the product result and the bias parameter value to obtain the first sampling rate matched with the current power consumption component.

[0147] Optionally, the sixth determining module is further configured to determine predicted power values of the current power consumption component at a plurality of collection times according to the running description information, determine an average error rate according to actual power values collected at the plurality of collection times and the predicted power values, and determine the first calibration coefficient according to the average error rate.

[0148] Optionally, the second determining unit 604 includes a seventh determining module configured to determine a maximum standard power value from the standard power values of the plurality of power consumption components, and determine the maximum standard power value as the target power value.

[0149] Optionally, the second determining unit 604 further includes an eighth determining module configured to determine a component weight value of each of the plurality of power consumption components, wherein the component weight value is determined according to an influence degree of the power consumption component on the total power consumption of the system; and the target power value is obtained by performing weighted summation on the standard power value of each power consumption component and the corresponding component weight value.

[0150] Optionally, the fourth determining unit 608 is further configured to collect actual power values of the current power consumption component at a plurality of collection times according to the target sampling rate; and determine the actual power consumption of the current power consumption component by performing integral operation on each actual power value at the plurality of collection times based on a sampling interval matched with the target sampling rate.

[0151] The features of the embodiments of the power consumption determining apparatus can be understood by referring to the related descriptions of the embodiments of the power consumption determining method, which will not be repeated here.

[0152] The embodiments of the present application further provide an electronic device including a memory and a processor, the memory storing a computer program, and the processor being configured to execute the computer program to perform the steps in any of the embodiments of the power consumption determining method.

[0153] The electronic device to which the embodiments of the present application apply can be a terminal device or a server. In the embodiments, the electronic device is taken as a mobile phone and a computer as examples. As shown in Figure 7 the electronic device includes a memory 702 and a processor 704, the memory 702 storing a computer program, and the processor 704 being configured to execute the computer program to perform the steps in any of the embodiments of the method.

[0154] Optionally, in the embodiments, the electronic device can be located in at least one of a plurality of network devices in a computer network.

[0155] Optionally, those skilled in the art can understand that Figure 7 the structure shown in is only schematic, and the electronic device can also be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, etc. Figure 6 It does not limit the structure of the electronic device. For example, the electronic device can include more or fewer components (e.g., a network interface, etc.) than Figure 7 shown in, or have a different configuration from Figure 7 shown in.

[0156] The memory 702 can be used to store software programs and modules, such as program instructions / modules corresponding to the power consumption determination method and device in the embodiments of the present application. The processor 704 executes various functions by running the software programs and modules stored in the memory 702, that is, implements the power consumption determination method described above. The memory 702 can include a high-speed random access memory, and can further include a non-volatile memory such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory 702 can further include a memory remotely arranged with respect to the processor 704, which can be connected to the terminal through a network. Examples of the network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The memory 702 can specifically but not limited to be used to store signals, data, and other information. As an example, as shown in Figure 7 The memory 702 can specifically but not limited to include the first determination unit 602, the second determination unit 604, the third determination unit 606, and the fourth determination unit 608 in the power consumption determination device described above. In addition, other module units in the power consumption determination device described above can also be included, which will not be described in detail in this example.

[0157] Optionally, the transmission device 706 is used to receive or send data via a network. Specific examples of the network can include wired networks and wireless networks. In one example, the transmission device 706 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers through a network cable to communicate with the Internet or a local area network. In one example, the transmission device 706 is a radio frequency (Radio Frequency, RF) module, which is used to communicate with the Internet in a wireless manner.

[0158] In addition, the electronic device further includes a display 708 and a connection bus 710 for connecting various module components in the electronic device.

[0159] In other embodiments, the terminal device or the server can be a node in a distributed system, and the distributed system can be a blockchain system formed by the plurality of nodes connected through network communication. The nodes can form a point-to-point network, and any form of computing device, such as a server, a terminal, or an electronic device, can become a node in the blockchain system by joining the point-to-point network.

[0160] The embodiment of the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is configured to execute the steps in any of the power consumption determination method embodiments when running.

[0161] In an example embodiment, the computer readable storage medium can include, but is not limited to, a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store computer programs.

[0162] The embodiment of the present application further provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the steps in any of the power consumption determination method embodiments.

[0163] The embodiment of the present application further provides another computer program product, which comprises a non-volatile computer readable storage medium, and the non-volatile computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps in any of the power consumption determination method embodiments.

[0164] The skilled person can further realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be realized in electronic hardware, computer software or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been described in general terms in the above description. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0165] The above describes in detail the power consumption determination method and device, storage medium and electronic device provided by the present application. The principles and implementation manners of the present application are described by applying specific examples in this paper, and the above example description is only applicable to help understand the method and core idea of the present application. It should be pointed out that, for the ordinary skilled person in the technical field, without departing from the principles of the present application, the present application can be improved and modified in several ways, and these improvements and modifications also fall within the protection scope of the claims of the present application.

Claims

1. A method for determining power consumption, characterized in that, include: A first sampling rate matching the current power-consuming component is determined based on the standard power value of the current power-consuming component, wherein the first sampling rate and the standard power value have a positive correlation. A target power value is determined based on the standard power values ​​of multiple power-consuming components, wherein the multiple power-consuming components include the current power-consuming component; Determine the operating description information of the current power-consuming component at the current moment, wherein the operating description information is used to indicate the usage status of the current power-consuming component at the current moment; The operating load index value of the current power-consuming component is determined based on the operating description information; Calculate the ratio of the standard power value to the target power value; The sampling rate adjustment coefficient of the current power-consuming component is determined based on the operating load index value and the ratio, wherein the sampling rate adjustment coefficient is used to indicate the sampling resource occupancy of the sampling operation for the power value of the current power-consuming component; The first sampling rate is corrected according to the sampling rate adjustment coefficient to obtain a target sampling rate that matches the current power-consuming component; The actual power consumption of the current power-consuming component is determined based on the actual power value of the current power-consuming component collected at each collection time according to the target sampling rate.

2. The method according to claim 1, characterized in that, Determining the operating load index value of the current power-consuming component based on the operating description information includes: The usage rate index value and the usage rate change rate index value of the current power-consuming component indicated by the operation description information are determined, wherein the usage rate index value is used to indicate the load level of the current power-consuming component at the current time, and the usage rate change rate index value is used to indicate the load change trend of the current power-consuming component at the current time; The operating load index value of the current power-consuming component is determined based on the weighted sum of the usage rate index value and the usage rate change rate index value.

3. The method according to claim 2, characterized in that, After determining the actual power consumption of the current power-consuming component based on the actual power values ​​collected at each sampling time according to the target sampling rate, the method further includes: The predicted power value of the current power-consuming component is determined based on the operation description information; Based on the predicted power value and the actual power value, weight values ​​are determined that match the utilization rate index value and the utilization rate change rate index value, respectively.

4. The method according to claim 1, characterized in that, Determining a first sampling rate matching the current power-consuming component based on its standard power value includes: Determine the first calibration coefficient and bias parameter value corresponding to the currently power-consuming component; Calculate the product of the logarithm of the standard power value and the first calibration coefficient to obtain the product result; The product result is summed with the bias parameter value to obtain a first sampling rate that matches the current power-consuming component.

5. The method according to claim 4, characterized in that, After determining the actual power consumption of the current power-consuming component based on the actual power values ​​collected at each sampling time according to the target sampling rate, the method further includes: Based on the operation description information, the predicted power values ​​of the current power-consuming components at multiple acquisition times are determined; The average error rate is determined based on the actual power values ​​and the predicted power values ​​collected at multiple collection times. The first calibration coefficient is determined based on the average error rate.

6. The method according to claim 1, characterized in that, Determining the target power value based on the standard power values ​​of multiple power-consuming components includes: The maximum standard power value is determined from the standard power values ​​of each of the plurality of power-consuming components; The maximum standard power value is determined as the target power value.

7. The method according to claim 1, characterized in that, Determining the target power value based on the standard power values ​​of multiple power-consuming components includes: Determine the component weight value for each of the multiple power-consuming components, wherein the component weight value is determined based on the degree of influence of the power-consuming component on the total power consumption of the system; The target power value is obtained by weighting and summing the standard power value of each power-consuming component with its corresponding component weight value.

8. The method according to claim 1, characterized in that, The actual power consumption of the current power-consuming component is determined based on the actual power values ​​collected at each sampling time according to the target sampling rate, including: The actual power value of the current power-consuming component is collected at multiple sampling times according to the target sampling rate. Based on the sampling interval matching the target sampling rate, the actual power consumption of the current power-consuming component is determined by integrating the actual power values ​​at each of the multiple acquisition times.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the power consumption determination method as described in any one of claims 1 to 8 when executing the computer program.

Citation Information

Patent Citations

  • Power consumption statistical method and device, electronic equipment and readable storage medium

    CN115033458A

  • Power consumption test method and system, server and storage medium

    CN115980599A