Server power consumption prediction method and device, electronic equipment and storage medium

By inputting the server's running information into the neural network model and the linear regression model for combined prediction, the problem of low server power consumption prediction accuracy in the prior art is solved, and higher prediction accuracy is achieved.

CN120197150APending Publication Date: 2025-06-24INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510344639.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-21
Publication Date
2025-06-24

AI Technical Summary

Technical Problem

In the prior art, the accuracy of server power consumption prediction is low, and it is difficult to achieve higher prediction accuracy under complex and variable workloads.

Method used

By inputting the server's running information into the trained neural network model, the primary power consumption value is obtained, and then inputting the trained linear regression model for correction, to obtain the final power consumption value. This method combines neural network model and linear regression model to fully integrate the advantages of both and reduce the deviation of power consumption prediction in a single model.

Benefits of technology

It improves the accuracy of server power consumption prediction and solves the problem of low power consumption prediction accuracy in related technologies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120197150A_ABST
    Figure CN120197150A_ABST
Patent Text Reader

Abstract

The invention discloses a server power consumption prediction method and device, electronic equipment and a storage medium, and relates to the technical field of servers. The method comprises the following steps: acquiring operation information of a server, wherein the operation information at least comprises a processor utilization rate; inputting the operation information into a trained neural network model, and outputting a first predicted power consumption value of the server; wherein the neural network model comprises a first mapping function between the power consumption value and the operation information, and is used for determining a first predicted power consumption value corresponding to the operation information through the first mapping function; the first predicted power consumption value is input into a trained linear regression model, a second predicted power consumption value of the server is output, and the linear regression model comprises correction parameters corresponding to the first predicted power consumption value and is used for correcting the first predicted power consumption value through the correction parameters. The accuracy of power consumption prediction can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of servers, and in particular, to a method, device, electronic device, and storage medium for predicting the power consumption of a server. Background Art

[0002] With the continuous increase in the computing scale and complexity of servers, the power consumption problem of servers has become increasingly prominent. In order to reduce the power consumption of servers, it is necessary to predict the power consumption of servers.

[0003] In the related art, the prediction of the power consumption of servers mainly relies on empirical formulas and statistical analysis. However, in the face of complex and changing server workloads, it is often difficult to achieve a high prediction accuracy through the above prediction methods. Summary of the Invention

[0004] The present application provides a method, device, electronic device, and storage medium for predicting the power consumption of a server, so as to at least solve the problem of low accuracy of power consumption prediction in the related art.

[0005] The present application provides a method for predicting the power consumption of a server, and the method includes:

[0006] Obtain the running information of the server, where the running information at least includes the processor utilization rate;

[0007] Input the running information into a trained neural network model to output a first predicted power consumption value of the server; wherein, the neural network model includes a first mapping function between the power consumption value and the running information, and is used to determine the first predicted power consumption value corresponding to the running information through the first mapping function;

[0008] Input the first predicted power consumption value into a trained linear regression model to output a second predicted power consumption value of the server, where the linear regression model includes a correction parameter corresponding to the first predicted power consumption value, and is used to correct the first predicted power consumption value through the correction parameter.

[0009] The present application further provides a device for predicting the power consumption of a server, and the device includes: an obtaining module, a first prediction module, and a second prediction module:

[0010] Among them, the obtaining module is used to obtain the running information of the server, where the running information at least includes the processor utilization rate;

[0011] The first prediction module is used to input the running information into a trained neural network model to output a first predicted power consumption value of the server; wherein, the neural network model includes a first mapping function between the power consumption value and the running information, and is used to determine the first predicted power consumption value corresponding to the running information through the first mapping function;

[0012] A second prediction module, configured to input the first predicted power consumption value into a trained linear regression model and output a second predicted power consumption value of the server. The linear regression model includes a correction parameter corresponding to the first predicted power consumption value, and is used to correct the first predicted power consumption value through the correction parameter.

[0013] This application also provides an electronic device, including: a memory, configured to store a computer program; a processor, configured to implement the steps of any one of the above server power consumption prediction methods when executing the computer program.

[0014] This application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any one of the above server power consumption prediction methods are implemented.

[0015] This application also provides a computer program product, including a computer program. When the computer program is executed by a processor, the steps of any one of the above server power consumption prediction methods are implemented.

