Method for predicting cloud server resource performance based on LSTM-ACO model

By constructing an LSTM-ACO model and optimizing parameters using the ant colony algorithm, the problem of low accuracy in cloud server resource performance data prediction was solved, achieving high-accuracy prediction and software aging analysis.

CN112631890BActive Publication Date: 2025-01-10HANHOU (BEIJING) TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011642231.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-31
Publication Date
2025-01-10
Estimated Expiration
2040-12-31

AI Technical Summary

Technical Problem

Existing cloud server resource performance prediction methods are not accurate enough for data with large fluctuations, and are prone to getting stuck in local optima, with slow convergence speed and instability.

Method used

The LSTM-ACO model is adopted. By collecting resource and performance data of cloud servers, preprocessing the data, constructing an LSTM model, and optimizing the parameters using the ant colony algorithm, the LSTM-ACO model is formed for prediction.

Benefits of technology

It achieves high-accuracy prediction of cloud server resources and performance, overcomes the problems of local optima and slow convergence speed in the model prediction process, and can more accurately predict software aging phenomena.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112631890B_ABST
    Figure CN112631890B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for predicting the resource performance of a cloud server based on an LSTM-ACO model. First, the time series data is preprocessed, and the original sequence data is mapped to the interval [0,1]. Then, the LSTM model is determined, the existing data is trained and predicted, and the LSTM model is optimized using an ant colony algorithm. Finally, the prediction result of the LSTM model for the data at time t and the data at time t-1, t-2, ..., t-n are input into the LSTM-ACO model, and the data at time t is predicted. The method for predicting the resource performance of a cloud server based on the LSTM-ACO model of the present invention overcomes the problem of low accuracy in the prediction process of traditional prediction methods, and optimizes the LSTM parameters using ACO to avoid the problem of the model falling into a local optimal solution, thereby improving the prediction convergence speed. Finally, the prediction of cloud server resources and performance is achieved, and the software aging phenomenon is predicted more accurately.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of time series prediction, and specifically relates to a method for predicting cloud server resource performance based on a model of a long short-term memory (LSTM) recurrent neural network and an ant colony optimization (ACO). Background Art

[0002] With the development of modern computer technology and cloud computing, cloud servers are becoming more and more common. Cloud servers are characterized by long-term operation, high complexity, and frequent resource exchange, which increases the risk of resource exhaustion and software system anomalies and failures. As failures and resource consumption accumulate, cloud server systems will slowly degrade in performance, increase in failure rates, and even crash. This phenomenon is called "software aging." The main causes of software aging include the consumption of operating system resources, data corruption, and the accumulation of errors. These phenomena accumulate over time, which will deteriorate the performance of the software and may cause a sudden crash or shutdown of the software system.

[0003] In important systems, such as military defense, telecommunications systems, financial systems, securities systems, and commercial systems, as system complexity increases, system error factors are increasingly concentrated in software systems, and one of the issues that deserves more attention is software aging. Once the system software fails, it will affect the normal operation of the entire business system, causing immeasurable economic losses to enterprises and institutions.

[0004] A common method to deal with software aging is the "software regeneration" technology. This technology actively recovers the system before a global or partial failure occurs by clearing faults. Software regeneration technology depends largely on the time of software regeneration. The downtime or overhead caused by such operations cannot be ignored, and frequent software regeneration may have a negative impact on system availability. The ideal software regeneration strategy is to recover the system before it is close to failure.

[0005] Therefore, accurate prediction of software aging trends and calculation of aging thresholds can provide a theoretical basis for online pre-maintenance of cloud systems. Most of the existing prediction methods for cloud server system software aging trends are time series analysis or intelligent algorithms. Time series analysis uses models such as recurrent neural networks and particle filters for trend prediction. The model is simple, but the amount of data required is large and the prediction accuracy is low for data with large fluctuations. Intelligent algorithms include neural networks, support vector machines, etc., which also have low prediction accuracy when predicting time series data. Cloud server resource and performance data are characterized by nonlinearity, randomness, and burstiness. Therefore, the prediction accuracy of cloud server resource and performance data using the above existing prediction methods is not high, especially in the interval where data changes more drastically, the prediction accuracy is even lower. Summary of the invention

