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

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

Info

Publication number
CN112631890A
CN112631890A CN202011642231.4A CN202011642231A CN112631890A CN 112631890 A CN112631890 A CN 112631890A CN 202011642231 A CN202011642231 A CN 202011642231A CN 112631890 A CN112631890 A CN 112631890A
Authority
CN
China
Prior art keywords
lstm
model
output
aco
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011642231.4A
Other languages
Chinese (zh)
Inventor
孟海宁
李维
石月开
童新宇
冯锴
朱磊
黑新宏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian University of Technology
Original Assignee
Xian University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xian University of Technology filed Critical Xian University of Technology
Priority to CN202011642231.4A priority Critical patent/CN112631890A/en
Publication of CN112631890A publication Critical patent/CN112631890A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • G06F11/3433Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment for load management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/049Temporal neural networks, e.g. delay elements, oscillating neurons or pulsed inputs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Biophysics (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a method for predicting cloud server resource performance based on an LSTM-ACO model, which comprises the steps of preprocessing time sequence data and mapping original sequence data to a [0,1] interval. The LSTM model is then determined, trained and predicted on existing data, and optimized using the ant colony algorithm. And finally, inputting the prediction result of the LSTM model for the data at the time t and the data at the times t-1, t-2, … and t-n into the LSTM-ACO model, and predicting the data at the time t. The method for predicting the cloud server resource performance based on the LSTM-ACO model solves the problem that the accuracy is low in the prediction process of the traditional prediction method, optimizes the LSTM parameters by using the ACO, avoids the problem that the model falls into the local optimal solution, and improves the prediction convergence speed. Finally, the resource and performance of the cloud server are predicted, and the software aging phenomenon is predicted more accurately.

Description

Method for predicting cloud server resource performance based on LSTM-ACO model
Technical Field
The invention belongs to the technical field of time sequence prediction, and particularly relates to a method for predicting resource performance of a cloud server based on a model of a long short-term memory (LSTM) recurrent neural network and an Ant Colony Optimization (ACO).
Background
With the development of modern computer technology and cloud computing, cloud servers are increasingly used. Cloud servers have the characteristics of long-term operation, high complexity, and frequent resource exchange, which increases the risk of resource exhaustion and software system abnormalities and failures. As failures and resource consumption accumulate, the cloud server system may experience slow performance degradation, failure rate increases and even crashes. This phenomenon is called "software aging". The main causes of software aging include consumption of operating system resources, corruption of data, and accumulation of errors. These phenomena are all accumulating over time, degrading the performance of the software and possibly leading to sudden crashes or shutdowns of the software system.
In important systems, such as military defense, telecommunication systems, financial systems, security systems, business systems, etc., system error factors are concentrated in software systems as the complexity of the systems increases, and the problem of increasing concern is software aging. Once the software of the system fails, the normal operation of the whole business system is affected, and immeasurable economic loss is brought to enterprise business units.
A common method of dealing with software aging is the "software regeneration" technique. The technique proactively restores the system before a global fault or a partial fault occurs by clearing the fault. Software regeneration techniques depend largely on the time of software regeneration. Downtime or overhead caused by such operations is not negligible and frequent software regeneration may negatively impact system availability. And the ideal software regeneration strategy is to recover before the system approaches failure.
Therefore, the aging trend of the software is accurately predicted, the aging threshold value is calculated, and a theoretical basis can be provided for online pre-maintenance of the cloud system. The existing method for predicting the aging trend of cloud server system software is mostly time series analysis or intelligent algorithm. The time series analysis method adopts models such as a recurrent neural network and particle filtering to predict the trend, the models are simple, but the needed data volume is large, and the prediction precision of the data with large fluctuation is low. The intelligent algorithm comprises a neural network, a support vector machine and the like, and the prediction accuracy of the algorithm is not high when the time series data are predicted. The cloud server resources and the performance data have the characteristics of nonlinearity, randomness and burstiness, so the prediction accuracy of the cloud server resources and the performance data in the conventional prediction method is not high, and particularly the prediction accuracy is lower in an interval with severe data change.
Disclosure of Invention
The invention aims to provide a cloud server resource performance prediction method using an LSTM-ACO model. The problem that the traditional prediction method is low in prediction precision on cloud server resource performance data with large fluctuation is solved. And moreover, a time series data calculation method for optimizing parameters by using an ant colony algorithm is provided, and the problems that a local optimal solution is easy to fall into in a model prediction process, and the convergence speed is low and unstable are solved. The LSTM-ACO prediction method can extract the characteristic change of the cloud server system, finally realize high-accuracy prediction and analysis of the performance parameters of the cloud server system, and predict the software aging phenomenon more accurately.
The technical scheme adopted by the invention is that a cloud server resource performance prediction method using an LSTM-ACO model comprises the following steps:
step 1, collecting resource and performance data of a cloud server system;
step 2, acquiring resource and performance sequence data of the cloud server system, wherein the resource and performance sequence data comprises: CPU idle rate, available memory, average load and response time;
step 3, carrying out preprocessing operation on the sequence data acquired in the step 2;
step 4, constructing an LSTM model by using the data obtained in the step 3, and obtaining a predicted value of the LSTM model to the data obtained in the step 3;
step 5, carrying out parameter optimization on the LSTM model obtained in the step 4 by using an ant colony algorithm to obtain an LSTM-ACO model;
step 6, predicting the data obtained in the step 3 by using the LSTM-ACO model obtained in the step 5 and comparing the data obtained in the step 4;
and 7, predicting future data by using the predicted value of the LSTM-ACO model and the existing sequence data.
In step 3, the sequence data is preprocessed by a normalization processing method, and the original sequence data is mapped to [0,1]]The interval is specifically as follows: calculating the maximum value and the minimum value of the sequence data, and respectively recording as XmaxAnd Xmin(ii) a X is then subtracted from each of the sequence dataminIs then divided by Xmax-Xmin
In step 4, the specific method for constructing the LSTM model comprises 5 functional modules of an input layer, a hidden layer, an output layer, network training and network prediction. The input layer is responsible for carrying out preliminary processing on the original response time sequence to meet the network input requirement, the hidden layer establishes a single-layer cyclic neural network, the output layer provides a prediction result network, and the network prediction module adopts an iterative method to predict point by point.
Firstly, defining the normalized original response time sequence as F in the input layero={f1,f2,…,fnH, the divided training set and test set can be represented as Ftr={f1,f2,…,fmAnd Fte={fm+1,fm+2,…,fnMeet the constraint condition m<N and m, N ∈ N. In order to adapt to the characteristic of hidden layer input, a data segmentation method is applied to FtrProcessing is carried out, and if the segmentation length is set to be L, the segmented model is X ═ X1,X2,…,XL},Xp={fp,fp+1,…,fm-L+p-1P is more than or equal to 1 and less than or equal to L; p, L ∈ N. The corresponding theoretical output is Y ═ Y1,Y2,…,YL},YP={fp+1,fp+2,…,fm-L+p}。
Next, X is input into a hidden layer, where the hidden layer contains L isomorphic LSTM cells connected at successive times, and the output of X after passing through the hidden layer can be expressed as P ═ P1,P2,…,PL},Pp=LSTMforward(Xp,Cp-1,Hp-1) In the formula Cp-1And Hp-1The state and output of the previous LSTM cell, respectively; LSTMforwardThe LSTM forward cell calculation method is shown. Setting the magnitude of the cell state vector to SstateThen C isp-1And Hp-1Both vectors are Sstate. It can be seen that the hidden layer output P, the model input X and the theoretical output Y are all two-dimensional arrays with dimensions (m-L, L). Selecting mean square error
Figure BDA0002879993040000041
As an error calculation formula, the loss function of the training process can be defined as:
Figure BDA0002879993040000042
Figure BDA0002879993040000043
and setting the minimum loss function as an optimization target, and continuously updating the network weight to further obtain a final hidden layer network.
In step 5, the specific method for performing parameter optimization on the LSTM model obtained in step 4 by using the ant colony algorithm is as follows:
1) a population of ants with multiple individuals is randomly generated.
2) Initializing parameters: ant size (ant number) M, maximum iteration number Nmax, initial iteration number N equal to 1, pheromone importance degree factor alpha, heuristic function importance degree factor beta, pheromone volatilization factor rho and informationTotal amount Q of volatile element and pheromone amount tauij(t)=C。
3) Setting the total number of the parameters to be optimized as m, and forming a set Pi(1 ≦ i ≦ m), randomly acquiring a non-zero value for each parameter, and forming another set SPi
4) M ants are randomly placed on r vertexes, all ants are started, and ant k (k is 1,2, …, M) is randomly selected from SPiAnd (3) acquiring a group of parameter values, and selecting the next group of parameter values in the set according to a formula (1) (an ant colony path selection probability formula) until each ant completely acquires a group of parameter values. The probability formula is as follows (1):
Figure BDA0002879993040000051
wherein tau isj(SPi) Is a set SPiThe pheromone concentration of a certain j group weight threshold combination.
5) Taking the value obtained by k (k is 1,2, …, M) ants as LSTM parameters, training the sample, and obtaining an error value σ between the actual output and the expected output, where σ is | Outputa-output |, Outputa is the actual output, and output is the expected output. Setting the expected error xi, and finding out the output error set sigma not greater than the expected errori(i is more than or equal to 1 and less than or equal to M), and finding the minimum error, wherein the weight threshold value obtained by the corresponding ant is the optimal or better solution.
6) When the iteration times or the output error does not meet the requirement, the pheromone needs to be updated after one cycle is completed, and the formula is as follows:
Figure BDA0002879993040000052
wherein
Figure BDA0002879993040000053
Indicates that the kth ant in the sub-cycle is in the set SPiThe pheromone concentration released by the jth element on the path;
Figure BDA0002879993040000061
indicates that all ants are in the set SPiThe pheromone concentration released by the jth element on the pathway.
7) And when the iteration times or the output error does not meet the requirement, repeating the operation.
The invention has the beneficial effects that: the invention aims to provide a method for predicting the performance of cloud server resources based on an LSTM-ACO model, which solves the problem that the conventional prediction method is low in accuracy of predicting the performance data of the cloud server resources with large fluctuation. And the time series data calculation method for optimizing the parameters by using the ant colony algorithm is provided, and the problems that the model is easy to fall into a local optimal solution in the prediction process, and the convergence speed is low and unstable are solved. Finally, the resource and performance of the cloud server are predicted and analyzed, and the software aging phenomenon is predicted more accurately.
Drawings
FIG. 1 is a diagram of a database query response time of a cloud server system in the method for predicting cloud server resource performance based on an LSTM-ACO model according to the present invention;
FIG. 2 is a diagram of a mapping value of response time in the method for predicting cloud server resource performance based on the LSTM-ACO model according to the present invention;
FIG. 3 is a time sequence prediction block diagram in the method for predicting cloud server resource performance based on the LSTM-ACO model according to the present invention;
FIG. 4 is a cell structure diagram of a single LSTM hidden layer in the method for predicting cloud server resource performance based on the LSTM-ACO model according to the present invention;
FIG. 5 is a flow chart of the ACO optimization LSTM parameter in the method for predicting cloud server resource performance based on the LSTM-ACO model according to the present invention;
FIG. 6 is a diagram illustrating a comparison between the LSTM-ACO model and other models in the method for predicting cloud server resource performance based on the LSTM-ACO model according to the present invention;
FIG. 7 is a diagram of absolute error values of each point prediction of the LSTM-ACO model and other models in the method for predicting cloud server resource performance based on the LSTM-ACO model according to the present invention;
FIG. 8 is a comparison graph of 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.
Detailed Description
The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
The invention discloses a method for predicting the resource performance of a cloud server based on an LSTM-ACO model, which comprises the following steps:
step 1, collecting resource and performance data of a cloud server.
Step 2, acquiring resource and performance sequence data of the cloud server, wherein the resource and performance sequence data comprises: CPU idle, available memory, average load, and response time.
And 3, carrying out preprocessing operation on the sequence data acquired in the step 2.
And 4, constructing an LSTM model by using the data obtained in the step 3, and obtaining a predicted value of the LSTM model to the data obtained in the step 3 by using the model.
And 5, performing parameter optimization on the LSTM model obtained in the step 4 by using an ant colony algorithm to construct an LSTM-ACO model.
And 6, predicting the data obtained in the step 3 by using the LSTM-ACO model obtained in the step 5 and comparing the data with the data obtained in the step 4.
And 7, predicting future data by using the predicted value of the LSTM-ACO model and the existing sequence data.
In step 3, in order to improve the accuracy of the prediction result, normalization processing needs to be performed on different dimension data of the sequence data, and the original sequence data is mapped to [0,1]]The interval is specifically as follows: firstly, calculating to obtain the maximum value and the minimum value of the sequence data, and respectively marking as XmaxAnd Xmin(ii) a X is then subtracted from each of the sequence dataminIs then divided by Xmax-Xmin。XiNormalizing the data value of the ith sample of the input layer; xminThe minimum sample data value after normalization in the input layer; xmaxThe maximum sample data value after normalization in the input layer.
In step 4, the specific method for constructing the LSTM model comprises 5 functional modules of an input layer, a hidden layer, an output layer, network training and network prediction. The input layer is responsible for carrying out preliminary processing on the original response time sequence to meet the network input requirement, the hidden layer establishes a single-layer cyclic neural network, the output layer provides a prediction result network, and the network prediction module adopts an iterative method to predict point by point.
Firstly, defining the normalized original response time sequence as F in the input layero={f1,f2,…,fnH, the divided training set and test set can be represented as Ftr={f1,f2,…,fmAnd Fte={fm+1,fm+2,…,fnMeet the constraint condition m<N and m, N ∈ N. In order to adapt to the characteristic of hidden layer input, a data segmentation method is applied to FtrProcessing is carried out, and if the segmentation length is set to be L, the segmented model is X ═ X1,X2,…,XL},Xp={fp,fp+1,…,fm-L+p-1P is more than or equal to 1 and less than or equal to L; p, L ∈ N. The corresponding theoretical output is Y ═ Y1,Y2,…,YL},YP={fp+1,fp+2,…,fm-L+p}。
Next, X is input into a hidden layer, where the hidden layer contains L isomorphic LSTM cells connected at successive times, and the output of X after passing through the hidden layer can be expressed as P ═ P1,P2,…,PL},Pp=LSTMforward(Xp,Cp-1,Hp-1) In the formula Cp-1And Hp-1The state and output of the previous LSTM cell, respectively; LSTMforwardThe LSTM forward cell calculation method is shown. Setting the magnitude of the cell state vector to SstateThen C isp-1And Hp-1Both vectors are Sstate. It can be seen that the hidden layer output P, the model input X and the theoretical output Y are all two-dimensional arrays with dimensions (m-L, L). Selecting mean square error
Figure BDA0002879993040000091
As an error calculation formula, the loss function of the training process can be defined as:
Figure BDA0002879993040000092
Figure BDA0002879993040000093
and setting the minimum loss function as an optimization target, and continuously updating the network weight to further obtain a final hidden layer network.
Using a trained LSTM network (denoted LSTM;)net) And (4) predicting, wherein an iterative method is adopted in the prediction process. First, the last line of data of the theoretical output Y is Yf={f’m-L+1,f’m-L+1,…,f’mH is reaction of YfInput LSTMnetThe output result can be expressed as Pf=LSTM*net(Yf)={pm-L+2,pm-L+3,…,pm+1The predicted value at the m +1 moment is pm+1. Then Y is putfLast L-1 data points of (1) and pm+1Merge into a new line of data Yf+1={f’m-L+2,f’m-L+3,…,pm+1}. Will Yf+1Input LSTMnetIf the predicted value at the time m +2 is pm+2And the prediction sequence obtained by analogy is Po={pm+1,pm+2,…,pn}. Then to PoPerforming inverse normalization to obtain final product FteThe corresponding prediction sequence is PteIs Pte={p*m+1,p*m+1,…,p*n}. Similarly, each row of X is used as the input of the training model to obtain the training set FtrCorresponding fitting sequence Ptr. Finally by calculating FtrAnd PtrAnd FtrAnd PtrThe fitting and prediction accuracy of the model is quantitatively given.
In step 5, the specific method for performing parameter optimization on the LSTM model obtained in step 4 by using the ant colony algorithm is as follows:
1) a population of ants with multiple individuals is randomly generated.
2) Initializing parameters: ant size (ant number) M, maximum iteration number Nmax, initial iteration number N equal to 1, pheromone importance degree factor alpha, heuristic function importance degree factor beta, pheromone volatilization factor rho, pheromone volatilization total quantity Q, and pheromone quantity tauij(t)=C。
3) Setting the total number of the parameters to be optimized as m, and forming a set Pi(1 ≦ i ≦ m), randomly acquiring a non-zero value for each parameter, and forming another set SPi
4) M ants are randomly placed on r vertexes, all ants are started, and ant k (k is 1,2, …, M) is randomly selected from SPiAnd (3) acquiring a group of parameter values, and selecting the next group of parameter values in the set according to a formula (1) (an ant colony path selection probability formula) until each ant completely acquires a group of parameter values. The probability formula is shown in formula (1).
5) Taking the value obtained by k (k is 1,2, …, M) ants as LSTM parameters, training the sample, and obtaining an error value σ between the actual output and the expected output, where σ is | Outputa-output |, Outputa is the actual output, and output is the expected output. Setting the expected error xi, and finding out the output error set sigma not greater than the expected errori(i is more than or equal to 1 and less than or equal to M), and finding the minimum error, wherein the weight threshold value obtained by the corresponding ant is the optimal or better solution.
6) When the iteration number or the output error does not meet the requirement, the pheromone needs to be updated after one cycle is completed, and the formula is shown as a formula (2).
7) And when the iteration times or the output error does not meet the requirement, repeating the operation.
And obtaining an optimal or better weight threshold solution, acting on the LSTM model, inputting training data to obtain the LSTM network optimized by the ant colony algorithm, and bringing test data into the network model to obtain a prediction result of the cloud server resource performance time series data.
Preprocessing the sequence data; first, the minimum value of the sequence data is obtained and marked as Xmin. Finding the maximum value of the raw data, denoted Xmax. Subtracting X from each of the sequence datamin. Dividing time series data to be processed by (X)max-Xmin)。
Constructing an LSTM model, training and predicting the existing data; the specific method for constructing the LSTM model comprises 5 functional modules of an input layer, a hidden layer, an output layer, network training and network prediction. The input layer is responsible for carrying out preliminary processing on the original response time sequence to meet the network input requirement, the hidden layer adopts the LSTM cell represented by the figure 4 to build a single-layer cyclic neural network, the output layer provides a prediction result network, and the network prediction module adopts an iterative method to predict point by point.
Optimizing LSTM model parameters by utilizing an ant colony algorithm; and establishing the network by using the solution searched by the ant colony algorithm as an initial weight and a threshold of the LSTM model neural network, setting an expected error and iteration times, training the network until the error meets the requirement or the iteration times meet the requirement, inputting cloud server resource performance time sequence test data, and predicting response time.
The cloud system server database query response time is taken as an example in the embodiment, and the data sequence is as shown in fig. 1. A graph comparing the prediction result of the LSTM-ACO model with the prediction effect of a Support Vector Machine (SVM) and an LSTM single model is shown in FIG. 6 (taking points at intervals of 15 for the result), the absolute error pairs of each point of sequence data are shown in FIG. 7 (taking points at intervals of 15 for the result), the convergence tendency pairs of different models are shown in FIG. 8, the error pairs of different models are shown in Table 1, the root mean square error RMSE, the mean absolute error MAE and the mean absolute percentage error MAPE are respectively used as evaluation indexes and are respectively shown in formulas (3) (4) (5), wherein RMSE is standard deviation, N is the number of data samples, y is the number of data samplespredictiveTo predict value, ytrueIs the actual value.
Figure BDA0002879993040000111
Figure BDA0002879993040000121
Figure BDA0002879993040000122
TABLE 1 comparison of prediction errors for different models
Figure BDA0002879993040000123
The method comprises the following specific steps:
step 1: resource and performance data of the cloud server system is collected.
Step 2: acquiring cloud server resource and performance sequence data, wherein the resource and performance sequence data comprises: CPU idle, available memory, average load, and response time.
And step 3: and (4) preprocessing data. Before aging prediction is carried out on the cloud server, data needs to be preprocessed, otherwise, the convergence of the model prediction process is poor, so that the data training difficulty and time are increased, and finally, the prediction error is large. The cloud server original data are mapped to the interval [0,1] by adopting a normalization processing method, so that a prediction model is stable, the prediction convergence speed is high, and the processing result is shown in fig. 2. The method specifically comprises the following steps:
step 3.1, find the minimum and maximum of the sequence data, the minimum is marked as XminAnd the maximum value is Xmax
Step 3.2, subtract X from sequence datamin
Step 3.3, dividing the sequence data obtained in step 3.2 by the maximum minus minimum value, i.e. Xmax-Xmin
And 4, step 4: the specific method for constructing the LSTM model comprises 5 functional modules of an input layer, a hidden layer, an output layer, network training and network prediction. As shown in fig. 3, the input layer is responsible for performing preliminary processing on the original response time sequence to meet the network input requirement, the hidden layer adopts the LSTM cells shown in fig. 4 to build a single-layer recurrent neural network, the output layer provides a prediction result network, and the network prediction adopts an iterative method to predict point by point.
Step 4.1: firstly, defining the normalized original response time sequence as F in the input layero={f1,f2,…,fnH, the divided training set and test set can be represented as Ftr={f1,f2,…,fmAnd Fte={fm+1,fm+2,…,fnMeet the constraint condition m<N and m, N ∈ N. In order to adapt to the characteristic of hidden layer input, a data segmentation method is applied to FtrProcessing is carried out, and if the segmentation length is set to be L, the segmented model is X ═ X1,X2,…,XL},Xp={fp,fp+1,…,fm-L+p-1P is more than or equal to 1 and less than or equal to L; p, L ∈ N. The corresponding theoretical output is Y ═ Y1,Y2,…,YL},YP={fp+1,fp+2,…,fm-L+p}。
Step 4.2: inputting X into a hidden layer, the hidden layer comprising L isomorphic LSTM cells connected at successive times, and the output of X after passing through the hidden layer may be expressed as P ═ P1,P2,…,PL},Pp=LSTMforward(Xp,Cp-1,Hp-1) In the formula Cp-1And Hp-1The state and output of the previous LSTM cell, respectively; LSTMforwardThe LSTM forward cell calculation method is shown. Setting the magnitude of the cell state vector to SstateThen C isp-1And Hp-1Both vectors are Sstate. It can be seen that the hidden layer output P, the model input X, and the theoretical output Y are all two-dimensional arrays with dimensions (m-L, L). Selecting mean square error
Figure BDA0002879993040000131
As an error calculation formula, the loss function of the training process can be defined as:
Figure BDA0002879993040000132
Figure BDA0002879993040000141
and setting the minimum loss function as an optimization target, and continuously updating the network weight to further obtain a final hidden layer network.
Step 4.3: using a trained LSTM network (denoted LSTM;)net) And (4) predicting, wherein an iterative method is adopted in the prediction process. First, the last line of data of the theoretical output Y is Yf={f’m-L+1,f’m-L+1,…,f’mH is reaction of YfInput LSTMnetThe output result can be expressed as Pf=LSTM*net(Yf)={pm-L+2,pm-L+3,…,pm+1The predicted value at the m +1 moment is pm+1. Then Y is putfLast L-1 data points of (1) and pm+1Merge into a new line of data Yf+1={f’m-L+2,f’m-L+3,…,pm+1}. Will Yf+1Input LSTMnetIf the predicted value at the time m +2 is pm+2And the prediction sequence obtained by analogy is Po={pm+1,pm+2,…,pn}. Then to PoPerforming inverse normalization to obtain final product FteThe corresponding prediction sequence is PteIs Pte={p*m+1,p*m+1,…,p*n}. Similarly, each row of X is used as the input of the training model to obtain the training set FtrCorresponding fitting sequence Ptr. Finally by calculating FtrAnd PtrAnd FtrAnd PtrThe fitting and prediction accuracy of the model is quantitatively given.
And 5: the LSTM model obtained in step 4 is optimized by ant colony algorithm, as shown in fig. 5,
step 5.1, randomly generating an ant population with a plurality of individuals;
step 5.2, initializing parameters: the ant scale (number of ants) is M, the maximum iteration number is Nmax, the initial iteration number is N1, the pheromone importance degree factor alpha and the heuristic functionNumber importance factor beta, pheromone volatilization factor rho, total pheromone volatilization amount Q, and pheromone amount tauij(t)=C;
Step 5.3, the total number of the parameters to be optimized is set as m, and the m parameters are combined into a set Pi(1 ≦ i ≦ m), randomly acquiring a non-zero value for each parameter, and forming another set SPi
Step 5.4, M ants are randomly placed on r vertexes, all ants are started, and ant k (k is 1,2, …, M) is randomly selected from SPiObtaining a group of parameter values, and selecting the next group of parameter values in the set according to a formula (1) (an ant colony path selection probability formula) until each ant completely obtains a group of parameter values;
taking the value obtained by k (k is 1,2, …, M) ants as LSTM parameters, training the sample, and obtaining an error value σ between the actual output and the expected output, where σ is | Outputa-output |, Outputa is the actual output, and output is the expected output. Setting the expected error xi, and finding out the output error set sigma not greater than the expected errori(i is more than or equal to 1 and less than or equal to M), and finding the minimum error, wherein the weight threshold value obtained by the corresponding ant is the optimal or better solution.
And when the iteration times or the output error does not meet the requirement, updating the pheromone according to the formula (2) after completing one cycle.
And when the iteration times or the output error does not meet the requirement, repeating the operation.
Step 6: and performing an optimal or better weight threshold solution obtained in the steps on the LSTM model, inputting training data to obtain the LSTM network optimized by the ant colony algorithm, and bringing test data into the network model to obtain a prediction result of the cloud server resource performance time series data.

Claims (6)

1. The method for predicting the resource performance of the cloud server based on the LSTM-ACO model is characterized by comprising the following steps of:
step 1, collecting resource and performance data of a cloud server;
step 2, acquiring resource and performance sequence data of the cloud server, wherein the resource and performance sequence data comprises: CPU idle rate, available memory, average load and response time;
step 3, carrying out preprocessing operation on the sequence data obtained in the step 2;
step 4, constructing an LSTM model by using the data obtained in the step 3, and obtaining a predicted value of the LSTM model to the data obtained in the step 3 by using the model;
step 5, performing parameter optimization on the LSTM model obtained in the step 4 by using an ant colony algorithm to construct an LSTM-ACO model;
step 6, predicting the data obtained in the step 3 by using the LSTM-ACO model obtained in the step 5 and comparing the data with the data obtained in the step 4;
and 7, predicting future data by using the predicted value of the LSTM-ACO model and the existing sequence data.
2. The method for predicting the resource performance of the cloud server based on the LSTM-ACO model according to claim 1, wherein in the step 3, the sequence data is preprocessed by a normalization processing method, and the raw sequence data is mapped to [0,1], which comprises:
calculating the maximum value and the minimum value of the sequence data, and respectively recording the maximum value and the minimum value as XmaxAnd Xmin
Subtracting X from each of the sequence dataminThen divided by Xmin-Xmin
3. The method for predicting the resource performance of the cloud server based on the LSTM-ACO model as claimed in claim 1, wherein in the step 4, the method for constructing the LSTM model is as follows:
the construction model comprises 5 functional modules of an input layer, a hidden layer, an output layer, network training and network prediction; the input layer is responsible for carrying out preliminary processing on an original response time sequence so as to meet network input requirements, the hidden layer adopts LSTM cells to build a single-layer cyclic neural network, the output layer provides a prediction result network, and network prediction adopts an iterative method to predict point by point.
4. The method for predicting the resource performance of the cloud server based on the LSTM-ACO model as claimed in claim 3, wherein the specific steps for constructing the LSTM model are as follows:
firstly, defining the normalized original response time sequence as F in the input layero={f1,f2,…,fnH, the divided training set and test set can be represented as Ftr={f1,f2,…,fmAnd Fte={fm+1,fm+2,…,fnMeet the constraint condition m<N and m, N belongs to N; in order to adapt to the characteristic of hidden layer input, a data segmentation method is applied to FtrProcessing is carried out, and if the segmentation length is set to be L, the segmented model is X ═ X1,X2,…,XL},Xp={fp,fp+1,…,fm-L+p-1P is more than or equal to 1 and less than or equal to L; p, L ∈ N. The corresponding theoretical output is Y ═ Y1,Y2,…,YL},YP={fp+1,fp+2,…,fm-L+p};
Next, X is input into a hidden layer, where the hidden layer contains L isomorphic LSTM cells connected at successive times, and the output of X after passing through the hidden layer can be expressed as P ═ P1,P2,…,PL},Pp=LSTMforward(Xp,Cp-1,Hp-1) In the formula Cp-1And Hp-1The state and output of the previous LSTM cell, respectively; LSTMforwardThe LSTM forward cell calculation method is shown. Setting the magnitude of the cell state vector to SstateThen C isp-1And Hp-1Both vectors are Sstate(ii) a It can be seen that the hidden layer output P, the model input X and the theoretical output Y are all two-dimensional arrays with dimensions (m-L, L). Selecting mean square error
Figure FDA0002879993030000021
As an error calculation formula, the loss function of the training process can be defined as:
Figure FDA0002879993030000032
Figure FDA0002879993030000033
and setting the minimum loss function as an optimization target, and continuously updating the network weight to further obtain a final hidden layer network.
5. The method for predicting the resource performance of the cloud server based on the LSTM-ACO model according to claim 1, wherein in the step 5, the specific method for optimizing the LSTM model by using the ant colony optimization method is as follows:
1) randomly generating an ant population with a plurality of individuals;
2) initializing parameters: ant size M, maximum iteration number Nmax, initial iteration number N equal to 1, pheromone importance degree factor alpha, heuristic function importance degree factor beta, pheromone volatilization factor rho, total pheromone volatilization quantity Q and pheromone quantity tauij(t)=C;
3) Setting the total number of the parameters to be optimized as m, and forming a set PiI is more than or equal to 1 and less than or equal to m, each parameter randomly acquires a non-zero value to form another set SPi
4) Randomly placing M ants on r vertexes, starting all ants, wherein k is 1,2, … and M; random slave SPiAnd (3) acquiring a group of parameter values, selecting a probability formula according to the ant colony path selection formula (1), and selecting the next group of parameter values in the set until each ant completely acquires a group of parameter values. The probability formula is as follows (1):
Figure FDA0002879993030000031
wherein tau isj(SPi) Is a set SPiThe pheromone concentration of a certain j group weight threshold value combination;
5) mixing k, k-1, 2, …, M; the values obtained by ants are used as LSTM parameters, and the samples are trained to obtain the error value sigma between the actual output and the expected output, whereinσ is | Outputa-output |, Outputa is the actual output, and output is the desired output. Setting the expected error xi, and finding out the output error set sigma not greater than the expected erroriI is more than or equal to 1 and less than or equal to M, and the minimum error is found, and the weight threshold value obtained by the corresponding ant is the optimal or better solution;
6) when the iteration times or the output error does not meet the requirement, the pheromone needs to be updated after one cycle is completed, and the formula is as follows:
Figure FDA0002879993030000041
wherein
Figure FDA0002879993030000042
Indicates that the kth ant in the sub-cycle is in the set SPiThe pheromone concentration released by the jth element on the path;
Figure FDA0002879993030000043
indicates that all ants are in the set SPiConcentration of pheromone released by the jth element on the path;
7) and when the iteration times or the output error does not meet the requirement, repeating the operation.
6. The method for predicting the resource performance of the cloud server based on the LSTM-ACO model according to claim 1, wherein the LSTM model comprises 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 input of the input layer, and the output layer is the prediction result of the LSTM-ACO model; the hidden layer uses tanh as the activation function.
CN202011642231.4A 2020-12-31 2020-12-31 Method for predicting cloud server resource performance based on LSTM-ACO model Pending CN112631890A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011642231.4A CN112631890A (en) 2020-12-31 2020-12-31 Method for predicting cloud server resource performance based on LSTM-ACO model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011642231.4A CN112631890A (en) 2020-12-31 2020-12-31 Method for predicting cloud server resource performance based on LSTM-ACO model

