A server fault prediction method based on CVAE-LSTM

The server fault prediction method combining adaptive feature enhancement CVAE and bidirectional attention LSTM solves the problem of inefficient server fault prediction in existing technologies, achieving high-precision and timely fault prediction, reducing false alarm rate and improving the effectiveness of early warning.

CN120892240BActive Publication Date: 2025-12-16四川华鲲振宇智能科技有限责任公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511419498.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-30
Publication Date
2025-12-16
Estimated Expiration
2045-09-30

AI Technical Summary

Technical Problem

Existing technologies are unable to efficiently predict server failures, leading to system performance degradation or business interruptions and causing economic losses.

Method used

A server fault prediction method combining adaptive feature enhancement (CVAE) and bidirectional attention LSTM is proposed. The adaptive feature enhancement module learns the importance weights of server indicator data, dynamically selects key features, and uses bidirectional attention LSTM to capture temporal dependencies. Combined with dynamic probability thresholds, fault warnings are provided.

Benefits of technology

It improves the accuracy and timeliness of server fault prediction, reduces the false alarm rate, enhances the effectiveness and rationality of early warning, and reduces manual maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120892240B_ABST
    Figure CN120892240B_ABST
Patent Text Reader

Abstract

The application relates to a CVAE-LSTM-based server fault prediction method, which constructs an adaptive feature enhancement CVAE, takes the CVAE as a basic architecture and a CVAE-LSTM fusion model; specified index data in a server running process are collected in real time and input into the adaptive feature enhancement CVAE, and potential feature vectors of various fault types are output; the potential features of various fault types are input into a fusion layer of the CVAE-LSTM fusion model for fusion processing, and a fusion feature vector is obtained; the fusion feature vector is input into a bidirectional attention LSTM for feature enhancement, probability values of different types of faults predicted based on the enhanced fusion feature vector are output; dynamic probability threshold values of different types of faults are set based on the current load state of the server, and whether the server has a fault risk is judged based on the dynamic probability threshold values. Through adaptive feature enhancement and feature fusion technology, the learning ability for complex server running data is improved; with the aid of a bidirectional attention mechanism and dynamic threshold adjustment, the accuracy of fault prediction and the effectiveness of early warning are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of server fault prediction, and particularly relates to a server fault prediction method based on CVAE-LSTM. BACKGROUND

[0002] In today's digital world, servers as the key computing devices of the Internet and enterprises bear a large amount of data processing and storage tasks. The normal operation of the server is crucial to ensure the stability of the system and the continuity of the business. However, the server inevitably has various faults such as hardware failure, software failure and network failure during long-time operation. These faults may cause system performance degradation, even business interruption, and cause huge economic losses.

[0003] In order to solve the above problems, the application proposes a server fault prediction method based on adaptive feature enhancement CVAE (conditional variational autoencoder) and bidirectional attention LSTM (long short-term memory network model) combination, which uses the strong representation ability of CVAE and the long-time memory ability of LSTM to improve the accuracy and timeliness of server fault prediction. SUMMARY

[0004] The purpose of the application is to provide a server fault prediction method based on CVAE-LSTM, which uses the strong representation ability of CVAE and the long-time memory ability of LSTM to improve the accuracy and timeliness of server fault prediction.

[0005] To solve the above technical problems, the technical solution adopted by the application is as follows:

[0006] A server fault prediction method based on CVAE-LSTM, comprising the following steps:

[0007] S1: Construct an adaptive feature enhancement CVAE, and add an adaptive feature enhancement module to the CVAE basic architecture;

[0008] S2: Construct a bidirectional attention LSTM, and set a fusion layer as the connection core between the adaptive feature enhancement CVAE and the bidirectional attention LSTM to generate a CVAE-LSTM fusion model;

[0009] S3: Real-time acquisition of specified index data in the server running process and preprocessing, taking the preprocessed specified index data as the input of the adaptive feature enhancement CVAE, and outputting the latent feature vector of each fault type;

[0010] S4: Input the latent feature of each fault type into the fusion layer of the CVAE-LSTM fusion model for fusion processing to obtain a fusion feature vector;

[0011] S5: inputting the fusion feature vector into a bidirectional attention LSTM, further enhancing the fusion feature vector by the bidirectional attention LSTM to obtain an enhanced fusion feature vector, and outputting a predicted probability value of different types of faults based on the enhanced fusion feature vector;

[0012] S6: setting a dynamic probability threshold of different types of faults based on a current load state of the server, and judging whether the server has a fault risk based on the dynamic probability threshold, and if yes, performing a fault warning.

[0013] Preferably, the adaptive feature enhancement module dynamically filters key features and enhances their expression by learning the importance weight of each server index data.

[0014] Preferably, the specific process of outputting the latent feature vector of each fault type in step S3 with the preprocessed specified index data as the input of the adaptive feature enhancement CVAE is as follows:

[0015] S31: dividing the preprocessed specified index data into sample sets of fixed length according to time sequence, each sample set containing complete index data within a single time window;