[0006] The purpose of the present invention is to provide a cloud server resource performance prediction method using the LSTM-ACO model. The problem that the traditional prediction method has low prediction accuracy for cloud server resource performance data with large fluctuations is solved. A time series data calculation method using an ant colony algorithm to optimize parameters is proposed, which overcomes the problem that the model prediction process is prone to falling into local optimal solutions, slow convergence speed and instability. The LSTM-ACO prediction method can extract the characteristic changes of the cloud server system, and finally achieves high-accuracy prediction and analysis of the performance parameters of the cloud server system, and more accurately predicts the software aging phenomenon.

[0007] The technical solution adopted by the present invention is a cloud server resource performance prediction method using an LSTM-ACO model, comprising the following steps:

[0008] Step 1: Collect resource and performance data of the cloud server system;

[0009] Step 2: Obtain the cloud server system resource and performance sequence data, wherein the resource and performance sequence data include: CPU idle rate, available memory, average load and response time;

[0010] Step 3, performing preprocessing operations on the sequence data obtained in step 2;

[0011] Step 4, using the data obtained in step 3 to build an LSTM model, and obtain the predicted value of the LSTM model for the data obtained in step 3;

[0012] Step 5, using the ant colony algorithm to optimize the parameters of the LSTM model obtained in step 4 to obtain the LSTM-ACO model;

[0013] Step 6: Use the LSTM-ACO model obtained in step 5 to predict the data obtained in step 3 and compare it with the data obtained in step 4;

[0014] Step 7: Use the predicted values of the LSTM-ACO model and the existing sequence data to predict future data.

[0015] In step 3, the sequence data is preprocessed using a normalization method to map the original sequence data to the interval [0, 1]. The specific method is as follows: First, calculate the maximum and minimum values of the sequence data, denoted as X max and X min respectively; then subtract X min from each data in the sequence data, and then divide by X max -X min .

[0016] In step 4, the specific method for constructing the LSTM model includes five functional modules: an input layer, a hidden layer, an output layer, network training, and network prediction. The input layer is responsible for preliminarily processing the original response time series to meet the network input requirements. The hidden layer builds a single-layer recurrent neural network. The output layer provides the prediction result network, and the network prediction module uses an iterative method to predict point by point.

[0017] First, in the input layer, define the original response time series that has been normalized as F o ={f1, f2, …, f n}, then the divided training set and test set can be expressed as F tr ={f1, f2, …, f m} and F te ={f m+1 , f m+2 , …, f n}, satisfying the constraint conditions m < n and m, n ∈ N. To adapt to the characteristics of the hidden layer input, apply the data segmentation method to process F tr . Let the segmentation length be L, then the segmented model is X = {X1, X2, …, X L}, X p ={f p , f p+1 , …, f m-L+p-1}, and 1 ≤ p ≤ L; p, L ∈ N. The corresponding theoretical output is Y = {Y1, Y2, …, Y L}, Y P ={f p+1 , f p+2 , …, f m-L+p}.

[0018] Next, input X into the hidden layer. The hidden layer contains L isomorphic LSTM cells connected in sequence according to the front and back moments. The output of X after passing through the hidden layer can be expressed as P = {P1, P2, …, P L}, P p = LSTMforward (X p ,C p-1 ,H p-1 ), where C p-1 and H p-1 are the state and output of the previous LSTM cell respectively; LSTM forward Represents the LSTM forward cell calculation method. Set the cell state vector size to S state , then C p-1 and H p-1 The magnitude of both vectors is S state It can be seen that the hidden layer output P, ​​model input X and theoretical output Y are all two-dimensional arrays with dimensions (m-L, L). As an error calculation formula, the loss function of the training process can be defined as: The minimum loss function is set as the optimization goal, and the network weights are continuously updated to obtain the final hidden layer network.