Publications (1)

Publication Number Publication Date
CN112631890A true CN112631890A (en) 2021-04-09

Family

ID=75290207

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011642231.4A Pending CN112631890A (en) 2020-12-31 2020-12-31 Method for predicting cloud server resource performance based on LSTM-ACO model

Country Status (1)

Country Link
CN (1) CN112631890A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113159453A (en) * 2021-05-17 2021-07-23 北京字跳网络技术有限公司 Resource data prediction method, device, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113159453A (en) * 2021-05-17 2021-07-23 北京字跳网络技术有限公司 Resource data prediction method, device, equipment and storage medium
CN113159453B (en) * 2021-05-17 2024-04-30 北京字跳网络技术有限公司 Resource data prediction method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
US20190340533A1 (en) Systems and methods for preparing data for use by machine learning algorithms
CN113486078B (en) Distributed power distribution network operation monitoring method and system
CN106067034B (en) Power distribution network load curve clustering method based on high-dimensional matrix characteristic root
CN112418482A (en) Cloud computing energy consumption prediction method based on time series clustering
CN110708318A (en) Network abnormal flow prediction method based on improved radial basis function neural network algorithm
CN111738520A (en) System load prediction method fusing isolated forest and long-short term memory network
CN112181659B (en) Cloud simulation memory resource prediction model construction method and memory resource prediction method
CN112149898A (en) Fault rate prediction model training method, fault rate prediction method and related device
CN113341919B (en) Computing system fault prediction method based on time sequence data length optimization
CN113449802A (en) Graph classification method and device based on multi-granularity mutual information maximization
CN114609994B (en) Fault diagnosis method and device based on multi-granularity regularized rebalancing increment learning
CN111882157A (en) Demand prediction method and system based on deep space-time neural network and computer readable storage medium
CN114510871A (en) Cloud server performance degradation prediction method based on thought evolution and LSTM
CN112784920A (en) Cloud-side-end-coordinated dual-anti-domain self-adaptive fault diagnosis method for rotating part
CN111027591B (en) Node fault prediction method for large-scale cluster system
CN113901679B (en) Reliability analysis method and device for power system and computer equipment
CN112561119B (en) Cloud server resource performance prediction method using ARIMA-RNN combined model
CN112631890A (en) Method for predicting cloud server resource performance based on LSTM-ACO model
CN113821401A (en) WT-GA-GRU model-based cloud server fault diagnosis method
CN115794405A (en) Dynamic resource allocation method of big data processing framework based on SSA-XGboost algorithm
CN115293639A (en) Battlefield situation studying and judging method based on hidden Markov model
CN112766537A (en) Short-term electric load prediction method
CN116611506B (en) User analysis model training method, user label determining method and device
CN113726564B (en) Method for analyzing importance degree of server node
US20240144075A1 (en) Updating label probability distributions of data points

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination