Energy consumption management method and electronic equipment

By obtaining the processor's workload data, predicting the target energy consumption value and adjusting the frequency step, the inflexibility of traditional CPU power management methods is solved, personalized management of the processor core is achieved, and operational efficiency and stability are improved.

CN120595932APending Publication Date: 2025-09-05XFUSION DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510724168.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-30
Publication Date
2025-09-05

AI Technical Summary

Technical Problem

Traditional CPU power management methods are not flexible enough and cannot meet the needs of CPU core power consumption management in different scenarios, resulting in resource waste.

Method used

By obtaining the processor's workload data, predicting the target energy consumption value, and determining the frequency adjustment step size based on the workload data and the target energy consumption value, the output frequency of the processor core can be accurately adjusted to achieve personalized management.

Benefits of technology

It achieves precise and personalized management of processor cores, avoids the waste of resources caused by "one-size-fits-all" adjustments, and improves the operating efficiency and stability of processor cores.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120595932A_ABST
    Figure CN120595932A_ABST
Patent Text Reader

Abstract

The invention provides an energy consumption management method and electronic equipment, and the method comprises the steps: obtaining the workload data of each processor; wherein the workload data is used for indicating the running state of the processor; predicting a target energy consumption value of each processor at the current moment based on the workload data; determining a frequency adjustment step length of each processor based on the workload data and the target energy consumption value; wherein the frequency adjustment step length is used for indicating to adjust the amplitude of the output frequency of the processor; and adjusting the output frequency of the corresponding processor based on the frequency adjustment step length.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of computers, and in particular to an energy consumption management method and an electronic device. Background Art

[0002] A physical host, also called a physical server, is a self-contained, hardware-based server with a self-contained infrastructure. A physical host can have multiple central processing units (CPUs).

[0003] For physical hosts, CPU power consumption can be managed by adjusting the CPU's output frequency. However, traditional CPU power management methods are not flexible enough to meet the needs of CPU core power management in different scenarios. Summary of the Invention

[0004] The embodiments of the present application at least provide an energy consumption management method and an electronic device.

[0005] In a first aspect, an embodiment of the present application provides an energy consumption management method, comprising:

[0006] Acquiring workload data of a processor; wherein the processor core runs at least one virtual machine, and the workload data is used to indicate an operating state of the processor;

[0007] Predicting a target energy consumption value of each of the processors at a current moment based on the workload data;

[0008] Determining a frequency adjustment step size for each of the processor cores based on the workload data and the target energy consumption value; wherein the frequency adjustment step size is used to indicate an amplitude for adjusting the output frequency of the processor core;

[0009] The output frequency of the corresponding processor core is adjusted based on the frequency adjustment step size.

[0010] This technical solution not only allows for timely responses based on the current operating state of each processor, but also independently determines the frequency adjustment step size for each processor core. This allows processor cores in different operating states to receive their own adaptive frequency adjustments, thus enabling precise and personalized management of each processor core and avoiding the resource waste caused by "one-size-fits-all" adjustments.

[0011] In an optional implementation, determining the frequency adjustment step size of each processor core based on the workload data and the target energy consumption value includes:

[0012] Calculating a first frequency adjustment parameter of the processor core based on the target energy consumption value; wherein the first frequency adjustment parameter is used to indicate a difference between the target energy consumption value and an expected energy consumption value of the processor core;

[0013] The first frequency adjustment parameter is modified based on the performance impact factor of the processor core to obtain a second frequency adjustment parameter; wherein the performance impact factor is used to indicate the degree of influence of the workload data on the energy consumption change of the processor core;

[0014] The frequency adjustment step size is calculated based on the second frequency adjustment parameter and the output frequency of the processor core.

[0015] In this technical solution, when determining the processor core frequency adjustment step size, the first frequency adjustment parameter is calculated using the target energy consumption value to determine the energy consumption gap with the desired energy consumption value. The second frequency adjustment parameter is then corrected using performance impact factors, comprehensively considering both performance and energy consumption. Finally, the step size is calculated by combining relevant parameters. This allows for energy consumption control and scientific frequency adjustment decisions, enabling the processor to flexibly adapt to workloads and improving the operating efficiency and stability of the processor core.

[0016] In an optional implementation, calculating the first frequency adjustment parameter of the processor core based on the target energy consumption value includes:

[0017] determining a first difference between the target energy consumption value and the expected energy consumption value;

[0018] determining a ratio between the first difference and the expected energy consumption value;

[0019] The negative of the ratio is determined as the first frequency adjustment parameter.

[0020] In this technical solution, by determining the difference and ratio between the target energy consumption value and the expected energy consumption value, and setting the negative of the ratio as the first frequency adjustment parameter, the energy consumption value can be quantified into a uniform and comparable value, and a clear mathematical relationship between the energy consumption deviation and the frequency adjustment can be established, so that scientific and accurate frequency adjustment operations can be achieved under different processor cores and working conditions.

[0021] In an optional implementation, the modifying the first frequency adjustment parameter based on the performance impact factor of the processor core to obtain the second frequency adjustment parameter includes:

[0022] determining the performance impact factor based on the workload data;

[0023] Performing a sum operation on the performance impact factor and the first value to obtain a sum result;

[0024] The first frequency adjustment parameter is modified based on the summation result to obtain a second frequency adjustment parameter.

[0025] This technical solution makes the second adjustment parameter more closely aligned with the actual operating conditions of the processor core, improving the scientific nature of frequency adjustment decisions and enhancing the processor core's adaptability to complex and changing operating scenarios.

[0026] In an optional implementation, the workload data includes multiple sub-data, and determining the performance impact factor based on the workload data includes:

[0027] Determining a first impact factor of each sub-data; wherein the first impact factor is used to indicate the degree of impact of each sub-data on the energy consumption change of the processor core;

[0028] determining a data weight of each of the sub-data;

[0029] The data weight and the first impact factor are weightedly calculated to obtain the performance impact factor.

[0030] This technical solution accurately measures the impact of different workload sub-data on processor core energy consumption, comprehensively and meticulously reflecting the impact of workload data on energy consumption. By flexibly adjusting the influence of each sub-data using data weights, the processor core frequency adjustment is more adaptable to complex and diverse workloads.

