Server fault prediction method, device and equipment and readable storage medium

By using a server fault prediction model based on the attention mechanism and time convolutional network in the cloud computing platform, the problem of inaccurate fault prediction in the existing technology is solved, more efficient and reliable fault prediction is achieved, and the operation and maintenance efficiency of the cloud platform is improved.

CN119690721APending Publication Date: 2025-03-25INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411749151.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-30
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

In the prior art, server failure prediction is not accurate and unreliable enough, resulting in huge losses caused by cloud computing platforms when server downtime is large.

Method used

A variational autoencoder based on attention mechanism and time convolution network is used as the server fault prediction model to predict health of the server to be tested, and the health threshold is obtained through training the model. If the health factor is less than the threshold, there is a risk of failure.

Benefits of technology

It improves the processing capability and accuracy of large-scale timing data, can troubleshoot some faults in the early stage, improve the operation and maintenance efficiency of cloud platform, and reduce the impact of server failures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119690721A_ABST
    Figure CN119690721A_ABST
Patent Text Reader

Abstract

The invention discloses a server fault prediction method, device and equipment and a readable storage medium, and is applied to the field of servers, and the method comprises the steps: carrying out the health prediction of a to-be-tested server through a server fault prediction model, and obtaining a health factor; the server fault prediction model is a variational auto-encoder based on an attention mechanism and a time convolutional network; obtaining a health threshold value obtained when the training of the server fault prediction model is finished; if the health factor is smaller than a health threshold value, determining that a fault risk exists. According to the method, a variational auto-encoder is introduced into a fault prediction process of a cloud platform server, the variational auto-encoder is improved, and a time convolutional network is introduced to enable a model to efficiently process large-scale time sequence data without omitting original detail features of the data; and feature enhancement processing is realized by introducing a channel attention mechanism, so that the influence degree of related features on the model is improved. Therefore, the method provided by the invention has stronger processing capability and higher accuracy on large-scale time sequence data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of servers, and in particular to a server fault prediction method, device, equipment and readable storage medium. Background Art

[0002] If a large-scale downtime occurs on cloud computing platform servers, it will cause huge losses. Therefore, server failure prediction is particularly important. Currently, the operation and maintenance of cloud platform servers usually requires manual analysis and judgment based on a large number of indicators to determine the health of the server. This method is very inefficient and extremely dependent on the experience of relevant experts.

[0003] Therefore, how to efficiently and reliably predict server failures is an urgent problem that needs to be solved. Summary of the invention

[0004] In view of this, an object of the present invention is to provide a server fault prediction method, apparatus, device and readable storage medium, which solves the problem that server fault prediction in the prior art is not accurate and reliable.

[0005] In order to solve the above technical problems, the present invention provides a server failure prediction method, comprising:

[0006] The server failure prediction model is used to predict the health of the server to be tested, and a health factor is obtained; the server failure prediction model is a variational autoencoder based on an attention mechanism and a temporal convolutional network;

[0007] Obtaining a health threshold value obtained when the server fault prediction model training is completed;

[0008] If the health factor is less than the health threshold, there is a risk of failure.

[0009] On the one hand, the training process of the server failure prediction model includes:

[0010] Acquire training data, where the training data is normal historical data of the server;

[0011] Preprocessing the training data to obtain processed data;

[0012] The server failure prediction model is trained using the processed data, and the training is stopped when an end condition is reached.

[0013] On the one hand, obtain training data, including:

[0014] Obtaining a preset performance indicator, and collecting historical data of the server according to the preset performance indicator;

[0015] Accordingly, obtaining the health threshold obtained during the training of the server fault prediction model includes:

[0016] Obtain the health thresholds corresponding to the preset performance indicators obtained at the end of the server fault prediction model training.

[0017] On the one hand, collecting historical data of the server according to the preset performance indicator includes:

[0018] Collecting historical data of the server within a preset historical time period according to the preset performance indicator;

[0019] If the data corresponding to the preset performance indicator is periodic time series data, the historical data at least includes historical data of one period.

[0020] On the one hand, the training data is preprocessed to obtain processed data, including:

[0021] The training data is subjected to time aggregation, sliding window processing, abnormal interval processing and normalization processing to obtain the processed data.

[0022] On the one hand, using the processed data to train the server failure prediction model includes:

[0023] Inputting the processed data into the temporal convolutional network to perform skip convolution operation and residual processing to obtain output data;

[0024] Inputting the output data into the encoder of the variational autoencoder for encoding to obtain an encoding mean and an encoding variance;

[0025] Inputting the encoding mean and encoding variance into the latent space of the variational autoencoder for reconstruction to obtain latent variables;

[0026] Inputting the latent variables into the attention model for feature enhancement processing to obtain weighted feature results;

[0027] The weighted feature result is input into the decoder of the variational autoencoder for decoding to obtain reconstructed data.

[0028] A loss function is used to calculate a loss based on the reconstructed data and the processed data, and the server failure prediction model is optimized based on the loss.

