System fault prediction method, model training method, device and computer equipment
Patent Information
- Application Number
- CN202311136088.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-01
- Publication Date
- 2026-09-15
- Estimated Expiration
- 2043-09-01
AI Technical Summary
[0004]然而采用全局检查点的检查方法不能解决系统故障的根本原因,且准确度较差,无法对系统进行优化
[0043] The aforementioned system fault prediction method, model training method, apparatus, and computer equipment include a target fault prediction model comprising linear and nonlinear models. After determining the weights of the linear and nonlinear models, the acquired fault logs of the computing system are input into the target fault prediction model to obtain the fault prediction result. Both the linear and nonlinear models are obtained through multiple training iterations using training samples. By using known data to estimate the model parameters, predictions can be made based on the fault log data. Compared to the global checkpoint method in traditional technologies, this application uses a model training method, obtaining the fault prediction model through multiple training iterations based on sample faults. This reduces fault prediction errors, achieves higher accuracy, and maintains relatively constant prediction accuracy over extended operating time, thus improving the system's operational efficiency.
Smart Images

Figure CN117290196B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a system fault prediction method, model training method, apparatus, and computer equipment. Background Technology
[0002] With the development of computer technology, high-performance computing (HPC) technology has emerged. HPC refers to computing systems and environments that typically utilize many processors or several computers organized within a cluster, ranging from large clusters of standard computers to highly specialized hardware. HPCs have a relatively short mean time between failures (MTBF). To maintain the normal operation of HPCs and reduce the failure rate of HPC systems, failure prediction is necessary.
[0003] In traditional technologies, a global checkpoint method is used to check the system. At a certain point in time in the distributed system, all processes or nodes save the current state to persistent storage so that the system can be recovered in case of failure.
[0004] However, the global checkpoint method cannot solve the root cause of system failures, and its accuracy is poor, making it impossible to optimize the system. Summary of the Invention
[0005] Therefore, it is necessary to provide a system fault prediction method, model training method, device, and computer equipment that can accurately and comprehensively predict the faults of high-performance computing systems, addressing the aforementioned technical problems.
[0006] Firstly, this application provides a system fault prediction method. The method includes:
[0007] Obtain fault log data from the target computing system;
[0008] The fault log data is input into the trained target fault prediction model, and the fault prediction result is output through the target fault prediction model.
[0009] The target fault prediction model includes a target linear model and a target nonlinear model. The target fault prediction model uses the combination of the target linear model and the target nonlinear model to predict faults from fault log data. The weights of the target linear model and the target nonlinear model in the target fault prediction model are determined by training samples. The target linear model is obtained by training the initial linear model multiple times with training samples. In each training session, the parameters of the initial linear model are updated based on the training results and the fault categories of the training samples. The target nonlinear model is obtained by training the initial nonlinear model multiple times with training samples. In each training session, the parameters of the initial nonlinear model are updated based on the training results and the fault categories of the training samples.
[0010] In one embodiment, the training process of the target fault prediction model includes:
[0011] A training sample set is constructed and input into the initial linear model and the initial nonlinear model for multiple training iterations. The training sample set includes multiple training samples, each carrying a sample fault category. These sample fault categories are used to construct a fault category sequence.
[0012] For the initial linear model, the parameters are updated based on the difference between the training results and the fault category sequence in each training session until the first preset training condition is met, and then the training stops to obtain the target linear model.
[0013] For the initial nonlinear model, the parameters are updated based on the difference between the training results and the fault category sequence in each training session until the second preset training condition is met, at which point training stops and the target nonlinear model is obtained.
[0014] An initial fault prediction model is constructed based on the target linear model and the target nonlinear model. The model is trained multiple times using the training sample set as input. In each training session, the weights of the target linear model and the target nonlinear model are updated based on the difference between the output results and the fault category sequence. Training stops when the third preset training condition is met, and the target fault prediction model is obtained.
[0015] In one embodiment, constructing a training sample set includes:
[0016] Obtain the fault log set; the fault log set includes multiple sample fault logs and multiple standard fault logs, and the standard fault logs carry standard fault categories;
[0017] Based on the similarity between the sample fault logs and the standard fault logs, the sample fault category of the sample fault logs is determined according to the standard fault category.
[0018] Based on the sample fault categories of each sample feature value, a training sample set is constructed by using multiple sample fault logs.
[0019] In one embodiment, the sample fault category of the sample fault log is determined based on the similarity between the sample fault log and the standard fault log, including:
[0020] Fault keywords are obtained by preprocessing each sample fault log, standard keywords are obtained by preprocessing each standard fault log, and sample feature values of fault keywords and standard feature values of standard keywords are determined. The preprocessing process includes word segmentation, stop word removal, and part-of-speech tagging.
[0021] Based on the similarity between the sample feature values and each standard feature value, a preset number of similar feature values are selected from multiple standard feature values;
[0022] Based on the standard fault category to which similar feature values belong, the sample fault category of the sample feature values is determined.
[0023] In one embodiment, the process of determining the feature values of keywords includes:
[0024] The overall frequency is obtained by weighting the frequency of keywords in the title and the first paragraph of the fault log;
[0025] The characteristic values of each keyword are determined based on the aggregation frequency, the total number of fault logs, and the number of fault logs containing the keyword.
[0026] Secondly, this application also provides a method for training a target fault prediction model, wherein the target fault prediction model includes a target linear model and a target nonlinear model. The method includes:
[0027] A training sample set is constructed and input into the initial linear model and the initial nonlinear model for multiple training iterations. The training sample set includes multiple training samples, each carrying a sample fault category. These sample fault categories are used to construct a fault category sequence.
[0028] For the initial linear model, the parameters are updated based on the difference between the training results and the fault category sequence in each training session until the first preset training condition is met, and then the training stops to obtain the target linear model.
[0029] For the initial nonlinear model, the parameters are updated based on the difference between the training results and the fault category sequence in each training session until the second preset training condition is met, at which point training stops and the target nonlinear model is obtained.
[0030] An initial fault prediction model is constructed based on the target linear model and the target nonlinear model. The model is trained multiple times using the training sample set as input. In each training session, the weights of the target linear model and the target nonlinear model are updated based on the difference between the output results and the fault category sequence. Training stops when the third preset training condition is met, and the target fault prediction model is obtained.
[0031] Thirdly, this application also provides a system fault prediction device. The device includes:
[0032] The data acquisition module is used to acquire fault log data of the target computing system;
[0033] The result output module is used to input fault log data into the trained target fault prediction model and output the fault prediction result through the target fault prediction model.
[0034] The target fault prediction model includes a target linear model and a target nonlinear model. The target fault prediction model uses the combination of the target linear model and the target nonlinear model to predict faults from fault log data. The weights of the target linear model and the target nonlinear model in the target fault prediction model are determined by training samples. The target linear model is obtained by training the initial linear model multiple times with training samples. In each training session, the parameters of the initial linear model are updated based on the training results and the fault categories of the training samples. The target nonlinear model is obtained by training the initial nonlinear model multiple times with training samples. In each training session, the parameters of the initial nonlinear model are updated based on the training results and the fault categories of the training samples.
[0035] Fourthly, this application also provides a target fault prediction model training device, wherein the target fault prediction model includes a target linear model and a target nonlinear model. The device includes:
[0036] The sample set construction module is used to construct a training sample set, which is then input into the initial linear model and the initial nonlinear model for multiple training iterations. The training sample set includes multiple training samples, each carrying a sample fault category, which is used to construct a fault category sequence.
[0037] The target linear model training module is used to update the parameters of the initial linear model based on the difference between the training results and the fault category sequence in each training session until the first preset training condition is met, and then training stops to obtain the target linear model.
[0038] The target nonlinear model training module is used to update the parameters of the initial nonlinear model based on the difference between the training results and the fault category sequence in each training session until the second preset training condition is met, and then training stops to obtain the target nonlinear model.
[0039] The target fault prediction model training module is used to construct an initial fault prediction model based on the target linear model and the target nonlinear model. It performs multiple training sessions with the training sample set as input. In each training session, the weights of the target linear model and the target nonlinear model are updated based on the difference between the output results and the fault category sequence. Training stops when the third preset training condition is met, and the target fault prediction model is obtained.
[0040] Fifthly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-mentioned system fault prediction method or the steps of the target fault prediction model training method.
[0041] Sixthly, this application also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the above-mentioned system fault prediction method or the steps of the target fault prediction model training method.
[0042] Seventhly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described system fault prediction method or the steps of the target fault prediction model training method.
[0043] The aforementioned system fault prediction method, model training method, apparatus, and computer equipment include a target fault prediction model comprising linear and nonlinear models. After determining the weights of the linear and nonlinear models, the acquired fault logs of the computing system are input into the target fault prediction model to obtain the fault prediction result. Both the linear and nonlinear models are obtained through multiple training iterations using training samples. By using known data to estimate the model parameters, predictions can be made based on the fault log data. Compared to the global checkpoint method in traditional technologies, this application uses a model training method, obtaining the fault prediction model through multiple training iterations based on sample faults. This reduces fault prediction errors, achieves higher accuracy, and maintains relatively constant prediction accuracy over extended operating time, thus improving the system's operational efficiency. Attached Figure Description
[0044] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0045] Figure 1 This is an application environment diagram of the system fault prediction method in one embodiment;
[0046] Figure 2 This is a flowchart illustrating a system fault prediction method in one embodiment;
[0047] Figure 3 This is a flowchart illustrating a target fault prediction model training method in one embodiment;
[0048] Figure 4 This is a schematic diagram of the BP neural network structure in another embodiment;
[0049] Figure 5 This is a flowchart illustrating the process of determining the sample fault category based on sample feature values in another embodiment.
[0050] Figure 6 This is a flowchart illustrating a system fault prediction method in another embodiment;
[0051] Figure 7 This is a structural block diagram of a system fault prediction device in one embodiment;
[0052] Figure 8 This is a structural block diagram of a target fault prediction model training device in one embodiment;
[0053] Figure 9 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0054] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0055] The system fault prediction method and / or target fault prediction model training method provided in the embodiments of this application can be applied to, for example, Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed on the cloud or other network servers. After constructing the target fault prediction model, fault log data is input into the target fault prediction model to obtain the prediction results corresponding to the fault logs, including determining the fault category in the fault logs. After obtaining the fault log data of the high-performance computing system, the fault category of the high-performance computing system can be determined. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can be smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. Portable wearable devices can be smartwatches, smart bracelets, head-mounted devices, etc. Server 104 can be implemented using a standalone server or a server cluster composed of multiple servers.
[0056] In one exemplary embodiment, such as Figure 2 As shown, a system fault prediction method is provided, which is applied to... Figure 1 Taking server 104 as an example, the explanation includes the following steps S202 to S204.
[0057] in:
[0058] S202, Obtain fault log data of the target computing system.
[0059] A computing system is a computer system with high computing power, which can be used in fields such as scientific research, engineering analysis, data processing, and simulation. Illustratively, a computing system can be a high-performance computing system, capable of providing supercomputing capabilities, and is a computer system used to handle complex, large-scale, computationally intensive problems.
[0060] High-performance computers have a short mean time between failures (MTBF). To maintain the normal operation of high-performance computers and reduce the failure rate of high-performance computing systems, it is necessary to predict failures. Fault log data records log information generated when computer systems or other devices malfunction, including relevant records of anomalies, errors, or failures that occur during system operation.
[0061] S204. Input the fault log data into the trained target fault prediction model, and output the fault prediction result through the target fault prediction model.
[0062] The target fault prediction model includes a target linear model and a target nonlinear model. The target fault prediction model uses the combination of the target linear model and the target nonlinear model to predict faults from fault log data. The weights of the target linear model and the target nonlinear model in the target fault prediction model are determined by training samples. The target linear model is obtained by training the initial linear model multiple times with training samples. In each training session, the parameters of the initial linear model are updated based on the training results and the fault categories of the training samples. The target nonlinear model is obtained by training the initial nonlinear model multiple times with training samples. In each training session, the parameters of the initial nonlinear model are updated based on the training results and the fault categories of the training samples.
[0063] Fault prediction results can include fault categories, illustratively including software faults, hardware faults, human error, and faults of unknown cause. The target fault prediction model predicts the type of future fault based on fault log data. Illustratively, fault prediction results can also include the probability of expected fault occurrence.
[0064] The target fault prediction model is a trained model used to output fault prediction results based on input fault log data. The target fault prediction model includes a target linear model and a target nonlinear model, each with its own weights. Fault prediction is performed by combining the target linear and nonlinear models. The weights of the target linear and nonlinear models are obtained through training samples. During training, the output prediction results are continuously made to approximate the theoretical prediction results, thereby determining the weights.
[0065] A linear model is a model of the linear relationship between the dependent and independent variables, and can be univariate or multivariate. When a linear model is multivariate, the weights of each explanatory variable can be estimated by minimizing the difference between the actual observed values and the model's predicted values, thereby obtaining the best-fit linear relationship.
[0066] Specifically, training is performed by inputting training samples into an untrained initial linear model. In each training iteration, the training result output by the initial linear model is used as the predicted value, and the fault category of the training sample is used as the actual value for comparison. By updating the parameters of the initial linear model to minimize the difference, training is completed, and the target linear model is obtained.
[0067] A nonlinear model is a model of the nonlinear relationship between dependent and independent variables. Illustratively, a nonlinear relationship model can be a neural network model, such as a backpropagation (BP) neural network. Similar to the training process of a linear model, training samples are input into an untrained initial nonlinear model for training. The parameters of the initial nonlinear model are updated based on the difference between predicted and actual values until training is complete, resulting in the target nonlinear model.
[0068] In the aforementioned system fault prediction method, the target fault prediction model includes a linear model and a nonlinear model. After determining the weights of the linear and nonlinear models, the acquired fault logs of the computing system are input into the target fault prediction model to obtain the fault prediction result. Both the linear and nonlinear models are obtained through multiple training iterations using training samples. By using known data to estimate the model parameters, predictions can be made based on the fault log data. Compared to the global checkpoint method in traditional techniques, this application uses a model training method, obtaining the fault prediction model through multiple training iterations based on sample faults. This reduces fault prediction errors, achieves higher accuracy, and maintains a relatively constant prediction accuracy over extended operating time, thus improving the system's operational efficiency.
[0069] In one exemplary embodiment, such as Figure 3 As shown, the training process of a target fault prediction model includes steps S302 to S308. Wherein:
[0070] S302, Construct a training sample set, and input the training sample set into the initial linear model and the initial nonlinear model for multiple training iterations; the training sample set includes multiple training samples, each carrying a sample fault category, and the sample fault categories are used to construct a fault category sequence.
[0071] Training samples are fault logs carrying the fault categories of the samples. After constructing a fault category sequence from the sample fault categories, the fault categories can be quantified, thus enabling a difference comparison with the training results obtained from each training session.
[0072] S304. For the initial linear model, the parameters are updated based on the difference between the training results and the fault category sequence in each training session until the first preset training condition is met, at which point training stops and the target linear model is obtained.
[0073] Schematic, the fault category sequence of the sample faults is shown in Equation (1):
[0074] X(0)=[x(0)1,x(0)2,...,x(0) n (1)
[0075] Where n is the number of categories.
[0076] Furthermore, the sample fault category sequence can be accumulated once to remove the randomness of the log data in the training samples. The new fault log data category sequence is shown in formula (2):
[0077] X(1)=[x(1)1,x(1)2,...,x(1) n (2)
[0078] In the formula t = 1, 2, ..., n.
[0079] The differential equation model for fault prediction established based on formula (2) is shown in formula (3):
[0080]
[0081] Therefore, based on parameters a and u, the future predicted values of the original fault log data, i.e., the predicted sequence, can be obtained. Specifically, the solution process for formula (3) of the differential equation model is as follows: First, formula (2) is accumulated to obtain the accumulation matrix B and y. n As shown in formulas (4) and (5) respectively:
[0082]
[0083] y n = [x(0)2,x(0)3,...,x(0)] n (5)
[0084] The parameters a and u of the established differential equation model for fault prediction are solved using the least squares algorithm, resulting in formula (6):
[0085]
[0086] Specifically, the solution to the differential equation for fault prediction is obtained through formula (7):
[0087]
[0088] Finally, the predicted value of the fault is obtained by cumulative subtraction and restoration, as shown in formula (8):
[0089]
[0090] Based on the differences between the obtained predicted values and the fault category sequence, the parameters of the initial linear model are updated. After multiple training iterations, it is determined whether a first preset training condition is met. If the condition is met, training ends, and the target linear model is obtained; otherwise, the next training iteration begins. Illustratively, the first preset training condition can be the number of training iterations.
[0091] S306, For the initial nonlinear model, the parameters are updated based on the difference between the training results and the fault category sequence in each training session until the second preset training condition is met, at which point training stops and the target nonlinear model is obtained.
[0092] Schematic illustration: Nonlinear models can be constructed based on back-propagation (BP) neural networks, such as... Figure 4 As shown, a BP neural network consists of an input layer, hidden layers, and an output layer. By training, the weights of the nodes in the input, hidden, and output layers are adjusted to obtain more accurate output results.
[0093] The output values of the hidden layer nodes in the nonlinear model are shown in Equation (9):
[0094]
[0095] Where y = (1, 2, ..., m);
[0096] The output values of the output layer nodes are shown in formula (10):
[0097]
[0098] Where k = (1, 2, ..., l);
[0099] The weights of nodes between the hidden layer and the output layer are adjusted based on the weight adjustment formula (11):
[0100]
[0101] The weights of nodes between the input layer and the hidden layer are adjusted based on the weight adjustment formula (12):
[0102]
[0103] Then, the weights of the nodes between the hidden layer and the output layer are updated based on formula (13):
[0104] ejk (t+1)=e jk (t)+Δe jk (13)
[0105] And based on formula (14), the weights of the nodes between the input layer and the hidden layer are updated:
[0106] r jk (t+1)=e jk (t)+Δr jk (14)
[0107] The weights of each node are updated during multiple training iterations until the second preset training condition is met, at which point the target nonlinear model is obtained. Indicatively, the second preset training condition can be the number of training iterations.
[0108] S308. Construct an initial fault prediction model based on the target linear model and the target nonlinear model. Use the training sample set as input for multiple training sessions. In each training session, update the weights of the target linear model and the target nonlinear model based on the difference between the output results and the fault category sequence. Stop training when the third preset training condition is met, and obtain the target fault prediction model.
[0109] After determining the target linear model and the target nonlinear model, an initial fault prediction model is constructed. This model is then trained multiple times using training samples, updating the weights of the target linear and nonlinear models within the initial fault prediction model. This process continues until a third preset training condition completes the weight update, resulting in the target fault prediction model. Indicatively, the third preset training condition can be the number of training iterations.
[0110] In this embodiment, a target linear model is first trained using training samples to obtain an initial linear model, and then a target nonlinear model is trained using an initial nonlinear model. An initial fault prediction model is then constructed based on the target linear and nonlinear models. The weights of the target linear and nonlinear models are determined through training with training samples to obtain the target fault prediction model. This completes the training process. Fault prediction values are obtained from the fault log data input to the target fault prediction model. The linear and nonlinear models are then combined according to their weights to output the optimal prediction result for the system fault.
[0111] In an exemplary embodiment, S302 constructing the sample set includes:
[0112] Obtain a set of fault logs; this set includes multiple sample fault logs and multiple standard fault logs, with the standard fault logs carrying standard fault categories. Based on the similarity between the sample fault logs and the standard fault logs, determine the sample fault category of the sample fault logs according to the standard fault categories. Construct a training sample set based on the sample fault categories of each sample's feature values using the multiple sample fault logs.
[0113] Sample fault logs are samples used as input to the model for training, while standard fault logs are defined logs written to standard fault categories and used to compare differences in training results.
[0114] Based on similarity, the closest standard fault log is identified, and then the fault category of the sample fault log is determined according to the fault category of the closest standard fault log. After determining the fault category of the sample fault log, a training sample set is constructed based on the determined sample fault category.
[0115] In this embodiment, the constructed fault log set includes sample fault logs for training and standard fault logs for determining the fault categories of the sample fault logs, thereby determining the fault category of each sample fault log and constructing a training sample set.
[0116] In an exemplary embodiment, determining the sample fault category of the sample fault log based on the similarity between the sample fault log and the standard fault log, according to the standard fault category, includes:
[0117] S502, preprocess each sample fault log to obtain fault keywords, preprocess each standard fault log to obtain standard keywords, and determine the sample feature values of fault keywords and the standard feature values of standard keywords; the preprocessing process includes word segmentation, stop word removal and part-of-speech tagging.
[0118] Word segmentation is the process of dividing continuous text into word units, thus dividing logs into meaningful words.
[0119] Stop words are words that appear frequently in a text but usually have no real meaning. Removing stop words can reduce noise and redundant information, and improve the extraction and processing speed of key information.
[0120] Part-of-speech tagging is the process of tagging each word after word segmentation to indicate its grammatical category in a sentence, such as noun, verb, adjective, etc.
[0121] In one embodiment, the process of determining the feature value of a keyword includes: weighting the frequency of the keyword in the title and the frequency of its appearance in the first paragraph of the fault log to obtain a total frequency; and determining the feature value of each keyword based on the total frequency, the total number of fault logs, and the number of fault logs containing the keyword.
[0122] When extracting fault keywords from log data, a dynamic weight α is used to calculate the frequency of fault keywords appearing in the log data after being weighted, and then the feature value of the fault log is calculated, as shown in formula (15). The initial coefficient of α is 1.5-3;
[0123] tf′ j (w i )=t(3+α)·f jh (w i )+(1.5+α)·f jf (w i (15)
[0124] Among them, tf′ j (w i ) indicates the current fault keyword w i The frequency of occurrence of f in fault log data j jh (w i ) indicates the frequency of the current fault keyword in the fault log title, f jf (w i The value indicates the frequency of the current fault keyword appearing in the first paragraph of the fault log.
[0125] Furthermore, the eigenvalues can be obtained according to formula (16):
[0126] TI′(w i )=tf′ j (w i )·log(N / df(w i ))·log(N / df(w i (16)
[0127] Where N represents the total number of fault log data in the fault log dataset, df(w i This indicates how many fault log entries in the fault log dataset contain the keyword "w" for the current fault. i ;
[0128] S504: Based on the similarity between the sample feature values and each standard feature value, a preset number of similar feature values are selected from multiple standard feature values.
[0129] Sample fault log data v and standard classification fault log data v s Similarity is calculated as shown in formula (7), and is determined based on the difference between the sample feature value and the standard feature value:
[0130]
[0131] Based on the magnitude of similarity, a preset number of similar feature values with the highest similarity are selected from multiple standard feature values and used as the standard fault data that is closest to the sample fault data.
[0132] Indicatively, this can be achieved using formula (18):
[0133]
[0134] Wherein, y(v i ,c j ) is a category attribute function, when v i ∈c j At that time, y(v) i ,c j ) = 1, otherwise, y(v) = 1. i ,c j ) = 0;
[0135] S506, Based on the standard fault category to which similar feature values belong, determine the sample fault category of the sample feature values.
[0136] Finally, formula (19) is used to determine the category of the sample fault log data v:
[0137] f = argmaxc j (p(v,c j (19)
[0138] In this embodiment, after calculating the similarity between sample fault log data and standard classified fault log data, multiple samples with the highest similarity are found; then, based on the similarity weight of the sample fault log data and the category of similar fault log data, the category of the sample fault log data is determined, which improves the accuracy of fault log mining and extraction, thereby affecting the comprehensiveness of fault prediction model establishment and improving the comprehensiveness of prediction and the speed of prediction response.
[0139] In an exemplary embodiment, a system fault prediction method includes steps S602-S620:
[0140] S602, Obtain the fault log set; the fault log set includes multiple sample fault logs and multiple standard fault logs, and the standard fault logs carry standard fault categories.
[0141] S604: Preprocess each sample fault log to obtain fault keywords, preprocess each standard fault log to obtain standard keywords, and determine the sample feature values of fault keywords and the standard feature values of standard keywords; the preprocessing process includes word segmentation, stop word removal, and part-of-speech tagging.
[0142] S606, based on the similarity between the sample feature value and each standard feature value, selects a preset number of similar feature values from multiple standard feature values.
[0143] S608 determines the sample fault category of sample feature values based on the standard fault categories to which similar feature values belong. A training sample set is then constructed from multiple sample fault logs based on the sample fault category of each sample feature value.
[0144] S610, the training sample set is input into the initial linear model and the initial nonlinear model for multiple training iterations; the training sample set includes multiple training samples, each carrying a sample fault category, and the sample fault categories are used to construct a fault category sequence.
[0145] S612, for the initial linear model, the parameters are updated based on the difference between the training results and the fault category sequence in each training session until the first preset training condition is met, and then the training stops to obtain the target linear model.
[0146] S614. For the initial nonlinear model, the parameters are updated based on the difference between the training results and the fault category sequence in each training session until the second preset training condition is met, at which point training stops and the target nonlinear model is obtained.
[0147] S616. Construct an initial fault prediction model based on the target linear model and the target nonlinear model. Use the training sample set as input for multiple training sessions. In each training session, update the weights of the target linear model and the target nonlinear model based on the difference between the output results and the fault category sequence. Stop training when the third preset training condition is met, and obtain the target fault prediction model.
[0148] S618, Obtain fault log data of the target computing system.
[0149] S620 inputs fault log data into the trained target fault prediction model and outputs fault prediction results through the target fault prediction model.
[0150] To characterize the prediction performance of the fault prediction method provided in this application, linear and nonlinear models were constructed for comparison. Experiments were conducted to test the accuracy of the prediction models of the three modeling methods. During the experiments, the prediction models of the three modeling methods worked continuously without interruption, and the experiments were repeated five times. The specific durations of the five experiments were as follows: 1: 0-5 hours for the three models; 2: 5-10 hours for the three models; 3: 10-15 hours for the three models; 4: 15-20 hours for the three models; 5: 20-24 hours for the three models. The experimental results are shown in Table 1 below, with the unit being prediction accuracy (%).
[0151] Table 1. Experimental Results of Prediction Accuracy
[0152] 1 87.3 93.3 98.5 2 86.5 92.8 98.8 3 86.6 91.8 99.1 4 81.5 85.6 98.6 5 79.2 80.2 98.6
[0153] The table above shows that, over time, the accuracy of the linear model decreased from 87.3% to 79.2%, exhibiting an overall downward trend, with the decline becoming particularly pronounced after 15 hours of operation. The initial accuracy of the nonlinear model was higher than that of the linear model, decreasing from 93.3% to 80.2%, also showing an overall downward trend, with the decline becoming particularly pronounced after 15 hours of operation. In contrast, the method in this embodiment had an initial accuracy higher than both the linear and nonlinear models. Furthermore, the accuracy of the method in this embodiment reached its peak after 10-15 hours of operation, eventually stabilizing at 98.6%. This indicates that the accuracy of fault prediction in this embodiment did not change significantly with increasing operating time.
[0154] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0155] Based on the same inventive concept, this application also provides a system fault prediction device for implementing the system fault prediction method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more system fault prediction device embodiments provided below can be found in the limitations of the system fault prediction method described above, and will not be repeated here.
[0156] In one exemplary embodiment, such as Figure 7 As shown, a system fault prediction device 700 is provided, including: a data acquisition module 702 and a result output module 704, wherein:
[0157] The data acquisition module 702 is used to acquire fault log data of the target computing system.
[0158] The result output module 704 is used to input fault log data into the trained target fault prediction model and output the fault prediction result through the target fault prediction model.
[0159] The target fault prediction model includes a target linear model and a target nonlinear model. The target fault prediction model uses the combination of the target linear model and the target nonlinear model to predict faults from fault log data. The weights of the target linear model and the target nonlinear model in the target fault prediction model are determined by training samples. The target linear model is obtained by training the initial linear model multiple times with training samples. In each training session, the parameters of the initial linear model are updated based on the training results and the fault categories of the training samples. The target nonlinear model is obtained by training the initial nonlinear model multiple times with training samples. In each training session, the parameters of the initial nonlinear model are updated based on the training results and the fault categories of the training samples.
[0160] In one embodiment, the training process of the target fault prediction model includes: constructing a training sample set, inputting the training sample set into an initial linear model and an initial nonlinear model for multiple training iterations; the training sample set includes multiple training samples, each carrying a sample fault category, which is used to construct a fault category sequence; for the initial linear model, updating parameters based on the difference between the training result and the fault category sequence in each training iteration until a first preset training condition is met, at which point training stops, resulting in a target linear model; for the initial nonlinear model, updating parameters based on the difference between the training result and the fault category sequence in each training iteration until a second preset training condition is met, at which point training stops, resulting in a target nonlinear model; constructing an initial fault prediction model based on the target linear model and the target nonlinear model, using the training sample set as input for multiple training iterations, updating the weights of the target linear model and the target nonlinear model based on the difference between the output result and the fault category sequence in each training iteration, until a third preset training condition is met, at which point training stops, resulting in a target fault prediction model.
[0161] Each module in the aforementioned system fault prediction device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0162] Based on the same inventive concept, this application also provides a target fault prediction model training device for implementing the target fault prediction model training method described above. The solution provided by this device is similar to the implementation scheme described in the above method. Therefore, the specific limitations in one or more target fault prediction model training device embodiments provided below can be found in the limitations of the target fault prediction model training method described above, and will not be repeated here.
[0163] In one exemplary embodiment, such as Figure 8As shown, a target fault prediction model training device 800 is provided. The target fault prediction model includes a target linear model and a target nonlinear model. The target fault prediction model training device 800 includes: a sample set construction module 802, a target linear model training module 804, a target nonlinear model training module 806, and a target fault prediction model training module 808, wherein:
[0164] The sample set construction module 802 is used to construct a training sample set, which is then input into the initial linear model and the initial nonlinear model for multiple training iterations. The training sample set includes multiple training samples, each carrying a sample fault category, which is used to construct a fault category sequence.
[0165] The target linear model training module 804 is used to update the parameters of the initial linear model based on the difference between the training results and the fault category sequence in each training session until the first preset training condition is met, and then training stops to obtain the target linear model.
[0166] The target nonlinear model training module 806 is used to update the parameters of the initial nonlinear model based on the difference between the training results and the fault category sequence in each training session until the second preset training condition is met, and then training stops to obtain the target nonlinear model.
[0167] The target fault prediction model training module 808 is used to construct an initial fault prediction model based on the target linear model and the target nonlinear model. It performs multiple training sessions with the training sample set as input. In each training session, the weights of the target linear model and the target nonlinear model are updated based on the difference between the output results and the fault category sequence. Training stops when the third preset training condition is met, and the target fault prediction model is obtained.
[0168] In one embodiment, the sample set construction module 802 is specifically used to: obtain a fault log set; the fault log set includes multiple sample fault logs and multiple standard fault logs, the standard fault logs carrying standard fault categories; determine the sample fault category of the sample fault logs based on the standard fault categories according to the similarity between the sample fault logs and the standard fault logs; and construct a training sample set based on the sample fault categories of each sample feature value through multiple sample fault logs.
[0169] In one embodiment, the sample set construction module 802 is specifically used for: preprocessing each sample fault log to obtain fault keywords, preprocessing each standard fault log to obtain standard keywords, and determining the sample feature values of the fault keywords and the standard feature values of the standard keywords; the preprocessing process includes word segmentation, stop word removal, and part-of-speech tagging; based on the similarity between the sample feature values and each standard feature value, selecting a preset number of similar feature values from multiple standard feature values; and determining the sample fault category of the sample feature values based on the standard fault category to which the similar feature values belong.
[0170] In one embodiment, the sample set construction module 802 is specifically used to: weight the frequency of the keyword in the title and the frequency of the keyword in the first paragraph of the fault log to obtain the summary frequency; and determine the feature value of each keyword based on the summary frequency, the total number of fault logs, and the number of fault logs containing the keyword.
[0171] Each module in the aforementioned target fault prediction model training device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0172] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 9 As shown, the computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores training sample data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a system fault prediction method or a target fault prediction model training method.
[0173] Those skilled in the art will understand that Figure 9The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0174] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0175] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.
[0176] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0177] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0178] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0179] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A system fault prediction method, characterized in that, The method includes: Obtain fault log data from the target computing system; The fault log data is input into the trained target fault prediction model, and the target fault prediction model outputs the fault prediction result. The target fault prediction model includes a target linear model and a target nonlinear model. The target fault prediction model uses a combination of the target linear model and the target nonlinear model to predict faults in the fault log data. The weights of the target linear model and the target nonlinear model in the target fault prediction model are determined through training samples. The target linear model is obtained by training an initial linear model multiple times using training samples. In each training iteration, the parameters of the initial linear model are updated based on the training results and the fault categories of the training samples. The target nonlinear model is obtained by training an initial nonlinear model multiple times using training samples. In each training iteration, the parameters of the initial nonlinear model are updated based on the training results and the fault categories of the training samples. The training process of the target fault prediction model includes: constructing a training sample set and inputting the training sample set into the initial linear model and the initial nonlinear model respectively. The training process involves multiple training sessions. The training sample set includes multiple training samples, each carrying a fault category. These fault categories are used to construct a fault category sequence. For the initial linear model, parameters are updated in each training session based on the difference between the training result and the fault category sequence, until a first preset training condition is met, at which point training stops, resulting in a target linear model. For the initial nonlinear model, parameters are updated in each training session based on the difference between the training result and the fault category sequence, until a second preset training condition is met, at which point training stops, resulting in a target nonlinear model. An initial fault prediction model is constructed based on the target linear model and the target nonlinear model. The training sample set is used as input for multiple training sessions. In each training session, the weights of the target linear model and the target nonlinear model are updated based on the difference between the output result and the fault category sequence, until a third preset training condition is met, at which point training stops, resulting in a target fault prediction model.
2. The method according to claim 1, characterized in that, The construction of the training sample set includes: Obtain a set of fault logs; the set of fault logs includes multiple sample fault logs and multiple standard fault logs, the standard fault logs carrying standard fault categories; Based on the similarity between the sample fault log and the standard fault log, the sample fault category of the sample fault log is determined according to the standard fault category; The training sample set is constructed based on the sample fault categories of each sample fault log.
3. The method according to claim 2, characterized in that, Based on the similarity between the sample fault logs and the standard fault logs, the sample fault category of the sample fault logs is determined according to the standard fault category, including: The sample fault logs are preprocessed to obtain fault keywords, and the sample feature values of the fault keywords are determined. Similarly, the standard fault logs are preprocessed to obtain standard keywords, and the standard feature values of the standard keywords are determined. The preprocessing process includes word segmentation, stop word removal, and part-of-speech tagging. Based on the similarity between the sample feature values and each of the standard feature values, a preset number of similar feature values are selected from the multiple standard feature values; Based on the standard fault category to which the similar feature values belong, the sample fault category of the sample feature values is determined.
4. The method according to claim 3, characterized in that, The process of determining the feature values of keywords includes: The overall frequency is obtained by weighting the frequency of the keywords in the title and the first paragraph of the fault log. The characteristic value of each keyword is determined based on the summarization frequency, the total number of fault logs, and the number of fault logs containing the keyword.
5. A method for training a target fault prediction model, characterized in that, The target fault prediction model training method is used to train the target fault prediction model in the system fault prediction method according to any one of claims 1-4; The target fault prediction model includes a target linear model and a target nonlinear model; the method includes: A training sample set is constructed, and the training sample set is input into the initial linear model and the initial nonlinear model for multiple training iterations. The training sample set includes multiple training samples, each carrying a sample fault category, which is used to construct a fault category sequence. For the initial linear model, the parameters are updated based on the difference between the training results and the fault category sequence in each training session until the first preset training condition is met, and then the training stops to obtain the target linear model. For the initial nonlinear model, the parameters are updated based on the difference between the training results and the fault category sequence in each training session until the second preset training condition is met, and then the training stops to obtain the target nonlinear model. An initial fault prediction model is constructed based on the target linear model and the target nonlinear model. The model is trained multiple times using the training sample set as input. In each training session, the weights of the target linear model and the target nonlinear model are updated based on the difference between the output result and the fault category sequence. Training stops when the third preset training condition is met, and the target fault prediction model is obtained.
6. A system fault prediction device, characterized in that, The device includes: The data acquisition module is used to acquire fault log data of the target computing system; The result output module is used to input the fault log data into the trained target fault prediction model and output the fault prediction result through the target fault prediction model. The target fault prediction model includes a target linear model and a target nonlinear model. The target fault prediction model uses a combination of the target linear model and the target nonlinear model to predict faults in the fault log data. The weights of the target linear model and the target nonlinear model in the target fault prediction model are determined through training samples. The target linear model is obtained by training an initial linear model multiple times using training samples. In each training iteration, the parameters of the initial linear model are updated based on the training results and the fault categories of the training samples. The target nonlinear model is obtained by training an initial nonlinear model multiple times using training samples. In each training iteration, the parameters of the initial nonlinear model are updated based on the training results and the fault categories of the training samples. The training process of the target fault prediction model includes: constructing a training sample set and inputting the training sample set into the initial linear model and the initial nonlinear model respectively. The training process involves multiple training sessions. The training sample set includes multiple training samples, each carrying a fault category. These fault categories are used to construct a fault category sequence. For the initial linear model, parameters are updated in each training session based on the difference between the training result and the fault category sequence, until a first preset training condition is met, at which point training stops, resulting in a target linear model. For the initial nonlinear model, parameters are updated in each training session based on the difference between the training result and the fault category sequence, until a second preset training condition is met, at which point training stops, resulting in a target nonlinear model. An initial fault prediction model is constructed based on the target linear model and the target nonlinear model. The training sample set is used as input for multiple training sessions. In each training session, the weights of the target linear model and the target nonlinear model are updated based on the difference between the output result and the fault category sequence, until a third preset training condition is met, at which point training stops, resulting in a target fault prediction model.
7. A target fault prediction model training device, characterized in that, The target fault prediction model training device is used to train the target fault prediction model in the system fault prediction method according to any one of claims 1-4; The target fault prediction model includes a target linear model and a target nonlinear model, and the device includes: A sample set construction module is used to construct a training sample set, which is then input into an initial linear model and an initial nonlinear model for multiple training iterations. The training sample set includes multiple training samples, each carrying a sample fault category, which is used to construct a fault category sequence. The target linear model training module is used to update the parameters of the initial linear model based on the difference between the training results and the fault category sequence in each training session, until the first preset training condition is met and training is stopped to obtain the target linear model. The target nonlinear model training module is used to update the parameters of the initial nonlinear model based on the difference between the training results and the fault category sequence in each training session, until the second preset training condition is met and training is stopped to obtain the target nonlinear model. The target fault prediction model training module is used to construct an initial fault prediction model based on the target linear model and the target nonlinear model, and to perform multiple training sessions using the training sample set as input. In each training session, the weights of the target linear model and the target nonlinear model are updated based on the difference between the output result and the fault category sequence, until the training stops when the third preset training condition is met, thus obtaining the target fault prediction model.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Fault occurrence time prediction method and device
CN111400964A
Fault prediction method and device for distributed system, storage medium and electronic equipment
CN112631888A