[0016] Through this application, since the primary power consumption value is first determined by a neural network model and then corrected by a linear regression model to obtain the final power consumption value, the neural network model and the linear regression model can be combined, fully integrating the advantages of both, and reducing the deviation of power consumption prediction by a single model. Therefore, the technical problem of low accuracy of power consumption prediction in the related art can be solved, and the technical effect of improving the accuracy of server power consumption prediction can be achieved. Description of the Drawings

[0017] To more clearly illustrate the embodiments of this application, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of this application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0018] Figure 1 A schematic diagram of an application scenario provided by an embodiment of this application;

[0019] Figure 2 A flowchart of a method for predicting server power consumption provided by an embodiment of this application;

[0020] Figure 3 A flowchart of a method for training a neural network model provided by an embodiment of this application;

[0021] Figure 4 A flowchart of a method for training a linear regression model provided by an embodiment of this application;

[0022] Figure 5Schematic structural diagram of a server power consumption prediction device provided by an embodiment of the present application;

[0023] Figure 6 Schematic structural diagram of an electronic device provided by an embodiment of the present application. Specific embodiments

[0024] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying 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. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the protection scope of the present application.

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

[0026] With the continuous improvement of the computing scale and complexity of servers, the power consumption problem of servers has become increasingly prominent. In order to reduce the power consumption of servers, it is necessary to predict the power consumption of servers. In the related art, the prediction of server power consumption mainly relies on empirical formulas and statistical analysis. However, in the face of complex and changing server workloads, it is often difficult to achieve a high prediction accuracy through the above prediction methods.

[0027] In the embodiments of the present application, in view of the above technical problems, the technical concept of the inventor is as follows: when predicting the server power consumption, first determine the primary power consumption value through a convolutional neural network model, and then correct the primary power consumption value through a linear regression model to obtain the final power consumption value. By combining the convolutional neural network model and the linear regression model, the advantages of the two models are fully integrated, and the deviation of power consumption prediction by a single model is reduced, so as to achieve the technical effect of improving the accuracy of power consumption prediction.

[0028] In order to enable those skilled in the art of the present technology to better understand the solution of the present application, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0029] Combined with the specific application environment architecture or specific hardware architecture on which the execution of the server power consumption prediction method depends, the specific application environment architecture or specific hardware architecture will be described herein. Refer to Figure 1 , Figure 1A schematic diagram of an application scenario provided by an embodiment of the present application. The power consumption of a server can be predicted through a Baseboard Management Controller (BMC) in an electronic device. Among them, a trained neural network model and a trained linear regression model are deployed on the baseboard management controller. When it is necessary to predict the power consumption of the server, the running information of the server is obtained. The running information of the server is input into the baseboard management controller. At this time, the baseboard management controller can first determine a first predicted power consumption value through the neural network model, and then correct the first predicted power consumption value through the linear regression model to obtain a final second predicted power consumption value.

[0030] In the server power consumption prediction method provided by the embodiment of the present application, since the primary power consumption value is first determined through the neural network model, and then the primary power consumption value is corrected through the linear regression model to obtain the final power consumption value, in this way, the neural network model and the linear regression model can be combined to fully integrate the advantages of the two and reduce the deviation of the power consumption prediction of a single model. Therefore, the technical problem of low accuracy of power consumption prediction in the related art can be solved, and the technical effect of improving the accuracy of server power consumption prediction can be achieved.

[0031] Figure 2 A flowchart of a server power consumption prediction method provided by an embodiment of the present application is as Figure 2 shown. An embodiment of the present application provides a server power consumption prediction method, and the method is described in detail as follows:

[0032] S201. Obtain the running information of the server, where the running information at least includes the processor utilization rate.

[0033] In some embodiments, the running information may include the processor utilization rate. Exemplarily, the processor utilization rate includes the utilization rate of the CPU (Central Processing Unit).

[0034] In other embodiments, the running information may further include some running information related to the CPU utilization rate. Optionally, the running information further includes one or more of the processor computing speed, the number of started application programs, and the running duration of each application program.

[0035] In the embodiment of the present application, the running information can be obtained through the server system.

[0036] Optionally, a running information monitoring script can be pre-installed in the server system, and the running information of the server can be obtained through the running information monitoring script.

[0037] Among them, the above-mentioned running information monitoring script can be a computer language script of any type. For example, a Shell script, an ismdraw tool script, etc. Among them, in the configuration information of the running information monitoring script, information such as a start instruction, an end instruction, a monitoring object (which can be CPU utilization in the embodiments of the present application), a data saving target, etc. can be set.

[0038] Optionally, the running information monitoring script is an ismdraw tool script, and running information (such as CPU usage rate) is obtained through the ismdraw tool script. In some possible embodiments, running information and time information can be obtained through the ismdraw tool script, and a corresponding dynamic line chart is generated.

[0039] It should be noted that the above-mentioned running information can be the running information of the server at a certain moment or the running information of the server within a certain period of time.

[0040] S202. Input the running information into the trained neural network model to output the first predicted power consumption value of the server; among them, the neural network model includes a first mapping function between the power consumption value and the running information, and is used to determine the first predicted power consumption value corresponding to the running information through the first mapping function.

[0041] In the embodiments of the present application, the above-mentioned neural network model can be a CNN (Convolutional Neural Network) model. The neural network model includes a convolutional layer, a pooling layer, and a fully connected layer, and is used for primary prediction of the power consumption of the server, and belongs to a primary power consumption prediction model.

[0042] It should be noted that when the running information is the running information of the server at a certain moment, the first predicted power consumption value of the server at that moment is output through the neural network model. When the running information is the running information of the server within a certain period of time, the first predicted power consumption value of the server within that period of time is output through the neural network model.

[0043] S203. Input the first predicted power consumption value into the trained linear regression model to output the second predicted power consumption value of the server, where the linear regression model includes a correction parameter corresponding to the first predicted power consumption value, and is used to correct the first predicted power consumption value through the correction parameter.

[0044] In the embodiments of the present application, the linear regression model is a secondary power consumption prediction model trained through the predicted power consumption value output by the neural network model and the collected actual power consumption value, and is matched with the above-mentioned neural network model.

[0045] It should be noted that when the neural network model outputs the first predicted power consumption value of the server at a certain moment, the first predicted power consumption value at this moment is corrected by the linear regression model. When the neural network model outputs the first predicted power consumption value of the server within a certain time period, the first predicted power consumption value within this time period is corrected by the linear regression model.

[0046] The embodiment of the present application provides a method for predicting the power consumption of a server: obtaining the running information of the server, where the running information at least includes the processor utilization rate; inputting the running information into a trained neural network model to output the first predicted power consumption value of the server; where the neural network model includes a first mapping function between the power consumption value and the running information, and is used to determine the first predicted power consumption value corresponding to the running information through the first mapping function; inputting the first predicted power consumption value into a trained linear regression model to output the second predicted power consumption value of the server, where the linear regression model includes correction parameters corresponding to the first predicted power consumption value, and is used to correct the first predicted power consumption value through the correction parameters. In the embodiment of the present application, since the primary power consumption value is first determined by the neural network model, and then the primary power consumption value is corrected by the linear regression model to obtain the final power consumption value, the neural network model and the linear regression model can be combined in this way, fully integrating the advantages of the two, and reducing the deviation of power consumption prediction by a single model. Therefore, the technical problem of low accuracy of power consumption prediction in the related art can be solved, and the technical effect of improving the accuracy of server power consumption prediction can be achieved.

[0047] The training process of the neural network model and the training process of the linear regression model will be introduced in detail below through specific embodiments.

[0048] In some embodiments, the neural network model includes a convolutional layer, a pooling layer, and a fully connected layer; correspondingly, as Figure 3 shown, the training process of this neural network model includes:

[0049] S301. Obtain multiple historical running information of the server within a preset historical time period and the historical true power consumption value corresponding to each historical running information.

[0050] In some embodiments, the duration of the preset historical time period is not specifically limited. It can be the last week, the last month, the last quarter, etc.

[0051] Among them, the historical running information at least includes the historical CPU utilization rate. In some embodiments, the historical running information may further include some running information related to the CPU utilization rate. Optionally, the historical running information further includes one or more of the processor computing speed, the number of started application programs, and the running duration of each application program.

[0052] In some embodiments, obtaining a plurality of historical operation information of the server within a preset historical time period and the corresponding historical power consumption value for each historical operation information includes: obtaining the maximum power of the server's processor and the idle power of the processor; obtaining a plurality of historical operation information of the server within the preset historical time period through a pre-installed operation information monitoring script in the system; for each historical operation information, determining the corresponding historical power consumption value according to the maximum power of the processor, the idle power of the processor, the historical operation information, and a preset power consumption calculation formula.

[0053] Optionally, the historical operation information includes CPU utilization.