[0029] On the one hand, the latent variables are input into the attention model for feature enhancement processing to obtain weighted feature results, including:

[0030] The latent variables are subjected to data transformation and data expansion to obtain processed data; the feature transformation includes transforming the feature dimension into a channel dimension, and the data expansion includes expanding the data information on each channel dimension;

[0031] Performing maximum pooling and average pooling on the processed data respectively, and obtaining output features by a multi-layer perceptron;

[0032] Performing an addition operation on the output features to obtain an addition result;

[0033] The addition result is processed by using an activation function to obtain a channel attention feature weighted graph;

[0034] The latent variables are weighted based on the channel attention feature weighted map to obtain the weighted feature result.

[0035] The present invention also provides a server failure prediction device, comprising:

[0036] A health prediction module is used to use a server fault prediction model to perform health prediction on the server to be tested to obtain a health factor; the server fault prediction model is a variational autoencoder based on an attention mechanism and a temporal convolutional network;

[0037] A health threshold acquisition module, used to obtain the health threshold obtained when the server fault prediction model training is completed;

[0038] A fault prediction module is used to determine if the health factor is less than the health threshold value, indicating that there is a fault risk.

[0039] The present invention also provides a server failure prediction device, comprising:

[0040] Memory for storing computer programs;

[0041] A processor is used to implement the server failure prediction method as described above when executing the computer program.

[0042] The present invention also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are loaded and executed by a processor, the server fault prediction method as described above is implemented.

[0043] The present invention also provides a computer program product, comprising a computer program / instruction, which implements the steps of the above-mentioned server failure prediction method when executed by a processor.

[0044] It can be seen from the above technical scheme that the present invention uses the server fault prediction model to predict the health of the server to be tested and obtains the health factor; the server fault prediction model is a variational autoencoder based on the attention mechanism and the time convolution network; the health threshold obtained at the end of the server fault prediction model training is obtained; if the health factor is less than the health threshold, there is a risk of failure. The beneficial effects of the present invention are: the variational autoencoder is introduced into the fault prediction process of the cloud platform server, and the variational autoencoder is also improved. By introducing the time convolution network, the model can efficiently process large-scale time series data without missing the original detail features of the data; by introducing the channel attention mechanism, feature enhancement processing is realized, and the influence of related features on the model is improved. Therefore, the method has a stronger processing capability and higher accuracy for large-scale time series data. This fault prediction method can eliminate some faults in the early stage, improve the operation and maintenance efficiency of the cloud platform and reduce the serious impact of server failures.

[0045] In addition, the present invention also provides a server fault prediction device, equipment and readable storage medium, which also have the above-mentioned beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0047] Figure 1 A flow chart of a server failure prediction method provided by an embodiment of the present invention;

[0048] Figure 2 A comparison diagram before and after time aggregation provided by an embodiment of the present invention;

[0049] Figure 3 An example diagram of the architecture of a VAE-TCN-AT model provided in an embodiment of the present invention;

[0050] Figure 4 A structural example diagram of a temporal convolutional neural network provided by an embodiment of the present invention;

[0051] Figure 5 An exemplary structural diagram of an attention module provided by an embodiment of the present invention;

[0052] Figure 6 A schematic diagram of the structure of a server failure prediction device provided by an embodiment of the present invention;

[0053] Figure 7A schematic diagram of the structure of a server fault prediction device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0055] Today, cloud computing is booming. Various cloud platforms represented by public cloud, private cloud and hybrid cloud have become important "new digital infrastructure". Cloud platforms are an indispensable part of various digital industries. And with the increasing number of functions integrated into cloud platforms, the complexity, integration and automation of cloud platform systems are constantly improving, and the probability of server failure and functional failure is gradually increasing. Therefore, how to better predict the failure of cloud platform servers is particularly important. At present, the operation and maintenance of cloud platform servers requires manual analysis of a large number of indicators to determine the health of the server, but this method is very inefficient and extremely dependent on the experience of relevant experts.

[0056] In order to solve the above problems, this paper proposes a server failure prediction method. The health factor of the server is obtained through the VAE (Variational Autoencoder)-TCN (Temporal Convolutional Network)-AT (Attention Mechanism) model (i.e., the server failure prediction model). Failure prediction is performed based on whether the health factor falls below the health threshold, thereby reducing the significant economic losses caused by server failures, reducing labor costs, and saving labor resources. Please refer to Figure 1 , Figure 1 A flow chart of a server failure prediction method provided by an embodiment of the present invention. The method may include:

[0057] S101: Use the server fault prediction model to predict the health of the server to be tested and obtain a health factor; the server fault prediction model is a variational autoencoder based on an attention mechanism and a temporal convolutional network.