[0016] S32: sequentially inputting the sample set into the adaptive feature enhancement CVAE, calculating the weight value of each index feature through the attention mechanism, and the weight value is positively correlated with the contribution of the feature to the fault prediction;

[0017] S33: dynamically filtering the input features based on the weight value: retaining key features with a weight higher than a preset threshold, performing dimension reduction processing on low-weight redundant features, and simultaneously enhancing the numerical expression of the key features through a feature amplification mechanism;

[0018] S34: inputting the enhanced key features into an encoder network, performing nonlinear transformation through multiple fully connected layers to compress the data dimension, and outputting the mean vector and variance vector of the latent variable;

[0019] S35: performing fault type prior constraint injection, encoding the fault type label into a one-hot vector, splicing the one-hot vector with the intermediate layer feature of the encoder, and adding a type constraint term in the loss function, so that the model maps the features of different fault types to different sub-regions in the latent space;

[0020] S36: generating the latent variable z through reparameterization based on the mean and variance, the latent variable z fusing the essential information of the input features and the fault type constraint, the latent variable z being the latent feature carrier of each fault type, the dimension of the latent variable z being preset by the encoder structure, and the sample latent variables of the same fault type showing an aggregated distribution in the latent space;

[0021] S37: generating the latent feature vector of each fault type based on the latent variable.

[0022] Preferably, the specific process of generating the latent feature vector of each fault type based on the latent variable in step S37 is as follows:

[0023] S371: The latent variable z is input into the decoder network, and the feature data of the same dimension as the input data is reconstructed through multiple fully connected layers. The mean square error of the reconstructed data and the original input is calculated, and the KL divergence loss and the feature importance loss are combined to update the parameters of the encoder and the decoder through back propagation;

[0024] S372: According to the clustering area of the latent variable in the preset latent space, the feature boundary of each fault type is pre-divided through K-means, and the latent feature vector of the corresponding fault type is output, with the feature confidence. The feature confidence is calculated based on the Euclidean distance between the latent variable and the center of the class.

[0025] Preferably, the specific process of step S4 is as follows:

[0026] S41: The latent feature vector of the corresponding fault type, i.e. the latent variable sequence, and the hidden layer state of the bidirectional attention LSTM network are input into the fusion layer at the same time. The latent feature vector contains the essential distribution feature of the server index data, and the LSTM hidden state H contains the dynamic dependence relationship of the time series;

[0027] S42: The latent feature Z and the LSTM hidden state H are processed by a fully connected layer for dimension unification;

[0028] S43: An attention score matrix is constructed: the correlation score of each time step feature in Z and H is calculated by the following formula;

[0029] S44: The attention score matrix is normalized to obtain the attention weight of each time step;

[0030] S45: The latent feature vector and the LSTM hidden state of each time step are added element by element to obtain an intermediate feature vector;

[0031] The intermediate feature is weighted and fused by the attention weight to obtain a fusion feature vector.

[0032] Preferably, the specific process of step S5 is as follows:

[0033] S51: The fusion feature vector F output by the fusion layer is rearranged into a sequence form according to the time sequence as the input sequence of the bidirectional attention LSTM. The sequence already contains the coupling information of the distribution feature of CVAE and the time sequence feature of LSTM, providing a basis for further enhancement;

[0034] S52: Process the input sequence from time step 1 to n in turn, store the historical feature information through the memory unit, and output the forward hidden state sequence;

[0035] Process the input sequence from time step n to 1 in reverse, and output the reverse hidden state sequence;

[0036] Concatenate the forward and reverse hidden states of each time step to obtain the bidirectional hidden state, which has a dimension of twice the bidirectional LSTM hidden layer dimension, and simultaneously captures the forward and backward dependencies of the time series data;

[0037] S53: Feature-level attention calculation: For the bidirectional hidden state, calculate the importance weight of each feature dimension, map the bidirectional hidden state to an attention score vector through a fully connected layer, and then normalize it through softmax to obtain the feature weight;

[0038] S54: Temporal attention aggregation of all enhanced hidden states: Calculate the contribution weight of each time step to the final prediction, weight the sum of all enhanced hidden states based on the temporal weight, and obtain the global enhanced fusion feature vector. The global enhanced fusion feature vector further filters key features and time steps through two layers of attention mechanism, realizing feature enhancement based on bidirectional feature extraction;

[0039] S55: Input the enhanced fusion feature vector into the fully connected network, map the feature to the fault type dimension space through two layers of nonlinear transformation, and use the improved softmax function to normalize the output of the fully connected layer to obtain the prediction probability of each fault type;

[0040] S56: Calibrate the probability value by combining the historical prediction accuracy, keep the probability of high confidence samples unchanged, and adjust the low confidence samples smoothly to improve the reliability of probability prediction.

[0041] Preferably, the detailed process of step S6 is as follows:

[0042] S61: Based on the load-related indicators of the server running in real time, including CPU usage C, memory occupancy M, disk I / O utilization D and network bandwidth occupancy N, all expressed in percentage 0-100%;

