A CPU fault diagnosis prediction method, device, system and storage medium
By optimizing CPU anomaly data using Monte Carlo and genetic algorithms, and combining multiple model training and fusion, a target diagnostic prediction model is constructed, which solves the problem of low efficiency in traditional CPU fault diagnosis and achieves efficient CPU fault diagnosis.
Patent Information
- Application Number
- CN202311834925.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-27
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2043-12-27
AI Technical Summary
Traditional CPU fault diagnosis methods rely on human experience, resulting in low diagnostic efficiency and complexity.
Monte Carlo and genetic algorithms were used to remove samples and optimize features from CPU abnormal data. The model was trained using support vector machine and backpropagation neural network, and the stacking algorithm was used to fuse the models to build a target diagnosis and prediction model.
This improves the efficiency of CPU fault diagnosis, reduces the need for manual troubleshooting, and achieves more efficient fault diagnosis.
Smart Images

Figure CN117762675B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of CPU fault diagnosis technology, and in particular to a CPU fault diagnosis and prediction method, apparatus, system and storage medium. Background Technology
[0002] The Central Processing Unit (CPU) is one of the core components of a computer, responsible for processing instructions, executing operations, controlling timing, and processing data. With the rapid development of information technology, technicians have increasingly higher requirements for the stability of computer systems. Therefore, how to quickly and accurately diagnose faults in the CPU, a crucial core component of a computer system, has become a hot topic of discussion.
[0003] Traditional CPU fault diagnosis methods typically involve manual troubleshooting of CPU components based on fault information. For example, when a computer system starts up, the screen displays brightness but the operating system fails to load. In this case, the power can be turned off, the CPU cooled down, and the CPU heatsink and fan checked. However, this manual fault diagnosis method relies on experience to troubleshoot one by one, which is cumbersome and time-consuming, leading to reduced diagnostic efficiency. Summary of the Invention
[0004] This application provides a CPU fault diagnosis and prediction method, apparatus, system, and storage medium, which can improve the efficiency of CPU fault diagnosis.
[0005] The first aspect of this application provides a CPU fault diagnosis and prediction method, including:
[0006] Acquire all CPU anomaly data within a preset time period, and determine the set of CPU anomaly data as the initial training sample set. The CPU anomaly data packets contain Machine-Check Exception (MCE) information and Advanced Error Reporting (AER) information.
[0007] The Monte Carlo algorithm is used to remove outliers from the initial training sample set to obtain a removed training sample set.
[0008] The genetic algorithm is used to optimize the features of the removed training sample set to obtain the target training sample set.
[0009] Based on the target training sample set, the initial models of Support Vector Machine (SVM) and Back Propagation Neural Network (BPNN) are trained respectively to obtain the first base model and the second base model.
[0010] The first base model and the second base model are fused using the stacking algorithm to obtain the target diagnosis prediction model.
[0011] The target CPU fault information is input into the target diagnostic prediction model, and the target diagnostic prediction value is output.
[0012] Optionally, the step of using the Monte Carlo algorithm to remove outliers from the initial training sample set to obtain a removed training sample set includes:
[0013] A preset proportion of abnormal CPU data is randomly selected from the initial training sample set as the first training sample set to train the first model to be trained, thereby obtaining the first elimination model.
[0014] A preset proportion of abnormal CPU data is randomly selected from the initial training sample set as the second training sample set to train the second model to be trained, thereby obtaining the second elimination model. This process is repeated until a preset number of elimination models are obtained.
[0015] Sort all eliminated models in ascending order based on their accuracy.
[0016] The probability of occurrence of all CPU anomaly data in the initial training sample set is calculated using the Monte Carlo algorithm, and the calculation method is as follows:
[0017]
[0018] Among them, f ac (m) represents the probability of the m-th CPU anomaly sample, n represents the knockout model number after sorting all knockout models in ascending order according to their accuracy, N represents the total number of knockout models, and f mn This indicates whether the m-th CPU anomaly data appears in the training sample set of the n-th elimination model;
[0019] CPU abnormal data with a probability of occurrence greater than a preset threshold are identified as abnormal samples.
[0020] The abnormal samples are removed from the initial training sample set to obtain the removed training sample set.
[0021] Optionally, the step of using a genetic algorithm to optimize the features of the removed training sample set to obtain the target training sample set includes:
[0022] Randomly create the first group;
[0023] Encode all individuals in the first population, wherein the genes in the individuals correspond to the CPU anomaly data in the removed training sample set;
[0024] The fitness function was used to evaluate the fitness of each individual.
[0025] Determine whether there are individuals whose fitness meets the preset conditions;
[0026] If so, the individual whose fitness meets the preset conditions is determined as the optimal individual, and the set of CPU anomaly data corresponding to all optimal individuals is determined as the target training sample set.
[0027] Optionally, after determining whether there are individuals whose fitness meets preset conditions, the CPU fault diagnosis and prediction method further includes:
[0028] If not, then perform individual crossover to obtain offspring individuals;
[0029] The offspring individuals are mutated to generate a second population, and the fitness of all individuals in the second population is evaluated. This process is repeated until an individual whose fitness meets the preset conditions is generated.
[0030] Optionally, the step of fusing the first base model and the second base model using the Stacking algorithm to obtain the target diagnosis prediction model includes:
[0031] Obtain the first and second predicted values output by the first and second base models;
[0032] The first predicted value and the second predicted value are concatenated horizontally to obtain the feature matrix;
[0033] The feature matrix is input into a Gradient Boosting Decision Tree (GBDT) model for training to obtain a target diagnosis prediction model.
[0034] A second aspect of this application provides a CPU fault diagnosis and prediction device, comprising:
[0035] The acquisition unit is used to acquire all CPU abnormal data within a preset time period and determine the set of CPU abnormal data as the initial training sample set. The CPU abnormal data packets contain MCE information and AER information.
[0036] The elimination unit is used to eliminate abnormal samples from the initial training sample set using the Monte Carlo algorithm to obtain an eliminated training sample set.
[0037] The feature optimization unit is used to optimize the features of the removed training sample set using a genetic algorithm to obtain the target training sample set.
[0038] The training unit is used to train the initial SVM model and the initial BPNN model respectively based on the target training sample set to obtain the first base model and the second base model.
[0039] The model fusion unit is used to fuse the first base model and the second base model using the Stacking algorithm to obtain the target diagnosis prediction model.
[0040] The input unit is used to input the target CPU fault information into the target diagnostic prediction model and output the target diagnostic prediction value.
[0041] Optionally, the rejection unit is specifically used for:
[0042] A preset proportion of abnormal CPU data is randomly selected from the initial training sample set as the first training sample set to train the first model to be trained, thereby obtaining the first elimination model.
[0043] A preset proportion of abnormal CPU data is randomly selected from the initial training sample set as the second training sample set to train the second model to be trained, thereby obtaining the second elimination model. This process is repeated until a preset number of elimination models are obtained.
[0044] Sort all eliminated models in ascending order based on their accuracy.
[0045] The probability of occurrence of all CPU anomaly data in the initial training sample set is calculated using the Monte Carlo algorithm, and the calculation method is as follows:
[0046]
[0047] Among them, f ac (m) represents the probability of the m-th CPU anomaly sample, n represents the knockout model number after sorting all knockout models in ascending order according to their accuracy, N represents the total number of knockout models, and f mn This indicates whether the m-th CPU anomaly data appears in the training sample set of the n-th elimination model;
[0048] CPU abnormal data with a probability of occurrence greater than a preset threshold are identified as abnormal samples.
[0049] The abnormal samples are removed from the initial training sample set to obtain the removed training sample set.
[0050] Optionally, the feature optimization unit is specifically used for:
[0051] Randomly create the first group;
[0052] Encode all individuals in the first population, wherein the genes in the individuals correspond to the CPU anomaly data in the removed training sample set;
[0053] The fitness function was used to evaluate the fitness of each individual.
[0054] Determine whether there are individuals whose fitness meets the preset conditions;
[0055] If so, the individual whose fitness meets the preset conditions is determined as the optimal individual, and the set of CPU anomaly data corresponding to all optimal individuals is determined as the target training sample set.
[0056] Optionally, the feature optimization unit is further specifically used for:
[0057] If not, then perform individual crossover to obtain offspring individuals;
[0058] The offspring individuals are mutated to generate a second population, and the fitness of all individuals in the second population is evaluated. This process is repeated until an individual whose fitness meets the preset conditions is generated.
[0059] Optionally, the model fusion unit is specifically used for:
[0060] Obtain the first and second predicted values output by the first and second base models;
[0061] The first predicted value and the second predicted value are concatenated horizontally to obtain the feature matrix;
[0062] The feature matrix is input into the Gradient Boosting Decision Tree (GBDT) model for training to obtain the target diagnosis and prediction model.
[0063] A third aspect of this application provides a CPU fault diagnosis and prediction system, comprising:
[0064] Central processing unit, memory, input / output interfaces, wired or wireless network interfaces, and power supply;
[0065] The memory is either a short-term storage memory or a persistent storage memory;
[0066] The central processing unit is configured to communicate with the memory and execute instructions in the memory to perform any of the first aspect and any of the alternative methods of the first aspect.
[0067] A fourth aspect of this application provides a computer-readable storage medium including instructions that, when executed on a computer, cause the computer to perform any of the methods described in the first aspect and its alternatives.
[0068] As can be seen from the above technical solutions, this application has the following effects:
[0069] All CPU anomaly data within a preset time period is acquired, and this set of CPU anomaly data is determined as the initial training sample set. This CPU anomaly data package contains MCE and AER information. Anomalies are removed from the initial training sample set using the Monte Carlo algorithm, resulting in a removed training sample set. Features of the removed training sample set are optimized using a genetic algorithm, resulting in the target training sample set. Based on the target training sample set, initial models of Support Vector Machine (SVM) and Backpropagation Neural Network (BPNN) are trained respectively, resulting in the first and second base models. The first and second base models are fused using the Stacking algorithm to obtain the target diagnostic prediction model. The target CPU fault information is input into the target diagnostic prediction model, and the target diagnostic prediction value is output. In this way, the initial training sample set can be optimized using the Monte Carlo algorithm and the genetic algorithm to obtain better training samples. Then, the model is fused using the Stacking algorithm to obtain a target diagnostic prediction model with better generalization. Finally, this target diagnostic prediction model is used to diagnose and predict CPU faults, eliminating the need for manual troubleshooting based on experience, thus improving the efficiency of CPU fault diagnosis. Attached Figure Description
[0070] Figure 1 This is a schematic diagram of an embodiment of a CPU fault diagnosis and prediction method in this application;
[0071] Figure 2-1 , Figure 2-2 as well as Figure 2-3 This is a schematic diagram of another embodiment of a CPU fault diagnosis and prediction method in this application;
[0072] Figure 3 This is a schematic diagram of an embodiment of a CPU fault diagnosis and prediction device according to this application;
[0073] Figure 4 This is a schematic diagram of another embodiment of a CPU fault diagnosis and prediction device in this application;
[0074] Figure 5 This is a schematic diagram of an embodiment of a CPU fault diagnosis and prediction system according to this application. Detailed Implementation
[0075] This application provides a CPU fault diagnosis and prediction method, apparatus, system, and storage medium to improve the efficiency of CPU fault diagnosis.
[0076] The implementation described in this application is intended for use on servers, systems, terminals, or other devices with logical processing capabilities. Please refer to [link to relevant documentation]. Figure 1 As shown, one embodiment of the CPU fault diagnosis and prediction method in this application includes:
[0077] 101. Obtain all CPU anomaly data within a preset time period, and determine the set of CPU anomaly data as the initial training sample set. This CPU anomaly data set contains MCE information and AER information.
[0078] MCE (Memory Error Detection) is an error detected by the host's CPU. MCE error types include warning errors and fatal exceptions. Warning errors are logged to the system log with a message for later review, while fatal exceptions cause the host to stop responding. Causes of MCE errors include memory errors, inadequate cooling or processor overheating, system bus errors, and processor cache errors. AER (Error Detection and Reporting) is a mechanism for detecting and reporting errors in PCIe (Peripheral Component Interconnect Express) devices. It allows PCIe devices to detect and report various types of errors, such as non-fatal, recoverable, or critical errors. AER implements a set of registers and corresponding error notification mechanisms on the PCIe device, and error information can be obtained by reading the corresponding registers. In this embodiment, MCE and AER information within a preset time period are acquired. This MCE and AER information contains various types of error information. This error information is used as CPU exception data, and the set of all acquired CPU exception data is used as the initial training sample set.
[0079] 102. Use the Monte Carlo algorithm to remove outliers from the initial training sample set to obtain the removed training sample set;
[0080] The Monte Carlo algorithm is an algorithm based on probability and statistics theory, aiming to solve various mathematical problems using random or pseudo-random numbers. The more random samples a solution has, the closer it is to the optimal solution. In this embodiment, the Monte Carlo algorithm is used to obtain the probability of occurrence of each CPU anomaly in the initial training sample set. CPU anomalies with higher probabilities are then removed from the initial training sample set, resulting in a removed training sample set. This improves the performance of the subsequent training model. The specific implementation will be described in subsequent embodiments.
[0081] 103. Use a genetic algorithm to optimize the features of the removed training sample set to obtain the target training sample set;
[0082] Genetic algorithms are computational models that simulate the biological evolutionary process based on natural selection and genetic mechanisms in Darwin's theory of evolution. They are methods for searching for optimal solutions by simulating natural evolution. In this embodiment, a genetic algorithm is used to optimize features in the removed training sample set. This feature optimization helps to select more representative CPU anomaly data from the removed training sample set, and the selected set of CPU anomaly data is used as the target training sample set to improve the performance of the subsequent training model. The specific implementation method will be described in subsequent embodiments.
[0083] 104. Train the initial SVM model and the initial BPNN model according to the target training sample set to obtain the first base model and the second base model;
[0084] In this embodiment, the initial SVM model and the initial BPNN model, which have high complexity and strong learning ability, are trained using the target training sample set. The trained initial SVM model and the initial BPNN model are then used as the first base model and the second base model for subsequent model fusion, respectively.
[0085] 105. Use the Stacking algorithm to fuse the first and second base models to obtain the target diagnosis prediction model;
[0086] Stacking is a multi-layered model stacking method. First, multiple models are trained using a training set as the bottom-level base models. Then, the prediction results from these base models are combined and fed into the next-level meta-model for training. In this embodiment, the initial SVM and BPNN models trained using the target training sample set are used as the first and second base models at the bottom layer. The prediction results output by the first and second base models are then used to train another meta-model to obtain the target diagnostic prediction model.
[0087] 106. Input the target CPU fault information into the target diagnostic prediction model and output the target diagnostic prediction value.
[0088] The target CPU fault information is the CPU fault information to be diagnosed. After the target CPU fault information is input into the target diagnostic prediction model, the target diagnostic prediction value will be output.
[0089] In this embodiment, all CPU anomaly data within a preset time period is first acquired, and the set of CPU anomaly data is determined as the initial training sample set. This CPU anomaly data set contains MCE information and AER information. Then, the Monte Carlo algorithm is used to remove anomaly samples from the initial training sample set, resulting in a removed training sample set. Subsequently, a genetic algorithm is used to optimize the features of the removed training sample set, resulting in the target training sample set. Next, the initial models of the Support Vector Machine (SVM) and Backpropagation Neural Network (BPNN) are trained based on the target training sample set, respectively, to obtain the first base model and the second base model. Then, the Stacking algorithm is used to fuse the first base model and the second base model to obtain the target diagnostic prediction model. Finally, the target CPU fault information is input into the target diagnostic prediction model, and the target diagnostic prediction value is output. In this way, the initial training sample set can be optimized by feature engineering using the Monte Carlo algorithm and the genetic algorithm to obtain better training samples. Then, the model can be fused using the Stacking algorithm to obtain a target diagnostic prediction model with better generalization. Finally, the target diagnostic prediction model is used to diagnose and predict CPU faults, eliminating the need for manual investigation based on experience, thereby improving the efficiency of CPU fault diagnosis.
[0090] Please see Figure 2-1 , Figure 2-2 as well as Figure 2-3 As shown, another embodiment of the CPU fault diagnosis and prediction method in this application includes:
[0091] 201. Obtain all CPU anomaly data within a preset time period, and determine the set of CPU anomaly data as the initial training sample set. This CPU anomaly data set contains MCE and AER.
[0092] Step 201 in this embodiment is the same as described above. Figure 1 Step 101 in the illustrated embodiment is similar and will not be described again here.
[0093] 202. Randomly select a preset proportion of abnormal CPU data from the initial training sample set as the first training sample set to train the first model to be trained, and obtain the first elimination model.
[0094] 203. Randomly select a preset proportion of abnormal CPU data from the initial training sample set as the second training sample set to train the second model to be trained, and obtain the second elimination model. Repeat this process until a preset number of elimination models are obtained.
[0095] 204. Sort all eliminated models in ascending order according to their accuracy.
[0096] 205. Calculate the probability of occurrence of each corresponding sample in the initial training sample set for all CPU anomaly data using the Monte Carlo algorithm;
[0097] 206. Identify CPU abnormal data whose probability of occurrence is greater than a preset threshold as abnormal samples;
[0098] 207. Remove the abnormal samples from the initial training sample set to obtain the removed training sample set;
[0099] Optionally, in this embodiment, a preset proportion of CPU anomaly data is randomly selected from the initial training sample set as the training sample set, and the remaining CPU anomaly data is used as the test sample set. For example, 80% of the CPU anomaly data can be randomly selected from the initial training sample set as the training sample set, and the remaining 20% as the test sample set. The first randomly selected training sample set is the first training sample set. The first training sample set is used to train the first model to be trained, resulting in the first elimination model. This first training sample model can be an SVM model or a BPNN model, which is not limited here. After the first elimination model is trained, a predicted proportion of CPU anomaly data is randomly selected again from the initial training sample set, and the second randomly selected training sample set is the second training sample set. Then, the model training steps are repeated to obtain the second elimination model. This process is repeated until N elimination models are obtained. After all elimination models are trained, all elimination models are sorted in ascending order according to their model accuracy, and all elimination models are labeled according to their sequence number, such as: elimination model 1, elimination model 2, ..., elimination model n. Then, the probability of occurrence of each CPU anomaly data point in the initial training sample set is calculated using the following formula:
[0100]
[0101] Among them, f ac (m) represents the probability of the m-th CPU anomaly sample, n represents the knockout model number after sorting all knockout models in ascending order according to their accuracy, N represents the total number of knockout models, and f mn This indicates whether the m-th CPU anomaly data appears in the training sample set of the n-th elimination model. If so, then f mn =1; if not, then f mn =0.
[0102] As the number of models removed increases, the probability of normal CPU abnormal data samples will stabilize within a preset threshold range. At this point, the relationship between the probability of sample occurrence and the preset threshold can be used to determine whether the corresponding CPU abnormal data is an abnormal sample. If the sample probability is greater than the preset threshold, the corresponding CPU abnormal data can be determined to be an abnormal sample.
[0103] 208. Randomly create the first group;
[0104] 209. Encode all individuals in the first group, and remove CPU abnormal data from the training sample set corresponding to the genes in the individuals;
[0105] 210. Use the fitness function to evaluate the fitness of each individual separately;
[0106] 211. Determine whether there are individuals whose fitness meets the preset conditions. If yes, proceed to step 212; otherwise, proceed to steps 213 to 214.
[0107] 212. Determine the individuals whose fitness meets the preset conditions as the optimal individuals, and determine the set of CPU anomaly data corresponding to all optimal individuals as the target training sample set;
[0108] 213. Perform crossover to obtain offspring individuals;
[0109] 214. Mutate the offspring individuals to generate a second population, and evaluate the fitness of all individuals in the second population. Repeat this process until an individual with fitness that meets the preset conditions is generated.
[0110] Optionally, in this embodiment, a first population with a preset number of individuals is first randomly established. Then, all individuals in the first population are encoded according to the chromosome encoding method. Since the feature optimization process in this embodiment requires selecting appropriate feature vectors, and the chromosome gene only needs to indicate whether the location participates in the fitting, the individuals in the genetic algorithm of this embodiment use binary as the encoding method. Each gene on an individual corresponds to a feature vector, and each CPU anomaly data in the target training sample set is a feature vector. The encoding "1" in each gene indicates that the feature vector participates in model training, and the encoding "0" indicates that the feature vector does not participate in model training. A prediction model is trained using the feature vectors corresponding to the genes on the individuals, and the fitness function is used to evaluate the fitness of the individuals. The corresponding calculation formula for the fitness of an individual is as follows:
[0111]
[0112] in, This represents the predicted value output by the prediction model, y. i This represents the observations in the validation set.
[0113] When there exists an individual whose f(x) satisfies the preset conditions, the corresponding individual is determined as the optimal individual, and the feature vector corresponding to the gene on the optimal individual is determined as the optimal feature vector. The set of CPU abnormal data corresponding to the optimal feature vector is used as the target training sample set.
[0114] When no individual's f(x) satisfies the preset condition, crossover and mutation are performed on all individuals in the first population to establish the second population. Then, the individual fitness evaluation steps are repeated until an individual's f(x) satisfies the preset condition.
[0115] In another feasible approach, the fitness function can be flexible: the fitness satisfaction condition is reduced in the early stages of evolution to decrease the competitiveness of super-individuals. The fitness satisfaction condition is increased in the later stages of genetics to accelerate convergence and prevent crossover and genetic operations from damaging super-individuals. The corresponding flexible fitness function formula is as follows:
[0116] F(x)=μ(f(x))
[0117] The μ function can be a linear function, an exponential function, or a power function; no specific limitation is made here.
[0118] 215. Train the initial SVM model and the initial BPNN model according to the target training sample set to obtain the first base model and the second base model;
[0119] Step 215 in this embodiment is the same as described above. Figure 1 Step 104 in the illustrated embodiment is similar and will not be described again here.
[0120] 216. Obtain the first and second predicted values output by the first and second base models;
[0121] 217. Concatenate the first and second predicted values horizontally to obtain the feature matrix;
[0122] 218. Input the feature matrix into the GBDT model for training to obtain the target diagnosis prediction model;
[0123] 219. Input the target CPU fault information into the target diagnostic prediction model and output the target diagnostic prediction value.
[0124] Optionally, in this embodiment, the target training sample set is first input into the first base model and the second base model respectively, and cross-validation is performed. The cross-validation results are then stacked vertically to form the corresponding first and second predicted values. The first and second predicted values are then concatenated horizontally to obtain the feature matrix. The GBDT model is then used as the meta-model, and the feature matrix is input into the GBDT model for training to obtain the target diagnosis prediction model.
[0125] Step 219 in this embodiment is the same as described above. Figure 1 Step 106 in the illustrated embodiment is similar and will not be described again here.
[0126] Please see Figure 3 As shown, one embodiment of the CPU fault diagnosis and prediction device in this application includes:
[0127] The acquisition unit 301 is used to acquire all CPU abnormal data within a preset time period and determine the set of CPU abnormal data as the initial training sample set. The CPU abnormal data packet contains MCE information and AER information.
[0128] The elimination unit 302 is used to eliminate abnormal samples from the initial training sample set using the Monte Carlo algorithm to obtain the eliminated training sample set.
[0129] The feature optimization unit 303 is used to optimize the features of the removed training sample set using a genetic algorithm to obtain the target training sample set.
[0130] Training unit 304 is used to train the initial SVM model and the initial BPNN model respectively based on the target training sample set to obtain the first base model and the second base model;
[0131] The model fusion unit 305 is used to fuse the first base model and the second base model using the Stacking algorithm to obtain the target diagnosis prediction model.
[0132] The input unit 306 is used to input the target CPU fault information into the target diagnostic prediction model and output the target diagnostic prediction value.
[0133] In this embodiment, the acquisition unit 301 acquires all CPU anomaly data within a preset time period and determines the set of CPU anomaly data as the initial training sample set. This CPU anomaly data set contains MCE information and AER information. The elimination unit 302 uses the Monte Carlo algorithm to eliminate anomaly samples from the initial training sample set, resulting in an eliminated training sample set. The feature optimization unit 303 uses a genetic algorithm to optimize the features of the eliminated training sample set, resulting in a target training sample set. The training unit 304 trains the SVM initial model and the BPNN initial model according to the target training sample set, respectively, to obtain a first base model and a second base model. The model fusion unit 305 uses the Stacking algorithm to fuse the first base model and the second base model, resulting in a target diagnostic prediction model. The input unit 306 inputs the target CPU fault information into the target diagnostic prediction model and outputs the target diagnostic prediction value. In this way, the initial training sample set can be optimized by feature engineering using Monte Carlo and genetic algorithms to obtain better training samples. Then, the model can be fused using the Stacking algorithm to obtain a target diagnosis prediction model with better generalization. Finally, this target diagnosis prediction model can be used to diagnose and predict CPU faults, eliminating the need for manual troubleshooting based on experience, thereby improving the efficiency of CPU fault diagnosis.
[0134] Please see Figure 4 As shown, another embodiment of the CPU fault diagnosis and prediction device in this application includes:
[0135] The acquisition unit 401 is used to acquire all CPU abnormal data within a preset time period and determine the set of CPU abnormal data as the initial training sample set. The CPU abnormal data packet contains MCE information and AER information.
[0136] The elimination unit 402 is specifically used for: randomly selecting a preset proportion of CPU anomaly data from the initial training sample set as the first training sample set to train the first model to be trained, obtaining the first eliminated model; randomly selecting a preset proportion of CPU anomaly data from the initial training sample set as the second training sample set to train the second model to be trained, obtaining the second eliminated model, and so on, until a preset number of eliminated models are obtained; sorting all eliminated models in ascending order according to their accuracy; and calculating the probability of occurrence of the corresponding sample for all CPU anomaly data in the initial training sample set according to the Monte Carlo algorithm, the calculation method being as follows:
[0137]
[0138] Among them, f ac(m) represents the probability of the m-th CPU anomaly sample, n represents the knockout model number after sorting all knockout models in ascending order according to their accuracy, N represents the total number of knockout models, and f mn This indicates whether the m-th CPU anomaly data appears in the training sample set of the n-th elimination model; CPU anomaly data with a probability of occurrence greater than a preset threshold are identified as anomaly samples; the anomaly samples are removed from the initial training sample set to obtain the elimination training sample set;
[0139] The feature optimization unit 403 is specifically used to randomly establish a first population; encode all individuals in the first population, and remove CPU abnormal data from the training sample set corresponding to the genes in the individuals; evaluate the fitness of all individuals using a fitness function; determine whether there are individuals whose fitness meets the preset conditions; if so, determine the individuals whose fitness meets the preset conditions as the optimal individuals, and determine the set of CPU abnormal data corresponding to all optimal individuals as the target training sample set.
[0140] It is also specifically used for: if not, then perform individual crossover to obtain offspring individuals; mutate the offspring individuals to generate a second population, and evaluate the fitness of all individuals in the second population, and repeat this cycle until individuals whose fitness meets the preset conditions are generated.
[0141] Training unit 404 is used to train the initial SVM model and the initial BPNN model respectively based on the target training sample set to obtain the first base model and the second base model;
[0142] The model fusion unit 405 is specifically used to obtain the first predicted value and the second predicted value output by the first base model and the second base model; to concatenate the first predicted value and the second predicted value laterally to obtain the feature matrix; and to input the feature matrix into the gradient boosting decision tree GBDT model for training to obtain the target diagnosis prediction model.
[0143] The input unit 406 is used to input the target CPU fault information into the target diagnostic prediction model and output the target diagnostic prediction value.
[0144] In this embodiment, the functions of each unit are the same as those described above. Figure 2-1 , Figure 2-2 as well as Figure 2-3 The functions of steps 201 to 219 in the illustrated embodiment are similar and will not be described again here.
[0145] Please see Figure 5 As shown, one embodiment of the CPU fault diagnosis and prediction system in this application includes:
[0146] Central processing unit 502, memory 501, input / output interface 503, wired or wireless network interface 504, and power supply 505;
[0147] Memory 501 is either a short-term storage memory or a persistent storage memory;
[0148] The central processing unit 502 is configured to communicate with the memory 501 and execute instructions stored in the memory 501 to perform the aforementioned operations. Figure 1 , Figure 2-1 , Figure 2-2 as well as Figure 2-3 The steps in the illustrated embodiment.
[0149] This application provides a computer-readable storage medium, including instructions that, when executed on a computer, cause the computer to perform the aforementioned... Figure 1 , Figure 2-1 , Figure 2-2 as well as Figure 2-3 The steps in the illustrated embodiment.
[0150] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0151] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.
[0152] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0153] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0154] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A CPU fault diagnosis and prediction method, characterized in that, include: Acquire all CPU anomaly data within a preset time period, and determine the set of CPU anomaly data as the initial training sample set. The CPU anomaly data packets contain Host Detection Error (MCE) information and Advanced Error Report (AER) information. The Monte Carlo algorithm is used to remove outliers from the initial training sample set to obtain a removed training sample set. Randomly create the first group; Encode all individuals in the first population, wherein the genes in the individuals correspond to the CPU anomaly data in the removed training sample set; The fitness function was used to evaluate the fitness of each individual. Determine whether there are individuals whose fitness meets the preset conditions; If so, the individual whose fitness meets the preset conditions is determined as the optimal individual, and the set of CPU anomaly data corresponding to all optimal individuals is determined as the target training sample set; The initial models of Support Vector Machine (SVM) and Backpropagation Neural Network (BPNN) are trained based on the target training sample set to obtain the first base model and the second base model. Obtain the first and second predicted values output by the first and second base models; The first predicted value and the second predicted value are concatenated horizontally to obtain the feature matrix; The feature matrix is input into the Gradient Boosting Decision Tree (GBDT) model for training to obtain the target diagnosis prediction model. The target CPU fault information is input into the target diagnostic prediction model, and the target diagnostic prediction value is output.
2. The CPU fault diagnosis and prediction method according to claim 1, characterized in that, The step of using the Monte Carlo algorithm to remove outliers from the initial training sample set to obtain a removed training sample set includes: A preset proportion of abnormal CPU data is randomly selected from the initial training sample set as the first training sample set to train the first model to be trained, thereby obtaining the first elimination model. A preset proportion of abnormal CPU data is randomly selected from the initial training sample set as the second training sample set to train the second model to be trained, thereby obtaining the second elimination model. This process is repeated until a preset number of elimination models are obtained. Sort all eliminated models in ascending order based on their accuracy. The probability of occurrence of all CPU anomaly data in the initial training sample set is calculated using the Monte Carlo algorithm, and the calculation method is as follows: in, Indicates the first The probability of a sample of abnormal CPU data occurring. This represents the ordinal number of the eliminated models after sorting all eliminated models in ascending order according to their precision. This represents the total number of models that were removed. Indicates the first Did the CPU exception data appear in the [number]th ... The training sample set of the elimination model; CPU abnormal data with a probability of occurrence greater than a preset threshold are identified as abnormal samples. The abnormal samples are removed from the initial training sample set to obtain the removed training sample set.
3. The CPU fault diagnosis and prediction method according to claim 1, characterized in that, After determining whether there are individuals whose fitness meets the preset conditions, the CPU fault diagnosis and prediction method further includes: If not, then perform individual crossover to obtain offspring individuals; The offspring individuals are mutated to generate a second population, and the fitness of all individuals in the second population is evaluated. This process is repeated until an individual whose fitness meets the preset conditions is generated.
4. A CPU fault diagnosis and prediction device, characterized in that, include: The acquisition unit is used to acquire all CPU abnormal data within a preset time period and determine the set of CPU abnormal data as the initial training sample set. The CPU abnormal data packets contain MCE information and AER information. The elimination unit is used to eliminate abnormal samples from the initial training sample set using the Monte Carlo algorithm to obtain an eliminated training sample set. The feature optimization unit is used to randomly establish a first population; encode all individuals in the first population, wherein the genes in the individuals correspond to the CPU abnormal data in the removed training sample set; evaluate the fitness of each individual using a fitness function; determine whether there are individuals whose fitness meets a preset condition; if so, determine the individual whose fitness meets the preset condition as the optimal individual, and determine the set of CPU abnormal data corresponding to all optimal individuals as the target training sample set. The training unit is used to train the initial SVM model and the initial BPNN model respectively based on the target training sample set to obtain the first base model and the second base model. The model fusion unit is used to obtain the first and second predicted values output by the first base model and the second base model; and to horizontally concatenate the first and second predicted values to obtain a feature matrix. The feature matrix is input into the Gradient Boosting Decision Tree (GBDT) model for training to obtain the target diagnosis prediction model. The input unit is used to input the target CPU fault information into the target diagnostic prediction model and output the target diagnostic prediction value.
5. The CPU fault diagnosis and prediction device according to claim 4, characterized in that, The elimination unit is specifically used for: A preset proportion of abnormal CPU data is randomly selected from the initial training sample set as the first training sample set to train the first model to be trained, thereby obtaining the first elimination model. A preset proportion of abnormal CPU data is randomly selected from the initial training sample set as the second training sample set to train the second model to be trained, thereby obtaining the second elimination model. This process is repeated until a preset number of elimination models are obtained. Sort all eliminated models in ascending order based on their accuracy. The probability of occurrence of all CPU anomaly data in the initial training sample set is calculated using the Monte Carlo algorithm, and the calculation method is as follows: in, Indicates the first The probability of a sample of abnormal CPU data occurring. This represents the ordinal number of the eliminated models after sorting all eliminated models in ascending order according to their precision. This represents the total number of models that were removed. Indicates the first Did the CPU exception data appear in the [number]th ... The training sample set of the elimination model; CPU abnormal data with a probability of occurrence greater than a preset threshold are identified as abnormal samples. The abnormal samples are removed from the initial training sample set to obtain the removed training sample set.
6. The CPU fault diagnosis and prediction device according to claim 4, characterized in that, The feature optimization unit is specifically used for: Randomly create the first group; Encode all individuals in the first population, wherein the genes in the individuals correspond to the CPU anomaly data in the removed training sample set; The fitness function was used to evaluate the fitness of each individual. Determine whether there are individuals whose fitness meets the preset conditions; If so, the individual whose fitness meets the preset conditions is determined as the optimal individual, and the set of CPU anomaly data corresponding to all optimal individuals is determined as the target training sample set.
7. A CPU fault diagnosis and prediction system, characterized in that, include: Central processing unit, memory, input / output interfaces, wired or wireless network interfaces, and power supply; The memory is either a short-term storage memory or a persistent storage memory; The central processing unit is configured to communicate with the memory and execute instructions in the memory to perform the CPU fault diagnosis and prediction method according to any one of claims 1 to 3.
8. A computer-readable storage medium comprising instructions that, when executed on a computer, cause the computer to perform the CPU fault diagnosis and prediction method as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Product quality anomaly detection method and system applied to industrial internet
CN115861246A
Fault diagnosis method and device of transformer, computer equipment and storage medium
CN116756508A
