Cloud server fault diagnosis method based on WT-GA-GRU model

The WT-GA-GRU model is used to perform wavelet decomposition and GRU modeling on cloud server resource and performance data, combined with genetic algorithm optimization and sliding window analysis, to solve the problem of accuracy of cloud server fault diagnosis and realize the detection of large fluctuations in resources. Highly accurate prediction and fault diagnosis of performance data.

CN113821401BActive Publication Date: 2024-10-29SHAANXI JINJUE ENTERPRISE GROUP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110959817.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-20
Publication Date
2024-10-29
Estimated Expiration
2041-08-20

AI Technical Summary

Technical Problem

Existing cloud server fault diagnosis methods are not accurate enough for diagnosing resource performance data with large fluctuations, especially in the range of dramatic data changes, and the accuracy is low.

Method used

A fault diagnosis method based on the WT-GA-GRU model is used to decompose resource and performance data into sub-signals of different frequencies through wavelet decomposition, GRU neural network is used to model each scale domain, and hyperparameters are optimized through genetic algorithms, combined with The sliding window analyzes data change patterns and sets dynamic thresholds for fault diagnosis.

Benefits of technology

It improves the accuracy of cloud server fault diagnosis, can extract changes in fault characteristics, achieves high-accuracy prediction and analysis of cloud server system performance parameters, and overcomes the problems of local optimal solutions and slow convergence speed in the model prediction process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113821401B_ABST
    Figure CN113821401B_ABST
Patent Text Reader

Abstract

The present invention discloses a cloud server fault diagnosis method based on a WT‑GA‑GRU model, which comprises the following steps: collecting resource and performance data of a cloud server; obtaining resource and performance sequence data of a cloud server; performing wavelet decomposition on the sequence data to obtain wavelet subsequences of various scales; performing preprocessing operations on each subsequence data; modeling the wavelet subsequences on each scale domain using a GRU neural network; optimizing the hyperparameters of the GRU neural network using a genetic algorithm to obtain prediction results of each subsequence; reconstructing the predictions of each subsequence to comprehensively generate a final prediction result; calculating a residual sequence between a predicted value and an actual value of the sequence data, using a sliding window to analyze the variation law of cloud system performance data, and setting a dynamic threshold to diagnose cloud system faults; the fault diagnosis method of the WT‑GA‑GRU model of the present invention solves the problem that the traditional diagnosis method has low diagnosis accuracy for cloud server resource performance data with large fluctuations.
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 fault diagnosis, and specifically relates to a cloud server fault diagnosis method based on a WT-GA-GRU model. 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. The reasons for this phenomenon include the consumption of operating system resources, the destruction of data, 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, commercial systems and other applications, with the increase in system complexity, system error factors are increasingly concentrated in the software, and one of the issues that deserves more and more attention is system failure. Once the system software fails, it will affect the normal operation of the entire business system and bring immeasurable economic losses to enterprises and institutions.

[0004] At present, there are two main types of cloud server system fault diagnosis methods. One type of method studies fault phenomena based on the trend changes of system performance indicators, uses linear regression and decision tree models in machine learning to analyze the fault characteristics caused by server memory consumption, and uses decision tree models and linear regression models to diagnose server faults. The other type of method sets static thresholds for system performance indicators to study system faults. For example, using response time as a fault indicator, calculating the average response time of the server, and giving a critical threshold. When the response time exceeds the critical threshold, the server is fault-recovered. However, due to the nonlinear, random, and sudden characteristics of cloud server resources and performance data, the above methods do not further mine and analyze system fault characteristics, so the fault diagnosis of cloud server system resources and performance data is not accurate enough, especially in the interval where the data changes more drastically. The accuracy is even lower. Summary of the invention

[0005] The purpose of the present invention is to provide a cloud server fault diagnosis method based on the WT-GA-GRU model, which solves the problem that traditional diagnosis methods are not accurate enough in diagnosing faults of cloud server resource performance data with large fluctuations.

[0006] The technical solution adopted by the present invention is a cloud server fault diagnosis method based on the WT-GA-GRU model, which is specifically implemented in the following steps:

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

[0008] Step 2: Obtain cloud server resource and performance sequence data;