[0031] In an optional embodiment, the workload data includes but is not limited to: the utilization rate of the processor, the average task response time, and the task throughput;

[0032] The determining of the first impact factor of each sub-data includes:

[0033] Determining a first sub-influence factor based on the usage rate of the processor core; wherein the first sub-influence factor is used to indicate the degree of influence of the usage rate of the processor core on the performance of the processor core;

[0034] Determining a second sub-influence factor based on the average task response time of the processor core; wherein the second sub-influence factor is used to indicate the degree of influence of the average task response time of the processor core on the performance of the processor core;

[0035] Determining a third sub-influence factor based on the task throughput of the processor core; wherein the third sub-influence factor is used to indicate the degree of influence of the task throughput of the processor core on the performance of the processor core;

[0036] A normalization operation is performed on the first sub-influence factor, the second sub-influence factor, and the third sub-influence factor to obtain a first influence factor.

[0037] This technical solution can convert the impact of different types of sub-data on processor core energy consumption into a unified and comparable quantitative value. By providing a reference for normalization using performance indicators, it lays a solid foundation for subsequent comprehensive calculation of performance influencing factors.

[0038] In an optional implementation, adjusting the output frequency of the corresponding processor based on the frequency adjustment step size includes:

[0039] When it is determined that a first type of virtual machine and a second type of virtual machine are running simultaneously in the processor core, updating the frequency adjustment step size based on the usage rate of the processor to obtain the updated frequency adjustment step size; wherein a difference between the usage rates of the first type of virtual machine and the second type of virtual machine for the processor core is greater than a preset threshold;

[0040] The output frequency of the corresponding processor is adjusted based on the updated frequency adjustment step size.

[0041] In an optional implementation, updating the frequency adjustment step size based on the usage rate of the processor core to obtain the updated frequency adjustment step size includes:

[0042] calculating a target difference between the second value and the usage rate of the processor core;

[0043] The product of the target difference and the frequency adjustment step is calculated to obtain the updated frequency adjustment step.

[0044] In this technical solution, by first calculating the target difference between the second value and the target physical core utilization rate, and then multiplying the target difference by the frequency adjustment step size to obtain the updated frequency adjustment step size, the frequency adjustment step size can be updated according to the actual usage of the processor core, making the frequency adjustment more closely aligned with the real-time load of the processor. This enhances the adaptability of the processor core to different workloads.

[0045] In a second aspect, an embodiment of the present application further provides an electronic device comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the steps of the above-mentioned first aspect or any possible implementation of the first aspect are performed.

[0046] The energy consumption management method provided in the embodiment of the present application collects the workload data of each processor core to predict the target energy consumption value of the processor in which the processor core is located, and obtains the frequency adjustment step size based on the target energy consumption value of each processor and the workload data of each processor core. Afterwards, the output frequency of each processor core is adjusted by the frequency adjustment step size. Through the above-mentioned processing method, it is possible to respond in a timely manner according to the current operating state of each processor core, thereby adjusting the energy consumption of the processor core. By determining the frequency adjustment step size of each processor core, processor cores in different operating states can all obtain frequency adjustment amplitudes adapted to themselves.

[0047] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and, together with the specification, are used to illustrate the technical solutions of the present application. It should be understood that the following drawings only illustrate certain embodiments of the present application and should not be regarded as limiting the scope. For those of ordinary skill in the art, other relevant drawings can be obtained based on these drawings without inventive effort.

[0049] Figure 1 A flow chart of an energy consumption management method provided in an embodiment of the present application is shown;

[0050] Figure 2 A schematic diagram of the structure of an energy consumption management platform provided in an embodiment of the present application is shown;

[0051] Figure 3 A specific flow chart of an energy consumption management method provided in an embodiment of the present application is shown;

[0052] Figure 4 A schematic diagram of an energy consumption management device provided in an embodiment of the present application is shown;

[0053] Figure 5 A schematic diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of this application.

[0055] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings.

[0056] The term "and / or" herein simply describes an association relationship, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, the simultaneous existence of A and B, and the existence of B alone. In addition, the term "at least one" herein refers to any combination of at least two of any one or more of a plurality of items. For example, "at least one of A, B, and C" can represent any one or more elements selected from the set consisting of A, B, and C.

[0057] Before going into detail, the terms used in the embodiments of the present application are explained as follows:

[0058] Hyper Converged Infrastructure (HCI): refers to the integration of computing, networking, storage, server virtualization and other resources and supporting technologies in the same set of unit equipment, as well as backup software, snapshot technology, data deduplication, online data compression and other technologies. Multiple sets of unit equipment can be aggregated through the network to achieve modular seamless horizontal expansion, thus forming a unified resource pool.

[0059] Virtual Machine (VM): A virtual machine is equivalent to a computing environment that can run as an independent system. It has a processor, memory device, network interface and storage space and can be created based on a hardware resource pool.

[0060] Based on the above research, this application provides an energy consumption management method, which collects the workload data of each processor to predict the target energy consumption value of each processor, and obtains the frequency adjustment step size based on the target energy consumption value and workload data of each processor. Afterwards, the output frequency of each processor is adjusted by the frequency adjustment step size. Through the above processing method, it is possible to respond in a timely manner according to the current operating state of each processor, thereby adjusting the energy consumption of the processor; at the same time, by determining the frequency adjustment step size of each processor, processors in different operating states can all be adapted to their own frequency adjustment amplitude, thereby realizing accurate and personalized management of each processor and avoiding the waste of resources caused by "one-size-fits-all" adjustments.

[0061] To facilitate understanding of this embodiment, we first provide a detailed introduction to an energy management method disclosed in this embodiment. The energy management method provided in this embodiment is generally executed by an electronic device with certain computing capabilities. In some possible implementations, this energy management method can be implemented by a processor invoking computer-readable instructions stored in a memory.

[0062] See also Figure 1 FIG. 1 is a flow chart of an energy consumption management method provided in an embodiment of the present application, wherein the method includes steps S101 to S104, wherein:

[0063] S101. Obtain workload data of a processing core of a processor; wherein the processor core runs at least one virtual machine, and the workload data is used to indicate an operating state of the processor and the processor core.

[0064] In an embodiment of the present application, a plug-in may be installed on each physical host. This plug-in may be referred to as an energy-usage-agent. The energy-usage-agent then collects workload data for each processor in the physical host. The processor may be a central processing unit (CPU).

[0065] Here, workload data is multi-dimensional data. The workload data also includes at least one of the following: processor utilization, processor core utilization, processor core utilization corresponding to each virtual machine, average task response time, and task throughput. Processor utilization can be determined by the proportion of the processor's busy time.

[0066] In an embodiment of the present application, workload data for each processor core in the processor may be acquired at preset intervals, for example, at 5-second intervals. Alternatively, workload data for each processor core may be acquired at 6-second intervals. The length of the preset time is not specifically limited and is subject to practicality.

[0067] S102: Predict the target energy consumption value of each processor at the current moment based on the workload data.

[0068] In an embodiment of the present application, workload data may first be vectorized to obtain a real-time workload vector, and then a target energy consumption value (i.e., a predicted energy consumption value) of the processor at the current moment may be predicted based on the real-time workload vector.

[0069] Here, the load data required for predicting the target energy consumption value may be determined from the workload data, and the required load data may be vectorized to obtain a workload vector.

[0070] For example, when the target energy consumption value is the predicted energy consumption value at the current moment i and the data dimension of the required load data is the target dimension, the workload vector x is determined to be i =[HostCPU i useage , Task i resptime , VM i (1) cpu_useage ,…,VM i(j) cpu_useage ,…,VM i(n) cpu_useage , VM i(1) core ,…,VM i(j) core ,…,VM i(n) core ]; where the target dimensions include: processor utilization, average task response time, processor core utilization corresponding to each virtual machine, and the number of processor cores corresponding to each virtual machine.

[0071] Here, HostCPU i useage is the processor usage at time i, Task i resptime is the average response time of the task at time i, VM i(j) cpu_useage is the processor usage of the jth virtual machine at time i, where j ranges from 1 to n, and n is the number of virtual machines set for the processor. i(j) core The number of processor cores of the jth virtual machine at the i-th time.

[0072] S103 . Determine a frequency adjustment step size for each processor core based on the workload data and the target energy consumption value; wherein the frequency adjustment step size is used to indicate an amplitude for adjusting the output frequency of the processor core.

[0073] In an embodiment of the present application, the adjustment step size of each processor core may be determined based on the degree of influence of workload data on the target energy consumption value.

[0074] Here, the degree of influence of the sub-data of each dimension in the workload data on the target energy consumption value may be determined, thereby determining the adjustment step size of each processor core.

[0075] S104: Adjust the output frequency of the corresponding processor core based on the frequency adjustment step size.

[0076] In an embodiment of the present application, after determining the frequency adjustment step size, the frequency adjustment step size and the output frequency of the corresponding processor core may be summed to obtain an updated output frequency, wherein the output frequency is obtained together with the real-time workload parameter.

[0077] Among them, the updated output frequency f' meets the following conditions:

[0078] f'=Δf+f, where Δf is the frequency adjustment step and f is the output frequency of the processor.

[0079] Here, the rated minimum output frequency value f of the processor core can be determined min And the rated minimum output frequency f max , thereby determining the range of the processor core's output frequency [f min , f max After determining the updated output frequency, it can be determined whether the updated output frequency is within the range of the output frequency of the processor core, that is, whether it satisfies f min ≤f'≤f max .

[0080] If it is determined that the updated output frequency is within the range of the output frequencies of the processor cores, the updated output frequency can be determined as the output frequency of the processor cores at the current moment. If it is determined that the updated output frequency is not within the range of the output frequencies of the processor cores, the step of obtaining workload data for each processor core is performed again.

[0081] In an embodiment of the present application, first, workload data of a processor core of a processor is obtained; wherein the processor core runs at least one virtual machine, and the workload data is used to indicate the operating status of the processor and the processor core; secondly, a target energy consumption value of the processor at the current moment is predicted based on the workload data; secondly, a frequency adjustment step size of each processor core is determined based on the workload data and the target energy consumption value; wherein the frequency adjustment step size is used to indicate the amplitude of adjusting the output frequency of the processor core; finally, the output frequency of the corresponding processor core is adjusted based on the frequency adjustment step size.

[0082] In the above-described embodiment, workload data for each processor core is collected to predict the target energy consumption value of the processor in which the processor core resides. Based on the target energy consumption value and workload data for each processor core, a frequency adjustment step size is determined. The output frequency of each processor core is then adjusted using the frequency adjustment step size. This processing approach allows for timely response based on the current operating state of each processor core, thereby adjusting the energy consumption of the processor core. By determining the frequency adjustment step size for each processor core, each processor core in different operating states can receive a frequency adjustment amplitude tailored to its specific needs.

[0083] In an optional embodiment, determining the frequency adjustment step size of each processor core based on workload data and target energy consumption value specifically includes the following steps:

[0084] First, a first frequency adjustment parameter of the processor core is calculated based on the target energy consumption value; wherein the first frequency adjustment parameter is used to indicate the difference between the target energy consumption value and the expected energy consumption value of the processor core;

[0085] Secondly, the first frequency adjustment parameter is modified based on the performance impact factor of the processor core to obtain a second frequency adjustment parameter; wherein the performance impact factor is used to indicate the degree of influence of the workload data on the energy consumption change of the processor core;

[0086] Finally, a frequency adjustment step size is calculated based on the second frequency adjustment parameter and the output frequency of the processor core.

[0087] In an embodiment of the present application, first, the expected energy consumption value of the processor core can be determined. Second, the difference between the target energy consumption value and the expected energy consumption value can be determined. Finally, the difference can be normalized to obtain a first frequency adjustment parameter.

[0088] Here, the performance impact factor of the processor core is the impact degree of all performance impact data of the processor core. Afterwards, the performance impact factor and the first frequency adjustment parameter can be operated to obtain the second frequency adjustment parameter.