[0043] S62: Build a load comprehensive score model: Calculate the load index L by weighted summation, and the weight is set based on the influence degree of each indicator on the load;

[0044] S63: Set the basic probability threshold for each fault type, set the adjustment coefficient K according to the load level, K=1.2 when the load is low, the threshold is raised, the false alarm is reduced, K=1.0 when the load is medium, the threshold remains the basic value, K=0.8 when the load is high, the threshold is reduced, and the early warning sensitivity is improved.

[0045] Dynamic threshold calculation: for the i-th fault type, the dynamic probability threshold Tᵢ = Tᵢ × K, where Tᵢ is the base threshold value for this type of fault;

[0046] Threshold boundary constraint setting: ensure that the dynamic threshold is always within a reasonable range, avoiding excessively high or low thresholds due to extreme loads;

[0047] Obtain the output of each type of fault prediction probability, and compare the probability with the threshold value: for each fault type, determine whether its probability is greater than the corresponding dynamic threshold value, if yes, mark this type as a risk candidate; otherwise, it is normal;

[0048] Risk level division: according to the number and severity of risk candidate fault types, the risk level is divided into three levels:

[0049] First-level risk: there is a hardware failure risk or there are two or more fault risks at the same time;

[0050] Second-level risk: there is a software failure risk and no hardware failure risk;

[0051] Third-level risk: only network failure risk exists;

[0052] When there is any first-level risk, trigger the failure warning mechanism; when there is no risk candidate type, do not trigger the warning;

[0053] Warning information generation: the warning information contains the following core content:

[0054] Risk type: clearly mark the risk probability of the fault type triggering the warning;

[0055] Current load: server load index and specific values of each load indicator;

[0056] Warning level: according to the risk level, mark first-level warning, second-level warning, and third-level warning.

[0057] Threshold real-time update: every specified time, re-collect the load indicators and calculate the dynamic threshold value, if the load state changes, update the threshold value of the corresponding fault type immediately.

[0058] Warning history record: automatically store information such as time, fault type, prediction probability, and load state of the warning event, form a warning log, and use it for subsequent optimization of the threshold model.

[0059] Threshold model optimization: periodically adjust the base threshold value and load weight coefficient based on the warning log and actual fault occurrence.

[0060] The beneficial effects of the present application include:

[0061] The server fault prediction method based on the CVAE-LSTM provided by the application, constructs an adaptive feature enhancement CVAE, and takes the CVAE as a basic architecture and a CVAE-LSTM fusion model; real-time collection of specified index data in the server running process is input into the adaptive feature enhancement CVAE, and the latent feature vectors of each fault type are output; the latent features of each fault type are input into the fusion layer of the CVAE-LSTM fusion model for fusion processing to obtain a fusion feature vector; the fusion feature vector is input into a bidirectional attention LSTM for feature enhancement, and the enhanced fusion feature vector is output to predict the probability value of different types of faults; the dynamic probability threshold of different types of faults is set based on the current load state of the server, and whether the server has a fault risk is judged based on the dynamic probability threshold. Through adaptive feature enhancement and feature fusion technology, the learning ability of the server complex running data is improved; with the help of the bidirectional attention mechanism and dynamic threshold adjustment, the accuracy of fault prediction and the effectiveness of early warning are improved.

[0062] First, by setting an adaptive feature enhancement module in the CVAE, the importance weight of each server index data can be automatically learned, and the key features can be dynamically selected and enhanced. The limitations of manual intervention in traditional feature selection are avoided, the interference of redundant features on the model is reduced, the model can focus more on the core features with high contribution to fault prediction, thereby improving the efficiency and pertinence of feature extraction, and providing better feature basis for subsequent fault prediction.

[0063] Second, the CVAE-LSTM fusion model fuses the latent features output by the CVAE with the LSTM hidden state through the fusion layer, and calculates the correlation score and weight of each time step feature by using the attention mechanism in the fusion process, realizing the deep coupling of distribution features and time sequence features. This fusion method not only retains the ability of CVAE to capture data distribution features, but also combines the learning advantages of LSTM on time sequence dependency, so that the model can better handle complex and dynamically changing index data in the server running process, and improve the learning ability of the model on complex data patterns.

[0064] Third, when the bidirectional attention LSTM further enhances the fusion feature vector, it captures the forward and backward dependency of time sequence data by processing the input sequence in the forward and reverse directions, and aggregates and selects key features and time steps by using feature-level attention and time sequence attention. The effective information in the fusion features is fully mined, the noise influence is reduced, and then the prediction probability is output through the full connection network and the improved softmax function, effectively improving the accuracy of different types of fault prediction and reducing the prediction error.

[0065] Fourth, set dynamic probability thresholds for different types of faults based on the current load state of the server, which can flexibly adjust the judgment criteria according to the real-time running status of the server. Lower the threshold to improve the warning sensitivity and timely discover potential faults in high load; increase the threshold to reduce false positives and avoid unnecessary intervention in low load. At the same time, combined with the comparison of fault probability and dynamic threshold and the division of risk level, the fault warning is carried out, which makes the warning more suitable for the actual operation of the server and improves the rationality and effectiveness of the warning.