[0054] The preset power consumption calculation formula is: Pcpu = (Pmax - Pidle) × U + Pidle;

[0055] Wherein, Pcpu represents the server power consumption, Pmax represents the maximum power of the CPU, Pidle represents the power of the CPU when idle, and U represents the CPU utilization.

[0056] S302. Input the plurality of historical operation information and the corresponding historical true power consumption value for each historical operation information into the convolutional layer of the neural network model, and perform feature extraction through the convolutional layer to obtain the first feature information.

[0057] Among them, the convolutional layer is the core part of the neural network model, and can perform feature extraction on the input data through a series of learnable convolutional kernels (or filters). The specific formula is as follows:

[0058]

[0059] Wherein, yij is the element at the i-th row and j-th column in the output feature map; x i+m,j+n is the element in the input feature map corresponding to the convolutional kernel; b is the bias term; w m,n is the weight parameter of the convolutional kernel, and m and n represent the height and width of the convolutional kernel.

[0060] It should be noted that yij represents the output value obtained by weighted summation when the convolutional kernel slides to the i-th row and j-th column of the input feature map. It can reflect the matching degree between the input data in this local area and the convolutional kernel. Optionally, the input data includes CPU utilization and historical true power consumption value. At this time, yij reflects the local feature between CPU utilization and power consumption value. Among them, the bias term b can represent the basic power consumption value of the server.

[0061] In the embodiments of the present application, the input feature map may be a feature matrix composed of multiple historical operation information and the corresponding historical true power consumption values of each historical operation information. The output feature map (i.e., the first feature information) may be a feature matrix composed of multiple eigenvalues obtained by feature extraction through a convolutional layer.

[0062] S303. Input the first feature information into the pooling layer of the neural network model, and perform downsampling processing on the first feature information through the pooling layer to obtain second feature information; wherein, the feature dimension of the second feature information is smaller than that of the first feature information.

[0063] In the embodiments of the present application, the pooled first predicted power consumption value is input into the trained linear regression model to output the second predicted power consumption value of the server, wherein the linear regression model includes correction parameters corresponding to the first predicted power consumption value, and the layer is used to reduce the dimension of the above output feature map (i.e., the first feature information), reduce the amount of calculation, and extract the main features.

[0064] S304. Input the second feature information into the fully connected layer of the neural network model, and determine the first mapping function between the power consumption value and the operation information through the fully connected layer.

[0065] In the embodiments of the present application, the fully connected layer may map the obtained eigenvalue to the predicted power consumption value according to the relationship between the power consumption and the CPU utilization rate.

[0066] Optionally, the first mapping function may be expressed as:

[0067]

[0068] wherein, y represents the predicted power consumption value, xi represents the feature vector corresponding to the i-th operation information, wi represents the weight, representing the importance of the i-th feature for power consumption prediction; b is the bias term of the output neuron, and n is the number of features of the historical operation information.

[0069] Exemplarily, the historical operation information includes: historical CPU utilization rate, processor computing speed, number of started application programs, and running duration of each application program. At this time, the number of features of the historical operation information is 4.

[0070] In some embodiments, a trained convolutional neural network model may be used to predict the CPU power consumption data and obtain a prediction output, and the prediction output is used as a new feature vector to form a training set of the secondary linear regression model with the true label (collected true power consumption data) of the validation set.

[0071] Correspondingly, as Figure 4 shown, the training process of the linear regression model includes:

[0072] S401. Obtain multiple historical operation information of the server within a preset historical time period and the corresponding historical true power consumption values for each piece of historical operation information.

[0073] Step S401 is the same as step S301 and will not be elaborated here.

[0074] S402. Input the multiple historical operation information into the trained neural network model and output multiple historical predicted power consumption values of the server.

[0075] Among them, the trained neural network model is also the neural network model obtained through the above steps S301 to S304.

[0076] In some embodiments, before executing step S403, it is also possible to verify the multiple historical predicted power consumption values output by the neural network model. Delete the data that fails the verification.

[0077] Optionally, the method for verifying the multiple historical predicted power consumption values output by the neural network model includes: determining the average predicted power consumption value of the multiple historical predicted power consumption values, and for each historical predicted power consumption value, if the difference between the historical predicted power consumption value and the average predicted power consumption value is greater than a preset value, then delete the historical predicted power consumption value; and / or, if the historical predicted power consumption value is a null value, then delete the historical predicted power consumption value.