[0019] In step 5, the specific method of using the ant colony algorithm to optimize the parameters of the LSTM model obtained in step 4 is:

[0020] 1) Randomly generate an ant population with multiple individuals.

[0021] 2) Initialization parameters: ant scale (number of ants) M, maximum number of iterations Nmax, initial number of iterations N=1, pheromone importance factor α, heuristic function importance factor β, pheromone volatility factor ρ, total pheromone volatility Q, pheromone quantity τ ij (t) = C.

[0022] 3) The total number of parameters to be optimized is set to m, which are grouped into a set P i (1≤i≤m), each parameter randomly obtains a non-zero value to form another set S Pi .

[0023] 4) m ants are randomly placed on r vertices, all ants are started, and ant k (k = 1, 2, ..., M) randomly moves from S Pi Get a set of parameter values, and select the next set of parameter values ​​in the set according to formula (1) (ant colony path selection probability formula), until each ant completely obtains a set of parameter values. The probability formula is as follows formula (1):

[0024]

[0025] where τ j (S Pi ) is the set S Pi The pheromone concentration of a certain j group of weight threshold combinations in .

[0026] 5) Take the values ​​obtained by k (k = 1, 2, ..., M) ants as LSTM parameters, train the samples, and obtain the error value σ between the actual output and the expected output, where σ = |Outputa-Outpute|, Outputa is the actual output, and Outpute is the expected output. Set the expected error ξ and find the output error set σ that is not greater than the expected error i (1≤i≤M), and find the minimum error. The corresponding weight threshold obtained by the ant is the optimal or better solution.

[0027] 6) When the number of iterations or the output error is not satisfied, the pheromone needs to be updated after completing a cycle. The formula is as follows:

[0028]

[0029] in Indicates that the kth ant in the next cycle is in the set S Pi , the pheromone concentration released by the jth element on the path; Indicates that all ants are in the set S Pi The pheromone concentration released by the jth element on the path.

[0030] 7) When the number of iterations or output error does not meet the requirements, repeat the above operations.

[0031] The beneficial effects of the present invention are as follows: The purpose of the present invention is to provide a method for predicting cloud server resource performance based on the LSTM-ACO model, which solves the problem that the traditional prediction method has low prediction accuracy for cloud server resource performance data with large fluctuations. A time series data calculation method using ant colony algorithm to optimize parameters is proposed, which overcomes the problem that the model prediction process is prone to fall into local optimal solutions, slow convergence speed and instability. Finally, the prediction and analysis of cloud server resources and performance is achieved, and the software aging phenomenon is predicted more accurately. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 A cloud server system database query response time diagram in the method for predicting cloud server resource performance based on the LSTM-ACO model of the present invention;

[0033] Figure 2 It is a response time mapping value diagram in the method for predicting cloud server resource performance based on the LSTM-ACO model of the present invention;

[0034] Figure 3 This is a time series prediction block diagram of the method for predicting cloud server resource performance based on the LSTM-ACO model of the present invention;

[0035] Figure 4 A diagram of a single LSTM hidden layer cell structure in the method for predicting cloud server resource performance based on the LSTM-ACO model of the present invention;

[0036] Figure 5 ACO optimization LSTM parameter flow chart in the method for predicting cloud server resource performance based on LSTM-ACO model of the present invention;

[0037] Figure 6 This is a comparison chart of the prediction effects of the LSTM-ACO model and other models in the method for predicting cloud server resource performance based on the LSTM-ACO model of the present invention;

[0038] Figure 7 This is a graph of the absolute error values ​​of each point prediction of the LSTM-ACO model and other models in the method for predicting the performance of cloud server resources based on the LSTM-ACO model of the present invention;

[0039] Figure 8 This is a comparison chart of the convergence trends of the LSTM-ACO model, the LSTM model and the SVM model in the method for predicting cloud server resource performance based on the LSTM-ACO model of the present invention. DETAILED DESCRIPTION

[0040] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

[0041] The method for predicting the resource performance of a cloud server based on the LSTM-ACO model of the present invention comprises the following steps:

[0042] Step 1: Collect resource and performance data of the cloud server.

[0043] Step 2: Obtain cloud server resource and performance sequence data, wherein the resource and performance sequence data include: CPU idle rate, available memory, average load and response time.

[0044] Step 3: preprocess the sequence data obtained in step 2.

[0045] Step 4: Use the data obtained in step 3 to build an LSTM model, and use the model to obtain the predicted value of the LSTM model for the data obtained in step 3.

[0046] Step 5: Use the ant colony algorithm to optimize the parameters of the LSTM model obtained in step 4 and build the LSTM-ACO model.

[0047] Step 6: Use the LSTM-ACO model obtained in step 5 to predict the data obtained in step 3 and compare it with the data obtained in step 4.

[0048] Step 7: Use the predicted values of the LSTM-ACO model and the existing sequence data to predict future data.

[0049] In step 3, to improve the accuracy of the prediction results, it is necessary to normalize the data with different dimensions of the sequence data and map the original sequence data to the interval [0, 1]. The specific method is as follows: First, calculate the maximum and minimum values of the sequence data, denoted as X max and X min respectively; then subtract X min from each data in the sequence data, and then divide by X max -X min . X i is the normalized data value of the i-th sample in the input layer; X min is the minimum sample data value after normalization in the input layer; X max is the maximum sample data value after normalization in the input layer.

[0050] In step 4, the specific method for constructing the LSTM model includes five functional modules: an input layer, a hidden layer, an output layer, network training, and network prediction. The input layer is responsible for preprocessing the original response time series to meet the network input requirements. The hidden layer builds a single-layer recurrent neural network. The output layer provides the prediction result network, and the network prediction module uses an iterative method to predict point by point.

[0051] First, in the input layer, define the original response time series that has been normalized as F o ={f1, f2, …, f n}, then the divided training set and test set can be expressed as F tr ={f1, f2, …, f m} and F te ={f m+1 , f m+2 , …, f n}, satisfying the constraint conditions m < n and m, n ∈ N. To adapt to the characteristics of the hidden layer input, apply the data segmentation method to process F tr . Let the segmentation length be L, then the segmented model is X = {X1, X2, …, X L}, X p ={f p , f p+1 , …, f m-L+p-1}, and there is also 1 ≤ p ≤ L; p, L ∈ N. The corresponding theoretical output is Y = {Y1, Y2, …, Y L}, Y P ={f p+1 , f p+2 , …, f m-L+p}.

[0052] Next, X is input into the hidden layer, which contains L isomorphic LSTM cells connected at the previous and next moments. The output of X after passing through the hidden layer can be expressed as P = {P1, P2, ..., P L}, P p =LSTM forward (X p ,C p-1 ,H p-1 ), where C p-1 and H p-1 are the state and output of the previous LSTM cell respectively; LSTM forward Represents the LSTM forward cell calculation method. Set the cell state vector size to S state , then C p-1 and H p-1 The magnitude of both vectors is S state It can be seen that the hidden layer output P, ​​model input X and theoretical output Y are all two-dimensional arrays with dimensions (m-L, L). As an error calculation formula, the loss function of the training process can be defined as: The minimum loss function is set as the optimization goal, and the network weights are continuously updated to obtain the final hidden layer network.

[0053] Apply the trained LSTM network (denoted as LSTM* net ) is used for prediction, and the prediction process adopts an iterative method. First, the last row of data of the theoretical output Y is Y f ={f' m-L+1 ,f' m-L+1 ,…,f' m}, change Y f Input LSTM* net , the output result can be expressed as P f =LSTM* net (Y f )={p m-L+2 ,p m-L+3 ,…,p m+1}, then the predicted value at time m+1 is p m+1 Then Y f The last L-1 data points and p m+1 Merge into a new row of data Y f+1 ={f' m-L+2 ,f' m-L+3 ,…,p m+1}. f+1 Input LSTM* net , then the predicted value at time m+2 is p m+2 , and so on, the predicted sequence is P o={p m+1 ,p m+2 ,…,p n}. Next, o Perform anti-normalization to obtain the final te The corresponding prediction sequence is P te P te ={p* m+1 ,p* m+1 ,…,p* n Similarly, taking each row of X as the input of the training model can obtain the same tr The corresponding fitting sequence P tr Finally, by calculating F tr and P tr and F tr and P tr The deviation of the model is quantitatively given, and the fitting and prediction accuracy of the model is given.

[0054] In step 5, the specific method of using the ant colony algorithm to optimize the parameters of the LSTM model obtained in step 4 is:

[0055] 1) Randomly generate an ant population with multiple individuals.

[0056] 2) Initialization parameters: ant scale (number of ants) M, maximum number of iterations Nmax, initial number of iterations N=1, pheromone importance factor α, heuristic function importance factor β, pheromone volatility factor ρ, total pheromone volatility Q, pheromone quantity τ ij (t) = C.

[0057] 3) The total number of parameters to be optimized is set to m, which are grouped into a set P i (1≤i≤m), each parameter randomly obtains a non-zero value to form another set S Pi .

[0058] 4) m ants are randomly placed on r vertices, all ants are started, and ant k (k = 1, 2, ..., M) randomly moves from S Pi A set of parameter values ​​is obtained from the set, and the next set of parameter values ​​in the set is selected according to formula (1) (the probability formula for ant colony path selection), until each ant completely obtains a set of parameter values. The probability formula is shown in formula (1).

[0059] 5) Take the values ​​obtained by k (k = 1, 2, ..., M) ants as LSTM parameters, train the samples, and obtain the error value σ between the actual output and the expected output, where σ = |Outputa-Outpute|, Outputa is the actual output, and Outpute is the expected output. Set the expected error ξ and find the output error set σ that is not greater than the expected error i(1≤i≤M), and find the minimum error. The corresponding weight threshold obtained by the ant is the optimal or better solution.

[0060] 6) When the number of iterations or the output error is not satisfied, the pheromone needs to be updated after completing a cycle, and the formula is shown in formula (2).

[0061] 7) When the number of iterations or output error does not meet the requirements, repeat the above operations.

[0062] The optimal or better weight threshold solution is obtained, applied to the LSTM model, and the training data is input to obtain the LSTM network optimized by the ant colony algorithm. The test data is brought into the network model to obtain the prediction results of the cloud server resource performance time series data.

[0063] The above preprocesses the sequence data; first obtain the minimum value of the sequence data, denoted as X min . Find the maximum value of the original data, recorded as X max . Subtract X from each data point in the sequence data. min . Divide the time series data to be processed by (X max -X min ).

[0064] The above-mentioned LSTM model is constructed and trained and predicted for the existing data; the specific method of constructing the LSTM model includes five functional modules: input layer, hidden layer, output layer, network training and network prediction. The input layer is responsible for the preliminary processing of the original response time series to meet the network input requirements, and the hidden layer adopts Figure 4 The LSTM cell represented by the graph constructs a single-layer recurrent neural network. The output layer provides the prediction result network. The network prediction module uses an iterative method to predict point by point.

[0065] The above method uses the ant colony algorithm to optimize the LSTM model parameters; uses the solution searched by the ant colony algorithm as the initial weights and thresholds of the LSTM model neural network, creates the network, sets the expected error and number of iterations, and trains the network until the error meets the requirements or the number of iterations reaches the requirements, inputs the cloud server resource performance time series test data, and predicts the response time.

[0066] This embodiment uses the cloud system server database query response time as an example. The data sequence is as follows: Figure 1 The prediction results of the LSTM-ACO model are compared with those of the support vector machine (SVM) and the LSTM single model. Figure 6 (The results are taken at intervals of 15) as shown in the figure. The absolute error comparison of each point in the sequence data is as follows: Figure 7(The results are taken at intervals of 15 points) As shown, the convergence trends of different models are compared. Figure 8 The error comparison of different models is shown in Table 1. We use root mean square error RMSE, mean absolute error MAE and mean absolute percentage error MAPE as evaluation indicators, as shown in formulas (3), (4) and (5), respectively, where RMSE is the standard deviation, N is the number of data samples, and y predictive is the predicted value, y true is the actual value.

