Server energy consumption prediction method based on time-frequency domain feature fusion
Through the time-frequency domain feature fusion network, the global and local characteristics of server energy consumption are extracted, and the problem of inaccurate energy consumption prediction in the existing technology is solved, more accurate energy consumption trend capture and prediction is achieved, and the operation cost of data centers is reduced. .
Patent Information
- Application Number
- CN202411163790.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-11-29
Smart Images

Figure CN119046880A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a server energy consumption prediction method based on time-frequency domain feature fusion. Background Art
[0002] Data centers have always had a high energy consumption problem. Servers consume energy and dissipate heat into the hot environment, affecting the power consumption of refrigeration equipment. Conversely, the parameter configuration of refrigeration equipment will also affect the inlet air temperature of the server, thereby affecting the energy consumption of the server. Based on the above analysis, it is of great significance to effectively improve the overall energy performance of the two main components of the data center, including IT equipment and refrigeration equipment. It can not only reduce the operating costs of the data center, but also bring sustainable development. However, the factors that affect the energy consumption of data center servers include voltage, current, and the temperature, consumption and power consumption of hardware devices such as CPU and GPU. These reflect the working status of the server and affect the overall power consumption and heat release. Predicting the energy consumption of the server in advance can timely adjust the temperature of the refrigeration system such as air conditioning, avoid energy waste caused by excessive cooling and reduce the risk of server downtime due to insufficient cooling.
[0003] In the research on energy consumption prediction of data center servers, traditional time series prediction models such as vector autoregression (VAR) and differential autoregression moving average model (ARIMA) were initially used. The parameter selection of these models has a great impact on the prediction results, and it is difficult to handle multivariate time series. In recent years, the development of deep learning technology can improve the nonlinear modeling ability of time series prediction and realize multivariate time series prediction. For example, the Informer model based on the Transformer network proposes a ProbSparse self-attention mechanism and distillation technology to reduce the computational complexity and memory usage bottlenecks. The iTransformer model captures variable dependencies by independently embedding the entire time dimension and using the self-attention mechanism. There is also a Dlinear model based on a linear layer that decomposes the time series into trend and residual terms, and uses two single-layer linear networks to model these two items for prediction. According to analysis, when the workload of the server suddenly increases, the active power of the server will have a significant upward trend. The above method is difficult to accurately capture the trend of a significant increase in active power due to significant changes in the working status and load of the server. Summary of the invention
[0004] 1. Technical problems to be solved:
[0005] How to effectively capture this changing trend and maintain the accuracy of the forecast.
[0006] 2. Technical solution:
[0007] In order to solve the above problems, the present invention provides a server energy consumption prediction method based on time-frequency domain feature fusion, comprising the following steps:
[0008] Step 1: Obtain historical time series data that affects the energy consumption of data center servers; obtain training samples after preprocessing the historical time series data.
[0009] Step 2: Construct a server energy consumption prediction model based on time-frequency domain feature fusion.
[0010] Step 3: Divide the sample set into a training set and a validation set, use the training set to train the constructed model, and use the validation set to verify the training results, so as to obtain a trained server energy consumption prediction model based on time-frequency domain feature fusion.
[0011] Step 4: Input the relevant energy consumption data of the server collected by different sensors in real time into the trained model for prediction to obtain the final energy consumption prediction result.
[0012] Furthermore, in step one, preprocessing the historical time series data includes: filling missing values, removing outliers and normalizing the data for the historical time series.
[0013] Furthermore, in step one, the sequence data related to the server energy consumption affecting the data center includes voltage, current, temperature, consumption and power consumption of ESP32, CPU, GPU, and RAM hardware devices.
[0014] Furthermore, in step 2, the energy consumption prediction model includes a time domain global extraction network, a frequency domain local extraction network and a feature fusion network; the time domain global extraction network uses a G-Mamba network to extract global features of the input energy consumption series data; the frequency domain local extraction network uses a F-TCN network to extract local features of the input energy consumption series data; the feature fusion network uses the extracted global features as the main features, and at the same time captures important information of the local features to supplement the global feature information, so that it avoids the interference of redundant feature information in the feature fusion process to obtain more comprehensive features, and uses scaled dot product attention to realize information interaction between variables, and finally obtains the final prediction result through the fully connected layer.
[0015] 3. Beneficial effects:
[0016] The method discloses a server energy consumption prediction method based on time-frequency domain feature fusion. The model design of the method includes three parts: a time-domain global extraction network, a frequency-domain local extraction network, and a feature fusion network. Among them, the time-domain global extraction network captures the overall change trend in the time domain. The network can effectively retain important information in the input sequence, fully perceive the dynamic update status of the sequence context information, provide flexible nonlinear modeling capabilities, and grasp the global information. The frequency-domain local extraction network analyzes local detail information in the frequency domain, which helps to focus on specific frequency information and short-term fluctuations. The feature fusion network specifically supplements the important information of local features to the global features, obtains more comprehensive feature information, and promotes information interaction between variables. The results show that the model proposed by the present invention can capture the change trend of the significant increase in active power due to the significant increase in server workload, and can maintain the improvement of energy consumption prediction accuracy, provide decision support for the data center to reasonably adjust the temperature of the refrigeration system, and reduce the operating cost of the data center. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 Flowchart of this method.
[0018] Figure 2 This is the overall structure diagram of the energy consumption prediction model involved in this method.
[0019] Figure 3 This is the time domain global extraction network structure diagram involved in this method.
[0020] Figure 4 This is the frequency domain local extraction network structure diagram involved in this method.
[0021] Figure 5 This is a comparison chart of the predictions of the data center server energy consumption dataset by the present invention and other models in the verification example. DETAILED DESCRIPTION
[0022] The present invention will be described in detail below with reference to the accompanying drawings and embodiments.
[0023] like Figure 1 As shown, a server energy consumption prediction method based on time-frequency domain feature fusion is characterized by comprising the following steps:
[0024] Step 1: Obtain historical time series data that affects the energy consumption of data center servers; obtain training samples after preprocessing the historical time series data; the series data that affects the energy consumption of data center servers include voltage, current, and the temperature, consumption, and power consumption of ESP32, CPU, GPU, and RAM hardware devices;
[0025] Step 2: Construct a server energy consumption prediction model based on time-frequency domain feature fusion; Figure 2As shown, the energy consumption prediction model includes a time domain global extraction network, a frequency domain local extraction network and a feature fusion network; the time domain global extraction network uses a G-Mamba network to extract global features of the input energy consumption series data; the frequency domain local extraction network uses an F-TCN network to extract local features of the input energy consumption series data; the feature fusion network uses the extracted global features as the main features, and at the same time captures important information of local features to supplement the global feature information, so that it avoids the interference of redundant feature information in the feature fusion process to obtain more comprehensive features, uses scaled dot product attention to realize information interaction between variables, and finally obtains the final prediction result through the fully connected layer;
[0026] Step 3: Divide the sample set into a training set and a validation set, use the training set to train the model, and use the validation set to verify the training results, so as to obtain a trained server energy consumption prediction model based on time-frequency domain feature fusion;
[0027] Step 4: Input the relevant energy consumption data of the server collected by different sensors in real time into the trained model for prediction to obtain the final energy consumption prediction result.
[0028] In one embodiment, preprocessing the historical time series data includes: filling missing values, removing outliers, and normalizing the data on the historical time series.
[0029] In one embodiment, the time domain global extraction network in step 2 uses the Mamba model and a feedforward neural network (FFN) to extract global features and capture the time dependency of the input sequence. The selection mechanism introduced by Mamba can retain important information in the sequence and is combined with the state space model to capture dynamic changes in the sequence data, so that the model can fully perceive the sequence information and dynamically update the state according to the input. FFN provides more flexible nonlinear modeling capabilities to further adjust and optimize the output of the model. The specific extraction includes the following steps: Figure 3 As shown,
[0030] S51: The input sequence X is passed through the embedding layer, and the input feature dimension is mapped to the embedding dimension using the linear layer. The embedding vector is obtained through the embedding layer, as follows:
[0031] E = EmbeddingLayer(X) (1)
[0032] Among them, EmbeddingLayer represents the embedding layer, and E is the embedding vector;
[0033] S52: The embedding vector obtained in step S21 is input into the Mamba model. The specific operation is to pass through two branches respectively. The first branch obtains the output matrix H through the linear layer, one-dimensional convolution, SiLU activation function and selection state space model. The other branch obtains the output matrix L through the linear layer and SiLU activation function. The output matrices of the two branches are multiplied, and then a linear layer is used to output the matrix M, as follows:
[0034] H = SSM(SiLU(Conv1d(Linear(E)))) (2)
[0035] L = SiLU(Linear(E)) (3)
[0036] M = Linear(H*L) (4)
[0037] Among them, * is matrix multiplication, Linear is the linear layer, Conv1d is the one-dimensional convolution operation, SSM is the selection state space model, and M is the Mamba representation matrix;
[0038] S53: Perform residual connection and layer normalization processing on the Mamba representation matrix M obtained in step S22 and the embedding vector E, as follows:
[0039] M`=E+M (5)
[0040] M``= LayerNorm(M`) (6)
[0041] Among them, M` is the matrix after residual connection, LayerNorm is layer normalization, and M`` is the normalized matrix;
[0042] S54: Finally, the normalized matrix M`` obtained in step S23 is sent to a feedforward neural network, which includes two fully connected layers, and then residual connection and layer normalization are performed again to obtain a representation matrix S1 of the time domain global features. The specific process is as follows:
[0043] Z=FFN(M``)=Max (0,M``*W1+b1)*W2+b2 (7)
[0044] S1= LayerNorm(M``+Z) (8)
[0045] Among them, FFN represents a feedforward neural network, Z is the representation matrix after the feedforward neural network, W1 and W2 are the weights of the first and second layers respectively, b1 and b2 are the biases of the first and second layers respectively, and S1 is the global feature representation matrix extracted in the time domain.
[0046] In one embodiment, the frequency domain local extraction network selects the main frequency components by amplitude after Fourier transform to reduce the interference caused by noise in the data, and extracts local features by using the dilated causal convolution of the temporal convolution network (TCN). The acquisition process specifically includes the following steps: Figure 4 As shown:
[0047] S61: The input sequence X is converted from the time domain to the frequency domain for analysis by Fourier transform operation, as shown in the following formula:
[0048]
[0049]
[0050] in, is the rotation factor, k is the number of frequency components, N is the number of variables, fre(k) is the real part representation of the frequency component, fim(k) is the imaginary part representation of the frequency component, f(k) is the frequency component, FFT represents the Fourier transform operation, and F is the Fourier representation matrix;
[0051] S62: Sending the Fourier representation matrix after Fourier transformation to a temporal convolutional network, wherein the temporal convolutional network includes two identical dilated causal convolutional layers, and then obtaining an output matrix of the temporal convolutional network through a residual connection, as follows;
[0052] P1= DilatedCausalConv1d(Padding(F)) (11)
[0053] Y1=Dropout(ReLU(WN(P1))) (12)
[0054] P2= DilatedCausalConv1d(Padding(Y1)) (13)
[0055] Y2=Dropout(ReLU(WN(P2))) (14)
[0056] Y=F+Y2 (15)
[0057] Among them, Padding represents zero padding operation, DilatedCausalConv1d represents one-dimensional dilated causal convolution operation, WN represents weight normalization, ReLU is the activation function, Dropout is random dropout, P1 and Y1 are the intermediate representation and output matrix of the first dilated causal convolution layer, P2 and Y2 are the intermediate representation and output matrix of the second dilated causal convolution layer, and Y is the temporal convolution network output matrix;
[0058] S63: Return the output matrix Y obtained in step S26 from the frequency domain to the time domain through an inverse Fourier transform operation, as shown in the following formula:
[0059] S2=iFFT(Y) (16)
[0060] Among them, iFFT represents the inverse Fourier transform operation; S2 is the frequency domain local feature representation matrix.
[0061] In one embodiment, the feature fusion network uses global maximum pooling and two fully connected layers to learn important information of local features, processes local feature vectors through Sigmoid nonlinear function to generate channel gating vectors for adjusting global features, applies them to queries and keys generated by global features to supplement global features, and finally uses scaled dot product attention to complete the fusion of global and local feature information, thereby realizing interaction between different variables, specifically including the following steps:
[0062] S71: The frequency domain local feature representation matrix S2 is passed through a global maximum pooling layer and two fully connected layers to learn important local feature information, as shown in the following formula:
[0063]
[0064] C=Sigmoid(W2*ReLU(W1*G)) (18)
[0065] Among them, G represents the compression matrix, D is the model feature dimension, Sigmoid is the activation function, W1 and W2 are the weights of the two fully connected layers respectively, and C is the channel gating vector;
[0066] S72: The global features extracted by the time domain global extraction network are multiplied by three different learnable parameters to obtain the query, key and value, and the channel gating vector obtained in step S28 is adjusted to the global features to generate the query and key with global and local information, and the local feature information is supplemented, as follows:
[0067] Q = S1*Wq,K = S1*Wk,V = S1*Wv (19)
[0068]
[0069] Among them, ⊙ is element-by-element multiplication, Q, K, and V are query, key, and value respectively. are the query and key with fused features, Wq, Wk, and Wv are all learnable parameters;
[0070] S73: The query and key with fusion features obtained in step S72 are used to realize the interaction between different variables by using scaled dot product attention, and finally a linear layer is used to perform linear projection to obtain an energy consumption prediction result, including the following steps:
[0071]
[0072] O=Linear(A) (22)
[0073] Where A is the attention matrix and O is the prediction result.
[0074] Verification example:
[0075] This verification example uses the energy consumption data set of a data center server to bring into the server energy consumption prediction model based on time-frequency domain feature fusion of this application to perform energy consumption prediction: Table 1 is a comparison of the evaluation index size of the present invention and other advanced models in this energy consumption data set. The comparison with other advanced models shows the effectiveness of the prediction effect of the energy consumption prediction model of the present invention. The present invention is superior to other models in comparison of the two evaluation indicators of root mean square error and mean absolute error.
[0076] Table 1 Evaluation indicators of the present invention and other models
[0077]
[0078] like Figure 5 As shown in the prediction comparison chart of different models under the energy consumption data set, by comparing the predicted value with the actual value, the advantage of the present invention in the accuracy of prediction results compared with other advanced models can be more intuitively shown.
Claims
1. A server energy consumption prediction method based on time-frequency domain feature fusion, characterized by: The following steps are involved: Step 1: Obtain historical time series data that affects the energy consumption of data center servers; obtain training samples after preprocessing the historical time series data; Step 2: Construct a server energy consumption prediction model based on time-frequency domain feature fusion; Step 3: Divide the sample set into a training set and a validation set, use the training set to train the constructed model, and use the validation set to verify the training results, so as to obtain a trained server energy consumption prediction model based on time-frequency domain feature fusion; Step 4: Input the relevant energy consumption data of the server collected by different sensors in real time into the trained model for prediction to obtain the final energy consumption prediction result.
2. The server energy consumption prediction method based on time-frequency domain feature fusion according to claim 1 is characterized in that: In step one, preprocessing the historical time series data includes: filling missing values, removing outliers and normalizing the data.
3. The server energy consumption prediction method based on time-frequency domain feature fusion according to claim 1 is characterized in that: In step one, the sequence data on server energy consumption affecting the data center includes voltage, current, temperature, consumption, and power consumption of ESP32, CPU, GPU, and RAM hardware devices.
4. The server energy consumption prediction method based on time-frequency domain feature fusion as claimed in claim 1, characterized in that: In step 2, the energy consumption prediction model includes a time domain global extraction network, a frequency domain local extraction network and a feature fusion network; the time domain global extraction network uses the G-Mamba network to extract global features of the input energy consumption series data; the frequency domain local extraction network uses the F-TCN network to extract local features of the input energy consumption series data; the feature fusion network uses the extracted global features as the main features, and at the same time captures important information of the local features to supplement the global feature information, so that it avoids the interference of redundant feature information in the feature fusion process to obtain more comprehensive features, and uses the scaled dot product attention to realize information interaction between variables, and finally obtains the final prediction result through the fully connected layer.
5. The server energy consumption prediction method based on time-frequency domain feature fusion according to claim 4 is characterized in that: The time domain global extraction network body comprises the following steps: S51: The input sequence X is passed through the embedding layer, and the input feature dimension is mapped to the embedding dimension using the linear layer. The embedding vector is obtained through the embedding layer, as follows: E = EmbeddingLayer(X) (1) Among them, EmbeddingLayer represents the embedding layer, and E is the embedding vector; S52: The embedding vector obtained in step S21 is input into the Mamba model. The specific operation is to pass through two branches respectively. The first branch obtains the output matrix H through the linear layer, one-dimensional convolution, SiLU activation function and selection state space model. The other branch obtains the output matrix L through the linear layer and SiLU activation function. The output matrices of the two branches are multiplied, and then a linear layer is used to output the matrix M, as follows: H = SSM(SiLU(Conv1d(Linear(E)))) (2) L = SiLU(Linear(E)) (3) M = Linear(H*L) (4) Among them, * is matrix multiplication, Linear is the linear layer, Conv1d is the one-dimensional convolution operation, SSM is the selection state space model, and M is the Mamba representation matrix; S53: Perform residual connection and layer normalization processing on the Mamba representation matrix M obtained in step S22 and the embedding vector E, as follows: M`=E+M (5) M``= LayerNorm(M`) (6) Among them, M` is the matrix after residual connection, LayerNorm is layer normalization, and M`` is the normalized matrix; S54: Finally, the normalized matrix M`` obtained in step S23 is sent to a feedforward neural network, which includes two fully connected layers, and then residual connection and layer normalization are performed again to obtain a representation matrix S1 of the time domain global features. The specific process is as follows: Z=FFN(M``)=Max(0,M``*W1+b1)*W2+b2 (7) S1= LayerNorm(M``+Z) (8) Among them, FFN represents a feedforward neural network, Z is the representation matrix after the feedforward neural network, W1 and W2 are the weights of the first and second layers respectively, b1 and b2 are the biases of the first and second layers respectively, and S1 is the global feature representation matrix extracted in the time domain.
6. The server energy consumption prediction method based on time-frequency domain feature fusion according to claim 4 is characterized in that: The frequency domain local extraction network process includes the following steps: S61: The input sequence X is converted from the time domain to the frequency domain for analysis by Fourier transform operation, as shown in the following formula: in, is the rotation factor, k is the number of frequency components, N is the number of variables, fre(k) is the real part representation of the frequency component, fim(k) is the imaginary part representation of the frequency component, f(k) is the frequency component, FFT represents the Fourier transform operation, and F is the Fourier representation matrix; S62: Input the Fourier representation matrix after Fourier transformation into a temporal convolutional network, wherein the temporal convolutional network includes two identical dilated causal convolutional layers, and then obtain the temporal convolutional network through residual connection. P1= DilatedCausalConv1d(Padding(F)) (11) Y1=Dropout(ReLU(WN(P1))) (12) P2= DilatedCausalConv1d(Padding(Y1)) (13) Y2=Dropout(ReLU(WN(P2))) (14) Y=F+Y2 (15) Among them, Padding represents zero padding operation, DilatedCausalConv1d represents one-dimensional dilated causal convolution operation, WN represents weight normalization, ReLU is the activation function, Dropout is random dropout, P1 and Y1 are the intermediate representation and output matrix of the first dilated causal convolution layer, P2 and Y2 are the intermediate representation and output matrix of the second dilated causal convolution layer, and Y is the temporal convolution network output matrix; S63: Return the output matrix Y obtained in step S26 from the frequency domain to the time domain through an inverse Fourier transform operation, as shown in the following formula: S2=iFFT(Y) (16) Among them, iFFT represents the inverse Fourier transform operation; S2 is the frequency domain local feature representation matrix.
7. The server energy consumption prediction method based on time-frequency domain feature fusion according to claim 4 is characterized in that: The feature fusion network specifically includes the following steps: S71: The frequency domain local feature representation matrix S2 is passed through a global maximum pooling layer and two fully connected layers to learn important local feature information, as shown in the following formula: C=Sigmoid(W2*ReLU(W1*G)) (18) Among them, G represents the compression matrix, D is the model feature dimension, Sigmoid is the activation function, W1 and W2 are the weights of the two fully connected layers respectively, and C is the channel gating vector; S72: The global features extracted by the time domain global extraction network are multiplied by three different learnable parameters to obtain the query, key and value, and the channel gating vector obtained in step S28 is adjusted to the global features to generate the query and key with global and local information, and the local feature information is supplemented, as follows: Q = S1*Wq,K = S1*Wk,V = S1*Wv (19) Among them, ⊙ is element-by-element multiplication, Q, K, and V are query, key, and value respectively. are the query and key with fused features, Wq, Wk, and Wv are all learnable parameters; S73: The query and key with fusion features obtained in step S72 are used to realize the interaction between different variables by using scaled dot product attention, and finally a linear layer is used to perform linear projection to obtain an energy consumption prediction result, including the following steps: O=Linear(A) (22) Where A is the attention matrix and O is the prediction result.
Citation Information
Cited By
Selective state space model and apparatus for rolling bearing remaining life prediction
CN119442161A
Selective state-space model and device for remaining life prediction of rolling element bearings
CN119442161B
Cloud resource prediction method and device, equipment and medium
CN119788540A
Drug target affinity prediction method based on state space model and time-frequency transformation
CN119964634A
Hydrological time series prediction network and method based on feature extraction and guidance
CN120256865A
