Cloud server aging prediction method based on time series clustering and LSTM
Through time series clustering and deep learning LSTM model, combined with K-means and wavelet packet decomposition, the accuracy of the prediction of the aging trend of cloud server software is solved, ensuring the best time node for software regeneration operations, and improving the availability of cloud servers and prevent downtime.
Patent Information
- Application Number
- CN202011380406.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-30
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2040-11-30
AI Technical Summary
The prior art is difficult to accurately predict the aging trend of cloud server software, which makes it difficult to determine the time node for software regeneration operation, affecting the availability of cloud servers and preventing downtime.
Using a method based on time series clustering and deep learning LSTM, the preprocessed data is preprocessed through K-means clustering and wavelet packet decomposition, and an LSTM model is constructed to predict the aging trend of cloud servers, and the software regeneration time node is determined.
Improve the accuracy of predicting the aging trend of cloud servers, ensure that software regeneration operations are carried out when the downtime is approaching, avoiding cloud server performance degradation and downtime, and reducing the losses caused by downtime.
Smart Images

Figure CN112433927B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of time series prediction, and specifically relates to a cloud server aging prediction method based on time series clustering and deep learning LSTM. Background Art
[0002] With the development of cloud computing technology, cloud servers are being used in more and more fields. Cloud servers are a simple, efficient, secure, reliable, and elastic computing service. The usage time of cloud servers is completely different from that of home hosts. Home hosts do not need to be used continuously, so they can have a relatively long dormancy time. Cloud servers are different. Different companies use cloud servers in different time periods, which means that some servers do not have a dormancy time at all. They need to run for a long time and frequently exchange resources. Cloud servers that run for a long time often have software aging problems. Software aging is caused by the accumulation of errors within the system. When cloud servers encounter difficult-to-solve problems (for example, lack of computing resources), aging-related failures often occur, which leads to a significant drop in cloud server performance and an increase in failure rate, and may even cause cloud servers to go from normal operation to downtime. According to incomplete statistics, the average loss of financial companies for each downtime is about 10 million US dollars. Some large websites usually have peak access periods, such as railway ticket purchase websites during the Spring Festival, e-commerce platforms during shopping festivals, and the launch of the latest digital products, which will bring huge load pressure to cloud servers. Once a cloud server goes down, it will cause catastrophic losses to the companies using the cloud server.
[0003] At present, the main method to solve the problem of software aging is software regeneration. Software regeneration is a proactive pre-maintenance fault-tolerant technology. This technology generally rolls back the software to a stable state by restarting the application or system to eliminate the impact of software aging on the performance of the cloud server. The study of software aging on cloud servers is generally divided into three stages: (1) The stress test stage aims to observe the impact of the increase in workload on the internal state of the cloud server system. (2) The waiting stage observes the state of the cloud system after the workload increases. The purpose of this stage is to highlight the impact of software aging in the system. Since software aging is a cumulative process, its impact may remain in the system even if the workload is cancelled. If the system can still recover to a stable state without performing a software regeneration operation, it means that there is no software aging problem. (3) The regeneration stage aims to observe whether the software regeneration operation can alleviate the software aging problem existing in the "waiting stage" after performing the software regeneration operation. The factor affecting the effect of software regeneration is mainly the time node of software regeneration. Frequent software regeneration will affect the availability of the cloud server. The ideal software regeneration strategy is to perform software regeneration before the system failure. Therefore, how to accurately predict the aging trend of cloud server software and obtain the aging critical value is the key to solving the software aging problem. Traditional methods for predicting the aging trend of cloud servers are mostly time series analysis and intelligent algorithms. Summary of the invention
[0004] The purpose of the present invention is to provide a cloud server aging prediction method based on time series clustering and deep learning LSTM. The K-means clustering algorithm is used to cluster the cloud server performance resource time series data, and then the deep learning LSTM model is used to predict the cloud server aging trend. The time series data is analyzed and determined according to the predicted time series data. The problem of how to regenerate the software at the best time point for the aging phenomenon of cloud server software is solved.
[0005] The technical solution adopted by the present invention is a cloud server aging prediction method based on time series clustering and deep learning LSTM, which specifically includes the following steps:
[0006] Step 1: extract the time series data of performance resources on the cloud server, including CPU idle rate data and system available memory data;
[0007] Step 2, preprocessing the time series data obtained in step 1 by wavelet packet decomposition;
[0008] Step 3, perform K-means clustering on the data preprocessed in step 2, cluster 100 times with the cluster number K=4, count the cluster centers with the highest frequency, and use the DBI (Davies-Bouldin) index to evaluate the clustering results;
[0009] Step 4: Construct a deep learning LSTM model using the clustered results, train the LSTM model to increase the accuracy, and predict the time series data of cloud server resources;
[0010] Step 5: Verify the model accuracy using the root mean square error and mean absolute percentage error;
[0011] Step 6: Predict the software aging trend based on the time series prediction data of the LSTM model, check the fitting degree of the data, and determine the time node of software regeneration according to the prediction data threshold.
[0012] The features of the present invention also lie in:
[0013] In Step 2, preprocess the time series data. Since the time series data of cloud server resources is a non-stationary time series, in order to separate high-frequency information and low-frequency information and avoid overfitting of high-frequency information, the present invention first performs frequency domain analysis on the data before establishing the prediction model. The frequency domain analysis uses a three-layer wavelet packet decomposition technique, which is developed on the basis of wavelet analysis and overcomes the disadvantages of poor frequency resolution corresponding to the high-frequency band and poor time resolution corresponding to the low-frequency band in wavelet analysis.
[0014] In Step 3, use the K-means clustering algorithm to perform multiple clusterings on the time series data of cloud server resources. The K-means algorithm uses the Euclidean distance to represent the differences between data and calculates the center points of the clusters by directly finding the mean. The steps are as follows:
[0015] Step 3.1: Select the initial cluster center points m1, m2, …, m k , …, m N ;
[0016] Step 3.2: Assign other objects to the class where the center point with the smallest distance is located;
[0017] Step 3.3: Update the center point of each cluster according to the principle of the smallest average Euclidean distance;
[0018] Step 3.4: Repeat Step 3.2 and Step 3.3 until the K-means algorithm converges.
[0019] In Step 3.1, the K-means++ method is used to select the initial cluster center points. Its idea can be described as follows: When selecting the first cluster center (n = 1), a random method is adopted. Assuming that n initial cluster center points (0 < n < K) have been selected, then when selecting the (n + 1)-th cluster center, the points farther away from the current n cluster center points will have a higher probability of being selected as the (n + 1)-th cluster center.
[0020] Step 4: Use the clustering results to build a deep learning LSTM model. The time series model depends on the order in which events occur. The same value will produce different results when the order is changed. The long short-term memory network (LSTM) is a special neural network that can learn the aging law of cloud servers in long-term operation. The specific steps are as follows:
[0021] Step 4.1: Raw data conversion, digitizing cloud resource time series data;
[0022] Step 4.2, generate a model training data set and determine the window length of the training set;
[0023] Step 4.3, determination and adjustment of network model structure;
[0024] Step 4.4, model training and result prediction.
[0025] In step 4.3, the network training process involves the adjustment of many parameters, including the activation function of the LSTM module, the activation function of the fully connected artificial neural network that receives the LSTM output, and the discard rate of each layer of network nodes to prevent overfitting, the error calculation method, the iterative update method of the weight parameters, the number of epochs of model training, and the batch size of single training samples.
[0026] In step 4.4, in order to improve the prediction accuracy of the model, the cloud server performance resource time series data is randomly divided into a training set and a validation set at a ratio of 4:1. Then the time series data is imported into the model as a parameter to obtain the prediction data, which is compared with the actual cloud resource time series to obtain the fitting curve.
[0027] In step 6, the cloud server resource time series prediction data threshold of the LSTM model is used to determine the time node for software regeneration. When the cloud server is close to downtime, the software regeneration operation is selected to keep the system in a good running state.
[0028] The beneficial effect of the present invention is that the present invention adopts a prediction method combining a clustering algorithm and a deep learning LSTM model to predict the aging trend of cloud servers, and pre-processes the time series data by wavelet packet decomposition. The limitation of the traditional prediction method that the prediction accuracy of non-stationary time series data and time series data with large fluctuations is low is overcome. Thus, the aging trend of cloud servers can be predicted more accurately, and the time node for accurate execution of software regeneration operations can be provided. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1This is an overall flow chart of a cloud server aging prediction method based on time series clustering and deep learning LSTM of the present invention;
[0030] Figure 2 It is a cloud server aging prediction method based on time series clustering and deep learning LSTM of the present invention. The cloud server CPU idle resource time series diagram;
[0031] Figure 3 It is a cloud server aging prediction method based on time series clustering and deep learning LSTM of the present invention. The time series diagram of available memory resources of cloud server system;
[0032] Figure 4 It is a three-layer wavelet packet decomposition process diagram of a cloud server aging prediction method based on time series clustering and deep learning LSTM of the present invention;
[0033] Figure 5 This is a specific flow chart of K-means clustering of a cloud server aging prediction method based on time series clustering and deep learning LSTM in the present invention;
[0034] Figure 6 It is a deep learning LSTM model structure diagram used in a cloud server aging prediction method based on time series clustering and deep learning LSTM of the present invention. DETAILED DESCRIPTION
[0035] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0036] like Figure 1 As shown, the cloud server aging prediction method based on time series clustering and deep learning LSTM of the present invention specifically includes the following steps:
[0037] Step 1: Extract the time series data of performance resources on the cloud server, including CPU idle rate data and system available memory data. The time series data is as follows: Figure 2 and Figure 3 shown.
[0038] Step 2, preprocessing the data extracted in step 1. The cloud server resource time series is a non-stationary time series. In order to separate the high-frequency information and low-frequency information therein and avoid overfitting of the high-frequency information, the present invention first performs a three-layer wavelet packet decomposition on the data before clustering and building a model. Wavelet packet decomposition can overcome the shortcomings of poor frequency resolution corresponding to high-frequency bands and poor time resolution corresponding to low-frequency bands. The specific definition formulas are shown in equations (1), (2) and (3).
[0039]
[0040]
[0041]
[0042] Where p is the frequency parameter, q is the scale parameter, r is the translation parameter, h(r), and g(r) is a set of conjugate mirror filter functions. The process of wavelet packet decomposition is to filter the discrete signal through a low-pass filter h and a high-pass filter g. The three-layer wavelet packet decomposition process is as follows Figure 4 shown.
[0043] Step 3: Perform K-means clustering on the data preprocessed in step 2 and evaluate the clustering results based on the indicators. The K-means process is as follows: Figure 5 shown.
[0044] The specific process of step 3 is as follows:
[0045] Step 3.1: Use K-means++ algorithm to determine the initial cluster center points m1, m2, ..., m k ,…,m N ;
[0046] Step 3.2, assign objects other than the cluster center to the class where the center point with the smallest distance to them is located.
[0047] Step 3.3, update the center point of each cluster according to the principle of minimizing the average value of the Euclidean distance;
[0048] Step 3.4: Repeat steps 3.2 and 3.3 until the K-means algorithm converges.
[0049] Step 3.5: After multiple clustering tests, compare the DBI values of different cluster centers with the same number of clusters to evaluate the clustering results. DBI is the mean value of the maximum similarity of each class. Its calculation formula is shown in formula (4):
[0050]
[0051] Where N is the clustering result divided into N classes; S i , S j The variable is defined as the average distance from the data within the class to the class center, representing the dispersion of each time series in class i and j; M i,j Defined as the distance between the center of class i and the center of class j.
[0052] For the time series data of cloud server CPU idle rate and system available memory, the clustering results can be described as four categories: 1. Initial stage; 2. Light load stage; 3. Heavy load stage; 4. Critical stage of downtime.
[0053] The initial stage is described as the CPU idle rate and system available memory being between 70% and 100%, which is the stage when the cloud server just starts to run the load; the light load stage is described as the CPU idle rate and system available memory being between 40% and 80%, which is the stage when the cloud server runs a lighter load and operates normally; the heavy load stage is described as the CPU idle rate and system available memory being between 10% and 40%, which is the stage when the cloud server runs a heavier load and the system begins to show a series of signs of aging such as slow operation and jamming; the critical downtime stage is described as the CPU idle rate and system available memory being between 0% and 10%, at which time the cloud server is under great load pressure and the system may experience downtime due to software aging at any time.
[0054] Step 4: Build an LSTM model for prediction based on the clustering results in step 3. The clustering results in step 3 show that the cloud server is in a normal and good operating state in the initial stage and the light load stage, so only the heavy load stage and the subsequent critical downtime stage need to be predicted. In these two stages, the cloud server will show signs of slow system operation and jamming due to software aging. If the software is not regenerated when it reaches the critical downtime state, the cloud server may crash. The structure of the LSTM model is as follows: Figure 6 shown.
[0055] The specific process of step 4 is as follows:
[0056] Step 4.1, establish the LSTM prediction model, and then set the parameters in the model;
[0057] Step 4.2, train the LSTM model using the training data;
[0058] Step 4.3: Evaluate the trained model to see if it meets the accuracy and other requirements. If not, repeat step 4.2 for training. The loss function in the model is calculated using the mean absolute error.
[0059] Step 4.4, predict the actual data based on the trained model and obtain the prediction results.
[0060] Step 5: Fit the prediction results in step 4 with the actual time series to verify the prediction accuracy.
[0061] In order to judge the accuracy of the model, the root mean square error (RMSE) and mean absolute percentage error (MAPE) of the actual monitoring data of cloud server resources and the model prediction data are compared. The calculation formula is as follows:
[0062]
[0063]
[0064] Among them, actual(t) represents the actual time series data; forecast(t) represents the time series data predicted by the LSTM model; RMSE represents the expected value of the square of the error; the smaller the value of MAPE, the better the accuracy of the forecasting model.
[0065] Step 6: Check the fit between the LSTM model prediction data and the original data. When the cloud server resource prediction time series shows that it is in a critical downtime state, that is, the CPU idle rate and system available memory are between 0% and 10%, the cloud server is under great load pressure and the system may crash at any time due to software aging. Choose to perform software regeneration at this time to keep the system in a normal and good running state.
Claims
1. The cloud server aging prediction method based on time series clustering and deep learning LSTM includes the following steps: Step 1, extract the time series data of CPU idle rate and system available memory on the cloud server; Step 2, perform preprocessing of three-layer wavelet packet decomposition on the data in Step 1. First, preprocess the cloud server resource data and perform frequency domain analysis on the data; the frequency domain analysis uses the three-layer wavelet packet decomposition technique. Through the three-layer wavelet packet decomposition, a more refined analysis of the time series is carried out. It divides the time series into multiple levels, re-divides each decomposed frequency band, and selects the corresponding frequency band according to the characteristics of the analyzed time series to perform feature clustering on the time series data; Step 3, perform K-means clustering on the data preprocessed in Step 2 and evaluate the clustering result according to the DBI index; Use the K-means clustering algorithm to perform multiple clusterings on the time series data of cloud server resources. The K-means algorithm uses the Euclidean distance to represent the differences between data and calculates the center points of the clusters by directly calculating the mean. The steps are as follows: Step 3.1, select the initial cluster center points m1, m2, ..., m k ,…,m N ; In Step 3.1, the K-means++ method is used to select the initial cluster center points. Its idea can be described as follows: when selecting the first cluster center n = 1, it is done by a random method. Assuming that n initial cluster centers have been selected, 0 < n < K, then when selecting the (n + 1)-th cluster center, the points farther away from the current n cluster centers will have a higher probability of being selected as the (n + 1)-th cluster center; Step 3.2, assign other objects to the class where the center point with the smallest distance to them is located; Step 3.3, update the center point of each cluster according to the principle of the minimum average Euclidean distance; Step 3.4, repeat Step 3.2 and Step 3.3 until the K-means algorithm converges; Step 4, establish an LSTM model for the clustering result obtained in Step 3 and perform model training and prediction; Use the result obtained after clustering to construct a deep learning LSTM model. The specific steps are as follows: Step 4.1, extract the time series data in the heavy load stage and the critical stage of downtime and transform them, and numericalize the cloud server resource time series data; In Step 4.1, after clustering in Step 3, four types of time series data are obtained, namely the initial stage, the light load stage, the heavy load stage, and the critical stage of downtime. Among them, both the initial stage and the light load stage are in a normal and good operating state of the cloud server. Therefore, only the heavy load stage with signs of aging and the critical stage of downtime when the system is close to crashing need to be predicted; Step 4.2, generate the model training data set and determine the window length of the training set; Step 4.3, determine and adjust the network model structure and parameters; In Step 4.3, the determination of the network model structure involves the adjustment of many parameters, including determining the activation function of the LSTM module, determining the activation function of the fully connected artificial neural network that receives the LSTM output, determining the discard rate of each layer of network nodes to prevent overfitting, determining the calculation method of the error, determining the iterative update method of the weight parameters, determining parameters such as the epoch and batch size of model training; Step 4.4, model training and result prediction; In step 4.4, in order to prevent overfitting, the cloud resource time series data is randomly split into a training set and a validation set at a ratio of 4:1 to train the model. Then the time series data is imported into the model as a parameter to obtain the predicted time series data. Compared with the actual cloud resource time series data, the fitting curve can be obtained. Step 5: Use the root mean square error and mean absolute percentage error function to verify the prediction accuracy of the cloud server resource time series prediction value in step 4 and the original time series; Step 6: Check the fit between the LSTM model prediction time series and the actual time series. According to the cloud server resource time series prediction data, analyze the software aging trend and determine the best software regeneration time point. In step 6, the degree of fit between the LSTM model prediction data and the original data is checked. When the cloud server resource prediction time series shows that it is in a critical downtime state, the CPU idle rate and system available memory are between 0% and 10%. The cloud server is under great load pressure and the system may crash at any time. It is time to perform software regeneration to keep the system in a normal and good running state.
