Cloud resource load prediction method based on generative adversarial network
Through the method based on generative adversarial network, VMD, BiLSTM, ResNet generators and CNN discriminators are used to solve the problem of difficult to capture deep implicit relationships in cloud resource load prediction, improve prediction accuracy and model stability, and achieve more efficiency cloud resource scheduling.
Patent Information
- Application Number
- CN202411283054.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-13
- Publication Date
- 2025-01-03
AI Technical Summary
The prior art is difficult to capture the deep implicit relationship of load data in cloud resource load prediction, resulting in low prediction accuracy, especially when the load data has nonlinear and non-stationary characteristics.
Using a generative adversarial network (GAN) method, a generator composed of variational modal decomposition (VMD), bidirectional long and short-term memory network (BiLSTM) and residual network (ResNet) is composed of convolutional neural network (CNN) The discriminator performs preprocessing and prediction of cloud resource load data.
Effectively extracting the characteristics of load data improves load prediction accuracy, reduces noise impact, avoids model degradation, and improves the performance of cloud computing resource scheduling.
Smart Images

Figure CN119249080A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of cloud computing, and in particular to a cloud resource load prediction method based on a generative adversarial network. Background Art
[0002] With the development of cloud computing technology, more and more applications are deployed to the cloud, which has become a common practice in the industry. However, the mismatch between load requests and resource supply has become increasingly prominent, making it impossible to respond to user requests in a timely manner, greatly affecting the quality of cloud services. Real-time prediction of load requests helps to supply resources in a timely manner.
[0003] In order to improve the accuracy of load forecasting, domestic and foreign scholars have conducted a lot of research. At present, the load forecasting methods at home and abroad can be mainly divided into statistical learning, machine learning and deep learning. Among them, the typical representative of statistical learning is the difference autoregressive moving average (ARIMA) model. The model has a simple structure, only requires endogenous variables, does not need to resort to other external variables, and has good interpretability. However, the statistical learning model is suitable for linear data prediction, and has certain limitations for traffic prediction with high nonlinear intensity. In addition, statistical models often face the problem of lag when predicting, and cannot model time series with turning points or long-term dependence well. Compared with statistical models, machine learning models are flexible and changeable, and the parameters in the prediction function can be automatically updated during the model training process, which is more suitable for nonlinear data prediction. Machine learning includes support vector machine (SVM) model and Bayesian network model. This method is to discover the law of load change from historical data and can well reflect the nonlinearity of load. Although machine learning can process nonlinear data, it does not do in-depth mining of historical data itself, and cannot fully learn the law of change of traffic data. Once it is disturbed by the outside world, its prediction accuracy will drop significantly.
[0004] In recent years, deep learning has the ability to process multi-dimensional data, achieve flexibility, and have strong learning capabilities. Therefore, it has gradually become a mainstream method in the field of cloud resource load prediction. When processing load data, the recurrent neural network (RNN) considers not only the current input but also the previous input, making it more suitable for capturing the dynamic time changes of time series data. However, due to its structural characteristics, the gradient disappears or explodes when processing long time series back propagation. In view of this, scholars have improved the traditional RNN and proposed the long short-term memory network (LSTM). The features in the load data are extracted by LSTM, so as to well represent the nonlinearity of the load data and achieve better prediction results. The traditional LSTM network memory information can only be transmitted in one direction, but in the load data, considering the information rules before and after the prediction time helps to improve the fitting accuracy of the model. The bidirectional long short-term memory network (BiLSTM) is applied to load prediction, forward calculation of historical data and backward calculation of future data. Simulation shows that the model has good prediction performance and generalization ability. A single model has certain advantages in prediction time, but the prediction accuracy is still not high. Based on this, scholars have proposed prediction models such as LSTM-RNN, ARIMA-LSTM, and CNN-LSTM. Studies have shown that the prediction accuracy of hybrid models is better than that of single models. However, load data has the characteristics of non-stationarity and non-stability, and traditional deep learning cannot capture the deep implicit relationship between data. At present, there is a lack of a high-precision cloud computing resource load prediction model. The increasing number of applications deployed in the cloud has caused the power consumption of cloud data centers to fluctuate violently, resulting in the increasingly serious problem of unbalanced resource utilization in cloud data centers. Accurate cloud resource load prediction can improve cloud platform performance and prevent resource waste. In view of the nonlinear and non-stationary characteristics of load data, traditional deep learning cannot capture the deep implicit relationship between data. Summary of the invention
[0005] Purpose of the invention: The technical problem to be solved by the present invention is to provide a cloud resource load prediction method based on a generative adversarial network in view of the shortcomings of the prior art, comprising the following steps:
[0006] Step 1: Obtain cloud computing resource load data and pre-process the cloud computing resource load data;
[0007] Step 2, mathematical modeling of the improved generative adversarial network GAN;
[0008] Step 3: Train the improved generative adversarial network GAN to obtain a trained neural network, and input the cloud computing resource load data preprocessed in step 1 into the trained neural network to predict the cloud resource load.
[0009] Step 1 includes: constructing load data anomaly screening rules, screening the load data according to the load data anomaly screening rules to obtain abnormal data; repairing the abnormal data, that is, removing the abnormal data, and then incomplete the missing data through Newton interpolation method to obtain repaired data; normalizing the repaired data to obtain normalized load data.
[0010] In step 1, the load data includes central processing unit (CPU) utilization, memory utilization, disk I / O time and disk space;
[0011] The load data anomaly screening rules include: if the CPU utilization, memory utilization, disk I / O time, and disk space are negative values, they are abnormal data; if the CPU utilization and memory utilization exceed 100%, they are abnormal data.
[0012] In step 1, the following formula is used for normalization:
[0013]
[0014] Among them, X is the repaired data, X min is the minimum value in the repaired data, X max is the maximum value in the repaired data; X scaled is the normalized data.
[0015] In step 2, the generative adversarial network GAN includes a generator and a discriminator;
[0016] The generator is used to generate data with a distribution similar to that of real data;
[0017] The discriminator is used to judge the authenticity of input data.
[0018] In step 2, the objective function of the generative adversarial network GAN is:
[0019]
[0020] Among them, G is the generator; D is the discriminator; V is the output result of the objective function, E is the expectation, x is the real sample, z is random noise, data is the real data, p data (x) and p G (z) represents the distribution of real data and the distribution of false data respectively; represents the loss function that minimizes the generator, Represents the loss function that maximizes the discriminator.
[0021] In step 2, the generator includes a 4-layer network, wherein the first layer is a variational mode decomposition (VMD) layer, the second layer is a bidirectional long short-term memory network (BiLSTM) layer, the third layer is a residual network (ResNet) layer, and the fourth layer is a fully connected (Dense) layer, and the fully connected layer includes a BiLSTM module, a random loss (dropout) layer and a Dense layer;
[0022] The variational mode decomposition VMD layer performs the following steps:
[0023] Step 2-a1, first construct the variational constraint problem through equations (3) and (4):
[0024]
[0025] Where K is the number of decomposed modes, u k ,ω k are the components and center frequencies of the kth mode after decomposition; is the partial derivative of the function with respect to time, δ(t) is the Dirac function; t is time, j is the imaginary unit, * is the calculation convolution, e is a natural constant; f is the original input information; st means constrained;
[0026] Step 2-a2, transform the constrained variational problem through equation (5):
[0027]
[0028] Where α is the quadratic penalty factor, λ is the Lagrangian multiplication operator, f(t) is the time series data, and L represents the Lagrangian function;
[0029] Step 2-a3, search for the saddle point of the augmented Lagrange function, and alternately optimize {u k}、{ω k} and λ, the formula is:
[0030]
[0031] Where γ represents the noise tolerance, and Corresponding to the original signal u i Fourier transform of (t), f(t) and λ(t); The centroid of the power spectrum of the modal function for searching the saddle point of the augmented Lagrange function.
[0032] In step 2, the bidirectional long short-term memory network BiLSTM layer is used to perform hidden output calculations, and the formula is:
[0033]
[0034] in, and are the forward hidden layer state and backward hidden layer state at time q, respectively, and LSTM is the hidden operation process; y q represents the spatiotemporal correlation vector input at time q, h q is the hidden layer state vector of the bidirectional long short-term memory network BiLSTM at time q, a and b represent the forward hidden layer output weight and the reverse hidden layer output weight, respectively.
[0035] In step 2, the input of the residual network ResNet layer is x l , the output is x l+1 , then the output formula of the entire residual network ResNet layer is:
[0036] x l+1 =f(h(x l )+F(x l ,w l )) (12)
[0037] Among them, f is the activation function; w l is the network weight, h is the shortcut connection and h = identity; F(x) is the residual part, x is the input, when the shape of F(x) is inconsistent with that of x, x is converted to the shape of F(x) through the function identity, which includes a 1×1 convolution operation.
[0038] In step 2, the discriminator includes a convolutional neural network (CNN), and the convolutional neural network (CNN) includes an input layer, a convolutional layer, a pooling layer, a fully connected layer, and an output layer;
[0039] The convolution layer includes convolution and activation operations. The feature map input to the convolution layer is convolved using a convolution kernel. Then, the feature map obtained by the convolution calculation is input into a specific activation function f(·) to obtain a new feature matrix. The formula is:
[0040]
[0041] Among them, l is the number of layers in the network, is the jth feature matrix of the lth layer, f(·) is the activation function, M is the total number of neurons in the l-1th layer, is the i-th feature matrix passed from the l-1 layer network, is the weight matrix of the convolution kernel corresponding to the lth layer, is the bias matrix;
[0042] The pooling layer is used to reduce the dimension of the feature map. The input feature vector is downsampled through the pooling layer. The pooling layer includes maximum pooling and average pooling. The formula is:
[0043]
[0044] in, is the maximum pooling output value, is the average pooling output value; a l(i,t) is the i-th feature matrix of the t-th neuron in the l-th layer, W is the width of the pooling region, s is the serial number of the pooling kernel, s = 1, 2, ..., q, P l(i,s) is the result of pooling output;
[0045] The fully connected layer in the convolutional neural network CNN integrates the feature information in the convolutional layer and the pooling layer, and then converts the feature map carrying the information into a one-dimensional vector. The formula is:
[0046] H(X)=f(WX+B) (16)
[0047] Among them, X is the feature matrix passed down by the convolution layer and the pooling layer, that is, the input of the fully connected layer, W is the weight vector, B is the bias vector, f is the activation function, and H(x) is the feature output;
[0048] In step 3, the training of the improved generative adversarial network GAN includes the following steps:
[0049] Step 3-1, input the normalized load data into the variational mode decomposition layer, and decompose the load data into subsequences of different frequencies through the variational mode decomposition algorithm to reduce the impact of noise on the model prediction performance;
[0050] Step 3-2, the generator is fixed to train the discriminator so that the discriminator can distinguish between real data and data generated by the generator;
[0051] Step 3-3, the fixed discriminator is used to train the generator, mining the implicit deep features of the load data, outputting the prediction results of each component, and then weighted summing the prediction results of each component to obtain the prediction results, so that the data generated by the generator is constantly close to the real data;
[0052] Step 3-4, stop the loop when the data generated by the generator can deceive the discriminator.
[0053] The invention establishes a cloud resource load prediction model based on the Generative Adversarial Network (GAN). In order to reduce the impact of noise, extract features and avoid model degradation, the generator in the model is composed of variational mode decomposition (VMD), bidirectional long short-term memory network (BiLSTM) and residual network (ResNet), and the discriminator is composed of convolutional neural network (CNN) to improve the model's discrimination ability.
[0054] Beneficial effects: The present invention aims at the nonlinear and non-stationary characteristics of load data. Traditional deep learning cannot capture the deep implicit relationship between data. Therefore, a cloud resource load prediction model is established based on the generative adversarial network (GAN). In order to reduce the impact of noise, extract features and avoid model degradation, the generator in the model is composed of variational mode decomposition (VMD), bidirectional long short-term memory network (BiLSTM) and residual network (ResNet), and the discriminator is composed of convolutional neural network (CNN), so as to improve the discrimination ability of the model. The present invention can effectively extract the characteristics of load data and improve the accuracy of load prediction, which is of great significance for cloud computing resource scheduling. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments, and the above and / or other advantages of the present invention will become more clear.
[0056] Figure 1 This is a flow chart of abnormal data processing according to the present invention.
[0057] Figure 2 This is the structural diagram of the VBC-GAN model of the present invention.
[0058] Figure 3 This is a structural diagram of the generator of the present invention.
[0059] Figure 4 This is a structural diagram of the discriminator of the present invention. DETAILED DESCRIPTION
[0060] The present invention provides a cloud resource load prediction method based on a generative adversarial network, comprising the following steps:
[0061] Training the load prediction model includes:
[0062] Step 1: Obtain cloud computing resource load data and preprocess the cloud computing resource load data. The data preprocessing process is as follows: Figure 1 shown.
[0063] Step 2, mathematical modeling of the improved generative adversarial network GAN;
[0064] The Generative Adversarial Network consists of a generator and a discriminator. The main idea is to train the generator and the discriminator through continuous confrontation, so that the discriminator will find it difficult to distinguish the authenticity of the data generated by the generator, and the fake data will be indistinguishable from the real data. The structure diagram is as follows: Figure 2 shown.
[0065] Step 3: Train the improved generative adversarial network GAN to obtain a trained neural network, and input the cloud computing resource load data preprocessed in step 1 into the trained neural network to predict the cloud resource load.
[0066] The function of the generator is to generate data with a distribution similar to the real data, so as to achieve the purpose of making it impossible for the discriminator to distinguish between the real data and the generated data. The generator network structure in the present invention is relatively complex, consisting of multiple layers of neural networks alternating. Figure 3 This is the structural diagram of the generator, including VMD, BiLSTM, and ResNet.
[0067] Design the discriminator network:
[0068] The role of the discriminator is to determine whether the input data is real data or generated data, and its function is similar to that of a classifier. Figure 4 is the structure diagram of the discriminator. GAN is to generate data X t+1_prdict Continuously approaching the real data X t+1_real Through adversarial learning, the generator's generation ability and the discriminator's discrimination ability are continuously improved, and finally the data generated by the generator cannot be recognized by the discriminator. CNN has good feature extraction ability and performs well in classification tasks, so the discriminator uses CNN to improve the model's discrimination ability.
[0069] Set hyperparameters:
[0070] In order to solve the problems that traditional deep models cannot capture the implicit deep relationship between nonlinear load data, the model is unstable and the prediction accuracy is not high, the present invention proposes a VBC-GAN model based on the generative adversarial network for cloud resource load prediction. The generator body of the model of the present invention is VMD decomposition of cloud computing load data, and the decomposed data is sequentially input into 1 BiLSTM layer, 1 ResNet layer and 1 fully connected layer. The BiLSTM layer mines data features, and the ResNet network solves the problem of gradient disappearance. The main body of the discriminator is a 1-layer CNN, which is used to improve the discrimination ability of the model.
[0071] Stop training when the data generated by the generator is enough to fool the discriminator.
[0072] The process of preprocessing the load data includes: constructing load data anomaly screening rules, screening the load data according to the load data anomaly screening rules to obtain abnormal data; repairing the abnormal data to obtain repaired data; normalizing the repaired data to obtain preprocessed data.
[0073] Furthermore, load data anomaly screening rules include: load data includes CPU utilization, memory utilization, disk I / O time, disk space, etc.; among which abnormal data includes CPU utilization, memory utilization, disk I / O time, disk space being negative values, and CPU utilization and memory utilization exceeding 100%.
[0074] The cloud computing load sample data has a large time span and frequent fluctuations, which results in large dimensional differences between the initial sample data, affecting the robustness and convergence speed of the network. Therefore, in order to eliminate the data dimensional differences and speed up the convergence speed, the present invention normalizes the original load data, and its calculation formula is as shown in formula (1).
[0075]
[0076] Among them, X is the repaired data, X min is the minimum value in the repaired data, X max is the maximum value in the repaired data; X scaled is the normalized data.
[0077] The GAN network is modeled as follows:
[0078] The generator and the discriminator compete with each other to improve the ability of the generative model to generate sample data, while the discriminator also improves its own identification ability. After reaching a balance, the discriminator cannot determine whether the input data is generated data or real data. At this time, data that is highly similar to the real data can be generated. The objective function of GAN is shown in formula (2).
[0079]
[0080] Among them, G is the generator; D is the discriminator; V is the output result of the objective function, E is the expectation, x is the real sample, z is random noise, data is the real data, p data (x) and p G (z) represents the distribution of real data and the distribution of false data respectively; represents the loss function that minimizes the generator, Represents the loss function that maximizes the discriminator.
[0081] The generator network consists of multiple layers, including 4 layers. The specific network layers are as follows:
[0082] The first layer is the variational mode decomposition (VMD) layer: the cloud resource load data is a nonlinear and non-stationary time series. The original vehicle speed data is subjected to variational mode decomposition to reduce noise interference and improve prediction accuracy.
[0083] The second layer is the BiLSTM layer, a bidirectional long short-term memory network: the decomposed subsequences are input into the BiLSTM network to mine the cloud resource load data features. For time series with long spans, BiLSTM can not only learn historical information and avoid gradient explosion, but also consider the transformation rules of forward and backward time series data, which helps to improve the fitting accuracy of the model. There is also a dropout layer after the BiLSTM module to prevent overfitting problems.
[0084] The third layer is the residual network ResNet layer: When deepening the network structure, the neural network may face problems such as gradient diffusion and network degradation, and ResNet can solve this problem well. The residual layer is designed with two one-dimensional convolution and jump connection modules to solve the problem of gradient disappearance when deepening the depth of the neural network.
[0085] The fourth layer is a fully connected layer, which contains a BiLSTM module, a dropout layer, and a Dense layer. The data passes through the fully connected layer to obtain the prediction results of each component, and then the weighted sum of each component is used to obtain the final prediction result.
[0086] The construction of the internal model of the generator network includes: VMD decomposition, BiLSTM mathematical modeling, and residual network mathematical modeling.
[0087] (1) VMD decomposition steps:
[0088] 1) First, construct the variational constraint problem through equations (3) and (4):
[0089]
[0090] Where K is the number of decomposed modes, u k ,ω k are the components and center frequencies of the kth mode after decomposition; is the partial derivative of the function with respect to time, δ(t) is the Dirac function; t is time, j is the imaginary unit, * is the calculation convolution, e is a natural constant; f is the original input information; st means constrained;
[0091] 2) Transform the constrained variational problem through equation (5):
[0092]
[0093] Where α is the quadratic penalty factor and λ is the Lagrange multiplication operator.
[0094] 3) Search for the saddle point of the augmented Lagrange function and alternately optimize {u k}、{ω k} and λ, expressed as equations (6) to (8):
[0095]
[0096] Where γ represents the noise tolerance, and Corresponding to the original signal u i Fourier transform of (t), f(t) and λ(t); The centroid of the power spectrum of the modal function for searching the saddle point of the augmented Lagrange function.
[0097] (2) BiLSTM mathematical modeling
[0098] BiLSTM is a further improvement on LSTM, consisting of forward LSTM and backward LSTM. As a result, BiLSTM can not only maintain the memory of past states, but also has dependence on future states. The sequence data enters the hidden layer through the input layer for forward and reverse calculations, learning past historical information and future features. The final output result is obtained by the output layer fusing the forward LSTM output result and the backward LSTM output result according to a certain weight.
[0099] The bidirectional long short-term memory network layer is used to perform hidden output calculations, and the formula is:
[0100]
[0101] in, and are the forward hidden layer state and backward hidden layer state at time q, respectively, and LSTM is the hidden operation process; y q represents the spatiotemporal correlation vector input at time q, h q is the hidden layer state vector of the bidirectional long short-term memory network BiLSTM at time q, a and b represent the forward hidden layer output weight and the reverse hidden layer output weight, respectively.
[0102] (3) Mathematical modeling of residual network
[0103] Each layer in a neural network can learn different feature information. The deeper the network layer, the more feature information the entire network will learn, and the more feature information combinations between different layers, the better the effect. However, when the number of network layers reaches a certain number, the performance of the network will be saturated. If the number of layers is increased, the network will degenerate, and the shallow network performance will achieve better training results than the deep network.
[0104] ResNet avoids the problem of gradient vanishing in deep models by using skip connections between convolutional layers. Even if the network is very deep, the gradient will not disappear. Its network structure is as follows: Figure 4 As shown. If the input of the residual network structure is x l , the output is x l+1 , then the output of the entire residual network structure is formula (12):
[0105] x l+1 =f(h(x l )+F(x l ,w l )) (12)
[0106] Among them, f is the activation function; w l is the network weight; h is the shortcut connection and h = identity, F(x) is the residual part, x is the input. When the shape of F(x) is inconsistent with that of x, it is necessary to transform x into the shape of F(x) through the identity function. The identity function mainly performs 1×1 convolution operations.
[0107] The construction of the internal model of the discriminator includes CNN mathematical modeling. CNN mainly includes input layer, convolution layer, pooling layer and output layer. The specific functions are as follows:
[0108] (1) The convolution layer mainly includes convolution and activation operations. The feature map input to the convolution layer is convolved using the convolution kernel; then, the feature map obtained by the convolution calculation is input into a specific activation function to obtain a new feature matrix. Its formula is shown in formula (13):
[0109]
[0110] Among them, l is the number of layers in the network, is the jth feature matrix of the lth layer, f(·) is the activation function, M is the total number of neurons in the l-1th layer, is the i-th feature matrix passed from the l-1 layer network, is the weight matrix of the convolution kernel corresponding to the lth layer, is the bias matrix;
[0111] (2) The role of the pooling layer is to reduce the dimension of the feature map. The input feature vector is downsampled through the pooling layer, which reduces the number of neurons and significantly reduces the difficulty of calculation. At the same time, it can also further highlight the effect of extracting features. Pooling can be divided into maximum pooling and average pooling. The formulas are shown in equations (14) and (15).
[0112]
[0113] in, is the maximum pooling output value, is the average pooling output value; a l(i,t) is the i-th feature matrix of the t-th neuron in the l-th layer, W is the width of the pooling region, s is the serial number of the pooling kernel, s = 1, 2, ..., q, P l(i,s) is the result of pooling output;
[0114] (3) The fully connected layer integrates the feature information in the convolutional layer and the pooling layer, and then converts the feature map carrying the information into a one-dimensional vector. The formula is shown in formula (16). The output of the fully connected layer uses the softmax function to convert the input into a probability distribution with a sum of 1.
[0115] H(X)=f(WX+B) (16)
[0116] Among them, X is the feature matrix passed down by the convolution layer and the pooling layer, that is, the input of the fully connected layer, W is the weight vector, B is the bias vector, f is the activation function, and H(x) is the feature output.
[0117] In this embodiment, the cloud resource load data set collected by a certain server is preprocessed, and the CPU utilization is selected as a feature for prediction; according to the characteristics of the data, the first 80% of the data set is used as a training set, the last 20% is used as a test set, and the sliding window is set to 5; the fixed generator is used to train the discriminator so that the discriminator can obtain the ability to distinguish between real data and data generated by the generator; the fixed discriminator is used to train the generator to mine the deep features hidden in the load data, output the prediction result of each component, and then perform weighted summation on the prediction result of each component to obtain the prediction result, so that the data generated by the generator continues to approach the real data; when the data generated by the generator is able to deceive the discriminator, the loop is stopped and the predicted data is denormalized.
[0118] In order to verify the effectiveness of the model proposed in this example, the mean square error (RMSE), mean absolute error (MAE), and determination coefficient (R 2 ) is used as the evaluation index of the present invention.
[0119]
[0120] Among them, y i represents the true value at time i, y i-p represents the predicted value at time i, Represents y i The mean value, n is the number of samples.
[0121] The model of this embodiment is experimentally compared with other 4 models on three indicators in a public data set, and the results are shown in Table 1 below.
[0122] Table 1
[0123] Model RMSE MAE <![CDATA[R 2 ]]> ARIMA 5.22 3.75 0.40 LSTM 5.05 3.65 0.43 GRU-LSTM 4.25 3.03 0.52 VBC-GAN 3.51 2.46 0.61
[0124] It can be seen from the table that the VBC-GAN of the present invention is superior to other prediction models in terms of RMSE, MAE or R 2 The indicators all have good performance, and the prediction accuracy has been improved to a certain extent. The present invention can effectively extract the characteristics of load data, improve the load prediction accuracy, and has important significance for cloud computing resource scheduling.
[0125] The present invention provides a cloud resource load prediction method based on a generative adversarial network. There are many methods and ways to implement the technical solution. The above is only a preferred implementation of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention. All components not specified in this embodiment can be implemented using existing technologies.
Claims
1. A cloud resource load prediction method based on generative adversarial network, characterized in that: The following steps are involved: Step 1: obtaining cloud computing resource load data and preprocessing the cloud computing resource load data; Step 2, mathematical modeling of the improved generative adversarial network GAN; Step 3: Train the improved generative adversarial network GAN to obtain a trained neural network, and input the cloud computing resource load data preprocessed in step 1 into the trained neural network to predict the cloud resource load.
2. The method according to claim 1, characterized in that Step 1 includes: constructing load data anomaly screening rules, screening the load data according to the load data anomaly screening rules to obtain abnormal data; repairing the abnormal data, that is, removing the abnormal data, and then incomplete the missing data through Newton interpolation method to obtain repaired data; normalizing the repaired data to obtain normalized load data.
3. The method according to claim 2, characterized in that In step 1, the load data includes central processing unit utilization, memory utilization, disk I / O time and disk space; The load data anomaly screening rules include: if the CPU utilization, memory utilization, disk I / O time, and disk space are negative values, they are abnormal data; If the CPU utilization and memory utilization exceed 100%, it is abnormal data.
4. The method according to claim 3, characterized in that In step 1, the following formula is used for normalization: Among them, X is the repaired data, X min is the minimum value in the repaired data, X max is the maximum value in the repaired data; X scaled is the normalized data.
5. The method according to claim 4, characterized in that In step 2, the generative adversarial network GAN includes a generator and a discriminator; The generator is used to generate data with a distribution similar to that of real data; The discriminator is used to judge the authenticity of input data.
6. The method according to claim 5, characterized in that In step 2, the objective function of the generative adversarial network GAN is: Among them, G is the generator; D is the discriminator; V is the output result of the objective function, E is the expectation, x is the real sample, z is random noise, data is the real data, p data (x) and p G (z) represents the distribution of real data and the distribution of false data respectively; represents the loss function that minimizes the generator, Represents the loss function that maximizes the discriminator.
7. The method according to claim 6, characterized in that In step 2, the generator includes a 4-layer network, wherein the first layer is a variational mode decomposition layer, the second layer is a bidirectional long short-term memory network layer, the third layer is a residual network layer, and the fourth layer is a fully connected layer, and the fully connected layer includes a BiLSTM module, a random loss layer, and a Dense layer; The variational mode decomposition VMD layer performs the following steps: Step 2-a1, first construct the variational constraint problem through equations (3) and (4): Where K is the number of decomposed modes, u k ,ω k are the components and center frequencies of the kth mode after decomposition; is the partial derivative of the function with respect to time, δ(t) is the Dirac function; t is time, j is the imaginary unit, * is the calculation convolution, e is a natural constant; f is the original input information; st means constrained; Step 2-a2, transform the constrained variational problem through equation (5): Where α is the quadratic penalty factor, λ is the Lagrangian multiplication operator, f(t) is the time series data, and L represents the Lagrangian function; Step 2-a3, search for the saddle point of the augmented Lagrange function, and alternately optimize {u k }、{ω k } and λ, the formula is: Where γ represents the noise tolerance, and Corresponding to the original signal u i Fourier transform of (t), f(t) and λ(t); The centroid of the power spectrum of the modal function for searching the saddle point of the augmented Lagrange function.
8. The method according to claim 7, characterized in that In step 2, the bidirectional long short-term memory network layer is used to perform hidden output calculations, and the formula is: in, and are the forward hidden layer state and the backward hidden layer state at time q, respectively, and LSTM is the hidden operation process; y q represents the spatiotemporal correlation vector input at time q, h q is the hidden layer state vector of the bidirectional long short-term memory network BiLSTM at time q, a and b represent the forward hidden layer output weight and the reverse hidden layer output weight, respectively.
9. The method according to claim 8, characterized in that In step 2, the input of the residual network layer is x l , the output is x l+1 , then the output formula of the entire residual network layer is: x l+1 =f(h(x l )+F(x l ,w l )) (12) Among them, f is the activation function; w l is the network weight, h is the shortcut connection and h = identity; F(x) is the residual part, x is the input, when the shape of F(x) is inconsistent with that of x, x is converted to the shape of F(x) through the function identity, and the function identity includes a 1×1 convolution operation.
10. The method according to claim 9, characterized in that In step 2, the discriminator includes a convolutional neural network (CNN), and the convolutional neural network (CNN) includes an input layer, a convolutional layer, a pooling layer, a fully connected layer, and an output layer; The convolution layer includes convolution and activation operations. The feature map input to the convolution layer is convolved using a convolution kernel. Then, the feature map obtained by the convolution calculation is input into a specific activation function f(·) to obtain a new feature matrix. The formula is: Among them, l is the number of layers in the network, is the j-th feature matrix of the l-th layer, f(·) is the activation function, M is the total number of neurons in the l-1 layer, is the i-th feature matrix passed from the l-1 layer network, is the weight matrix of the convolution kernel corresponding to the lth layer, is the bias matrix; The pooling layer is used to reduce the dimension of the feature map. The input feature vector is downsampled through the pooling layer. The pooling layer includes maximum pooling and average pooling. The formula is: in, is the maximum pooling output value, is the average pooling output value; a l(i,t) is the i-th feature matrix of the t-th neuron in the l-th layer, W is the width of the pooling region, s is the serial number of the pooling kernel, s = 1, 2, ..., q, P l(i,s) is the result of pooling output; The fully connected layer in the convolutional neural network CNN integrates the feature information in the convolutional layer and the pooling layer, and then converts the feature map carrying the information into a one-dimensional vector. The formula is: H(X)=f(WX+B) (16) Among them, X is the feature matrix passed down by the convolution layer and the pooling layer, that is, the input of the fully connected layer, W is the weight vector, B is the bias vector, f is the activation function, and H(x) is the feature output; In step 3, the training of the improved generative adversarial network GAN includes the following steps: Step 3-1, input the normalized load data into the variational mode decomposition layer, and decompose the load data into subsequences of different frequencies through the variational mode decomposition algorithm to reduce the impact of noise on the model prediction performance; Step 3-2, the generator is fixed to train the discriminator so that the discriminator can distinguish between real data and data generated by the generator; Step 3-3, the fixed discriminator is used to train the generator, mining the implicit deep features of the load data, outputting the prediction results of each component, and then weighted summing the prediction results of each component to obtain the prediction results, so that the data generated by the generator is constantly close to the real data; Step 3-4, stop the loop when the data generated by the generator can deceive the discriminator.