[0009] Step 3, performing wavelet decomposition on the sequence data obtained in step 2 to obtain wavelet subsequences of various scales;

[0010] Step 4, preprocessing each subsequence data obtained in step 3;

[0011] Step 5, using the GRU neural network to model the wavelet subsequences on each scale domain;

[0012] Step 6, using genetic algorithm to optimize the GRU neural network hyperparameters to obtain the prediction results of each subsequence;

[0013] Step 7, reconstruct the predictions of each subsequence and comprehensively generate the final prediction results;

[0014] Step 8: Calculate the residual sequence between the predicted value and the actual value of the sequence data, use a sliding window to analyze the change pattern of the cloud system performance data, and set a dynamic threshold to diagnose cloud system failures.

[0015] The present invention is also characterized in that:

[0016] The cloud server resource and performance sequence data in step 2 is the CPU usage;

[0017] The specific process of wavelet decomposition in step 3 is: decompose the original sequence into sub-signals of different frequencies by using wavelet decomposition, extract features from each sub-signal, and decompose the original time series by using db2 wavelet function;

[0018] The preprocessing process in step 4 is as follows: normalize the different dimensions of the sequence data and map the original sequence data to [0,1]. The specific formula is:

[0019] The maximum and minimum values ​​of the sequence data are calculated and recorded as X max and X min ;

[0020] Subtract X from each data point in the sequence data min Divide by X max -X min ;

[0021] Among them, the specific method for constructing the GRU model in step 5 includes five functional modules: input layer, hidden layer, 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 recurrent neural network with a certain number of layers. The output layer provides the prediction results of the network, and the network prediction uses an iterative method to predict point by point.

[0022] Among them, the construction of the GRU model in step 5 is specifically implemented according to the following steps:

[0023] 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. 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};

[0024] Then input X into the hidden layer. The hidden layer contains L isomorphic GRU cells connected in sequence according to the previous and next moments. The output of X after passing through the hidden layer is P = {P1, P2, …, P L}, P p =GRU 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 GRU cell; GRU forward represents the forward cell calculation method of GRU. 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 state ; Select the mean square error As an error calculation formula, the loss function of the training process is defined as: Set the minimum loss function as the optimization goal, continuously update the network weights, and then obtain the final hidden layer network;