[0066] Fifth, the warning history record and threshold model optimization stores the warning event information and adjusts the basic threshold and load weight coefficient based on the actual situation regularly, so that the model can adapt to the changes of server running state and the evolution of fault mode, improve the practicability of the model, prolong the effective service life of the model, and reduce the cost and difficulty of manual maintenance.

[0067] Sixth, the threshold real-time updating mechanism ensures that the dynamic threshold can timely reflect the changes of the server load state, and once the load level changes, the corresponding fault threshold will be updated immediately, so that the fault risk judgment can follow the running state of the server. In addition, the calibration processing of the prediction probability and the detailed content contained in the warning information further enhance the reliability of the fault warning, provide accurate and valuable reference for the operation and maintenance personnel, and help them to take timely measures. BRIEF DESCRIPTION OF DRAWINGS

[0068] Figure 1 The figure is a flowchart of the server fault prediction method based on CVAE-LSTM of the application.

[0069] Figure 2 The figure is an architecture diagram of the CVAE-LSTM fusion model of the application. DETAILED DESCRIPTION

[0070] The following will be combined with the drawings Figures 1-2 Further detailed description of the application:

[0071] Example 1

[0072] Referring to the drawings Figure 1 The figure is a server fault prediction method based on CVAE-LSTM, which includes the following steps:

[0073] S1: Construct an adaptive feature enhancement CVAE, take CVAE as the basic architecture, add an adaptive feature enhancement module on the basis of CVAE, and dynamically filter key features and enhance their expression by learning the importance weight of each server index data.

[0074] S2: Construct a bidirectional attention LSTM, set a fusion layer as the connecting core between the adaptive feature enhancement CVAE and the bidirectional attention LSTM, and generate a CVAE-LSTM fusion model;

[0075] S3: Real-time acquisition and preprocessing of specified indicator data in the server running process, taking the preprocessed specified indicator data as the input of the adaptive feature enhancement CVAE, and outputting the latent feature vector of each fault type;

[0076] S4: Input the latent feature of each fault type into the fusion layer of the CVAE-LSTM fusion model for fusion processing to obtain a fusion feature vector;

[0077] S5: Input the fusion feature vector into the bidirectional attention LSTM, and the bidirectional attention LSTM further enhances the fusion feature vector to obtain an enhanced fusion feature vector, and outputs the predicted probability value of different types of faults based on the enhanced fusion feature vector;

[0078] S6: Set a dynamic probability threshold for different types of faults based on the current load state of the server, and judge whether there is a fault risk based on the dynamic probability threshold, and if so, perform fault warning.

[0079] Referring to Figure 2 , the input layer of the CVAE-LSTM fusion model is responsible for data input and preprocessing, and is the starting link of the model process. It receives raw data and performs preprocessing operations such as cleaning, format conversion, and standardization to provide reliable quality and standardized format data for subsequent modules. The adaptive feature enhancement CVAE (conditional variational autoencoder) is a generative model that combines variational inference and deep learning, which can introduce conditional information when generating data and better capture the latent distribution of data. Adaptive feature enhancement automatically adjusts the enhancement method of features according to the characteristics of input data, more effectively extracting and strengthening key features. Reparameterization: is a key technology in variational autoencoder, used to solve the problem of non-differentiable sampling of latent variables, so that the model can be trained through gradient descent. Encoder network and decoder network: the encoder maps the input data to the latent space to obtain the latent representation; the decoder reconstructs the original data or generates new data from the latent representation, and the two work together to complete the feature extraction and generation task.

[0080] The fusion layer realizes feature fusion: integrates features from different sources or after different processing, comprehensively utilizes information from multiple aspects, and improves the richness and representativeness of features. The attention mechanism makes the model pay attention to more important feature parts and ignore irrelevant or secondary information, further optimizing the quality of features and providing more valuable input for subsequent modules.

[0081] The bidirectional attention LSTM module is a bidirectional LSTM structure: LSTM (Long Short Term Memory) is good at processing time series data and capturing long-term dependencies of data; the bidirectional LSTM utilizes the forward and backward information of the sequence at the same time, and more comprehensively mines the patterns in the time series data. The attention mechanism is introduced at the feature level, and different weights are given to different features to highlight the key features in time series analysis. Time series attention aggregation: the attention information of time series data at different time steps is aggregated to better integrate the key information in the time dimension and improve the processing capability of the model for time series data.

[0082] The output layer integrates the features processed by the previous modules through full connection and maps them to the final output space.

[0083] Embodiment 2

[0084] On the basis of embodiment 1, the specific process of outputting the latent feature vector of each fault type in step S3 by using the preprocessed specified index data as the input of the adaptive feature enhanced CVAE is as follows:

[0085] S31: The preprocessed specified index data is divided into fixed-length sample sets according to the time sequence, and each sample set contains complete index data within a single time window;

[0086] S32: The sample sets are sequentially input into the adaptive feature enhanced CVAE, and the weight values of each index feature are calculated through the attention mechanism, which is positively correlated with the contribution of the feature to the fault prediction;

[0087] S33: Based on the weight values, the input features are dynamically selected: the key features with weight values higher than a preset threshold are retained, the low-weight redundant features are processed by dimension reduction, and the key features are enhanced by the feature amplification mechanism;

[0088] S34: The enhanced key features are input into the encoder network, and the data dimension is compressed through multiple fully connected layers for nonlinear transformation, and the output layer generates the mean vector and variance vector of the latent variable, wherein the mean vector reflects the central tendency of the same fault feature, and the variance vector reflects the dispersion degree of the feature distribution;

[0089] S35: Fault type prior constraint injection is performed, the fault type label is encoded into a one-hot vector, and the one-hot vector is spliced with the intermediate layer features of the encoder, and a type constraint term is added in the loss function to make the model map the features of different fault types to different sub-regions in the latent space;

[0090] S36: Based on the mean μ and variance σ , through reparameterization, the formula is: z= μ + ε ・σ ,in, ε To represent random noise that follows a standard normal distribution, a latent variable z is generated. The latent variable z integrates the essential information of the input features with the fault type constraint. The latent variable z serves as the potential feature carrier for each fault type, and its dimension is preset by the encoder structure. Sample latent variables of the same fault type exhibit a clustered distribution in the latent space. σ For standard deviation, given by variance σ ² is obtained by taking the square root;

[0091] S37: Generate latent feature vectors for each fault type based on latent variables.

[0092] The specific process of generating latent feature vectors for each fault type based on latent variables in step S37 is as follows:

[0093] S371: The latent variable z-input decoder network reconstructs feature data of the same dimension as the input data through multiple fully connected layers, calculates the mean square error between the reconstructed data and the original input, and combines KL divergence loss (to measure the difference between the latent variable distribution and the prior normal distribution) and feature importance loss (to constrain the rationality of attention weights) to update the encoder and decoder parameters through backpropagation.

[0094] S372: Based on the clustering regions of latent variables in the preset latent space, the feature boundaries of each fault type are pre-divided using K-means, and the latent feature vectors of the corresponding fault types are output, along with feature confidence scores. The feature confidence scores are calculated based on the Euclidean distance between the latent variables and the center of the class.

[0095] The specific process of step S4 is as follows:

[0096] S41: Denote the potential feature vector (i.e., the latent variable sequence, denoted as Z = [z1, z2, ..., z3]) corresponding to the fault type. n ], where n is the number of time steps, z n The hidden variable vector at time step n corresponds to the hidden state of the bidirectional attention LSTM network (denoted as H = [h1, h2, ..., h...). n ], h n The bidirectional attention LSTM hidden state vector at time step n is simultaneously input into the fusion layer. The latent feature vector contains the essential distribution characteristics of the server indicator data, and the LSTM hidden state H contains the dynamic dependencies of the time series.

[0097] S42: Dimensional unification of latent features Z and LSTM hidden states H is performed using a fully connected layer.

[0098] If the dimension of Z is d1 and the dimension of H is d2, they are mapped to the same dimension d through two independent fully connected layers respectively, d is usually the greatest common divisor of d1 and d2 or a custom dimension; ReLU activation function is used in the mapping process to enhance the non-linear expression ability and ensure the comparability of the two features in the same dimension space;

[0099] S43: Constructing the attention score matrix: the correlation score of each time step feature in Z and H is calculated by the following formula:

[0100] Attention Score (z n ,h n ) = tanh (W1・z n + W2・h n + b);

[0101] Where W1 and W2 are trainable weight matrices, and b is a bias term.

[0102] S44: Normalizing the attention score matrix to obtain the attention weight α n of each time step:

[0103] α n = exp (Attention Score (z n ,h n )) / Σ1 n exp (Attention Score (z n ,h n ));

[0104] The weight α n reflects the contribution of the feature at time step n to the overall fusion result, and its value range is [0, 1], and the sum of the weights of all time steps is 1.

[0105] S45: Element-level addition of the latent feature vector and the LSTM hidden state of each time step to obtain the intermediate feature vector m n = z' n + h' n , z' n and h' n are the dimension-aligned features and hidden states.

[0106] The fusion feature vector F is obtained by weighted fusion of the intermediate features through the attention weight:

[0107] F = Σ(α n ・m n );

[0108] The fusion feature vector F contains both the distribution features captured by the CVAE and the time sequence features captured by the LSTM, and has a dimension of d.

[0109] The fusion feature vector F processed through the above steps will be directly input into the output layer full connection network of the LSTM as the final output for subsequent fault probability prediction. The vector dynamically focuses on key time step features through the attention mechanism, realizing deep coupling of distribution features and time sequence features.

[0110] The specific process of step S5 is as follows:

[0111] S51: Rearrange the fusion feature vector F output by the fusion layer into a sequence form [F1, F2,..., Fn] according to the time sequence. n n is the number of time steps, and F n is the fusion feature corresponding to the original time step, which is the input sequence of the bidirectional attention LSTM. The sequence already contains the coupling information of the distribution features of the CVAE and the time sequence features of the LSTM, providing a basis for further enhancement;