[0078] In the embodiments of the present application, since before training the initial linear regression model, the multiple historical predicted power consumption values output by the neural network model are first verified and the data that fails the verification is deleted, in this way, the accuracy and effectiveness of the training data corresponding to the initial linear regression model can be improved, and further the accuracy and efficiency of the training of the initial linear regression model can be improved.

[0079] S403. Adjust the correction parameters in the initial linear regression model according to the multiple historical predicted power consumption values, the historical true power consumption values corresponding to each piece of historical operation information, and a preset loss function.

[0080] In some embodiments, the correction parameters include a first correction parameter and a second correction parameter, and the linear regression model is used to obtain a second predicted power consumption value through the product of the first predicted power consumption value and the first correction parameter and the second correction parameter.

[0081] Correspondingly, adjusting the correction parameters in the initial linear regression model according to the multiple historical predicted power consumption values, the historical true power consumption values corresponding to each piece of historical operation information, and a preset loss function may include the following steps (1) to (4):

[0082] (1) Determine the first partial derivative equation corresponding to the first correction parameter according to multiple historical predicted power consumption values, the historical true power consumption value corresponding to each historical operation information, and a preset loss function.

[0083] Optionally, the preset loss function can be expressed as:

[0084]

[0085] where y represents the corrected predicted power consumption value, represents the i-th historical predicted power consumption value, β 0 represents the first correction parameter, β 1 represents the second correction parameter, and n is the number of multiple historical predicted power consumption values.

[0086] Optionally, determining the first partial derivative equation corresponding to the first correction parameter can be expressed as:

[0087]

[0088] where y represents the corrected predicted power consumption value, represents the i-th historical predicted power consumption value, β 0 represents the first correction parameter, β 1 represents the second correction parameter, and n is the number of multiple historical predicted power consumption values.

[0089] (2) Determine the second partial derivative equation corresponding to the second correction parameter according to multiple historical predicted power consumption values, the historical true power consumption value corresponding to each historical operation information, and a preset loss function.

[0090] Optionally, determining the second partial derivative equation corresponding to the second correction parameter can be expressed as:

[0091]

[0092] where y represents the corrected predicted power consumption value, represents the i-th historical predicted power consumption value, β 0 represents the first correction parameter, β 1 represents the second correction parameter, and n is the number of multiple historical predicted power consumption values.

[0093] (3) Determine the optimal solution of the first correction parameter and the optimal solution of the second correction parameter according to the first partial derivative equation and the second partial derivative equation.

[0094] Optionally, according to the calculus equation, it can be known that the predicted power consumption value and the true power consumption value are closest at the tangent point. At this time, the first partial derivative equation and the second partial derivative equation are 0, and the optimal solution of the first correction parameter and the optimal solution of the second correction parameter can be solved.

[0095] That is,

[0096]

[0097] where y represents the corrected predicted power consumption value, represents the i-th historical predicted power consumption value, and β 0 represents the first correction parameter, and β 1 represents the second correction parameter, and n is the number of multiple historical predicted power consumption values.

[0098] (4) Adjust the correction parameters in the initial linear regression model according to the optimal solution of the first correction parameter and the optimal solution of the second correction parameter.

[0099] Optionally, this step is: taking the optimal solution of the first correction parameter and the optimal solution of the second correction parameter as the correction parameters in the initial linear regression model.

[0100] S404. Until the loss value of the preset loss function corresponding to the adjusted correction parameter is less than the preset loss value, a trained linear regression model is obtained.

[0101] Optionally, the trained linear regression model is: β 0 -β 1 ŷ. Where ŷ represents the predicted power consumption value obtained through the neural network model. In the embodiments of the present application, the specific value of the preset loss value is not limited and can be set and modified as needed.

[0102] In the embodiments of the present application, since the predicted power consumption value output by the neural network model is used as the training data of the linear regression model, the combination of the neural network model and the linear regression model is realized, the advantages of both are fully integrated, the deviation of the single model for predicting power consumption is reduced, and the technical effect of improving the accuracy of server power consumption prediction is achieved.

[0103] In some possible embodiments, the true power consumption value of the server can also be obtained through the CPU voltage and the CPU current. Then, the correction parameters of the linear regression model are adjusted through the true power consumption value of the server until the error of the above linear regression model is less than the preset value.

[0104] In the embodiments of the present application, the value of the preset value is not specifically limited and can be set and modified as needed. Optionally, the error of the linear regression model is equal to the difference between the true power consumption value and the predicted power consumption value.