[0025] Finally, the trained GRU network (denoted as GRU* net ) is used for prediction. The prediction process adopts an iterative method. The last row of data of the theoretical output Y is Y f ={f' m-L+1 ,f' m-L+2 ,…,f' m}, change Y f Enter GRU* net The output result is P f =GRU* 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}; Set Y f+1 Enter GRU* 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, P o Perform anti-normalization to obtain the final te The corresponding prediction sequence is P te= {p* m+1 ,p* m+1 ,…,p* n}; Similarly, taking each row of X as the input of the training model can get 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 quantitatively gives the fitting and prediction accuracy of the model;

[0026] In step 6, the use of genetic algorithm to optimize the hyperparameters of the GRU model is specifically implemented in the following steps:

[0027] Step 6.1, initialize the population and encode the hyperparameters to be optimized, including the time window, learning rate, and number of neurons;

[0028] Step 6.2, establish the GRU network structure and initialize the weight threshold;

[0029] Step 6.3, input data to train the GRU neural network to calculate the fitness value of each chromosome based on the error and fitness function, and use the inverse of the prediction model error function as the fitness function, as shown in the following formula (1), where y is the actual observation value of the sample time series, is the predicted value, T represents the amount of data in the sample parameter time series;

[0030]

[0031] Step 6.4: If the current maximum fitness value does not change significantly or reaches the maximum number of iterations of the population, stop the optimization and proceed to step 6.6; otherwise, proceed to step 6.5;

[0032] Step 6.5, using selection, crossover, and mutation operations, update the hyperparameter chromosome, and assign the new hyperparameters to the GRU neural network, and return to step 6.2;

[0033] Step 6.6, calculate the current prediction error, save the current optimal hyperparameters and the corresponding GRU model, and complete the prediction of the subsequence;

[0034] In step 6.5, the genetic algorithm performs selection, crossover, and mutation operations among individuals. For the selection operation, the roulette wheel method is used, as shown in formula (2) and formula (3); in the crossover operation, the i-th chromosome a i and the jth chromosome a j The method of crossover operation at the kth position is shown in formula (4); the mutation operation is as follows: ij , the mutation execution steps are shown in formula (5):

[0035]

[0036] In the formula, f i represents the fitness of individual i, p i represents the selection probability of i, k is the coefficient, and N is the number of individuals in the population;

[0037]

[0038] Where b is a random number in the range [0,1];

[0039]

[0040] In the formula, gene a ijThe maximum value of a is max , gene a ij The minimum value of a min , f(g)=r2(1-g / G max ) 2 , the random number is r2, g is the current iteration number, G max is the maximum number of evolutions, and r is a random number between [0,1].

[0041] The beneficial effects of the present invention are:

[0042] The cloud server fault diagnosis method based on the WT-GA-GRU model of the present invention solves the problem that the traditional diagnosis method has low accuracy in diagnosing cloud server resource performance data with large fluctuations, and the proposed wavelet decomposition method can decompose a complex signal into signals in different frequency bands. The low-frequency approximate components can reflect the changing trends and characteristics of the uneven data, and the high-frequency detail components reflect dynamic factors such as disturbances; the proposed genetic algorithm optimization method for neural network hyperparameters overcomes the problem of being easily trapped in local optimal solutions, slow convergence speed and instability during model prediction. The WT-GA-GRU prediction method can extract the fault feature changes of the cloud service system, realize the high-accuracy prediction and analysis of the cloud server system performance parameters, and finally realize more accurate system fault diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 It is an overall framework diagram of the cloud server fault diagnosis method based on the WT-GA-GRU model of the present invention;

[0044] Figure 2 It is a wavelet decomposition theory diagram of the cloud server fault diagnosis method based on the WT-GA-GRU model of the present invention;

[0045] Figure 3 This is a wavelet decomposition result diagram of the cloud server fault diagnosis method based on the WT-GA-GRU model of the present invention;

[0046] Figure 4 This is a GRU unit cell result diagram in the cloud server fault diagnosis method based on the WT-GA-GRU model of the present invention;

[0047] Figure 5 This is a GRU network structure diagram in the cloud server fault diagnosis method based on the WT-GA-GRU model of the present invention;

[0048] Figure 6 This is an explanatory diagram of the encoding method of GA to GRU hyperparameters in the cloud server fault diagnosis method based on the WT-GA-GRU model of the present invention;

[0049] Figure 7This is a sliding window explanation diagram in the cloud server fault diagnosis method based on the WT-GA-GRU model of the present invention;

[0050] Figure 8 It is a residual sequence discriminant diagram in the cloud server fault diagnosis method based on the WT-GA-GRU model of the present invention;

[0051] Fig. 9 A comparison chart of the prediction of CPU usage rate using the WT-GA-GRU model and other models in the cloud server fault diagnosis method based on the WT-GA-GRU model of the present invention;

[0052] Fig.10 This is the diagnosis result of the CPU usage rate of the cloud server fault diagnosis method based on the WT-GA-GRU model of the present invention. DETAILED DESCRIPTION

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

[0054] The present invention provides a cloud server fault diagnosis method based on the WT-GA-GRU model. The overall framework is as follows: Figure 1 As shown, the method for diagnosing cloud server system failures by using a model including wavelet transform (WT), gated recurrent unit (GRU) neural network and genetic algorithm (GA) is specifically implemented in the following steps:

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

[0056] Step 2, obtaining cloud server resource and performance sequence data, wherein the resource and performance sequence data is CPU usage;

[0057] Step 3, using the sequence data obtained in step 2, perform wavelet decomposition to obtain wavelet subsequences of various scales; using wavelet decomposition to decompose the original sequence into sub-signals of different frequencies, and extracting features from each sub-signal will improve the prediction accuracy. The db2 wavelet function is used to decompose the original time series, such as Figure 2 As shown in Figure 2, the original time series is decomposed into multiple subsequences through wavelet transform. Figure 3 is the wavelet decomposition result of the original sequence;

[0058] Step 4: preprocess the subsequence data obtained in step 3. In order to improve the accuracy of the prediction results, it is necessary to normalize the different dimensions of the sequence data and map the original sequence data to [0,1]. The specific formula is:

[0059] The maximum and minimum values of the sequence data are calculated and denoted as X max and X min ;

[0060] Subtract each data in the sequence data by X min and then divide by X max -X min ;

[0061] Step 5, use the GRU neural network to model the wavelet subsequences in each scale domain;

[0062] The specific method for constructing the GRU model includes five functional modules: the input layer, the hidden layer, the 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 recurrent neural network with L layers. The output layer provides the prediction result network, and network prediction uses an iterative method to predict point by point;

[0063] The GRU cell structure is as Figure 4 shown, and the GRU model structure is as Figure 5 shown; 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};

[0064] Then input X into the hidden layer. The hidden layer contains L isomorphic GRU cells connected in sequence of 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=GRU 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 GRU cell respectively; GRU forward Represents the GRU forward cell calculation method, setting 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). The mean square error is used As an error calculation formula, the loss function of the training process can be defined as: Set the minimum loss function as the optimization goal, continuously update the network weights, and then obtain the final hidden layer network;

[0065] Apply the trained GRU network (denoted as GRU* net ) is used for prediction. 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+2 ,…,f' m}, change Y f Enter GRU* net The output result can be expressed as P f =GRU* 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 Enter GRU* 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}, then P o Perform anti-normalization to obtain the final teThe corresponding prediction sequence is P te ={p* m+1 ,p* m+2 ,…,p* n}, similarly, taking each row of X as the input of the training model can get 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 quantitatively gives the fitting and prediction accuracy of the model;

[0066] Step 6, using genetic algorithm to optimize the GRU neural network hyperparameters to obtain the prediction results of each subsequence;

[0067] When using genetic algorithms to optimize the hyperparameters of the GRU model, the hyperparameters need to be set in advance, including the number of hidden layers, the number of hidden layer nodes, the number of model training rounds (Epoch), the batch size (Batch_size), the dropout ratio, the activation function, and the optimization function. Different hyperparameter combinations in the GRU model have different prediction accuracies for the models produced by training. The hyperparameter search range space set in this paper is shown in Table 1. The hyperparameter value range is expressed as [a:b:c], where a is the starting point, b is the end point, and c is the numerical interval;

[0068] Table 1: GRU prediction model hyperparameter search space

[0069]

[0070] 1) Population coding initialization: The parameters to be optimized are converted into gene strings by coding, and then chromosomes are formed according to certain conventions. In this paper, the hyperparameters of the GRU neural network are encoded in binary with different bits. The coding process is as follows: Figure 6 As shown;

[0071] 2) Calculation of individual fitness value: The fitness value quantifies the adaptability of an individual in the evolutionary process. The higher the fitness value, the smaller the model prediction error formed by the hyperparameter combination represented by the individual. This application uses the inverse of the prediction model error function as the fitness function, as shown in the following formula (1), where y t is the actual observed value of the sample time series, is the predicted value, and T represents the amount of data in the sample parameter time series.

[0072]

[0073] 3) The genetic algorithm realizes the change of individual information through selection, crossover, and mutation operations among individuals. For the selection operation, the roulette wheel method is adopted in this paper, as shown in formulas (2) and (3); in the crossover operation, the method of crossover at the k-th position for the i-th chromosome a i and the j-th chromosome a j is shown in formula (4);) for the mutation operation, such as the j-th gene a ij of the i-th individual, the mutation execution steps are shown in formula (5):

[0074]

[0075] For formulas (2) and (3), where f i represents the fitness of individual i, p i represents the selection probability of i, k is a coefficient, and N is the number of population individuals;

[0076]

[0077] For formula (4), where b is a random number within the range of [0, 1];

[0078]

[0079] For formula (5), where the maximum value of gene a ij is a max , the minimum value of gene a ij is a min , f(g) = r2(1 - g / G max ), 2 the random number is r2, g is the current iteration number, G max is the maximum number of evolutions, and r is a random number between [0, 1];

[0080] Step 7, perform prediction reconstruction on each subsequence and comprehensively generate the final prediction result;