[0058] The executor of this embodiment is a terminal. This embodiment does not limit the type of terminal, as long as the operation of server fault prediction can be completed. The server fault prediction model in this embodiment is based on the variational autoencoder (VAE) as the basic framework, and introduces the attention mechanism (AT) and the time convolution network (TCN). In this embodiment, the collected server data to be tested is input into the server fault prediction model to obtain the health factor of the server to be tested. It should be noted that this embodiment uses the variational autoencoder as the basic framework of the server fault prediction model, introduces the time convolution network in the encoding part of the variational autoencoder so that the server fault prediction model has a larger receptive field while not losing the detailed features of the data, and introduces the attention module of the attention mechanism in the decoding part of the variational autoencoder to enhance the feature information of the hidden variable. The health factor in this embodiment can explain the predicted health of the server to be tested and whether the server to be tested will fail.

[0059] S102: Obtaining a health threshold obtained when the server fault prediction model training is completed.

[0060] It should be noted that when the server fault prediction model training is completed, the server fault prediction model will obtain a health threshold. It can be understood that the health threshold is a threshold corresponding to each health indicator of the predicted server.

[0061] S103: If the health factor is less than the health threshold, there is a risk of failure.

[0062] When the health factor of the server under test is less than the health threshold, the server under test is at risk of failure. The failure risk can be reported to the computer room manager later.

[0063] The training process of the server fault prediction model is described below. The training process of the server fault prediction model in this embodiment includes: obtaining training data, data preprocessing and training process (i.e. initializing the model and model training). Specifically, the following steps may be included:

[0064] Step 11: Get training data, which is normal historical data of the server.

[0065] At present, most of the common mainstream models used for fault prediction are based on normal data and abnormal data training models, so as to realize the prediction of abnormal data of the server. However, in the time series data in the actual environment, abnormal data only accounts for a small proportion, and it is difficult to directly model the abnormal data, which further increases the difficulty of data processing and fault prediction, and the accuracy and reliability of the model are difficult to guarantee. It should be noted that in this embodiment, only normal data training models are needed, which solves the problem of inaccurate and unreliable model training caused by imbalance of positive and negative samples. This embodiment does not limit the method of obtaining normal data. Specifically, data can be obtained when the server is running normally, and the data is normal data; or normal data can be obtained by filtering from the historical data of the server. The data in this embodiment is time series data.

[0066] Furthermore, the above-mentioned acquisition of training data may include the following steps:

[0067] Obtain preset performance indicators and collect historical data of the server based on the preset performance indicators.

[0068] It should be noted that the normal data of each server on the cloud platform can be used as training data. This embodiment collects historical data of servers on the platform according to preset performance indicators and retains normal data. Among them, the preset performance indicators may include but are not limited to the number of processes, file descriptors, number of network connections, CPU (central processing unit) usage, memory usage, swap area usage, disk, network card traffic, system load, central processing unit temperature and fan speed, etc.

[0069] Specifically, data collection can be realized by using a collection program. In order to obtain the preset performance indicators of each server on the cloud platform, a collection program is written using a Shell script to parse the required indicators. The indicators and acquisition methods can be specifically referred to in Table 1.

[0070] Table 1 Preset performance indicators and acquisition methods

[0071]

[0072]

[0073] It should be noted that the above-mentioned collection program not only extracts the unstructured indicator data of the underlying servers on the cloud platform, but also needs to convert it into structured data that can be recognized by InfluxDB (a time series database) and store it in the InfluxDB time series database. Specifically, the collection program formats the collected data in the format of "Measurement, Points" to obtain a complete data item. Taking the collection program collecting load data as an example, a complete output data item is "system, host = 1ba2282a6eb1 load1 = 0.02, load5 = 0.05, load15 = 0.03, n_users = 1i, n_cpus = 4i 1645350070000000000". The Measurement in this data item refers to the "system" in this data item, which is equivalent to the concept of a table in traditional data, indicating that this data will be stored in the system table. Points corresponds to the remaining part and has three attributes: tags, fiedls and time. Tags is the label of the data item, corresponding to "host=1ba2282a6eb1", indicating that the data item comes from the server named "1ba2282a6eb1"; time corresponds to "1645350070000000000", indicating a moment with nanosecond precision; field is the specific data collected, corresponding to "load1=0.02, load5=0.05, load15=0.03, n_users=1i, n_cpus=4i". The above fields indicate that there is 1 active user in the system at the current moment, there are 4 CPU (central processing unit) cores, and the system load in the last minute, five minutes, and fifteen minutes is 0.02, 0.05, and 0.03 respectively.

[0074] During the data collection and conversion process, data is continuously stored in the time series database, and the labels are stored in the MySQL (a relational database management system) database. When a certain amount of data is reached, all data and labels can be obtained from these two databases for model training. In order to obtain the data required for training, it is necessary to obtain data from the input_database specified in the metadata information and obtain labels from the event table in MySQL. Among them, the label represents a mark for the sample in the training data. The marked sample points will be regarded as abnormal data points and participate in the model training. Abnormal data points can be understood as data that is not uniform data obtained at fixed time intervals.