[0105] Optionally, the CPU voltage value and CPU current value of the server at different times can be collected by an oscilloscope, and the actual power consumption value of the server can be determined based on the collected CPU voltage value and CPU current value; and, the CPU utilization rate of the server is obtained. A correspondence relationship is established among the CPU voltage value, CPU current value, CPU utilization rate, and the actual power consumption value of the server.

[0106] Exemplarily, the established correspondence relationship is shown in Table 1 below:

[0107] Table 1

[0108]

[0109] It should be noted that in this application, the mathematical method of interpolation fitting can also be used to accurately estimate unknown data points through the collected known data points, and the collected CPU power consumption is used as a reference value for correcting the predicted power consumption.

[0110] In the embodiment of this application, since the accuracy of obtaining the true power consumption value of the server through the CPU voltage and CPU current is relatively high, the correction parameters of the linear regression model can be adjusted through the above true power consumption value, which can further improve the accuracy of the linear regression model.

[0111] Figure 5 It is a schematic structural diagram of a prediction device for the power consumption of a server provided by an embodiment of this application. As Figure 5 shown, the prediction device includes: an acquisition module 501, a first prediction module 502, and a second prediction module 503;

[0112] Among them, the acquisition module 501 is used to acquire the running information of the server, and the running information includes at least the processor utilization rate;

[0113] The first prediction module 502 is used to input the running information into the trained neural network model and output the first predicted power consumption value of the server; wherein, the neural network model includes a first mapping function between the power consumption value and the running information, and is used to determine the first predicted power consumption value corresponding to the running information through the first mapping function;

[0114] The second prediction module 503 is used to correct the first predicted power consumption value through the correction parameter.

[0115] In the embodiment of this application, since the primary power consumption value is first determined through the neural network model, and then the primary power consumption value is corrected through the linear regression model to obtain the final power consumption value, in this way, the neural network model and the linear regression model can be combined to fully integrate the advantages of both, and reduce the deviation of the power consumption prediction of a single model. Therefore, the technical problem of low accuracy of power consumption prediction in the related art can be solved, and the technical effect of improving the accuracy of server power consumption prediction can be achieved.

[0116] In a possible embodiment, the operation information further includes one or more of the following: processor computing speed, number of launched applications, and running duration of each application.

[0117] In a possible embodiment, the neural network model includes a convolutional layer, a pooling layer, and a fully connected layer; the prediction device further includes: a first training module; wherein, the process of the first training module training the neural network model includes: obtaining a plurality of historical operation information of the server within a preset historical time period and the corresponding historical true power consumption value of each historical operation information; inputting the plurality of historical operation information and the corresponding historical true power consumption value of each historical operation information into the convolutional layer of the neural network model, and performing feature extraction through the convolutional layer to obtain first feature information; inputting the first feature information into the pooling layer of the neural network model, and performing downsampling processing on the first feature information through the pooling layer to obtain second feature information; wherein, the feature dimension of the second feature information is smaller than that of the first feature information; inputting the second feature information into the fully connected layer of the neural network model, and determining a first mapping function between the power consumption value and the operation information through the fully connected layer.

[0118] In a possible embodiment, the first training module obtaining a plurality of historical operation information of the server within a preset historical time period and the corresponding historical power consumption value of each historical operation information includes: obtaining the maximum power of the server's processor and the idle power of the processor; obtaining a plurality of historical operation information of the server within a preset historical time period through a pre-installed operation information monitoring script in the system; for each historical operation information, determining the corresponding historical power consumption value of the historical operation information according to the maximum power of the processor, the idle power of the processor, the historical operation information, and a preset power consumption calculation formula.

[0119] In a possible embodiment, the prediction device further includes: a second training module; wherein, the process of the second training module training the linear regression model includes: obtaining a plurality of historical operation information of the server within a preset historical time period and the corresponding historical true power consumption value of each historical operation information; inputting the plurality of historical operation information into the trained neural network model to output a plurality of historical predicted power consumption values of the server; adjusting the correction parameters in the initial linear regression model according to the plurality of historical predicted power consumption values, the corresponding historical true power consumption value of each historical operation information, and a preset loss function; until the loss value of the preset loss function corresponding to the adjusted correction parameters is less than a preset loss value, obtaining the trained linear regression model.