[0081] Step 8, calculate the residual sequence between the predicted value and the actual value of the sequence data, adopt a sliding window to analyze the change law of the cloud system performance data, and set a dynamic threshold to diagnose cloud system faults:

[0082] Adopt a sliding window to analyze the change law of the cloud system performance data, and set a dynamic threshold to diagnose cloud system faults. The data of the sliding window is a data unit obtained by segmenting the data stream, which is a certain interval in the data stream. This interval can be defined according to the time interval or the spatial capacity. Assume that there are two time moments t1 and t2 on the time axis, and t1 < t2. Define the window width W as the time interval between t2 and t1. Then, each time the data within the window is observed, it is the data flowing through the data stream within two time intervals separated by W. The sliding window is as Figure 7 As shown; this application sets W to 4 hours, sets a dynamic threshold based on the sliding window, and analyzes the operation of the cloud system, such as Figure 8 As shown in the figure, the residual sequence is generated by the residual calculated by the GRU model prediction value and the cloud system observation value; the upper and lower limits of the threshold are set as and in, and Represent the average values ​​of positive and negative value sequences, σ + and σ - They represent the standard deviation of positive and negative sequences respectively. The decision function is shown in formula (6), where: represents the square of the residual value at the current moment, Represents the expectation of the sum of squares of the residual sequence within the sliding window;

[0083]

[0084] By comparing the decision function value with the upper and lower limits of the threshold, the fault anomaly point is diagnosed. If the decision function value is between the upper and lower limits of the threshold, it indicates that the cloud system is running normally, otherwise it indicates that the system is faulty. The cloud system fault diagnosis algorithm based on dynamic threshold is shown in Algorithm 1;

[0085]

[0086]

[0087] 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 );

[0088] The above-mentioned GRU model is constructed and trained and predicted for the existing data; the specific method of constructing the GRU 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 time series to meet the network input requirements, the hidden layer builds a recurrent neural network with a specified number of layers, and the output layer provides a prediction result network. The network prediction uses an iterative method to predict point by point;

[0089] The above method uses genetic algorithm to optimize GRU model parameters; uses the solution searched by genetic algorithm as the hyperparameter of the GRU model neural network, creates the network, sets the expected error and number of iterations, and trains the network until the error meets the requirement or the number of iterations reaches the requirement.

[0090] The above method determines whether a cloud system fails, calculates the residual using the predicted value and the actual value of the performance indicator to generate a residual sequence, and then uses the decision function to compare it with the dynamic threshold to diagnose whether the platform management layer, virtual resource layer and application service layer of the cloud system fail.

[0091] Example

[0092] This example uses the CPU usage of the cloud system server as an example. The prediction results of the WT-GA-GRU model are compared with those of the integrated moving average autoregressive model (ARIMA), the long short-term memory network (LSTM), the long short-term memory network based on the temporal pattern attention mechanism (TPA-LSTM), and the gated recurrent neural network (GRU). Fig. 9 As shown; the abnormal point detection results of CPU usage are as follows Fig.10 The error comparison of different models is shown in Table 2. We use mean absolute error (MAE), root mean square error (RMSE) and symmetric mean absolute percentage error (SMAPE) as evaluation indicators. The formulas are shown in formulas (7)-(9), where T is the number of data samples, y predictive is the predicted value, y true is the actual value;

[0093]

[0094] Table 2 Comparison of prediction errors of different models

[0095]

[0096] The specific steps are as follows:

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

[0098] Step 2, obtaining cloud server resource and performance sequence data, wherein the resource and performance sequence data is CPU usage;

[0099] Step 3: Use the sequence data obtained in step 2 to perform wavelet decomposition to obtain wavelet subsequences of various scales. Select db2 as the wavelet function, decompose the layers to 3, and obtain the approximate component and detail component;

[0100] Step 4: Data preprocessing. Before diagnosing and predicting the cloud server, 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 [0,1] interval, so that the prediction model is stable and the prediction convergence speed is fast. The specific steps include the following:

[0101] Step 4.1, obtain the minimum and maximum values of the sequence data, and denote the minimum value as X min , and denote the maximum value as X max ;

[0102] Step 4.2, subtract X from the sequence data min ;