[0075] Furthermore, the above-mentioned collecting historical data of the server according to the preset performance indicator may include the following steps:

[0076] The historical data of the server within a preset historical time period is collected according to the preset performance indicator; if the data corresponding to the preset performance indicator is periodic time series data, the historical data includes at least one period of historical data.

[0077] In order to make the model have a better prediction effect, if the data corresponding to the preset performance indicator of the model is periodic time series data, then the time series data should include data of at least one period.

[0078] Step 12: Preprocess the historical data to obtain processed data.

[0079] The preprocessing in this embodiment is to regularize the historical data so that the processed data is more conducive to model training. This embodiment does not limit the preprocessing, for example, it can be a normalization operation; or it can also be processing uneven time series data.

[0080] Furthermore, the above-mentioned preprocessing of historical data may specifically include the following steps:

[0081] The training data is subjected to time aggregation, sliding window processing, abnormal interval processing and normalization processing to obtain the processed data.

[0082] Specifically, time aggregation is to solve the problem that uneven training data is not conducive to model training, so it is necessary to aggregate the training data according to time intervals. For details, please refer to Figure 2 , Figure 2 On the left is the original data collected at a 10-second collection interval for a period of time for the KPI (preset performance indicator) in the cloud platform server. It can be seen that the time interval between two adjacent data points is not exactly the set 10 seconds, and some intervals exceed 20 seconds, which means that data is missing and the collected data is uneven. The specific method of time aggregation is: for each time point, take the average value of the collection within the unit window as the observation value at that time point. If data is missing, select the observation value of the previous unit window. The data after time aggregation processing is as follows Figure 2 Shown on the right.

[0083] Since the variational autoencoder was not originally used for time series data, in order to be applied to time series data such as KPI, it is necessary to use two methods, sliding window and abnormal interval processing, to process the data. The variational autoencoder is a generative model that can use existing labels to improve the model effect. The principle is that the variational autoencoder learns the normal pattern in the data. If the abnormal interval in the data (the abnormal interval where the abnormal data point is located) is marked, then the abnormal interval is filled with zeros, and then the variational autoencoder tries to restore this section of data and participates in the training as normal data, which can reduce the adverse effects of abnormal data points (referring to data missing or uneven data) on the model training process. On the other hand, since each data point in the time series data is not isolated, there is a strong contextual association between them. For example, even if there are two data points from a KPI and have the same value, it is very likely that one of them is normal and the other is abnormal. Whether it is abnormal depends on the context in which they are located. Therefore, in order to enable the model to learn the relationship between such a context and a single point, the input of the model training needs to be a section of time series data. This can be achieved by pre-processing the data using a sliding window. Assume that the data after z-score standardization over a period of time is The size of the sliding window is w, so new training data X can be obtained, as shown in the following formula:

[0084]

[0085] Furthermore, since the units of various KPIs in the cloud platform are different and the numerical differences are relatively large, z-score standardization can be used to scale the data proportionally so that it falls into a specific range. Assume that the data within the time range T and aggregated by time is used. As training data, we first need to calculate the mean x and standard deviation σ of the data within the range. The formula is as follows:

[0086]

[0087] Among them, x ti Represents each time series data; n represents the number of time series data

[0088] Finally, we get the scaled training data X norm , the formula is as follows:

[0089]

[0090] Among them, X represents each training data.

[0091] Step 13: Use the processed data to train the server failure prediction model, and stop the training when the end condition is reached.

[0092] After step 11 and step 12, the processed data is obtained. The end condition is not limited in this embodiment. For example, the model training loss value may be less than the preset loss value; or the model training times may reach the preset times. Before officially starting the model training, the model is initialized. For example, building a data flow diagram of the VAE-TCN-AT model includes specifying input and output, building an encoder, re-parameter sampling, a time convolutional network, an attention mechanism, a decoder, a loss function, and other steps.

[0093] Furthermore, the above-mentioned training of the server failure prediction model using the processed data may include the following steps:

[0094] Step 131: input the processed data into a temporal convolutional network for skip convolution operation and residual processing to obtain output data;

[0095] Step 132: Input the output data into the encoder of the variational autoencoder for encoding to obtain the encoding mean and encoding variance;

[0096] Step 133: input the encoding mean and encoding variance into the latent space of the variational autoencoder for reconstruction to obtain latent variables;

[0097] Step 134: input the latent variable into the attention model for feature enhancement processing to obtain a weighted feature result;

[0098] Step 135: input the weighted feature result into the decoder of the variational autoencoder for decoding to obtain reconstructed data;

[0099] Step 136: using the loss function, calculating the loss based on the reconstructed data and the processed data, and optimizing the server failure prediction model based on the loss;

[0100] Specifically, please refer to Figure 3. The network structure of the VAE-TCN-AT model in this embodiment includes: input layer-TCN network layer-encoder-hidden space-attention model-decoder-output layer. Among them, the input layer is used to input preprocessed data; the TCN network layer is used for jump convolution and residual processing; the encoder is used for encoding, and the encoding mean and encoding variance are obtained based on the encoding result; the latent space is used for data reconstruction; the attention mechanism is used for feature enhancement; the decoder is used for decoding. In this embodiment, the attention module can use the channel attention weighted feature map to obtain the key features in the time series data, thereby realizing enhanced feature representation, that is, the attention mechanism can enhance the information of the features according to the importance of the feature information; the dilated convolution structure and residual structure of the temporal convolutional network can enable the model to efficiently process large-scale time series data without missing the original detail features of the data.

[0101] Step 131 is described as follows: The temporal convolutional network in this embodiment uses dilated causal convolution to optimize the traditional one-dimensional convolutional network, which can reduce the complexity of the model while increasing the receptive field. It also has a dilated convolution structure and a residual structure, and has a good effect in processing large-scale time series data without losing the original detail features of the input time series data. The specific structure can be referred to Figure 4 , the temporal convolutional network also includes input layer, hidden layer and output layer. Figure 4 The arc-connected part in represents the residual connection module in the temporal convolutional network. The dilation factor d = 2, the convolution kernel K = 2, by adjusting the size of the convolution kernel and the dilation factor, the model can have the ability to efficiently process large-scale time series data without losing the original feature information of the data. In this embodiment, the preprocessed data X(t) is subjected to a skip convolution operation by the temporal convolutional network. The specific expression is as follows:

[0102]

[0103] Among them, F(i) represents the processed data (X0, ..., X t ) is the result of convolution of the i-th element in ). h(j) is the convolution kernel, and d(j) is the dilation factor (when d=1, it represents standard causal convolution).

[0104] Performing residual processing on the result of skip convolution operation can make the model have good performance in large-scale time series data sets while preventing the model from losing the detailed features of the data. The formula of the output data o of the temporal convolutional network is as follows:

[0105] o=Activation(X+F(X)) where Activation represents the activation function; F(X) is F(i); and X is X(t).

[0106] Step 132 is described as follows: The encoder encodes the output data o using the following formula, and generates the encoding mean μ and encoding variance σ of the encoding result: 2 .

[0107] I=σ(W e o+b e );

[0108] Among them, I represents the encoding result, σ represents the Sigmoid nonlinear activation function, We and be represent the weight matrix and bias vector of the encoding layer network structure respectively.

[0109] Step 133 is described as follows: The latent space of the variational autoencoder uses the encoding mean μ and the encoding variance σ 2 To reconstruct the latent variable Z, and pass the latent variable Z to the attention module, the attention module performs feature enhancement processing on the latent variable Z to obtain the weighted feature result Z'(t). Further, the above-mentioned input of the latent variable into the attention model for feature enhancement processing to obtain the weighted feature result can include the following steps:

[0110] Step 1341: performing data transformation and data expansion on the latent variables to obtain processed data; feature transformation includes transforming the feature dimension into a channel dimension, and data expansion includes expanding the data information on each channel dimension;

[0111] Step 1342: performing maximum pooling and average pooling on the processed data respectively, and obtaining output features by a multi-layer perceptron;

[0112] Step 1343: performing an addition operation on the output features to obtain an addition result;

[0113] Step 1344: Process the addition result using an activation function to obtain a channel attention feature weighted graph;

[0114] Step 1345: Perform weighted processing on the latent variables based on the channel attention feature weighted graph to obtain a weighted feature result.

[0115] The attention module in this embodiment uses the Sigmoid nonlinear activation function to obtain the weight information of the time series data after dimension transformation, so as to realize the targeted training of the model, reduce the number of model training times and improve the model accuracy. The attention module performs weighted fusion on each channel domain of the obtained feature weights and the channel feature values ​​corresponding to the original convolution, so that the convolution channel features can show different weights, thereby extracting the key information representing the target scarf. The calculation process is as follows: Figure 5 As shown. Among them, Represents a merge operation, o' represents an activation function, and FC represents a fully connected layer. Since the attention mechanism in this embodiment is to set the attention weights of different features, in order to better process the input latent variables, the latent variables will be subjected to a data transformation operation, and the feature dimension will be transformed into a channel dimension. Specifically, the latent variables are deformed, the feature dimension is converted into a channel dimension, and the data information on each channel dimension will also be expanded, and the features on the two channel dimensions closest to the current channel dimension will be copied to the current channel, and the processed data will be recorded as E(t). After performing maximum pooling and average pooling on the processed data E(t), two output features are obtained by the multilayer perceptron and an addition operation is performed, and the channel attention feature weighted graph M is obtained again after the Sigmod activation function. c , which is the feature attention weight map, the formula is as follows:

[0116] M c =σ{MLP[AvgPool(E(t))]+MLP[MaxPool(E(t))]}.