[0067]

[0068]

[0069]

[0070] Table 1 Comparison of prediction errors of different models

[0071]

[0072] The specific steps are as follows:

[0073] Step 1: Collect resource and performance data of the cloud server system.

[0074] Step 2: Obtain cloud server resource and performance sequence data, including: CPU idle rate, available memory, average load and response time.

[0075] Step 3: Data preprocessing. Before predicting the aging of cloud servers, the data needs to be preprocessed. Otherwise, the convergence of the model prediction process is poor, which increases the difficulty and time of data training, and finally leads to large prediction errors. We use the normalization method to map the original data of the cloud server to the interval [0,1], so that the prediction model is stable and the prediction convergence speed is fast. The processing results are as follows: Figure 2 As shown. Specifically including the following steps:

[0076] Step 3.1, find the minimum and maximum values ​​of the sequence data, the minimum value is recorded as X min , the maximum value is recorded as X max ;

[0077] Step 3.2, use the sequence data to subtract X min ;

[0078] Step 3.3, use the sequence data obtained in step 3.2 and divide it by the maximum value minus the minimum value, that is, X max -X min .

[0079] Step 4: The specific method for constructing the LSTM model includes five functional modules: an input layer, a hidden layer, an output layer, network training, and network prediction. As Figure 3 shown, the input layer is responsible for the preliminary processing of the original response time series to meet the network input requirements. The hidden layer uses Figure 4 the LSTM cells shown to build a single-layer recurrent neural network. The output layer provides the prediction result network, and the network prediction uses an iterative method for point-by-point prediction.

[0080] Step 4.1: First, in the input layer, define the original response time series after normalization as F o = {f1, f2, …, f n}, then the divided training set and test set can be expressed as F tr = {f1, f2, …, f m} and F te = {f m+1 , f m+2 , …, f n}, satisfying the constraint conditions m < n and m, n ∈ N. To adapt to the characteristics of the hidden layer input, apply the data segmentation method to process F tr . Let the segmentation length be L, then the segmented model is X = {X1, X2, …, X L}, X p = {f p , f p+1 , …, f m-L+p-1}, 1 ≤ p ≤ L; p, L ∈ N. The corresponding theoretical output is Y = {Y1, Y2, …, Y L}, Y P = {f p+1 , f p+2 , …, f m-L+p}.

[0081] Step 4.2: Input X into the hidden layer. The hidden layer contains L isomorphic LSTM cells connected in sequence according to the previous and next moments. The output of X after passing through the hidden layer can be expressed as P = {P1, P2, …, P L}, P p = LSTM forward (X p , C p-1 , H p-1 ), where C p-1 and H p-1 are respectively the state and output of the previous LSTM cell; LSTM forward represents the calculation method of the LSTM forward cell. Set the size of the cell state vector to S state , then the sizes of both the C p-1 and H p-1 vectors are S stateIt can be seen that the hidden layer output P, ​​model input X and theoretical output Y are all two-dimensional arrays with dimensions (m-L, L). As an error calculation formula, the loss function of the training process can be defined as: The minimum loss function is set as the optimization goal, and the network weights are continuously updated to obtain the final hidden layer network.