[0120] In one possible embodiment, the correction parameters include a first correction parameter and a second correction parameter. The linear regression model is used to obtain a second predicted power consumption value through the product of the first predicted power consumption value and the first correction parameter, as well as the second correction parameter. Correspondingly, the second training module adjusts the correction parameters in the initial linear regression model according to multiple historical predicted power consumption values, the historical true power consumption value corresponding to each historical operation information, and a preset loss function, including: determining a first partial derivative equation corresponding to the first correction parameter according to multiple historical predicted power consumption values, the historical true power consumption value corresponding to each historical operation information, and the preset loss function; determining a second partial derivative equation corresponding to the second correction parameter according to multiple historical predicted power consumption values, the historical true power consumption value corresponding to each historical operation information, and the preset loss function; determining the optimal solution of the first correction parameter and the optimal solution of the second correction parameter according to the first partial derivative equation and the second partial derivative equation; and adjusting the correction parameters in the initial linear regression model according to the optimal solution of the first correction parameter and the optimal solution of the second correction parameter.

[0121] In one possible embodiment, the second training module is further configured to determine an average predicted power consumption value of multiple historical predicted power consumption values. For each historical predicted power consumption value, if the difference between the historical predicted power consumption value and the average predicted power consumption value is greater than a preset value, then delete the historical predicted power consumption value; and / or, if the historical predicted power consumption value is a null value, then delete the historical predicted power consumption value.

[0122] The prediction device for server power consumption provided in this embodiment can execute the method provided in the above embodiment, and its implementation principle and technical effect are similar, which will not be elaborated here in this embodiment.

[0123] Figure 6 This is a schematic structural diagram of the electronic device provided in the present application. As Figure 6 shown, the electronic device 60 provided in this embodiment includes at least one processor 601 and a memory 602. Optionally, the device 60 further includes a communication component 603. Among them, the processor 601, the memory 602, and the communication component 603 are connected through a bus.

[0124] In a specific implementation process, at least one processor 601 executes the computer execution instructions stored in the memory 602, so that at least one processor 601 executes the above embodiment of the prediction method for server power consumption.

[0125] The specific implementation process of the processor 601 can be referred to the above method embodiment, and its implementation principle and technical effect are similar, which will not be elaborated here in this embodiment.

[0126] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in combination with the application can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.

[0127] The memory may include a random access memory (RAM), and may also include non-volatile memory (NVM), such as at least one disk memory.

[0128] The bus may be an industry standard architecture (ISA) bus, a peripheral component interconnect (PCI) bus, an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the buses in the drawings of this application are not limited to only one bus or one type of bus.

[0129] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored, and the computer program is configured to execute the steps in any of the above-described embodiments of the server power consumption prediction method when running.

[0130] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: USB flash drives, read-only memories (ROMs), random access memories (RAMs), mobile hard disks, magnetic disks, or optical discs, etc., all kinds of media that can store computer programs.

[0131] An embodiment of the present application also provides a computer program product, the above computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps in any of the above-described embodiments of the server power consumption prediction method.

[0132] Embodiments of the present application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, where the computer program, when executed by a processor, implements the steps in any of the above-described embodiments of the server power consumption prediction method.

[0133] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described according to their functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0134] The above has introduced in detail a method for predicting server power consumption provided by the present application. Specific examples are used herein to illustrate the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application. It should be noted that for those of ordinary skill in the art in the technical field, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.

Claims

1. A method for predicting server power consumption, characterized in that: The method comprises: Acquiring operation information of the server, wherein the operation information at least includes processor utilization; Inputting the operation information into a trained neural network model, and outputting a first predicted power consumption value of the server; wherein the neural network model includes a first mapping function between the power consumption value and the operation information, and is used to determine the first predicted power consumption value corresponding to the operation information through the first mapping function; The first predicted power consumption value is input into a trained linear regression model, and a second predicted power consumption value of the server is output, wherein the linear regression model includes a correction parameter corresponding to the first predicted power consumption value, and is used to correct the first predicted power consumption value by using the correction parameter.

2. The method according to claim 1, characterized in that The operation information also includes: one or more of: processor computing speed, the number of started application programs, and the running time of each application program.