[0117] Among them, σ represents the sigmoid nonlinear activation function, MLP represents the multi-layer perceptron operation, AvgPool and MaxPool represent average pooling and maximum pooling respectively. Using the obtained feature attention weight map M c The latent variable Z(t) is weighted to obtain the weighted feature result Z'(t), the formula is as follows:

[0118]

[0119] Step 134 is specifically described as follows: The decoder decodes and reconstructs the weighted feature result Z'(t) to obtain the reconstructed data Y, and the formula is as follows:

[0120] Y=σ d (W d Z′+b d ).

[0121] Among them, σ d Represents the Sigmoid nonlinear activation function, W d and b d Represent the weight matrix and bias vector of the decoding network structure respectively.

[0122] The specific description of step 136 is as follows: According to the model input data X (processed data) and the model output data Y (reconstructed data), the loss is calculated using the loss function. In this way, the effect of model training is measured. When the end condition is reached, the training ends, and a trained model and a corresponding health threshold are obtained. In the process of hyperparameter optimization, due to the wide variety of servers, if the hyperparameters of the KPI of each server are adjusted, it will be time-consuming and laborious. Therefore. In order to enable the model to automatically adapt to different KPIs and reduce the burden on users, the hyperparameter search space can be preset, and the hyperparameter optimization algorithm TPE (Tree-structured Parzen Estimators, a Bayesian optimization algorithm based on tree structure) can be used to search for hyperparameter combinations, and then the best performing group is selected as the hyperparameters for model training.

[0123] Furthermore, after the model training is completed, the trained model can be saved. In order to allow the model to be loaded and used by any node in the module cluster, it can also be serialized. Specifically, use the save() method to save the model (referring to the server fault prediction model) as a temporary file. This file represents the binary representation of the model. Then read the content of the file and encode it. The obtained string is the serialized model. Finally, delete the temporary file. The above string and the parameters obtained by the hyperparameter optimization are combined and saved in the model field in the MySQL model table. At the same time, the health threshold of this training is added to the training_loss field of the MySQL model table. In this way, the prediction process when using the model for prediction can include: extracting the string representing the model and the hyperparameter combination used in the training from the model field in the MySQL model table, deserializing and loading the model, and the model prediction work can be started after the model is loaded. The model prediction work process is carried out in a loop. This loop continuously queries the latest data and continuously outputs the health factor, and finally judges whether each performance indicator is abnormal based on the health threshold.

[0124] Further, when the server to be tested has a failure risk, the current failure risk event is determined, and the current abnormal performance indicator is determined according to the failure risk;

[0125] If the current fault risk event is determined to be a continuous event with the previous fault risk event based on the event time and the abnormal performance indicators are the same, no alarm is required and the time of the previous fault risk event is updated to the current time;

[0126] If it is determined based on the event time that the current fault risk event is a discontinuous event and / or the abnormal performance indicator is different from the previous fault risk event, an alarm is issued and the abnormal performance indicator is sent to the maintenance end.

[0127] This embodiment does not limit the sending method. For example, an email can be sent to the maintenance end to inform the operation and maintenance personnel of possible server failures, and the maintenance personnel can further obtain failure indicators based on abnormal performance indicators, which is conducive to targeted inspections and repairs by maintenance personnel. In addition, considering that alarms may be repeated, if a long-term failure risk event occurs, an alarm is issued every time a detection is performed, which appears to be redundant. Therefore, in order to reduce the number of alarms for failure risk events, the processing of merging failure risk events is added to the server failure prediction process. That is, if it is found that the start time of the current failure risk event is close to the previous failure risk event, the end time of the previous failure risk event is updated to the end time of the current failure risk event, and no alarm prompts are sent to the maintenance end.

[0128] The server fault prediction method provided by the embodiment of the present invention is applied. The server fault prediction model is used to predict the health of the server to be tested, and a health factor is obtained; the server fault prediction model is a variational autoencoder based on an attention mechanism and a temporal convolutional network; the health threshold obtained at the end of the server fault prediction model training is obtained; if the health factor is less than the health threshold, there is a risk of failure. This method introduces the variational autoencoder into the fault prediction process of the cloud platform server, and also improves the variational autoencoder. By introducing the temporal convolutional network, the model can efficiently process large-scale time series data without missing the original detail features of the data; by introducing the channel attention mechanism, feature enhancement processing is achieved, and the influence of related features on the model is increased. Therefore, this method has a stronger processing capability and higher accuracy for large-scale time series data. This fault prediction method can eliminate some faults at an early stage, improve the operation and maintenance efficiency of the cloud platform, and reduce the serious impact of server failures.

[0129] The following is an introduction to a server fault prediction device provided by an embodiment of the present invention. The server fault prediction device described below and the server fault prediction method described above can be referenced to each other.

[0130] Please refer to Figure 6 , Figure 6 A schematic diagram of the structure of a server fault prediction device provided by an embodiment of the present invention may include:

[0131] A health prediction module 100 is used to perform health prediction on the server to be tested using a server fault prediction model to obtain a health factor; the server fault prediction model is a variational autoencoder based on an attention mechanism and a temporal convolutional network;