[0112] S52: Process the input sequence from time step 1 to n in turn, store the historical feature information through the memory unit, and output the forward hidden state sequence [→h1, h2,...,→hn]. n Among them, →h n reflects the cumulative feature information from the initial time to the time corresponding to time step n;

[0113] Process the input sequence from time step n to 1 in reverse, and output the reverse hidden state sequence [←h1, ←h2,...,←hn]. n Among them, ←h n reflects the feature association information from the end time to the time corresponding to time step n;

[0114] Concatenate the forward and reverse hidden states of each time step to obtain the bidirectional hidden state h 2n = [→h n ; ←h n ], semicolon represents vector concatenation, and the dimension is twice the dimension of the bidirectional LSTM hidden layer, which simultaneously captures the forward and backward dependencies of time sequence data;

[0115] S53: Feature-level attention calculation: for the bidirectional hidden state h 2n , calculate the importance weight of each feature dimension, and map h 2n to an attention score vector s n = W n ・h n + b n through a fully connected layer, where W n is a weight matrix, and bn For bias, the feature weight is obtained by softmax normalization again;

[0116] S54: Time sequence attention aggregation on enhanced hidden states of all time steps: calculate the contribution weight of each time step to the final prediction, weight sum the enhanced hidden states of all time steps based on the time sequence weight, and obtain a global enhanced fusion feature vector. The global enhanced fusion feature vector further screens key features and time steps through two layers of attention mechanism based on bidirectional feature extraction, realizes feature enhancement, and outputs the final prediction result.

[0117] S55: Input the enhanced fusion feature vector into the fully connected network, map the features to the fault type dimension space through two layers of nonlinear transformation, normalize the output of the fully connected layer using the improved softmax function, and obtain the prediction probability P = [p1, p2,..., pi] of each fault type, where pi represents the probability of the server occurring the ith fault, and Σpi = 1.

[0118] S56: Calibrate the probability value by combining the historical prediction accuracy, keep the probability of high confidence samples unchanged, and adjust the low confidence samples smoothly to improve the reliability of probability prediction.

[0119] The detailed process of step S6 is as follows:

[0120] S61: Based on the load-related indicators of the server running in real time, including CPU usage (C), memory occupancy (M), disk I / O utilization (D), and network bandwidth occupancy (N), all expressed in percentage (0-100%);

[0121] S62: Construct a load comprehensive score model: calculate the load index L by weighted sum, the formula is L = α1C + α2M + α3D + α4N, α1, α2, α3, α4 are corresponding weights, and the weights are set based on the influence of each indicator on the load;

[0122] S63: Set the basic probability threshold for each fault type, set the adjustment coefficient K according to the load level, K = 1.2 when the load is low, the threshold is raised to reduce false positives, K = 1.0 when the load is medium, the threshold remains the basic value, K = 0.8 when the load is high, the threshold is reduced to improve the warning sensitivity;

[0123] Dynamic threshold calculation: for the ith fault type, the dynamic probability threshold Tᵢ = Tᵢ × K, where Tᵢ is the basic threshold value of this type of fault;

[0124] Set threshold boundary constraints: ensure that the dynamic threshold is always within a reasonable range to avoid excessively high or low thresholds due to extreme loads;