[0082] Step 4.3: Apply the trained LSTM network (denoted as LSTM* net ) is used for prediction, and the prediction process adopts an iterative method. First, the last row of data of the theoretical output Y is Y f ={f' m-L+1 ,f' m-L+1 ,…,f' m}, change Y f Input LSTM* net , the output result can be expressed as P f =LSTM* net (Y f )={p m-L+2 ,p m-L+3 ,…,p m+1}, then the predicted value at time m+1 is p m+1 Then Y f The last L-1 data points and p m+1 Merge into a new row of data Y f+1 ={f' m-L+2 ,f' m-L+3 ,…,p m+1}. f+1 Input LSTM* net , then the predicted value at time m+2 is p m+2 , and so on, the predicted sequence is P o ={p m+1 ,p m+2 ,…,p n}. Next, o Perform anti-normalization to obtain the final te The corresponding prediction sequence is P te P te ={p* m+1 ,p* m+1 ,…,p* n Similarly, taking each row of X as the input of the training model can obtain the same tr The corresponding fitting sequence P tr Finally, by calculating F tr and P tr and F tr and P trThe deviation of the model is quantitatively given, and the fitting and prediction accuracy of the model is given.

[0083] Step 5: Use the ant colony algorithm to optimize the parameters of the LSTM model obtained in step 4, such as Figure 5 As shown,

[0084] Step 5.1, randomly generate an ant population with multiple individuals;

[0085] Step 5.2, initialization parameters: ant scale (number of ants) is M, set the maximum number of iterations to Nmax, the first number of iterations N = 1, pheromone importance factor α, heuristic function importance factor β, pheromone volatility factor ρ, pheromone volatility total amount Q, pheromone amount τ ij (t) = C;

[0086] Step 5.3, the total number of parameters to be optimized is set to m, which are grouped into a set P i (1≤i≤m), each parameter randomly obtains a non-zero value to form another set S Pi .

[0087] Step 5.4, m ants are randomly placed on r vertices, all ants are started, and ant k (k = 1, 2, ..., M) randomly starts from S Pi Obtain a set of parameter values, and select the next set of parameter values ​​in the set according to formula (1) (ant colony path selection probability formula), until each ant completely obtains a set of parameter values;

[0088] Take the values ​​obtained by k (k = 1, 2, ..., M) ants as LSTM parameters, train the samples, and obtain the error value σ between the actual output and the expected output, where σ = |Outputa-Outpute|, Outputa is the actual output, and Outpute is the expected output. Set the expected error ξ and find the output error set σ that is not greater than the expected error i (1≤i≤M), and find the minimum error. The corresponding weight threshold obtained by the ant is the optimal or better solution.

[0089] When the number of iterations or the output error is not satisfied, after completing one cycle, the pheromone is updated according to formula (2).

[0090] When the number of iterations or output error does not meet the requirements, repeat the above operations.

[0091] Step 6: Apply the optimal or better weight threshold solution obtained in the above steps to the LSTM model, input the training data, obtain the LSTM network optimized by the ant colony algorithm, bring the test data into the network model, and obtain the prediction results of the cloud server resource performance time series data.

Claims

1. A method for predicting cloud server resource performance based on the LSTM-ACO model, characterized in that: The following steps are involved: Step 1: Collect resource and performance data of the cloud server; Step 2: Obtain cloud server resource and performance sequence data, including: CPU idle rate, available memory, average load, and response time; Step 3, performing preprocessing operations on the sequence data obtained in step 2; Step 4, using the data obtained in step 3 to build an LSTM model, and using the model to obtain the predicted value of the LSTM model for the data obtained in step 3; Step 5: Use the ant colony algorithm to optimize the parameters of the LSTM model obtained in step 4 and build a LSTM-ACO model; Step 6, use the LSTM-ACO model obtained in step 5 to predict the data obtained in step 3 and compare it with the data obtained in step 4; Step 7: Use the predicted value of the LSTM-ACO model and the existing sequence data to predict future data; In step 4, the method of constructing the LSTM model is: The constructed model includes five functional modules: input layer, hidden layer, output layer, network training and network prediction. The input layer is responsible for the preliminary processing of the original response time series to meet the network input requirements. The hidden layer uses LSTM cells to build a single-layer recurrent neural network. The output layer provides a prediction result network. The network prediction uses an iterative method to predict point by point. In step 5, the specific method of optimizing the LSTM model using the ant colony algorithm is: 1) Randomly generate an ant population with multiple individuals; 2) Initialization parameters: ant scale M, maximum number of iterations Nmax, initial number of iterations N=1, pheromone importance factor α, heuristic function importance factor β, pheromone volatility factor ρ, total pheromone volatility Q, pheromone quantity τ ij (t) = C; 3) The total number of parameters to be optimized is set to m, which are grouped into a set P i , 1≤i≤m, each parameter randomly obtains a non-zero value to form another set S Pi ; 4) m ants are randomly placed on r vertices, all ants are started, ant k, k = 1, 2, ..., M; randomly from S Pi Get a set of parameter values, and select the next set of parameter values ​​in the set according to the ant colony path selection probability formula (1), until each ant completely obtains a set of parameter values. The probability formula is as follows: where τ j (S Pi ) is the set S Pi The pheromone concentration of a certain j-group weight threshold combination; 5) Take k, k = 1, 2, ..., M; the values ​​obtained by the ants as LSTM parameters, train the samples, and obtain the error value σ between the actual output and the expected output, where σ = |Outputa-Outpute|, Outputa is the actual output, and Outpute is the expected output; set the expected error ξ, and find the output error set σ that is not greater than the expected error i , 1≤i≤M, and find the minimum error, the corresponding weight threshold obtained by the ant is the optimal or better solution; 6) When the number of iterations or the output error is not satisfied, the pheromone needs to be updated after completing a cycle. The formula is as follows: in Indicates that the kth ant in the next cycle is in the set S Pi , the pheromone concentration released by the jth element on the path; Indicates that all ants are in the set S Pi The concentration of pheromone released by the jth element on the path; 7) When the number of iterations or output error does not meet the requirements, repeat the above operations.