[0132] A health threshold acquisition module 200 is used to obtain the health threshold obtained when the server fault prediction model training is completed;

[0133] The fault prediction module 300 is used to determine if the health factor is less than the health threshold value and there is a fault risk.

[0134] Based on the above embodiment, the health prediction module 100 includes a training module of a server fault prediction model, and the training module of the server fault prediction model includes:

[0135] A data acquisition unit, used to acquire training data, wherein the training data is normal historical data of the server;

[0136] A preprocessing unit, used for preprocessing the training data to obtain processed data;

[0137] A training unit is used to train the server failure prediction model using the processed data, and stop the training when an end condition is reached.

[0138] Based on the above embodiment, the data acquisition unit may include:

[0139] A data collection subunit, used to obtain preset performance indicators and collect historical data of the server according to the preset performance indicators;

[0140] Accordingly, the above health threshold acquisition module 200 may include:

[0141] The health threshold acquisition unit is used to obtain the health threshold corresponding to each of the preset performance indicators obtained when the server fault prediction model training is completed.

[0142] Based on the above embodiment, the data acquisition subunit may include:

[0143] A first collection subunit, configured to collect historical data of the server within a preset historical time period according to the preset performance indicator;

[0144] The second collection subunit is used for, if the data corresponding to the preset performance indicator is periodic time series data, the historical data at least includes historical data of one period.

[0145] Based on the above embodiment, the preprocessing unit may include:

[0146] The preprocessing subunit is used to perform time aggregation, sliding window processing, abnormal interval processing and normalization processing on the training data to obtain the processed data.

[0147] Based on the above embodiment, the training unit may include:

[0148] A first input-output subunit, used for inputting the processed data into the temporal convolutional network to perform skip convolution operation and residual processing to obtain output data;

[0149] The second input-output subunit inputs the output data into the encoder of the variational autoencoder for encoding to obtain an encoding mean and an encoding variance;

[0150] A third input-output subunit inputs the encoding mean and encoding variance into the latent space of the variational autoencoder for reconstruction to obtain latent variables;

[0151] The fourth input-output subunit inputs the latent variable into the attention model for feature enhancement processing to obtain a weighted feature result;

[0152] The fifth input-output subunit inputs the weighted feature result into the decoder of the variational autoencoder for decoding to obtain reconstructed data.

[0153] The loss calculation subunit is used to calculate the loss based on the reconstructed data and the processed data using a loss function, and optimize the server failure prediction model based on the loss.

[0154] Based on the above embodiment, the fourth input-output subunit may include:

[0155] A data processing subunit is used to perform data transformation and data expansion on the latent variables to obtain processed data; the feature transformation includes transforming the feature dimension into a channel dimension, and the data expansion includes expanding the data information on each channel dimension;

[0156] A pooling subunit, used to perform maximum pooling and average pooling on the processed data, and obtain output features by a multi-layer perceptron;

[0157] An adding subunit, used for performing an adding operation on the output features to obtain an adding result;

[0158] A processing subunit, used for processing the addition result by using an activation function to obtain a channel attention feature weighted graph;

[0159] A weighting subunit is used to perform weighted processing on the latent variable based on the channel attention feature weighted map to obtain the weighted feature result.

[0160] It should be noted that the order of the modules and units in the above-mentioned server fault prediction device can be changed without affecting the logic.

[0161] The server fault prediction module provided by the embodiment of the present invention is applied, and the health prediction module 100 is used to use the server fault prediction model to predict the health of the server to be tested, and obtain the health factor; the server fault prediction model is a variational autoencoder based on the attention mechanism and the time convolution network; the health threshold acquisition module 200 is used to obtain the health threshold obtained at the end of the training of the server fault prediction model; the fault prediction module 300 is used to indicate that there is a fault risk if the health factor is less than the health threshold. This device introduces the variational autoencoder into the fault prediction process of the cloud platform server, and also improves the variational autoencoder. By introducing the time convolution network, the model can efficiently process large-scale time series data without missing the original detail features of the data; by introducing the channel attention mechanism, feature enhancement processing is realized, and the influence of related features on the model is improved. Therefore, the device has a stronger processing capability and higher accuracy for large-scale time series data. This fault prediction method can eliminate some faults in the early stage, improve the operation and maintenance efficiency of the cloud platform, and reduce the serious impact of server failures.

[0162] Figure 7 A schematic diagram of the structure of a server fault prediction device provided by an embodiment of the present invention, such as Figure 7 As shown, the server failure prediction device may include:

[0163] A memory 60, for storing computer programs;

[0164] The processor 61 is used to implement the steps of the server failure prediction method in the above embodiment when executing a computer program.

[0165] The server fault prediction device provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a laptop computer, or a desktop computer.

[0166] Among them, the processor 61 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 61 can be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). The processor 61 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 61 may be integrated with a graphics processing unit (GPU), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 61 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.