[0125] Obtain the output of each type of failure prediction probability P = [p1, p2,..., pi] (pᵢ is the prediction probability of the i-th failure type, compare the probability with the threshold value: for each failure type, determine whether pᵢ is greater than the corresponding dynamic threshold Tᵢ, if pᵢ > Tᵢ, mark this type as "risk candidate"; otherwise, it is "normal";

[0126] Risk level classification: according to the number and severity of risk candidate failure types, the risk level is divided into three levels:

[0127] First-level risk: there is a hardware failure risk or there are two or more failure risks at the same time;

[0128] Second-level risk: there is a software failure risk and no hardware failure risk;

[0129] Third-level risk: only network failure risk exists;

[0130] When there is any first-level risk, trigger the failure warning mechanism; when there is no risk candidate type, do not trigger the warning;

[0131] Warning information generation: the warning information contains the following core content:

[0132] Risk type: clearly mark the risk probability of the failure type that triggers the warning;

[0133] Current load: server load index and specific values of each load indicator (such as "load index 75 points (high load), CPU usage 80%");

[0134] Warning level: according to the risk level, mark "first-level warning", "second-level warning", "third-level warning".

[0135] Threshold value real-time update: re-collect load indicators and calculate dynamic threshold every specified time, if the load state changes, update the threshold value of the corresponding failure type immediately.

[0136] Warning history record: automatically store information such as time, failure type, prediction probability, load state of the warning event, form a warning log, and use it for subsequent optimization of threshold model.

[0137] Threshold model optimization: periodically adjust the basic threshold and load weight coefficient based on the warning log and actual failure occurrence.

[0138] To sum up, the server fault prediction method based on CVAE-LSTM provided by the application automatically learns the importance weight of each server index data by setting the adaptive feature enhancement module, dynamically filters the key features and enhances the expression. Avoid the limitations of manual intervention in traditional feature selection, reduce the interference of redundant features to the model, and provide a better feature basis for subsequent fault prediction. The latent features output by CVAE and the LSTM hidden state are fused through the fusion layer, realizing the deep coupling of distribution features and time sequence features. When the bidirectional attention LSTM further enhances the feature vector of the fusion feature, it captures the forward and backward dependence of the time sequence data by processing the input sequence in the forward and reverse directions, and aggregates and filters the key features and time steps with the help of feature-level attention and time sequence attention. Fully tap the effective information in the fusion features and reduce the noise influence.

[0139] Based on the current load state of the server, the dynamic probability threshold of different types of faults is set, which can flexibly adjust the judgment standard according to the real-time running state of the server. Reduce the threshold to improve the warning sensitivity in high load, and find potential faults in time; Increase the threshold to reduce false positives in low load, avoid unnecessary intervention. The warning history record and threshold model optimization store the warning event information and adjust the basic threshold and load weight coefficient based on the actual situation regularly, so that the model can adapt to the change of server running state and the evolution of fault mode. The threshold real-time updating mechanism ensures that the dynamic threshold can timely reflect the change of server load state, and once the load level changes, the corresponding fault threshold will be updated immediately, so that the fault risk judgment can follow the running state of the server. The calibration processing of the prediction probability and the detailed content contained in the warning information further enhance the reliability of the fault warning.

Claims

1. A server fault prediction method based on CVAE-LSTM, characterized in that, Includes the following steps: S1: Construct an adaptive feature enhancement CVAE, using the CVAE as the basic architecture, and add an adaptive feature enhancement module on top of the CVAE architecture; S2: Construct a bidirectional attention LSTM, and set a fusion layer between the adaptive feature enhancement CVAE and the bidirectional attention LSTM as the core of connection between the two to generate a CVAE-LSTM fusion model; S3: Real-time acquisition of specified indicator data during server operation and preprocessing, using the preprocessed specified indicator data as input to adaptive feature enhancement CVAE, and outputting potential feature vectors for each fault type; S4: Input the potential features of each fault type into the fusion layer of the CVAE-LSTM fusion model for fusion processing to obtain the fusion feature vector; S5: Input the fused feature vector into a bidirectional attention LSTM. The bidirectional attention LSTM further enhances the fused feature vector to obtain an enhanced fused feature vector. Based on the enhanced fused feature vector, output the predicted probability values ​​of different types of faults. S6: Set dynamic probability thresholds for different types of faults based on the server's current load status, and determine whether the server has a fault risk based on the dynamic probability thresholds. If so, issue a fault warning. The specific process of using the preprocessed specified index data as input to the adaptive feature enhancement CVAE in step S3, and outputting the potential feature vectors for each fault type, is as follows: S31: Divide the preprocessed specified indicator data into fixed-length sample sets according to the time series, with each sample set containing complete indicator data within a single time window; S32: Input the sample set into the adaptive feature enhancement CVAE in sequence, and calculate the weight value of each indicator feature through the attention mechanism. The weight value is positively correlated with the contribution of the feature to the fault prediction. S33: Dynamically filter input features based on weight values: retain key features with weights higher than a preset threshold, reduce the dimensionality of low-weight redundant features, and enhance the numerical expression of key features through a feature amplification mechanism. S34: The enhanced key features are input into the encoder network, and the data dimension is compressed through nonlinear transformation by multiple fully connected layers. The output layer generates the mean vector and variance vector of the latent variables. S35: Inject prior constraints on fault types, encode fault type labels into one-hot vectors, concatenate them with the features of the intermediate layer of the encoder, and add a type constraint term to the loss function so that the model maps the features of different fault types to different sub-regions of the latent space. S36: Based on the mean and variance, latent variables z are generated through reparameterization. The latent variables z integrate the essential information of the input features and the fault type constraints. The latent variables z are the potential feature carriers of each fault type. Their dimension is preset by the encoder structure. The latent variables of the same fault type are clustered in the latent space. S37: Generate latent feature vectors for each fault type based on latent variables; The specific process of generating latent feature vectors for each fault type based on latent variables in step S37 is as follows: S371: The latent variable z-input decoder network reconstructs feature data of the same dimension as the input data through multiple fully connected layers, calculates the mean square error between the reconstructed data and the original input, and combines KL divergence loss and feature importance loss to update the encoder and decoder parameters through backpropagation. S372: Based on the clustering regions of latent variables in the preset latent space, the feature boundaries of each fault type are pre-divided using K-means, and the latent feature vectors of the corresponding fault types are output, along with feature confidence scores. The feature confidence scores are calculated based on the Euclidean distance between the latent variables and the center of the class. The specific process of step S5 is as follows: S51: The fusion feature vector F output by the fusion layer is rearranged into a sequence form according to the time series and used as the input sequence of the bidirectional attention LSTM. This sequence already contains the coupling information of the distribution features of CVAE and the temporal features of LSTM, providing a basis for further enhancement. S52: Process the input sequence sequentially from time step 1 to n, store historical feature information through memory units, and output the positive hidden state sequence; Reverse the input sequence from time step n to 1, and output the reverse hidden state sequence; The forward and backward hidden states at each time step are concatenated to obtain the bidirectional hidden state, which has a dimension twice that of the bidirectional LSTM hidden layer, and at the same time captures the dependencies between time series data. S53: Feature-level attention calculation: For the bidirectional hidden state, calculate the importance weight of each feature dimension, map the bidirectional hidden state to the attention score vector through a fully connected layer, and then obtain the feature weights through softmax normalization. S54: Perform temporal attention aggregation on the enhanced hidden states of all time steps: calculate the contribution weight of each time step to the final prediction, and perform a weighted summation of the enhanced hidden states of all time steps based on the temporal weights to obtain the global enhanced fusion feature vector. Based on bidirectional feature extraction, the global enhanced fusion feature vector further filters key features and time steps through a two-layer attention mechanism to achieve feature enhancement. S55: The enhanced fusion feature vector is input into the fully connected network. The features are mapped to the fault type dimension space through two nonlinear transformations. The output of the fully connected layer is normalized using the improved softmax function to obtain the predicted probability of each fault type. S56: The probability value is calibrated by combining historical prediction accuracy. The probability of high-confidence samples remains unchanged, while the probability of low-confidence samples is smoothly adjusted to improve the reliability of probability prediction.

2. The server fault prediction method based on CVAE-LSTM according to claim 1, characterized in that, The adaptive feature enhancement module learns the importance weights of each server's indicator data, dynamically filters key features, and enhances their expression.

3. The server fault prediction method based on CVAE-LSTM according to claim 1, characterized in that, The specific process of step S4 is as follows: S41: Input the latent feature vector of the corresponding fault type, i.e., the latent variable sequence and the hidden state of the bidirectional attention LSTM network, into the fusion layer at the same time. The latent feature vector contains the essential distribution characteristics of the server indicator data, and the LSTM hidden state H contains the dynamic dependency relationship of the time series. S42: The latent features Z and LSTM hidden states H are dimensionally unified through a fully connected layer; S43: Construct the attention score matrix: Calculate the relevant score of each time step feature in Z and H using the following formula; S44: Normalize the attention score matrix to obtain the attention weights at each time step; S45: Add the latent feature vector and the LSTM hidden state element by element at each time step to obtain the intermediate feature vector; The intermediate features are weighted and fused using attention weights to obtain the fused feature vector.

4. The server fault prediction method based on CVAE-LSTM according to claim 1, characterized in that, The detailed process of step S6 is as follows: S61: Load-related metrics based on real-time server operation, including CPU utilization C, memory usage M, disk I / O utilization D, and network bandwidth utilization N, all expressed as percentages from 0-100%. S62: Construct a comprehensive load scoring model: Calculate the load index L by weighted summation, with the weights set based on the degree of influence of each indicator on the load; S63: Set a basic probability threshold for each type of fault, and set an adjustment coefficient K according to the load level. K=1.2 for low load, K=1.0 for medium load, and K=0.8 for high load. Dynamic threshold calculation: For the i-th fault type, the dynamic probability threshold Tᵢ=Tᵢ×K, where Tᵢ is the base threshold for this type of fault; Set threshold boundary constraints; Obtain the predicted probabilities of various types of faults and compare the probabilities with the thresholds for each type: For each type of fault, determine whether its probability is greater than the corresponding dynamic threshold. If it is, mark the type as a risk candidate; otherwise, it is normal. Risk Level Classification: Based on the number and severity of the candidate failure types, the risk level is divided into three levels: Level 1 risk: There is a risk of hardware failure or two or more types of failure risks at the same time; Level 2 risk: There is a risk of software failure but no risk of hardware failure; Level 3 risk: Only network failure risk exists; The fault warning mechanism is triggered when any level of risk exists; no warning is triggered when there are no risk candidate types. Warning information generation: Warning information includes the following core content: Risk type: Clearly indicate the probability of the fault type that triggers the warning; Current load: Server load index and specific values ​​for each load metric; Warning levels: Classified into Level 1, Level 2, and Level 3 warnings based on risk level; Real-time threshold updates: Load metrics are re-collected and dynamic thresholds are calculated at specified intervals. If the load status changes, the threshold for the corresponding fault type is updated immediately. Warning history record: Automatically stores the time, fault type, predicted probability, and load status information of warning events to form a warning log, which is used for subsequent optimization of the threshold model; Threshold model optimization: Regularly adjust the base threshold and load weight coefficient based on warning logs and actual fault occurrences.

Citation Information

Patent Citations

  • LSTM-CVAE-based lactic acid bacteria fermentation process fault detection and diagnosis method

    CN117350328A

  • Position prediction method in multi-target tracking based on random noise and attention mechanism

    CN119863492A