[0089] After the second frequency adjustment parameter is determined, the second frequency adjustment parameter may be multiplied by the output frequency of the processor core, and the obtained product may be determined as the frequency adjustment step size.

[0090] Here, first, the performance parameters of the workload data on the processor core energy consumption value can be determined. Secondly, the degree of influence of each performance parameter on the processor energy consumption value (ie, the first influence factor described below) can be determined.

[0091] Next, an expected energy consumption value of the processor core may be determined. The expected energy consumption value indicates that an energy consumption condition is satisfied while not degrading the performance of the processor core. The energy consumption condition is that the resources (eg, electrical energy) consumed by the processor core is within a preset range.

[0092] Here, not reducing the performance of the processor core can be understood as not reducing the processing performance of tasks that meet the important condition, wherein the important condition is a task that is currently being processed by the processor core and is greater than a preset importance.

[0093] Secondly, a second frequency adjustment parameter may be determined based on the target energy consumption value, the expected energy consumption value, and the degree of influence of the performance parameter. Finally, a frequency adjustment step size may be determined based on the adjustment coefficient and the output frequency of the processor core.

[0094] In the above implementation, when determining the processor core frequency adjustment step size, a first frequency adjustment parameter is calculated using the target energy consumption value to determine the energy consumption gap with the desired energy consumption value. The second frequency adjustment parameter is then corrected using the performance impact factor. This approach allows for a comprehensive balance between performance and energy consumption, allowing the step size to be calculated based on the relevant parameters. This allows for energy consumption to be regulated, making scientific decisions about frequency adjustments, allowing the processor core to flexibly adapt to the workload, and improving the processor core's operational efficiency and stability.

[0095] In an optional implementation, calculating the first frequency adjustment parameter of the processor core based on the target energy consumption value specifically includes the following steps:

[0096] First, determining a first difference between the target energy consumption value and the expected energy consumption value;

[0097] Secondly, determining the ratio between the first difference and the expected energy consumption value;

[0098] Finally, the negative of the ratio is determined as the first frequency adjustment parameter.

[0099] In an embodiment of the present application, first, the expected energy consumption value of the processor can be determined based on the performance index of the processor core, wherein the performance index includes the energy consumption value corresponding to each workload data and the energy consumption value corresponding to the processor core at different output frequencies.

[0100] Secondly, the predicted energy consumption value E can be determined pred and expected energy consumption E target The first difference C1 between them meets the following conditions: C1 = E pred -E target .

[0101] Secondly, the first difference C1 and the expected energy consumption value E can be determined target The ratio B1 between them meets the following conditions: B1=(E pred -E target ) / E target .

[0102] Finally, the negative of the ratio B1 can be used as the first frequency adjustment parameter k0, and the first frequency adjustment parameter k0 meets the following conditions: k0 = -[(E pred -E target ) / E target ].

[0103] In the above implementation, by determining the difference and ratio between the target energy consumption value and the expected energy consumption value, and setting the negative of the ratio as the first frequency adjustment parameter, the energy consumption value can be quantified into a uniform and comparable value, and a clear mathematical relationship between the energy consumption deviation and the frequency adjustment can be established, so that scientific and accurate frequency adjustment operations can be achieved under different processor cores and working conditions.

[0104] In an optional implementation, the first frequency adjustment parameter is modified based on the performance impact factor of the processor core to obtain the second frequency adjustment parameter, which specifically includes the following steps:

[0105] First, determine the performance impact factors based on workload data;

[0106] Secondly, performing a sum operation on the performance impact factor and the first value to obtain a sum result;

[0107] Finally, the first frequency adjustment parameter is corrected based on the summation result to obtain the second frequency adjustment parameter.

[0108] In an embodiment of the present application, after determining the performance impact factor, the performance impact factor may be added to the first value to obtain a sum result H1. The sum result H1 satisfies the following conditions:

[0109] H1=F+s1, wherein F is the performance impact factor and s1 is the first value. Those skilled in the art can set the first data according to actual needs, for example, setting the first value to 1, that is, s1=1.

[0110] After the summation result is determined, the first frequency adjustment parameter can be corrected by calculating the quotient of the first frequency adjustment parameter k0 and the summation result H1 to obtain a second frequency adjustment parameter k, where k satisfies the following condition: k=k0 / (F+s1).

[0111] In the above embodiment, the above process takes into account the impact of workload data on energy consumption changes, making the resulting second adjustment parameter more closely aligned with the actual operating conditions of the processor core. This improves the scientific nature of frequency adjustment decisions and enhances the processor's adaptability to complex and changing operating scenarios.

[0112] In an optional embodiment, the workload data includes multiple sub-data, and determining the performance impact factor based on the workload data specifically includes the following steps:

[0113] First, a first impact factor of each sub-data is determined; wherein the first impact factor is used to indicate the degree of impact of each sub-data on the energy consumption change of the processor core;

[0114] Secondly, determine the data weight of each sub-data;

[0115] Finally, the data weight and the first impact factor are weighted and calculated to obtain the performance impact factor.

[0116] In an embodiment of the present application, performance impact data of a processor core in the workload data may be determined and the performance impact data may be determined as sub-data, wherein the performance impact data includes at least one of the following: utilization rate of the processor core, average task response time, and task throughput.

[0117] After the first impact factor is determined, the data weight of each sub-data may be determined based on the sub-data and historical data corresponding to the first impact factor.

[0118] Afterwards, each first impact factor and the data weight corresponding to the first impact factor can be multiplied to obtain the target product. Then, the target products corresponding to the first impact factors are summed to obtain the performance impact factor. The performance impact factor F meets the following conditions:

[0119] F=W1×Y1+…W h ×Y h +…+W H ×Y H Among them, W h is the data weight corresponding to the hth first impact factor (i.e., the data weight corresponding to the hth sub-data), Y h is the hth first impact factor.

[0120] The above implementation accurately measures the differences in the impact of different sub-data within the workload data on the processor core's energy consumption, comprehensively and meticulously reflecting the workload data's impact on energy consumption. By flexibly adjusting the influence of each sub-data using data weights, the processor core's frequency adjustment is more adaptable to complex and diverse workloads.