2. The method for predicting cloud server resource performance based on the LSTM-ACO model according to claim 1 is characterized in that: In step 3, the sequence data is preprocessed using a normalization method to map the original sequence data to [0, 1]. The specific method is: The maximum and minimum values ​​of the sequence data are calculated and recorded as X max and X min ; Subtract X from each data point in the sequence data min Divide by X max -X min .

3. The method for predicting cloud server resource performance based on the LSTM-ACO model according to claim 1 is characterized in that: The specific steps of constructing the LSTM model are: First, in the input layer, define the original response time series after normalization as F o ={f1, f2, …, f n}, then the divided training set and test set can be expressed as F tr ={f1, f2, …, f s} and F te ={f s+1 , f s+2 , …, f n}, satisfying the constraint conditions s < n and s, n ∈ N; To adapt to the characteristics of the hidden layer input, the data segmentation method is applied to process F tr . Let the segmentation length be L, then the segmented model is X = {X1, X2, …, X L}, X p ={f p , f p+1 , …, f m-L+p-1}, and 1 ≤ p ≤ L; p, L ∈ N; The corresponding theoretical output is Y={Y1,Y2,…,Y L },Y P ={f p+1 ,f p+2 ,…,f m-L+p }; Next, X is input into the hidden layer, which contains L isomorphic LSTM cells connected at the previous and next moments. The output of X after passing through the hidden layer can be expressed as P p =LSTM forward (X p ,C p-1 ,H p-1 ), where C p-1 and H p-1 are the state and output of the previous LSTM cell respectively; LSTM forward Represents the LSTM forward cell calculation method; sets the cell state vector size to S state , then C p-1 and H p-1 The magnitude of both vectors is S state ; It can be seen that the hidden layer output Model input X and theoretical output They are all two-dimensional arrays with dimension (s-L,L); the mean square error is used As an error calculation formula, the loss function of the training process can be defined as: The minimum loss function is set as the optimization goal, and the network weights are continuously updated to obtain the final hidden layer network.

4. The method for predicting cloud server resource performance based on the LSTM-ACO model according to claim 1 is characterized in that: The LSTM model includes an input layer, a hidden layer and an output layer, wherein the sequence data obtained in step 3 and the prediction result of the LSTM model in step 4 are used as inputs of the input layer, and the output layer is the prediction result of the LSTM-ACO model; the hidden layer uses tanh as an activation function.

Citation Information

Patent Citations

  • Prediction-based virtual network function scheduling method for 5G network slices

    CN108965024A

  • A BP neural network used car price evaluation algorithm based on improved ant colony algorithm

    CN109034898A