Data center dynamic energy consumption optimization method based on machine learning
By deploying sensors in data centers and building machine learning models, dynamically optimizing data center energy consumption has been solved, and traditional energy consumption management methods cannot adapt to complex loads and environmental conditions, and the improvement of resource utilization efficiency and energy efficiency has been achieved.
Patent Information
- Application Number
- CN202411369633.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-02-18
AI Technical Summary
Traditional data center energy consumption management methods cannot dynamically adapt to complex and variable loads and environmental conditions, resulting in limited energy efficiency improvement.
Using a dynamic energy consumption optimization method based on machine learning, the data is collected by deploying sensors in the data center, data preprocessing and feature extraction, energy consumption prediction model and strategy training model are constructed, and task allocation is performed using hierarchical reinforcement learning and policy gradient method. and strategy optimization.
It has achieved improvements in data center resource utilization efficiency and energy efficiency, and can ensure reliable operation in changing environments, adapt to complex and changeable data center environments, and maintain high-performance and low-energy operating states.
Smart Images

Figure CN119475960A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of energy consumption optimization, and in particular to a method for dynamic energy consumption optimization of a data center based on machine learning. Background Art
[0002] With the explosive growth of global data volume, the energy consumption of data centers, as the core hub for information storage and processing, has received increasing attention. Data centers usually need to operate continuously, and with the expansion of business, the number of servers and computing loads have increased significantly, which has led to huge power consumption and operating costs. At the same time, high energy consumption also brings huge environmental pressure. Therefore, how to effectively reduce the energy consumption of data centers while ensuring performance has become a technical problem that needs to be solved urgently.
[0003] Traditional data center energy management methods mainly rely on hardware optimization and some simple policy scheduling. Although they improve energy efficiency to a certain extent, the effect is limited and they cannot dynamically adapt to complex and changing loads and environmental conditions. In recent years, with the rapid development of machine learning and artificial intelligence technology, intelligent, data-driven energy management solutions have gradually become a research hotspot. Summary of the invention
[0004] In order to solve the above problems, the purpose of the present invention is to provide a data center dynamic energy consumption optimization method based on machine learning, which can not only improve the resource utilization efficiency and energy efficiency of the data center, but also achieve reliable operation in a changing environment through intelligent management means.
[0005] To achieve the above object, the present invention adopts the following technical solutions:
[0006] A method for optimizing dynamic energy consumption of a data center based on machine learning, comprising the following steps:
[0007] S1: Deploy sensors at key locations in the data center to collect data center environmental data and collect data center operation data through system interfaces;
[0008] S2: Preprocess the environmental data and operation data of the data center, including data cleaning and feature engineering, extract features from the raw data, and use the LASSO algorithm to select the most important features to build a training data set;
[0009] S3: Build an energy consumption prediction model based on the machine learning model and train it based on the training data set;
[0010] S4: Based on the trained energy consumption prediction model, the prediction is performed, and tasks are dynamically allocated according to the predicted energy consumption and the current load of the equipment to obtain a preliminary task allocation plan;
[0011] S5: Use hierarchical reinforcement learning to perform strategy training, optimize the task allocation scheme of the data center, and perform task allocation based on the optimized task allocation scheme to achieve optimal energy efficiency, as follows:
[0012] The goal of the high-level strategy is to optimize the global energy efficiency and performance of the data center. The state space is global information, including the average load of each server, total power consumption, and overall response time; the action space is the adjustment of the macro task allocation strategy, including changing the allocation mode of a certain type of task; reward mechanism:
[0013]
[0014] Among them, E total is the total energy consumption; R average is the total response time; E ref and R ref is the benchmark energy consumption and response time; R global is the total reward value; α′ and β′ are weight coefficients;
[0015] Use the PPO optimization method to train high-level strategies separately. The training process is simulated using global data and the optimal strategy parameters are learned.
[0016] The goal of the low-level strategy is to optimize the specific energy efficiency and performance of a device or device group. The state space is the information of the specific device, including the current load, CPU / GPU usage, and temperature; the action space is the device operation options, including operating frequency adjustment, load transfer, and task queuing strategy; reward mechanism:
[0017]
[0018] Among them, R local is the equipment reward; γ and δ are weight coefficients; E device is the energy consumption of the current device; E device,max R is the maximum energy consumption of the device under high load target is the target response time; R device is the actual response time or performance index of the current device; R device,ref It is the reference response time or performance benchmark of the equipment;
[0019] Use Q-learning to train low-level policies separately;
[0020] After the high-level strategy and the low-level strategy have been trained individually for a preset number of times, joint optimization begins using the policy gradient method.
[0021] Furthermore, S1 is specifically:
[0022] Energy consumption and temperature sensors are deployed on each rack to monitor the power consumption and temperature changes of each rack; temperature and humidity sensors are deployed at the inlet and outlet of the cooling system; energy consumption sensors are deployed on the power distribution unit PDU to monitor the energy consumption of each power distribution unit; load sensors are deployed on network devices such as routers and switches to monitor network traffic and load conditions;
[0023] Data communication with sensors via standardized interfaces;
[0024] Use log collection tools to collect server logs; use network traffic monitoring tools to collect network traffic data.
[0025] Furthermore, S2 is specifically:
[0026] Perform data cleaning on raw data, including missing value processing, outlier detection and data standardization;
[0027] Extract the average value, maximum value, minimum value, variance, temperature gradient and load change rate features from the cleaned raw data;
[0028] The LASSO algorithm is used to select important features and construct a training data set.
[0029] Furthermore, the LASSO algorithm reduces the regression coefficients corresponding to some features to zero by introducing the L1 regularization term, thus achieving feature selection, as follows:
[0030] The objective function of the LASSO algorithm is as follows:
[0031]
[0032] Where N is the number of samples; p is the number of features; y i is the i-th target variable; X ij is the jth feature of the i-th sample; β j is the regression coefficient of the jth feature; λ is the regularization parameter;
[0033] Select the best λ value through K-fold cross validation;
[0034] Train the LASSO model using the best selected lambda value:
[0035]
[0036] Through the trained LASSO algorithm, according to the regression coefficient The important features are selected by the value of . If the coefficient β of the feature is not zero, the feature is retained; otherwise, the feature is discarded.
[0037] Furthermore, the energy consumption prediction model is constructed based on the BiLSTM network, as follows:
[0038] The LSTM layer of the BiLSTM network contains forward LSTM and backward LSTM:
[0039]
[0040] in, is the hidden state of the forward LSTM at time step t; x t is the input sequence data of the current time step t; LSTM f is the forward LSTM unit; is the hidden state of the backward LSTM at time step t; LSTM b is the backward LSTM unit;
[0041] By adding multiple layers of LSTM, the expressiveness of the model is improved:
[0042]
[0043] Where l represents the lth layer LSTM;
[0044] And add the context vector c to the BiLSTM network:
[0045]
[0046]
[0047] e t =v T tanh(W h h t +W s s t-1 +b a )
[0048] Where T is the total time step; α t is the normalized attention score; e t is the attention weight; v is the weight vector of the attention mechanism; W h and W s is the weight matrix; b a is the bias of the attention mechanism; s t-1 is the hidden state of the previous time step;
[0049] The output layer concatenates the context vector c with the LSTM layer output and performs a linear transformation to obtain the final prediction result.
[0050] z t =[c;h t ];
[0051]
[0052] Among them, W c , b y are the weights and biases of the output layer.
[0053] Furthermore, the energy consumption prediction model training is as follows:
[0054] (1) Initialize the weight parameter θ of the BiLSTM model
[0055] Set the hyperparameters of the AdamW optimizer, such as the learning rate η, momentum parameters β1 and β2, and weight decay coefficient;
[0056] (2) Input the training set data, calculate the hidden state of each time step through the BiLSTM layer, and calculate the predicted energy consumption value
[0057] (3) Use Huber loss function to calculate the predicted value The error between y and the true value;
[0058]
[0059] (4) Calculate the gradient of the loss function relative to the model parameters through the back propagation algorithm
[0060] (5) Use the AdamW optimizer to update the model parameters θ. First, calculate the first-order momentum estimate m t and the second-order momentum estimate v t , and make bias correction;
[0061]
[0062] Where β1 and β2 are the exponential decay rates of the first-order and second-order momentum estimates, respectively; and They are bias corrections for first-order momentum estimation and second-order momentum estimation, respectively;
[0063] The parameters are then updated based on the corrected momentum estimate and normalization term;
[0064]
[0065] Among them, η is the learning rate, ∈ is the smoothing term;
[0066] (6) The above steps (2)-(5) are repeated until the Huber loss is less than the threshold or the maximum number of training times is reached, and the trained energy consumption prediction model is obtained.
[0067] Furthermore, S4 is specifically:
[0068] Input the current load and environmental data of the equipment into the energy consumption prediction model to predict energy consumption and generate the energy consumption prediction value E for the future time interval; monitor and collect the load information L of the equipment in real time;
[0069] Calculate the priority of each task:
[0070]
[0071] Among them, E i′ It is based on the energy consumption prediction model for task T i′ Energy consumption prediction, L i′ is the expected impact of the task on the load, D i′ is the cut-off time; α, β and c are weight coefficients;
[0072] According to the calculated priority, the highest priority task is extracted from the priority queue.
[0073] Assign tasks based on the current device resource status; update the device status, and continue to extract the next task from the queue until the resource limit is reached or the queue is empty.
[0074] Furthermore, the PPO optimization method uses a policy gradient method to ensure stability by limiting the degree of deviation of each policy update from the old policy, as follows:
[0075] The loss function is defined as:
[0076]
[0077] Among them, r t (θ) is the action probability ratio; is the advantage estimate, ∈ is the shear amount of strategy change; θ is the strategy parameter; E t [·]: represents the expected value of time step t; clip(r t (θ),1-ε,1+ε) is the cutting function for policy update;
[0078] According to the interaction between the current strategy πθ and the environment, multiple state-action-reward three-tuples are generated, each of which represents the result of a task allocation decision;
[0079] Use standard advantage function estimation to adjust the weighted expectation of the return:
[0080] In each round of training, sampled data is used to limit each strategy update so that the new strategy does not exceed a fixed range of change ∈, thereby maintaining stable updates;
[0081] The policy parameters are updated using an optimizer to maximize the clipping loss function L(θ).
[0082] Furthermore, after the high-level strategy and the low-level strategy are trained individually for a preset number of times, joint optimization begins, using the policy gradient method for optimization, as follows:
[0083] After a preset number of independent trainings, the joint strategy π is introduced joint =(π H ,π L );
[0084] The decision of the high-level strategy is used as the input of the low-level strategy to dynamically adjust the low-level strategy; the state space is (S H ,S L ), the action is (A H ,A L );where S H is the state space of the high-level policy, S L is the state space of the low-level policy, A H is the action space of the high-level strategy, A L is the action space of the low-level strategy;
[0085] The objective function of optimizing the joint strategy is J(θ joint ):
[0086]
[0087] Among them, θ joint is the strategy parameter of the joint strategy; E joint [.] is the joint strategy π joint The expected value of the reward for time step t′; T′ represents the number of time steps in the entire decision-making process; γ t′ is the discount factor; is the reward of the high-level strategy at time step t′; is the reward of the lower-level policy at time step t′;
[0088] Update the parameters:
[0089]
[0090] in, represents the gradient of the joint strategy objective function; Represents the high-level strategy π H The policy gradient is expressed in terms of the parameter θ H The degree of optimization in direction; Represents the low-level policy π L The policy gradient is expressed in terms of the parameter θ L The degree of optimization in direction;
[0091] In the joint strategy, parameters are adjusted according to the update directions of the high-level strategy and the low-level strategy until the preset requirements are met.
[0092] The present invention has the following beneficial effects:
[0093] 1. The present invention can not only improve the resource utilization efficiency and energy efficiency of the data center, but also realize reliable operation in a changing environment through intelligent management means;
[0094] 2. The present invention constructs an energy efficiency prediction model based on BiLSTM. The introduction of a multi-layer LSTM structure further enhances the expression ability of the model, which can better process complex time series data. The Huber loss function is used to improve the robustness of the model to outliers, which can effectively reduce the impact of outliers on model training. The energy consumption prediction model finally realized can more accurately reflect the complexity and time-varying nature of data center energy consumption, and effectively support subsequent dynamic task allocation and strategy optimization.
[0095] 3. Through phased strategy training, the present invention enables high-level and low-level strategies to better understand and adapt to their goals in their respective stages, and uses the policy gradient method to optimize strategies, thereby achieving joint coordination of high-level and low-level strategies, so that the entire system can operate efficiently and achieve optimal energy efficiency. Through hierarchical guidance and optimization strategies, it can adapt to the complex and changeable data center environment, so that the overall system can maintain high-performance and low-energy consumption operating status under dynamic load conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0096] Figure 1 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0097] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:
[0098] refer to Figure 1 In this embodiment, a method for optimizing dynamic energy consumption of a data center based on machine learning is provided, comprising the following steps:
[0099] S1: Deploy sensors at key locations in the data center to collect data center environmental data and collect data center operation data through system interfaces;
[0100] S2: Preprocess the environmental data and operation data of the data center, including data cleaning and feature engineering, extract features from the raw data, and use the LASSO algorithm to select the most important features to build a training data set;
[0101] S3: Build an energy consumption prediction model based on the machine learning model and train it based on the training data set;
[0102] S4: Based on the trained energy consumption prediction model, the prediction is performed, and tasks are dynamically allocated according to the predicted energy consumption and the current load of the equipment to obtain a preliminary task allocation plan;
[0103] S5: Use hierarchical reinforcement learning for strategy training to optimize the task allocation plan of the data center, and perform processing based on the optimized task allocation plan to achieve optimal energy efficiency.
[0104] In this embodiment, S1 is specifically:
[0105] Energy consumption and temperature sensors are deployed on each rack to monitor the power consumption and temperature changes of each rack; temperature and humidity sensors are deployed at the inlet and outlet of the cooling system; energy consumption sensors are deployed on the power distribution unit PDU to monitor the energy consumption of each power distribution unit; load sensors are deployed on network devices such as routers and switches to monitor network traffic and load conditions;
[0106] Data communication with sensors via standardized interfaces (such as Modbus, SNMP, HTTP API);
[0107] Use log collection tools (such as Fluentd, Logstash) to collect server logs; use network traffic monitoring tools (such as Wireshark, NetFlow) to collect network traffic data.
[0108] In this embodiment, S2 is specifically:
[0109] Perform data cleaning on raw data, including missing value processing, outlier detection and data standardization;
[0110] Extract the average value, maximum value, minimum value, variance, temperature gradient and load change rate features from the cleaned raw data;
[0111] The LASSO algorithm is used to select important features and construct a training data set.
[0112] In this embodiment, the LASSO algorithm reduces the regression coefficients corresponding to some features to zero by introducing an L1 regularization term, thereby achieving feature selection, as follows:
[0113] The objective function of the LASSO algorithm is as follows:
[0114]
[0115] Where N is the number of samples; p is the number of features; y i is the i-th target variable; X ij is the jth feature of the i-th sample; β j is the regression coefficient of the jth feature; λ is the regularization parameter;
[0116] Select the best λ value through K-fold cross validation;
[0117] Train the LASSO model using the best selected lambda value:
[0118]
[0119] Through the trained LASSO algorithm, according to the regression coefficient The important features are selected by the value of . If the coefficient β of the feature is not zero, the feature is retained; otherwise, the feature is discarded.
[0120] In this embodiment, the energy consumption prediction model is constructed based on the BiLSTM network, as follows:
[0121] The LSTM layer of the BiLSTM network contains forward LSTM and backward LSTM:
[0122]
[0123] in, is the hidden state of the forward LSTM at time step t; x t is the input sequence data of the current time step t; LSTM f is the forward LSTM unit; is the hidden state of the backward LSTM at time step t; LSTM b is the backward LSTM unit;
[0124] By adding multiple layers of LSTM, the expressiveness of the model is improved:
[0125]
[0126] Where l represents the lth layer LSTM;
[0127] And add the context vector c to the BiLSTM network:
[0128]
[0129] e t =v T tanh(W h h t +W s s t-1 +b a )
[0130] Where T is the total time step; α t is the normalized attention score; e t is the attention weight; v is the weight vector of the attention mechanism; W hand W s is the weight matrix; b a is the bias of the attention mechanism; s t-1 is the hidden state of the previous time step;
[0131] The output layer concatenates the context vector c with the LSTM layer output and performs a linear transformation to obtain the final prediction result.
[0132] z t =[c;h t ];
[0133]
[0134] Among them, W c , b y are the weights and biases of the output layer.
[0135] In this embodiment, the energy consumption prediction model training is specifically as follows:
[0136] (1) Initialize the weight parameter θ of the BiLSTM model
[0137] Set the hyperparameters of the AdamW optimizer, such as the learning rate η, momentum parameters β1 and β2, and weight decay coefficient;
[0138] (2) Input the training set data, calculate the hidden state of each time step through the BiLSTM layer, and calculate the predicted energy consumption value
[0139] (3) Use Huber loss function to calculate the predicted value The error between y and the true value;
[0140]
[0141] (4) Calculate the gradient of the loss function relative to the model parameters through the back propagation algorithm
[0142] (5) Use the AdamW optimizer to update the model parameters θ. First, calculate the first-order momentum estimate m t and the second-order momentum estimate v t , and make bias correction;
[0143]
[0144] Where β1 and β2 are the exponential decay rates of the first-order and second-order momentum estimates, respectively; and They are bias corrections for first-order momentum estimation and second-order momentum estimation, respectively;
[0145] The parameters are then updated based on the corrected momentum estimate and normalization term;
[0146]
[0147] Among them, η is the learning rate, ∈ is the smoothing term;
[0148] (6) The above steps (2)-(5) are repeated until the Huber loss is less than the threshold or the maximum number of training times is reached, and the trained energy consumption prediction model is obtained.
[0149] In this embodiment, S4 is specifically:
[0150] Input the current load and environmental data of the equipment into the energy consumption prediction model to predict energy consumption and generate the energy consumption prediction value E for the future time interval; monitor and collect the load information L of the equipment in real time, such as CPU utilization, memory usage, etc., recorded as L(t);
[0151] Calculate the priority of each task:
[0152]
[0153] Among them, E i′ It is based on the energy consumption prediction model for task T i′ Energy consumption prediction, L i′ is the expected impact of the task on the load, D i′ is the cut-off time; α, β and c are weight coefficients;
[0154] According to the calculated priority, the highest priority task is extracted from the priority queue.
[0155] Assign tasks based on the current device resource status (such as available computing power, memory, etc.); update the device status, and continue to extract the next task from the queue until the resource reaches the limit or the queue is empty.
[0156] In this embodiment, hierarchical reinforcement learning includes high-level strategies and low-level strategies, wherein the high-level strategy is responsible for optimizing the global energy consumption and performance of the data center and formulating the overall strategy; the low-level strategy is responsible for optimizing the energy consumption and performance of specific devices and executing the high-level strategy, as follows:
[0157] The goal of the high-level strategy is to optimize the global energy efficiency and performance of the data center. The state space is global information, including the average load of each server, total power consumption, and overall response time; the action space is the adjustment of the macro task allocation strategy, including changing the allocation mode of a certain type of task; reward mechanism:
[0158]
[0159] Among them, E totalis the total energy consumption; R average is the total response time; E ref and R ref is the benchmark energy consumption and response time; R global is the total reward value; α′ and β′ are weight coefficients;
[0160] Use the PPO optimization method to train high-level strategies separately. The training process is simulated using global data and the optimal strategy parameters are learned.
[0161] The goal of the low-level strategy is to optimize the specific energy efficiency and performance of a device or device group. The state space is the information of the specific device, including the current load, CPU / GPU usage, and temperature; the action space is the device operation options, including operating frequency adjustment, load transfer, and task queuing strategy; reward mechanism:
[0162]
[0163] Among them, R local is the equipment reward; γ and δ are weight coefficients; E device is the energy consumption of the current device; E device,max R is the maximum energy consumption of the device under high load target is the target response time; R device is the actual response time or performance index of the current device; R device,ref It is the reference response time or performance benchmark of the equipment;
[0164] Use Q-learning to train low-level policies separately;
[0165] After the high-level strategy and the low-level strategy have been trained individually for a preset number of times, joint optimization begins using the policy gradient method.
[0166] In this embodiment, the PPO optimization method uses a policy gradient method to ensure stability by limiting the degree of deviation of each policy update from the old policy, as follows:
[0167] The loss function is defined as:
[0168]
[0169] Among them, r t (θ) is the action probability ratio; is the advantage estimate, ∈ is the shear amount of strategy change; θ is the strategy parameter; E t [·]: represents the expected value of time step t; clip(r t (θ),1-ε,1+ε) is the cutting function for policy update;
[0170] According to the interaction between the current strategy πθ and the environment, multiple state-action-reward three-tuples are generated, each of which represents the result of a task allocation decision;
[0171] Use standard advantage function estimation to adjust the weighted expectation of the return:
[0172] In each round of training, sampled data is used to limit each strategy update so that the new strategy does not exceed a fixed range of change ∈, thereby maintaining stable updates;
[0173] The policy parameters are updated using an optimizer to maximize the clipping loss function L(θ).
[0174] In this embodiment, after the high-level strategy and the low-level strategy are trained individually for a preset number of times, joint optimization is started, using the policy gradient method for optimization, as follows:
[0175] After a preset number of independent trainings, the joint strategy π is introduced joint =(π H ,π L );
[0176] The decision of the high-level strategy is used as the input of the low-level strategy to dynamically adjust the low-level strategy; the state space is (S H ,S L ), the action is (A H ,A L );where S H is the state space of the high-level policy, S L is the state space of the low-level policy, A H is the action space of the high-level strategy, A L is the action space of the low-level strategy;
[0177] The objective function of optimizing the joint strategy is J(θ joint ):
[0178]
[0179] Among them, θ joint is the strategy parameter of the joint strategy; E joint [.] is the joint strategy π joint The expected value of the reward for time step t′; T′ represents the number of time steps in the entire decision-making process; γ t′ is the discount factor; is the reward of the high-level strategy at time step t′; is the reward of the lower-level policy at time step t′;
[0180] Update the parameters:
[0181]
[0182] in, represents the gradient of the joint strategy objective function; Represents the high-level strategy π H The policy gradient is expressed in terms of the parameter θ H The degree of optimization in direction; Represents the low-level policy π L The policy gradient is expressed in terms of the parameter θ L The degree of optimization in direction;
[0183] In the joint strategy, parameters are adjusted according to the update directions of the high-level strategy and the low-level strategy until the preset requirements are met.
[0184] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0185] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0186] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0187] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0188] The above is only a preferred embodiment of the present invention, and does not limit the present invention in other forms. Any technician familiar with the profession may use the above disclosed technical content to change or modify it into an equivalent embodiment with equivalent changes. However, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the technical solution of the present invention still belongs to the protection scope of the technical solution of the present invention.
Claims
1. A data center dynamic energy consumption optimization method based on machine learning, characterized in that: The following steps are involved: S1: Deploy sensors at key locations in the data center to collect data center environmental data and collect data center operation data through system interfaces; S2: Preprocess the environmental data and operation data of the data center, including data cleaning and feature engineering, extract features from the raw data, and use the LASSO algorithm to select the most important features to build a training data set; S3: Build an energy consumption prediction model based on the machine learning model and train it based on the training data set; S4: Based on the trained energy consumption prediction model, the prediction is performed, and tasks are dynamically allocated according to the predicted energy consumption and the current load of the equipment to obtain a preliminary task allocation plan; S5: Use hierarchical reinforcement learning to perform strategy training, optimize the task allocation scheme of the data center, and perform task allocation based on the optimized task allocation scheme to achieve optimal energy efficiency, as follows: The goal of the high-level strategy is to optimize the global energy efficiency and performance of the data center. The state space is global information, including the average load of each server, total power consumption, and overall response time; The action space is the adjustment of the macro task allocation strategy, including changing the allocation mode of a certain type of task; reward mechanism: Among them, E total is the total energy consumption; R average is the total response time; E ref and R ref is the benchmark energy consumption and response time; R global is the total reward value; α′ and β′ are weight coefficients; Use the PPO optimization method to train high-level strategies separately. The training process is simulated using global data and the optimal strategy parameters are learned. The goal of the low-level strategy is to optimize the specific energy efficiency and performance of a device or device group. The state space is the information of the specific device, including the current load, CPU / GPU usage, and temperature; the action space is the device operation options, including operating frequency adjustment, load transfer, and task queuing strategy; reward mechanism: Among them, R local is the equipment reward; γ and δ are weight coefficients; E device is the energy consumption of the current device; E device,max R is the maximum energy consumption of the device under high load target is the target response time; R device is the actual response time or performance index of the current device; R device,ref It is the reference response time or performance benchmark of the equipment; Use Q-learning to train low-level policies separately; After the high-level strategy and the low-level strategy have been trained individually for a preset number of times, joint optimization begins using the policy gradient method.
2. According to the method of claim 1, the method is characterized in that: The S1 is specifically: Energy consumption and temperature sensors are deployed on each rack to monitor the power consumption and temperature changes of each rack; temperature and humidity sensors are deployed at the inlet and outlet of the cooling system; energy consumption sensors are deployed on the power distribution unit PDU to monitor the energy consumption of each power distribution unit; load sensors are deployed on network devices such as routers and switches to monitor network traffic and load conditions; Data communication with sensors via standardized interfaces; Use log collection tools to collect server logs; use network traffic monitoring tools to collect network traffic data.
3. The method for dynamic energy consumption optimization of a data center based on machine learning according to claim 1, characterized in that: The S2 is specifically: Perform data cleaning on raw data, including missing value processing, outlier detection and data standardization; Extract the average value, maximum value, minimum value, variance, temperature gradient and load change rate features from the cleaned raw data; The LASSO algorithm is used to select important features and construct a training data set.
4. The method for dynamic energy consumption optimization of a data center based on machine learning according to claim 3, characterized in that: The LASSO algorithm reduces the regression coefficients corresponding to some features to zero by introducing the L1 regularization term, thereby achieving feature selection, as follows: The objective function of the LASSO algorithm is as follows: Where N is the number of samples; p is the number of features; y i is the i-th target variable; X ij is the jth feature of the i-th sample; β j is the regression coefficient of the jth feature; λ is the regularization parameter; Select the best λ value through K-fold cross validation; Train the LASSO model using the best selected lambda value: Through the trained LASSO algorithm, according to the regression coefficient The important features are selected by the value of . If the coefficient β of the feature is not zero, the feature is retained; otherwise, the feature is discarded.
5. The method for dynamic energy consumption optimization of a data center based on machine learning according to claim 1, characterized in that: The energy consumption prediction model is built based on the BiLSTM network, as follows: The LSTM layer of the BiLSTM network contains forward LSTM and backward LSTM: in, is the hidden state of the forward LSTM at time step t; x t is the input sequence data of the current time step t; LSTM f is the forward LSTM unit; is the hidden state of the backward LSTM at time step t; LSTM b is the backward LSTM unit; By adding multiple layers of LSTM, the expressiveness of the model is improved: Where l represents the lth layer LSTM; And add the context vector c to the BiLSTM network: e t =v T tanh(W h h t +W s s t-1 +b a ) Where T is the total time step; α t is the normalized attention score; e t is the attention weight; v is the weight vector of the attention mechanism; W h and W s is the weight matrix; b a is the bias of the attention mechanism; s t-1 is the hidden state of the previous time step; The output layer concatenates the context vector c with the LSTM layer output and performs a linear transformation to obtain the final prediction result. z t =[c;h t ]; Among them, W c , b y are the weights and biases of the output layer.
6. The method for dynamic energy consumption optimization of a data center based on machine learning according to claim 5, characterized in that: The energy consumption prediction model training is specifically as follows: (1) Initialize the weight parameter θ of the BiLSTM model Set the hyperparameters of the AdamW optimizer, such as the learning rate η, momentum parameters β1 and β2, and weight decay coefficient; (2) Input the training set data, calculate the hidden state of each time step through the BiLSTM layer, and calculate the predicted energy consumption value (3) Use Huber loss function to calculate the predicted value The error between y and the true value; (4) Calculate the gradient of the loss function relative to the model parameters through the back propagation algorithm (5) Use the AdamW optimizer to update the model parameters θ. First, calculate the first-order momentum estimate m t and the second-order momentum estimate v t , and make bias correction; Where β1 and β2 are the exponential decay rates of the first-order and second-order momentum estimates, respectively; and They are bias corrections for first-order momentum estimation and second-order momentum estimation, respectively; The parameters are then updated based on the corrected momentum estimate and normalization term; Among them, η is the learning rate, ∈ is the smoothing term; (6) The above steps (2)-(5) are repeated until the Huber loss is less than the threshold or the maximum number of training times is reached, and the trained energy consumption prediction model is obtained.
7. The method for dynamic energy consumption optimization of a data center based on machine learning according to claim 1, characterized in that: The S4 is specifically: Input the current load and environmental data of the equipment into the energy consumption prediction model to predict energy consumption and generate the energy consumption prediction value E for the future time interval; monitor and collect the load information L of the equipment in real time; Calculate the priority of each task: Among them, E i′ It is based on the energy consumption prediction model for task T i′ Energy consumption prediction, L i′ is the expected impact of the task on the load, D i′ is the cut-off time; α, β and c are weight coefficients; According to the calculated priority, the highest priority task is extracted from the priority queue. Assign tasks based on the current device resource status; update the device status, and continue to extract the next task from the queue until the resource limit is reached or the queue is empty.
8. The method for dynamic energy consumption optimization of a data center based on machine learning according to claim 1, characterized in that: The PPO optimization method uses a policy gradient method to ensure stability by limiting the degree of deviation of each policy update from the old policy, as follows: The loss function is defined as: Among them, r t (θ) is the action probability ratio; is the advantage estimate, ∈ is the shear amount of strategy change; θ is the strategy parameter; E t [·]: represents the expected value of time step t; clip(r t (θ),1-ε,1+ε) is the cutting function for policy update; According to the interaction between the current strategy πθ and the environment, multiple state-action-reward three-tuples are generated, each of which represents the result of a task allocation decision; Use standard advantage function estimation to adjust the weighted expectation of the return: In each round of training, sampled data is used to limit each strategy update so that the new strategy does not exceed a fixed range of change ∈, thereby maintaining stable updates; The policy parameters are updated using an optimizer to maximize the clipping loss function L(θ).
9. The method for dynamic energy consumption optimization of a data center based on machine learning according to claim 1, characterized in that: After the high-level strategy and the low-level strategy have been trained individually for a preset number of times, joint optimization begins, using the policy gradient method for optimization, as follows: After a preset number of independent trainings, the joint strategy π is introduced joint =(π H ,π L ); The decision of the high-level strategy is used as the input of the low-level strategy to dynamically adjust the low-level strategy; the state space is (S H ,S L ), the action is (A H ,A L );where S H is the state space of the high-level policy, S L is the state space of the low-level policy, A H is the action space of the high-level strategy, A L is the action space of the low-level strategy; The objective function of optimizing the joint strategy is J(θ joint ): Among them, θ joint is the strategy parameter of the joint strategy; E joint [.] is the joint strategy π joint The expected value of the reward for time step t′; T′ represents the number of time steps in the entire decision-making process; γ t′ is the discount factor; is the reward of the high-level strategy at time step t′; is the reward of the lower-level policy at time step t′; Update the parameters: in, represents the gradient of the joint strategy objective function; Represents the high-level strategy π H The policy gradient is expressed in terms of the parameter θ H The degree of optimization in direction; Represents the low-level policy π L The policy gradient is expressed in terms of the parameter θ L The degree of optimization in direction; In the joint strategy, parameters are adjusted according to the update directions of the high-level strategy and the low-level strategy until the preset requirements are met.
Citation Information
Cited By
Energy consumption optimization method and system for computing power server
CN119847712A
An Energy Consumption Optimization Method and System for a Computing Power Server
CN119847712B
Optical fiber immersion sensing method with maximized safety energy efficiency
CN120017172A
Fiber Optic Immersion Sensing Method for Maximizing Safety Energy Efficiency
CN120017172B
Data center power load elastic distribution system
CN122512446A