[0121] In an optional embodiment, the workload data includes, but is not limited to: processor core utilization, task average response time, and task throughput;

[0122] Determine the first impact factor of each sub-data, including:

[0123] Determining a first sub-influence factor based on the utilization rate of the processor core; wherein the first sub-influence factor is used to indicate the degree of influence of the utilization rate of the processor core on the performance of the processor core;

[0124] Determining a second sub-influence factor based on the average task response time of the processor core; wherein the second sub-influence factor is used to indicate the degree of influence of the average task response time of the processor core on the performance of the processor core;

[0125] Determining a third sub-influence factor based on the task throughput of the processor core; wherein the third sub-influence factor is used to indicate the degree of influence of the task throughput of the processor core on the performance of the processor core;

[0126] A normalization operation is performed on the first sub-influence factor, the second sub-influence factor, and the third sub-influence factor to obtain the first influence factor corresponding to each sub-data.

[0127] In an embodiment of the present application, workload data may be a rated range of sub-data. For example, when the sub-data is the utilization rate of the processor by the virtual machine, the performance indicator is the maximum utilization rate of the processor (i.e., the load threshold of the processor); when the sub-data is the average task response time, the performance indicator is the maximum acceptable task response time; and when the sub-data is the task throughput, the performance indicator is the expected minimum throughput.

[0128] Wherein, when the sub-data is the utilization rate of the processor core, the first sub-influence factor Y U Meet the following conditions:

[0129] Y U =-[(UU th ) / (1-U th )]; where U is the utilization rate of the processor core by the virtual machine, U th The maximum usage allowed for the processor core.

[0130] When the sub-data is the average task response time, the second sub-influence factor Y RT Meet the following conditions:

[0131] Y RT =-[(RT-RT th ) / (RT max -RT th )]; where RT is the average task response time, RT th is the maximum acceptable task response time, RT max It is the maximum task response time among the tasks being processed by the processor core.

[0132] When the sub-data is task throughput, the third sub-influence factor Y TP Meet the following conditions:

[0133] Y TP =-[(TP th -TP) / TP th ]; where TP is the processor core task throughput, TP th is the minimum throughput expected from the processor core.

[0134] In the above implementation, the degree of influence of different types of sub-data on the change in processor core energy consumption can be converted into a unified and comparable quantitative value. By providing a reference for normalization through performance indicators, a solid foundation can be laid for subsequent comprehensive calculation of performance impact factors.

[0135] In an optional implementation, adjusting the output frequency of the corresponding processor core based on the frequency adjustment step size specifically includes the following steps:

[0136] First, when it is determined that a first type of virtual machine and a second type of virtual machine are running simultaneously in the processor core, the frequency adjustment step size is updated based on the usage rate of the processor core to obtain the updated frequency adjustment step size; wherein the difference between the usage rates of the first type of virtual machine and the second type of virtual machine for the processor core is greater than a preset threshold;

[0137] Secondly, the output frequency of the corresponding processor is adjusted based on the updated frequency adjustment step size.

[0138] In an embodiment of the present application, when it is determined that a first type virtual machine and a second type virtual machine exist simultaneously on any processor core of the processor, the frequency adjustment step size is updated based on the usage rate of the processor core.

[0139] The first category of VMs are those with consistently low resource requirements (i.e., low-load VMs). For example, they may use 75% or more of their configured network bandwidth and have frequent disk I / O (input and output). These VMs often perform high-load tasks such as large-scale data processing and complex scientific computing simulations.

[0140] The second category of VMs are those with significantly high resource demands (i.e., high-load VMs) that are continuously or for extended periods of time. For example, they may use less than 30% of their allocated memory, use less than 25% of their configured network bandwidth, and perform minimal disk I / O. They often run simple tasks such as file storage services and lightweight monitoring applications.

[0141] Here, the frequency adjustment step size may be updated based on the usage rate of the processor core to obtain an updated frequency adjustment step size.

[0142] After obtaining the updated frequency adjustment step length, the updated frequency adjustment step length and the output frequency of the processor core may be added together, and the calculated output frequency may be determined as the output frequency of the processor core at the current moment.

[0143] In the above implementation, when a processor core simultaneously hosts both Type 1 and Type 2 virtual machines, the frequency adjustment step size is first updated based on the processor core utilization, and the processor and output frequencies are then adjusted using the updated step size. This improves frequency adjustment accuracy and avoids the difficulty of traditional fixed step sizes in adapting to complex loads.

[0144] In an optional implementation, updating the frequency adjustment step size based on the usage rate of the processor core to obtain the updated frequency adjustment step size specifically includes the following steps:

[0145] First, a target difference between the second value and the utilization rate of the processing core is calculated;

[0146] Secondly, the product between the target difference and the frequency adjustment step size is calculated to obtain the updated frequency adjustment step size.

[0147] In an embodiment of the present application, the difference between the second value and the utilization rate of the processor core can be determined as the target difference. Wherein, the target difference MC meets the following conditions: MC = (s2-L u ); where s2 is the second value, L u is the utilization of the processor core.

[0148] Afterwards, the product of the target super value MC and the frequency adjustment step length Δf can be determined to obtain the updated frequency adjustment step length f". The updated frequency adjustment step length f" meets the following conditions: f" = (s2 - L u )×△f.

[0149] In the above embodiment, by first calculating the target difference between the second value and the processor core utilization rate, and then multiplying the target difference by the frequency adjustment step size to obtain the updated frequency adjustment step size, the frequency adjustment step size can be updated according to the actual usage of the processor core, making the frequency adjustment more closely aligned with the real-time load of the processor. This enhances the adaptability of the processor core to different workloads.

[0150] In an optional embodiment, predicting the target energy consumption value of each processor at the current moment based on workload data specifically includes the following steps:

[0151] The workload data is input into the trained random forest model for processing to obtain the target energy consumption value of each processor at the current moment.

[0152] In an embodiment of the present application, the trained random forest model can be determined as follows:

[0153] First, training data of each processor collected at preset intervals within a preset time period is obtained; wherein the training data is used to indicate workload data collected by the central processing unit within the preset time period and the energy consumption value corresponding to the workload data.