[0103] Step 4.3, divide the sequence data obtained in Step 4.2 by the maximum value minus the minimum value, i.e., X max -X min ;

[0104] Step 5, use the GRU neural network to model the wavelet subsequences in each scale domain; the specific method for constructing the GRU model includes five functional modules: the input layer, the hidden layer, the 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 recurrent neural network with a specified number of layers. The output layer provides the prediction result network, and network prediction uses an iterative method to predict point by point;

[0105] Step 5.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, 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}, 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};

[0106] Step 5.2, input X into the hidden layer. The hidden layer contains L isomorphic GRU 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 = GRUforward (X p ,C p-1 ,H p-1 ), where C p-1 and H p-1 are the state and output of the previous GRU cell respectively; GRU forward Represents the GRU 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: Set the minimum loss function as the optimization goal, continuously update the network weights, and then obtain the final hidden layer network;

[0107] Step 5.3, apply the trained GRU network (denoted as GRU* 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+2 ,…,f' m}, change Y f Enter GRU* net The output result can be expressed as P f =GRU* 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 Enter GRU* 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 teThe corresponding prediction sequence is 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 quantitatively gives the fitting and prediction accuracy of the model;

[0108] Step 6: Use genetic algorithm to optimize the GRU neural network hyperparameters to obtain the prediction results of each subsequence.

[0109] Step 6.1, initialize the population and encode the hyperparameters to be optimized.

[0110] Step 6.2, establish the GRU network structure and initialize the weight threshold.

[0111] Step 6.3, input data to train the GRU neural network to calculate the fitness value of each chromosome based on the error and fitness function.

[0112] Step 6.4: If the current maximum fitness value does not change significantly or the maximum number of iterations of the population is reached, stop the optimization and proceed to step 6.4; otherwise, proceed to step 6.6.

[0113] Step 6.5, use selection, crossover, and mutation operations to update the hyperparameter chromosome, assign the new hyperparameters to the GRU neural network, and return to step 6.2.

[0114] Step 6.6, calculate the current prediction error, save the current optimal hyperparameters and the corresponding GRU model, and complete the prediction of the subsequence.

[0115] Step 7, synthesize the prediction results obtained in step 6 and reconstruct the final prediction value;

[0116] Step 8: Calculate the residual sequence from the predicted value and the cloud system observation value, and obtain the upper and lower limits of the threshold. Compare the decision function value with the upper and lower limits of the threshold to diagnose the fault anomaly point.

Claims

1. Cloud server fault diagnosis method based on WT-GA-GRU model, It is characterized in that Please follow the steps below to implement: Step 1: Collect resource and performance data of the cloud server; Step 2: Obtain cloud server resource and performance sequence data; Step 3, performing wavelet decomposition on the sequence data obtained in step 2 to obtain wavelet subsequences of various scales; Step 4, preprocessing each subsequence data obtained in step 3; Step 5, using the GRU neural network to model the wavelet subsequences on each scale domain; Step 6: Initialize the population and encode the hyperparameters to be optimized, including the time window, learning rate and number of neurons. The hyperparameter value range is represented by [a:b:c], where a is the starting point, b is the end point and c is the numerical interval. Establish the GRU network structure and initialize the weight threshold. Input data to train the GRU neural network to calculate the fitness value of each chromosome according to the error and fitness function, and use the inverse of the prediction model error function as the fitness function, as shown in the following formula (1), where y is the actual observation value of the sample time series, is the predicted value, T represents the amount of data in the sample parameter time series; If the current maximum fitness value does not change significantly or the maximum number of iterations of the population is reached, the optimization is stopped, the current prediction error is calculated, the current optimal hyperparameters and the corresponding GRU model are saved, and the prediction of the subsequence is completed. Otherwise, the hyperparameter chromosome is updated by using selection, crossover, and mutation operations, and the new hyperparameters are assigned to the GRU neural network. Return to the step of establishing the GRU network structure and initializing the weight threshold. Step 7, reconstruct the predictions of each subsequence and comprehensively generate the final prediction results; Step 8: Calculate the residual sequence between the predicted value and the actual value of the sequence data, use a sliding window to analyze the change pattern of the cloud system performance data, and set a dynamic threshold to diagnose cloud system failures.

2. The cloud server fault diagnosis method based on the WT-GA-GRU model according to claim 1, It is characterized in that The cloud server resource and performance sequence data in step 2 is CPU usage.

3. The cloud server fault diagnosis method based on the WT-GA-GRU model according to claim 1, It is characterized in that The specific process of wavelet decomposition in step 3 is: decomposing the original sequence into sub-signals of different frequencies by using wavelet, extracting features from each sub-signal respectively, and decomposing the original time series by using db2 wavelet function.

4. The cloud server fault diagnosis method based on the WT-GA-GRU model according to claim 1, It is characterized in that The preprocessing process in step 4 is specifically: normalizing the different dimensional data of the sequence data and mapping the original sequence data to [0,1]. The specific formula 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 .

5. The cloud server fault diagnosis method based on the WT-GA-GRU model according to claim 1, It is characterized in that The specific method of constructing the GRU model in step 5 includes five functional modules: input layer, hidden layer, output layer, network training and network prediction; the input layer is responsible for preliminary processing of the original response time series to meet the network input requirements, the hidden layer builds a recurrent neural network with a specified number of layers, the output layer provides a prediction result network, and the network prediction adopts an iterative method to predict point by point.

6. The cloud server fault diagnosis method based on the WT-GA-GRU model according to claim 5, It is characterized in that The construction of the GRU model in step 5 is specifically implemented by the following steps: First, in the input layer, define the original response time series that has been normalized as F o ={f 1 , f 2 , …, f n}. Then, the divided training set and test set can be expressed as F tr ={f 1 , f 2 , …, f m} and F te ={f m+1 , f m+2 , …, f n}, satisfying the constraint conditions m < n and m, n ∈ N. Apply the data splitting method to process F tr . Let the splitting length be L. Then, the split model is X = {X 1 , X 2 , …, 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 = {Y 1 , Y 2 , …, Y L}, Y P ={f p+1 , f p+2 , …, f m-L+p}; Then X is input into the hidden layer, which contains L isomorphic GRU cells connected at the previous and next moments. The output of X after passing through the hidden layer is P = {P 1 ,P 2 ,…,P L }, P p =GRU 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 GRU cell respectively; GRU forward Represents the GRU 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 ; Select mean square error As an error calculation formula, the loss function of the training process is defined as: Set the minimum loss function as the optimization goal, continuously update the network weights, and then obtain the final hidden layer network; Finally, the trained GRU network is used for prediction. The GRU network is represented by GRU*net. The prediction process adopts an iterative method. The last row of data of the theoretical output Y is Y f ={f' m-L+1 ,f' m-L+2 ,…,f' m }, change Y f Enter GRU* net The output result is P f =GRU* 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 }; Set Y f+1 Enter GRU* 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, P o Perform anti-normalization to obtain the final te The corresponding prediction sequence is P te ={p* m+1 ,p* m+2 ,…,p* n }; Similarly, taking each row of X as the input of the training model can get 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 quantitatively gives the model's fitting and prediction accuracy.

7. The cloud server fault diagnosis method based on the WT-GA-GRU model according to claim 1, It is characterized in that In step 6, the genetic algorithm performs selection, crossover and mutation operations among individuals. For the selection operation, the roulette method is used, as shown in formula (2) and formula (3); in the crossover operation, the i-th chromosome a i and the jth chromosome a j The method of crossover operation at the kth position is shown in formula (4); the mutation operation is as follows: ij , the mutation execution steps are shown in formula (5): In the formula, f i represents the fitness of individual i, p i represents the selection probability of i, k is the coefficient, and N is the number of individuals in the population; Where b is a random number in the range [0,1]; In the formula, gene a ij The maximum value of a is max , gene a ij The minimum value of a min , f(g)=r 2 (1-g / G max ) 2 , the random number is r 2 , g is the current iteration number, G max is the maximum number of evolutions, and r is a random number between [0,1].

Citation Information

Patent Citations

  • Method for establishing sequence prediction model based on bidirectional independent recurrent neural network

    CN110070172A

  • Service robot movement system fault diagnosis method and device based on time sequence characteristics

    CN110231156A