3. The method according to claim 1, characterized in that The neural network model includes a convolutional layer, a pooling layer and a fully connected layer; Accordingly, the training process of the neural network model includes: Acquire multiple historical operation information of the server within a preset historical time period and the historical real power consumption value corresponding to each historical operation information; Input the plurality of historical operation information and the historical real power consumption value corresponding to each historical operation information into the convolution layer of the neural network model, and perform feature extraction through the convolution layer to obtain first feature information; Inputting the first feature information into the pooling layer of the neural network model, and performing downsampling processing on the first feature information through the pooling layer to obtain second feature information; wherein the feature dimension of the second feature information is smaller than the feature dimension of the first feature information; The second feature information is input into the fully connected layer of the neural network model, and a first mapping function between the power consumption value and the operation information is determined through the fully connected layer.

4. The method according to claim 3, characterized in that The obtaining of a plurality of historical operation information of the server within a preset historical time period and a historical power consumption value corresponding to each piece of historical operation information includes: Obtaining the maximum power and idle power of the processor of the server; Obtaining multiple historical operation information of the server within a preset historical time period through an operation information monitoring script pre-installed in the system; For each piece of historical operation information, a historical power consumption value corresponding to the historical operation information is determined according to the maximum power of the processor, the idle power of the processor, the historical operation information and a preset power consumption calculation formula.

5. The method according to claim 1, characterized in that The training process of the linear regression model includes: Acquire multiple historical operation information of the server within a preset historical time period and the historical real power consumption value corresponding to each historical operation information; Inputting the plurality of historical operation information into a trained neural network model, and outputting a plurality of historical predicted power consumption values ​​of the server; Adjusting correction parameters in the initial linear regression model according to the multiple historical predicted power consumption values, the historical actual power consumption values ​​corresponding to each historical operation information, and a preset loss function; Until the loss value of the preset loss function corresponding to the adjusted correction parameter is less than the preset loss value, a trained linear regression model is obtained.

6. The method according to claim 5, characterized in that The correction parameter includes a first correction parameter and a second correction parameter, and the linear regression model is used to obtain a second predicted power consumption value by multiplying the first predicted power consumption value by the first correction parameter and the second correction parameter; Accordingly, the adjusting of the correction parameters in the initial linear regression model according to the multiple historical predicted power consumption values, the historical real power consumption values ​​corresponding to each historical operation information and the preset loss function includes: Determine a first partial derivative equation corresponding to the first correction parameter according to the multiple historical predicted power consumption values, the historical real power consumption value corresponding to each historical operation information, and a preset loss function; Determine a second partial derivative equation corresponding to a second correction parameter according to the multiple historical predicted power consumption values, the historical real power consumption value corresponding to each historical operation information, and a preset loss function; Determining an optimal solution of the first correction parameter and an optimal solution of the second correction parameter according to the first partial derivative equation and the second partial derivative equation; According to the optimal solution of the first correction parameter and the optimal solution of the second correction parameter, the correction parameters in the initial linear regression model are adjusted.

7. The method according to claim 5, characterized in that Before adjusting the correction parameters in the initial linear regression model according to the multiple historical predicted power consumption values, the historical real power consumption values ​​corresponding to each historical operation information and the preset loss function, the method further includes: Determine an average predicted power consumption value of the multiple historical predicted power consumption values, and for each historical predicted power consumption value, if the difference between the historical predicted power consumption value and the average predicted power consumption value is greater than a preset value, delete the historical predicted power consumption value; and / or, If the historical predicted power consumption value is a null value, the historical predicted power consumption value is deleted.

8. A device for predicting server power consumption, characterized in that: The device comprises: An acquisition module, used for acquiring operation information of the server, wherein the operation information at least includes processor utilization; A first prediction module, configured to input the operation information into a trained neural network model, and output a first predicted power consumption value of the server; wherein the neural network model includes a first mapping function between the power consumption value and the operation information, and is configured to determine the first predicted power consumption value corresponding to the operation information through the first mapping function; The second prediction module is used to input the first predicted power consumption value into a trained linear regression model and output a second predicted power consumption value of the server, wherein the linear regression model includes a correction parameter corresponding to the first predicted power consumption value, and is used to correct the first predicted power consumption value by using the correction parameter.

9. An electronic device, characterized in that: The server includes a plurality of processors and a memory, wherein the memory is used to store computer-executable instructions; The processor is used to implement the method for predicting server power consumption as described in any one of claims 1-7 when executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the step of predicting the power consumption of the server as claimed in any one of claims 1 to 7.

Citation Information

Cited By

  • Method and device for predicting power consumption of processor architecture, processor architecture and product

    CN121680597A