[0154] For example, workload data of each processor is collected from the physical host every 5 seconds until the time interval between the first collection time and the last collection time is a preset time period, and the collected data is determined as training data.

[0155] Secondly, the training data can be cleaned to obtain cleaned training data. For example, the mean and standard deviation method can be used to remove outliers in the training data to obtain cleaned training data.

[0156] Secondly, the cleaned training data is divided into multiple training groups based on a preset time sequence. That is, the cleaned training data is divided into multiple training groups according to a preset time sequence. Each training group can determine the training set and test set according to a preset ratio. For example, 80% of the data in each training group is determined as the training set and 20% of the data is determined as the test set.

[0157] Finally, the random forest model to be trained is trained in turn through each training group to obtain the trained random forest model.

[0158] Here, a training sample set may be generated based on the training group, wherein the input data of the training sample set is workload data, and the label is the energy consumption value corresponding to the workload data.

[0159] The random forest model improves prediction accuracy by building multiple decision trees and outputting the averaged results. Each decision tree is trained by randomly sampling from the cleaned training data to reduce the model's variance. The combination of multiple decision trees ultimately forms a trained random forest model.

[0160] After obtaining the trained random forest model, the workload data can be vectorized and input into the trained random forest model to obtain the target energy consumption value corresponding to the workload data, that is, the energy consumption value predicted by the trained random forest model based on the workload data.

[0161] In the above implementation, workload data is fed into a trained random forest model to predict the target energy consumption value for each processor at the current moment. Leveraging the data analysis and prediction capabilities of the random forest model, processor energy consumption can be accurately predicted based on workload data, improving both the accuracy and timeliness of the predictions.

[0162] Reference Figure 2 FIG. 1 is a schematic diagram of the structure of the energy consumption management platform provided in an embodiment of the present application. The platform includes: an energy consumption management agent 21, a preprocessing component 22, a training component 23, a prediction component 24, an evaluation component 25, a frequency adjustment step determination component 26, and a frequency adjustment component 27; wherein:

[0163] FusionOne HCI23 (FusionOne Hyperconverged Infrastructure Version 23) can be used as a virtualization management platform. Within the HCI environment, resource allocation policies can be configured to allocate physical processors to different virtual machines based on business needs. For example, a relatively large number of core resources can be allocated to the ERP (Enterprise Resource Planning) system virtual machine to ensure efficient business processing, while an appropriate number of cores can be allocated to internal office application virtual machines to meet daily office needs while avoiding resource waste.

[0164] The energy consumption management agent 21 is used to collect workload data from the processor and send the collected workload data to the pre-processing component for pre-processing.

[0165] The pre-processing component 22 is used to pre-process the workload data (ie, clean the data) and send the cleaned workload data to the training component.

[0166] The training component 23 is used to train the random forest model to be trained using the cleaned workload data to obtain a trained random forest model.

[0167] The prediction component 24 is used to perform prediction processing on the workload data based on the trained random forest model to obtain a target energy consumption value, and send the target energy consumption value to the evaluation component and the frequency adjustment step determination component.

[0168] The evaluation component 25 is used to evaluate the accuracy and effectiveness based on the target energy consumption value, and send the evaluation result to the prediction component so that the prediction component can optimize the trained random forest model based on the evaluation result.

[0169] The frequency adjustment step length determining component 26 is configured to determine the frequency adjustment step length based on the workload data and the target energy consumption value, and send the frequency adjustment step length to the frequency adjustment component.

[0170] The frequency adjustment component 27 is configured to adjust the output frequency of each processor core in the processor based on the frequency adjustment step size.

[0171] Reference Figure 3 FIG. 1 is a flow chart of a specific energy consumption management method provided in an embodiment of the present application, wherein:

[0172] S10: Acquire training data of each processor collected at preset time intervals within a preset time period.

[0173] S20: performing data cleaning on the training data to obtain cleaned training data.

[0174] Here, you can set data cleaning rules through the above-mentioned preprocessing components. For example, remove abnormal data in the training data that deviates from the mean by more than 3 times the standard deviation, and normalize the training data after removing the abnormal data to obtain cleaned training data so that its value range is between 0 and 1, which is convenient for subsequent model processing.

[0175] S30. Train the random forest model to be trained based on the cleaned training data to obtain a trained random forest model.

[0176] S40 , obtaining workload data of the processor core of the processor, and inputting the workload data into a trained random forest model to obtain a target energy consumption value.

[0177] S50: Calculate a first frequency adjustment parameter of the processor based on the target energy consumption value.

[0178] S60: Modify the first frequency adjustment parameter based on the performance impact factor of the processor core to obtain a second frequency adjustment parameter.

[0179] For example, it is determined that the processor utilization rate U of the virtual machine deployed by the processor is 0.8, the task response time RT is 0.15 seconds, and the task throughput TP is 80 TPS. The energy consumption prediction model (i.e., the trained random forest model) shows that the current target energy consumption value exceeds the expected energy consumption value by 0.15 (i.e., exceeds the expected energy consumption value by 15%). The processor core frequency f is determined to be 2.5 GHz. A weight is set based on the degree of influence of each first influencing factor in the performance influencing factor. Subsequently, a comprehensive influencing factor is derived based on the weight and the first influencing factor.

[0180] Then, based on the comprehensive influencing factors, a second frequency adjustment parameter is determined. If the second frequency adjustment parameter is a negative number, it means that the output frequency of the processor core needs to be reduced to reduce energy consumption while ensuring a certain performance.

[0181] In actual applications, the current processor core output frequency may be reduced according to a certain step size (obtained from hardware indicators), such as to about 2.3 GHz, and then the performance and energy consumption of the virtual machine will continue to be monitored.

[0182] If the performance indicators of the processor core (such as response time, throughput, etc.) are found to have dropped too much after adjustment, further frequency adjustment may be suspended, or the second frequency adjustment parameters may be recalculated based on the new workload data, and reverse adjustment may be performed to restore performance.

[0183] If the performance of the processor core is still within an acceptable range and the energy consumption has improved, dynamic adjustments will continue to be made according to this policy to achieve a balanced optimization between the performance and energy consumption of the virtual machine.