[0167] The memory 60 may include one or more computer-readable storage media, which may be non-transitory. The memory 60 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 60 is at least used to store the following computer program 601, wherein, after the computer program is loaded and executed by the processor 61, it can implement the relevant steps of the server fault prediction method disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 60 may also include an operating system 602 and data 603, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 602 may include Windows, Unix, Linux, etc. Data 603 may include, but is not limited to, data of the server fault prediction method, etc.

[0168] In some embodiments, the server fault prediction device may further include a display screen 62 , an input and output interface 63 , a communication interface 64 , a power supply 65 , and a communication bus 66 .

[0169] Those skilled in the art will understand that Figure 7 The structure shown in the figure does not constitute a limitation to the server failure prediction device, and may include more or less components than those shown in the figure.

[0170] It is understandable that if the server fault prediction method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the current technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to execute all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM, magnetic disk or optical disk and other media that can store program code.

[0171] Based on this, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned server fault prediction method are implemented.

[0172] A computer program product provided in an embodiment of the present application is introduced below. The computer program product described below can be cross-referenced with other embodiments described in this document.

[0173] A computer program product includes a computer program / instruction, which implements the steps of the aforementioned disclosed server failure prediction method when executed by a processor.

[0174] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0175] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0176] Finally, it should be noted that, in this article, relationships such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variations are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0177] The above is a detailed introduction to a server fault prediction method, device, equipment and readable storage medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A server failure prediction method, characterized in that: include: Use the server fault prediction model to predict the health of the server to be tested and obtain the health factor; The server failure prediction model is a variational autoencoder based on an attention mechanism and a temporal convolutional network; Obtaining a health threshold value obtained when the server fault prediction model training is completed; If the health factor is less than the health threshold, there is a risk of failure.

2. The server failure prediction method according to claim 1, characterized in that: The training process of the server failure prediction model includes: Acquire training data, where the training data is normal historical data of the server; Preprocessing the training data to obtain processed data; The server failure prediction model is trained using the processed data, and the training is stopped when an end condition is reached.

3. The server failure prediction method according to claim 2, characterized in that: Get training data, including: Obtaining a preset performance indicator, and collecting historical data of the server according to the preset performance indicator; Accordingly, obtaining the health threshold obtained during the training of the server fault prediction model includes: Obtain the health thresholds corresponding to the preset performance indicators obtained at the end of the server fault prediction model training.

4. The server failure prediction method according to claim 2, characterized in that: Collecting historical data of the server according to the preset performance indicator includes: Collecting historical data of the server within a preset historical time period according to the preset performance indicator; If the data corresponding to the preset performance indicator is periodic time series data, the historical data at least includes historical data of one period.

5. The server failure prediction method according to claim 2, characterized in that: Preprocessing the training data to obtain processed data includes: The training data is subjected to time aggregation, sliding window processing, abnormal interval processing and normalization processing to obtain the processed data.

6. The server failure prediction method according to any one of claims 2 to 5, characterized in that: Using the processed data to train the server failure prediction model includes: Inputting the processed data into the temporal convolutional network to perform skip convolution operation and residual processing to obtain output data; Inputting the output data into the encoder of the variational autoencoder for encoding to obtain an encoding mean and an encoding variance; Inputting the encoding mean and encoding variance into the latent space of the variational autoencoder for reconstruction to obtain latent variables; Inputting the latent variables into the attention model for feature enhancement processing to obtain weighted feature results; The weighted feature result is input into the decoder of the variational autoencoder for decoding to obtain reconstructed data. A loss function is used to calculate a loss based on the reconstructed data and the processed data, and the server failure prediction model is optimized based on the loss.

7. The server failure prediction method according to claim 6, characterized in that: The latent variables are input into the attention model for feature enhancement processing to obtain weighted feature results, including: The latent variables are subjected to data transformation and data expansion to obtain processed data; the feature transformation includes transforming the feature dimension into a channel dimension, and the data expansion includes expanding the data information on each channel dimension; Performing maximum pooling and average pooling on the processed data respectively, and obtaining output features by a multi-layer perceptron; Performing an addition operation on the output features to obtain an addition result; The addition result is processed by using an activation function to obtain a channel attention feature weighted graph; The latent variables are weighted based on the channel attention feature weighted map to obtain the weighted feature result.

8. A server failure prediction device, characterized in that: include: A health prediction module is used to use a server fault prediction model to perform health prediction on the server to be tested and obtain a health factor; The server failure prediction model is a variational autoencoder based on an attention mechanism and a temporal convolutional network; A health threshold acquisition module, used to obtain the health threshold obtained when the server fault prediction model training is completed; A fault prediction module is used to determine if the health factor is less than the health threshold value, indicating that there is a fault risk.

9. A server failure prediction device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the server failure prediction method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are loaded and executed by the processor, the server failure prediction method according to any one of claims 1 to 7 is implemented.