[0184] S70 : Calculate a frequency adjustment step size based on the second frequency adjustment parameter and the output frequency of the processor core.

[0185] S80: Adjust the output frequency of the corresponding processor core based on the frequency adjustment step size.

[0186] In the actual implementation process, this application has the following technical effects:

[0187] (1) By deploying an energy management agent on the physical host and collecting workload data at specific time intervals, the target energy consumption value of the processor under different workloads can be accurately predicted using a random forest model based on the workload data.

[0188] (2) It can dynamically adjust the performance of the processor core according to the actual needs of the instance, while ensuring resource savings, meeting the performance requirements of the workloads of different virtual machines and improving overall performance and response speed.

[0189] (3) The processor cores of the physical host have both high-load virtual machines and low-load virtual machines. More flexible frequency and power consumption adjustments can be made on these cores, thereby reducing the potential impact on high-load virtual machines.

[0190] Those skilled in the art will understand that in the above-mentioned method of the specific implementation method, the writing order of each step does not mean a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.

[0191] Based on the same inventive concept, an energy consumption management device corresponding to the energy consumption management method is also provided in the embodiment of the present application. Since the principle of solving the problem by the device in the embodiment of the present application is similar to the above-mentioned energy consumption management method in the embodiment of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0192] Reference Figure 4 FIG. 1 is a schematic diagram of an energy consumption management device provided in an embodiment of the present application, wherein the device includes: an acquisition module 11, a prediction module 12, a determination module 13, and an adjustment module 14; wherein,

[0193] An acquisition module 11 is configured to acquire workload data of a processor core of a processor, wherein the processor core runs at least one virtual machine, and the workload data is used to indicate an operating state of the processor and the processor core;

[0194] A prediction module 12, configured to predict a target energy consumption value of each processor at a current moment based on the workload data;

[0195] A determination module 13 is configured to determine a frequency adjustment step size for each of the processor cores based on the workload data and the target energy consumption value; wherein the frequency adjustment step size is used to indicate an amplitude by which the output frequency of the processor core is adjusted;

[0196] The adjustment module 14 is configured to adjust the output frequency of the corresponding processor core based on the frequency adjustment step size.

[0197] The embodiment of the present application collects the workload data of each processor core to predict the target energy consumption value of the processor in which the processor core is located, and obtains the frequency adjustment step size based on the target energy consumption value of each processor and the workload data of each processor core. Afterwards, the output frequency of each processor core is adjusted by the frequency adjustment step size. Through the above-mentioned processing method, it is possible to respond in a timely manner according to the current operating state of each processor core, thereby adjusting the energy consumption of the processor core. By determining the frequency adjustment step size of each processor core, processor cores in different operating states can be adapted to their own frequency adjustment amplitudes, thereby realizing accurate and personalized management of each processor core and avoiding the waste of resources caused by "one-size-fits-all" adjustments.

[0198] In one possible implementation, the determination module is further configured to: calculate a first frequency adjustment parameter of the processor core based on the target energy consumption value; wherein the first frequency adjustment parameter is used to indicate a difference between the target energy consumption value and an expected energy consumption value of the processor;

[0199] The first frequency adjustment parameter is modified based on the performance impact factor of the processor core to obtain a second frequency adjustment parameter; wherein the performance impact factor is used to indicate the degree of influence of the workload data on the energy consumption change of the processor core;

[0200] The frequency adjustment step size is calculated based on the second frequency adjustment parameter and the output frequency of the processor core.

[0201] In a possible implementation, the determination module is specifically configured to: determine a first difference between the target energy consumption value and the expected energy consumption value;

[0202] determining a ratio between the first difference and the expected energy consumption value;

[0203] The negative of the ratio is determined as the first frequency adjustment parameter.

[0204] In a possible implementation, the determination module is specifically configured to: determine the performance impact factor based on the workload data;

[0205] Performing a sum operation on the performance impact factor and the first value to obtain a sum result;

[0206] The first frequency adjustment parameter is modified based on the summation result to obtain a second frequency adjustment parameter.

[0207] In a possible implementation, the determination module is specifically configured to: determine a first impact factor of each sub-data; wherein the first impact factor is used to indicate the degree of impact of each sub-data on the energy consumption change of the processor core;

[0208] determining a data weight of each of the sub-data;

[0209] The data weight and the first impact factor are weightedly calculated to obtain the performance impact factor.

[0210] In a possible implementation, the determination module is specifically configured to: determine a first sub-influence factor based on the usage rate of the processor core; wherein the first sub-influence factor is used to indicate the degree of influence of the usage rate of the processor core on the performance of the processor core;

[0211] Determining a second sub-influence factor based on the average task response time of the processor core; wherein the second sub-influence factor is used to indicate the degree of influence of the average task response time of the processor core on the performance of the processor core;

[0212] Determining a third sub-influence factor based on the task throughput of the processor core; wherein the third sub-influence factor is used to indicate the degree of influence of the task throughput of the processor core on the performance of the processor core;

[0213] A normalization operation is performed on the first sub-influence factor, the second sub-influence factor, and the third sub-influence factor to obtain a first influence factor corresponding to each sub-data.

[0214] In one possible implementation, the adjustment module is further configured to: when determining that a first type of virtual machine and a second type of virtual machine are running simultaneously in the processor core, update the frequency adjustment step size based on the usage rate of the processor core to obtain the updated frequency adjustment step size; wherein a difference between the usage rates of the first type of virtual machine and the second type of virtual machine for the processor core is greater than a preset threshold;

[0215] The output frequency of the corresponding processor is adjusted based on the updated frequency adjustment step size.

[0216] In a possible implementation, the adjustment module is specifically configured to: calculate a target difference between the second value and the usage rate of the processor core;

[0217] The product of the target difference and the frequency adjustment step is calculated to obtain the updated frequency adjustment step.

[0218] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference can be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.

[0219] Corresponding to Figure 1 The energy consumption management method in the present application embodiment also provides an electronic device 500, such as Figure 5 FIG. 5 is a schematic diagram of the structure of an electronic device 500 provided in an embodiment of the present application, including:

[0220] Processor 51, memory 52, and bus 53; memory 52 is used to store execution instructions, including internal memory 521 and external memory 522; the internal memory 521 is also called internal memory, which is used to temporarily store operation data in the processor 51 and data exchanged with external memory 522 such as a hard disk. The processor 51 exchanges data with the external memory 522 through the internal memory 521. When the electronic device 500 is running, the processor 51 communicates with the memory 52 via the bus 53, so that the processor 51 executes the following instructions:

[0221] Obtaining workload data of a processor core of a processor; wherein the processor core runs at least one virtual machine, and the workload data is used to indicate an operating state of the processor and the processor core;

[0222] Predicting a target energy consumption value of the processor at a current moment based on the workload data;

[0223] Determining a frequency adjustment step size for each of the processor cores based on the workload data and the target energy consumption value; wherein the frequency adjustment step size is used to indicate an amplitude for adjusting the output frequency of the processor core;

[0224] The output frequency of the corresponding processor core is adjusted based on the frequency adjustment step size.

[0225] The present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the computer program executes the steps of the energy consumption management method described in the above method embodiment. The storage medium can be a volatile or non-volatile computer-readable storage medium.

[0226] An embodiment of the present application also provides a computer program product, which carries program code. The instructions included in the program code can be used to execute the steps of the energy consumption management method described in the above method embodiment. For details, please refer to the above method embodiment and will not be repeated here.

[0227] The computer program product may be implemented in hardware, software, or a combination thereof. In one embodiment, the computer program product is implemented as a computer storage medium. In another embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).

[0228] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and electronic device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0229] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0230] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0231] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0232] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The scope of protection of the present application is not limited thereto. Although the present application has been described in detail with reference to the above-described embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above-described embodiments within the technical scope disclosed in the present application, or perform equivalent replacements for some of the technical features thereof. These modifications, changes, or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the scope of protection of the claims.

Claims

1. An energy consumption management method, characterized in that: include: Obtaining workload data of a processor core of a processor; wherein the processor core runs at least one virtual machine, and the workload data is used to indicate an operating state of the processor and the processor core; Predicting a target energy consumption value of the processor at a current moment based on the workload data; Determining a frequency adjustment step size for each of the processor cores based on the workload data and the target energy consumption value; wherein the frequency adjustment step size is used to indicate an amplitude for adjusting the output frequency of the processor core; The output frequency of the corresponding processor core is adjusted based on the frequency adjustment step size.

2. The method according to claim 1, characterized in that The determining, based on the workload data and the target energy consumption value, a frequency adjustment step size for each processor core includes: Calculating a first frequency adjustment parameter of the processor core based on the target energy consumption value; wherein the first frequency adjustment parameter is used to indicate a difference between the target energy consumption value and an expected energy consumption value of the processor core; The first frequency adjustment parameter is modified based on the performance impact factor of the processor core to obtain a second frequency adjustment parameter; wherein the performance impact factor is used to indicate the degree of influence of the workload data on the energy consumption change of the processor core; The frequency adjustment step size is calculated based on the second frequency adjustment parameter and the output frequency of the processor core.

3. The method according to claim 2, characterized in that The calculating the first frequency adjustment parameter of the processor core based on the target energy consumption value includes: determining a first difference between the target energy consumption value and the expected energy consumption value; determining a ratio between the first difference and the expected energy consumption value; The negative of the ratio is determined as the first frequency adjustment parameter.

4. The method according to claim 2, characterized in that The modifying the first frequency adjustment parameter based on the performance impact factor of the processor core to obtain a second frequency adjustment parameter includes: determining the performance impact factor based on the workload data; Performing a sum operation on the performance impact factor and the first value to obtain a sum result; The first frequency adjustment parameter is modified based on the summation result to obtain a second frequency adjustment parameter.

5. The method according to claim 4, characterized in that The workload data includes a plurality of sub-data, and determining the performance impact factor based on the workload data includes: Determining a first impact factor of each sub-data; wherein the first impact factor is used to indicate the degree of impact of each sub-data on the energy consumption change of the processor core; determining a data weight of each of the sub-data; The data weight and the first impact factor are weightedly calculated to obtain the performance impact factor.

6. The method according to claim 5, characterized in that The workload data includes but is not limited to: the utilization rate of the processor core, the average task response time and the task throughput; The determining of the first impact factor of each sub-data includes: Determining a first sub-influence factor based on the usage rate of the processor core; wherein the first sub-influence factor is used to indicate the degree of influence of the usage rate of the processor core on the performance of the processor core; Determining a second sub-influence factor based on the average task response time of the processor core; wherein the second sub-influence factor is used to indicate the degree of influence of the average task response time of the processor core on the performance of the processor core; Determining a third sub-influence factor based on the task throughput of the processor core; wherein the third sub-influence factor is used to indicate the degree of influence of the task throughput of the processor core on the performance of the processor core; A normalization operation is performed on the first sub-influence factor, the second sub-influence factor, and the third sub-influence factor to obtain a first influence factor corresponding to each sub-data.

7. The method according to claim 1, characterized in that The adjusting the output frequency of the corresponding processor core based on the frequency adjustment step size includes: When it is determined that a first type of virtual machine and a second type of virtual machine are running simultaneously in the processor core, updating the frequency adjustment step size based on the usage rate of the processor core to obtain the updated frequency adjustment step size; wherein a difference between the usage rates of the first type of virtual machine and the second type of virtual machine for the processor core is greater than a preset threshold; The output frequency of the corresponding processor is adjusted based on the updated frequency adjustment step size.

8. The method according to claim 7, characterized in that The updating of the frequency adjustment step size based on the usage rate of the processor core to obtain the updated frequency adjustment step size includes: calculating a target difference between the second value and the usage rate of the processor core; The product of the target difference and the frequency adjustment step is calculated to obtain the updated frequency adjustment step.

9. The method according to claim 1, characterized in that The predicting the target energy consumption value of each processor at the current moment based on the workload data includes: The workload data is input into the trained random forest model for processing to obtain the target energy consumption value of each processor at the current moment.

10. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the energy consumption management method as described in any one of claims 1 to 9 are performed.