Fault diagnosis model training method and device and computer storage medium
The feature information of the server fault data is extracted by the local reserve projection method and the fault-free tag data is automatically marked, which solves the problem of time-consuming and costly acquisition of tag data in the prior art, and improves the accuracy and efficiency of the fault diagnosis model.
Patent Information
- Application Number
- CN202411449261.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-17
- Publication Date
- 2025-02-21
AI Technical Summary
The prior art requires a large amount of precise label data when developing high-performance fault diagnosis models, and obtaining these data requires experienced operators, which is time-consuming and costly.
The local retention projection method is used to extract the feature information of the fault data, and by comparing the feature distribution of fault tag data and fault-free tag data, the fault-free tag data is automatically marked to reduce the workload of manual tagging.
It improves the accuracy and efficiency of fault classification diagnosis, reduces the need for manual intervention, and ensures the reliability and robustness of the fault diagnosis model in a real environment.
Smart Images

Figure CN119494041A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of server technology, and in particular to a fault diagnosis model training method, device and computer storage medium. Background Art
[0002] As enterprises and individuals rely more and more on servers, servers have become the core infrastructure for data storage, application deployment, and business processing. However, the scale and complexity of servers are also increasing, leading to an increase in the frequency and types of failures, which places higher demands on the stability and efficiency of network systems.
[0003] Currently, developing a high-performance fault diagnosis model usually requires a large amount of accurately labeled data for effective training. These labeled data play a key role in the training process, enabling the model to learn to identify various fault types, predict abnormal situations, and optimize the decision-making process. However, obtaining these accurately labeled data requires experienced operators to review historical fault records, identify the specific types and characteristics of the faults, and give appropriate labels, which is time-consuming and costly. Summary of the invention
[0004] The present application provides a fault diagnosis model training method, device and computer storage medium to at least partially solve the above-mentioned problems.
[0005] In a first aspect, the present application provides a fault diagnosis model training method, comprising:
[0006] Obtain at least one piece of fault data from the server;
[0007] Extracting characteristic information corresponding to each piece of fault data by using a local preservation projection method;
[0008] Determine the fault feature distribution information corresponding to the feature information of each piece of data with a fault label, and the feature distribution information corresponding to the feature information of each piece of data without a fault label, wherein the data with a fault label is data with a fault classification label in the fault data, and the data without a fault label is data without a fault classification label in the fault data;
[0009] Determine the fault label corresponding to each piece of the non-fault label data according to the fault feature distribution information and the feature distribution information;
[0010] Integrate the non-fault label data and the fault label data into a fault data set, and divide the fault data set into a training set and a test set;
[0011] Building a fault diagnosis model using the training set;
[0012] Using the fault diagnosis model, obtaining a classification label with the highest probability corresponding to each piece of fault data in the test set, wherein the classification label represents a label of the fault classification of the fault data;
[0013] The test set is used to evaluate the accuracy of the classification labels marked by the fault diagnosis model.
[0014] In one embodiment, the extracting characteristic information corresponding to each piece of the fault data by using a local preservation projection method includes:
[0015] Calculating the Euclidean distance between every two pieces of fault data;
[0016] For each piece of the fault data, determine, from each piece of the fault data, k adjacent fault data having the closest Euclidean distance to the fault data;
[0017] Based on k adjacent fault data, calculating the weight value of the weight relationship between every two fault data;
[0018] Substituting each of the weight values, a weight matrix is obtained;
[0019] Substituting each of the weight values, a degree matrix for characterizing the multidimensional data relationship of each of the fault data is obtained;
[0020] Calculating the difference between the degree matrix and the weight matrix to obtain a Laplace matrix for characterizing the structural relationship between each piece of the fault data;
[0021] Based on a data matrix composed of the various pieces of fault data, the Laplace matrix, a transposed matrix corresponding to the data matrix, and the degree matrix, characteristic information corresponding to each piece of fault data is calculated.
[0022] In one embodiment, the calculating the weight value of the weight relationship between every two pieces of the fault data based on k adjacent fault data includes:
[0023] The weight value of the weight relationship between each two pieces of fault data is calculated using the following formula:
[0024]
[0025] Among them, S ij Characterize fault data X i With fault data X j The weight value between , t is the heat kernel parameter, and the value range of t is (0,1).
[0026] In one embodiment, the calculating of the feature information corresponding to each piece of the fault data based on the data matrix composed of each piece of the fault data, the Laplace matrix, the transposed matrix corresponding to the data matrix and the degree matrix includes:
[0027] Substituting the data matrix composed of each piece of the fault data, the Laplace matrix, the transposed matrix corresponding to the data matrix and the degree matrix into the following formula, the feature information corresponding to each piece of the fault data is obtained;
[0028] XLXTA=λXDXTA
[0029] Wherein, X represents the data matrix, L represents the Laplace matrix, XT represents the transposed matrix corresponding to the data matrix X, λ represents the eigenvalue that retains the local structural relationship between each piece of the fault data during dimensionality reduction, and A represents the projection matrix composed of the eigenvectors corresponding to the eigenvalues; wherein each of the eigenvectors is the feature information of a corresponding piece of fault data.
[0030] In one embodiment, the determining of the fault feature distribution information corresponding to the feature information of each piece of faulty label data and the feature distribution information corresponding to the feature information of each piece of non-faulty label data includes:
[0031] Determine the fault category corresponding to the characteristic information of each piece of the faulty label data;
[0032] Calculate the probability distribution of each of the characteristic information corresponding to each type of fault category to obtain fault characteristic distribution information;
[0033] The probability distribution of the feature information of each piece of fault-free label data is calculated to obtain the feature distribution information.
[0034] In one embodiment, determining the fault label corresponding to each piece of the non-fault label data according to the fault feature distribution information and the feature distribution information includes:
[0035] The characteristic distribution information for each piece of fault-free label data:
[0036] Determine the KL divergence value between the characteristic distribution information of the fault-free label data and the fault characteristic distribution information corresponding to each type of the fault category;
[0037] The fault category corresponding to the minimum KL divergence value is used as the fault label of the fault-free label data.
[0038] In one embodiment, using the fault diagnosis model to obtain the classification label with the highest probability corresponding to each fault data in the test set includes:
[0039] For each fault data in the test set, execute:
[0040] Based on the following formula 1, the fault diagnosis model is used to calculate the probability that the fault data has a classification label of Y under different feature information conditions:
[0041]
[0042] Among them, P(Y|F1,...,F n ) represents that the fault data has characteristic information F1 to F n Under the condition of , they are the probabilities of classification label Y, P(Y) represents the probability that the fault data is classification label Y, P(F i |Y) represents that when the classification label of the fault data is Y, the characteristic information is F i The probability of n represents n feature information;
[0043] Based on the following formula 2, the fault diagnosis model is used to determine the classification label with the highest probability corresponding to the fault data:
[0044]
[0045] in, represents the classification label with the highest probability corresponding to the fault data, P(Y) represents the probability that the fault data is the classification label Y, P(F i |Y) represents that when the classification label of the fault data is Y, the characteristic information is F i The probability of n represents n feature information.
[0046] In one embodiment, the step of evaluating the accuracy of the classification labels marked by the fault diagnosis model using the test set includes:
[0047] Determine the number of fault data in the test set whose corresponding classification label is the same as the corresponding fault label;
[0048] The percentage of the ratio of the number to the number of fault data in the test set is calculated, and the percentage of the ratio is used as the accuracy rate of the classification label marked by the fault diagnosis model.
[0049] In one embodiment, a training set and a test set are divided from the fault data set in a random manner.
[0050] In one embodiment, obtaining at least one piece of fault data of the server includes:
[0051] Obtain at least one piece of historical server fault data;
[0052] The historical fault data of the server is normalized to obtain fault data.
[0053] In a second aspect, the present application provides a fault diagnosis model training device, comprising:
[0054] A data acquisition module, used to acquire at least one piece of fault data of a server;
[0055] A feature extraction module, used to extract feature information corresponding to each piece of fault data acquired by the data acquisition module by using a local preservation projection method;
[0056] A distribution calculation module, used to determine the fault feature distribution information corresponding to the feature information of each piece of fault-labeled data extracted by the feature extraction module, and the feature distribution information corresponding to the feature information of each piece of non-fault-labeled data, wherein the fault-labeled data is data with a fault classification label in the fault data, and the non-fault-labeled data is data without a fault classification label in the fault data;
[0057] A data processing module, configured to determine the fault label corresponding to each piece of the non-fault label data according to the fault feature distribution information and the feature distribution information determined by the distribution calculation module; integrate the non-fault label data and the faulty label data into a fault data set, and divide the fault data set into a training set and a test set;
[0058] A model management module is used to build a fault diagnosis model using the training set divided by the data processing module; using the fault diagnosis model, obtain the classification label with the highest probability corresponding to each fault data in the test set, wherein the classification label represents the label of the fault classification of the fault data; and using the test set to evaluate the accuracy of the classification label marked by the fault diagnosis model.
[0059] In a third aspect, the present application provides a computer program product, comprising a computer program / instructions, wherein the computer program / instructions, when executed by a processor, implement the method steps described in any one of the first aspects.
[0060] In a fourth aspect, the present application provides a computer storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the methods described in the first aspect.
[0061] The embodiment of the present application provides a fault diagnosis model training method, device and computer storage medium. First, by collecting fault data, a solid foundation is laid for analysis. On this basis, the local preservation projection method is used to effectively extract key features, making the data more representative and reducing the impact of noise. Further, by comparing the feature distribution of data with marked fault categories and data with unmarked fault categories, it is convenient to automatically mark data that has not been fault-classified, reduce the workload of manual marking, and improve the integrity of the data set. After integrating the original labeled and subsequently automatically marked data, it is divided into a training set and a test set to ensure that the fault diagnosis model can fully learn the diversity features and perform robust verification. After building the fault diagnosis model, a detailed evaluation is performed, and the efficiency and reliability of the model in practical applications are ensured by analyzing the accuracy of the test set. The present application not only improves the accuracy and efficiency of fault classification diagnosis, but also reduces the need for manual intervention, ensuring the reliability and robustness of the fault diagnosis model in a real environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 is a flow chart of a fault diagnosis model training method provided by an embodiment of the present application;
[0063] Figure 2 is a flow chart of another fault diagnosis model training method provided by an embodiment of the present application;
[0064] Figure 3 It is a schematic diagram of a fault diagnosis model training device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0065] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0066] Figure 1 A flowchart of a fault diagnosis model training method provided in an embodiment of the present application, the method specifically comprises the following steps:
[0067] Step 101: Obtain at least one piece of fault data of a server;
[0068] In the embodiment of the present application, by obtaining the data source, it can be ensured that the fault diagnosis model has actual fault data as input, which is conducive to training the fault diagnosis model.
[0069] Step 102: extracting feature information corresponding to each piece of fault data by using a local preservation projection method;
[0070] In the embodiment of the present application, effective feature extraction and dimensionality reduction are performed by retaining the information of the local structure, thereby improving the expressiveness of the features and reducing noise interference, which is beneficial to the efficiency and accuracy of subsequent analysis.
[0071] Step 103: determining fault feature distribution information corresponding to feature information of each piece of data with a fault label, and feature distribution information corresponding to feature information of each piece of data without a fault label, wherein data with a fault label is data with a fault classification label in the fault data, and data without a fault label is data without a fault classification label in the fault data;
[0072] In the embodiment of the present application, identifying and analyzing the characteristic distribution of characteristic information of faulty label data and non-faulty label data is helpful to provide a basis for marking the non-faulty label data.
[0073] Step 104: Determine the fault label corresponding to each piece of non-fault label data according to the fault feature distribution information and the feature distribution information;
[0074] In an embodiment of the present application, based on the feature distribution of the faulty labeled data and the feature distribution of the fault-free labeled data, the fault-free labeled data is automatically labeled, reducing the workload of manual labeling, while improving the integrity of the data set and supporting more comprehensive model training.
[0075] Step 105: Integrate the non-fault labeled data and the fault labeled data into a fault data set, and divide the fault data set into a training set and a test set;
[0076] In an embodiment of the present application, fault-free label data and faulty label data are integrated into a complete and diverse data set to ensure that the training and testing of the fault diagnosis model are performed under the same distribution, thereby improving the generalization ability of the model.
[0077] Step 106: Building a fault diagnosis model using the training set;
[0078] In the embodiments of the present application, a model for a specific fault diagnosis task is developed through a training set, which can identify and classify faults and improve the automated diagnosis capability of the system.
[0079] Step 107: using the fault diagnosis model, obtaining the classification label with the highest probability corresponding to each fault data in the test set, wherein the classification label represents the label of the fault classification of the fault data;
[0080] In the embodiment of the present application, the test set is used to classify the faults of unknown samples, and the classification results are used to facilitate the subsequent optimization of the fault diagnosis model.
[0081] Step 108: Use the test set to evaluate the accuracy of the classification labels marked by the fault diagnosis model.
[0082] In the embodiment of the present application, the accuracy and reliability of the fault diagnosis model are verified by evaluating the classification results of the fault diagnosis model on the test set, so as to improve the fault diagnosis model.
[0083] In one embodiment of the present application, the feature information corresponding to each piece of fault data is extracted by using a local preservation projection method, including:
[0084] Calculate the Euclidean distance between every two fault data;
[0085] For each piece of fault data, determine the k adjacent fault data with the closest Euclidean distance to the fault data from each piece of fault data;
[0086] Based on k adjacent fault data, calculate the weight value of the weight relationship between every two fault data;
[0087] Substitute each weight value to get the weight matrix;
[0088] Substituting each weight value, a degree matrix for characterizing the multidimensional data relationship of each fault data is obtained;
[0089] Calculate the difference between the degree matrix and the weight matrix to obtain a Laplace matrix used to characterize the structural relationship between each piece of fault data;
[0090] Based on the data matrix composed of each piece of fault data, the Laplace matrix, the transposed matrix corresponding to the data matrix and the degree matrix, the feature information corresponding to each piece of fault data is calculated.
[0091] In an embodiment of the present application, by determining the Euclidean distance between fault data points, the degree of similarity between fault data can be quantified. It provides an accurate basis for subsequent neighbor analysis, helps identify which fault data are closer in the feature space, and improves the interpretability of the data set. By identifying the k nearest neighbors of each fault data, the local structural features can be better captured and the understanding of the local pattern can be enhanced. By calculating the weight relationship, the similarity is quantified as a weight value, so that the association between the fault data appears clearer. The weight matrix systematizes the similarity relationship of the fault data to form a structured representation. The degree matrix characterizes the connection strength of each fault data and provides a way to measure the importance of the fault data in the network as a whole. The Laplace matrix is used to characterize the global structural relationship between the fault data, revealing the potential association pattern and the inherent form of the data. By extracting the characteristic information of the fault data, a higher quality input can be provided for the fault diagnosis model, which is conducive to improving the accuracy and robustness of the fault diagnosis model.
[0092] In an embodiment of the present application, based on k adjacent fault data, the weight value of the weight relationship between every two fault data is calculated, including:
[0093] The weight value of the weight relationship between each two fault data is calculated using the following formula:
[0094]
[0095] Among them, S ij Characterize fault data X i With fault data X j The weight value between , t is the heat kernel parameter, and the value range of t is (0,1).
[0096] In an embodiment of the present application, the similarity between the fault data is quantified as a weight value, and a more refined model can be constructed to describe the connection between the fault data. This quantification method enables the association between the fault data to be more clearly and intuitively identified. The weight value can help give priority to data points with strong correlation in further analysis, thereby improving the analysis accuracy of the data set and the predictive performance of the fault diagnosis model. In addition, determining the weight value between each fault data also helps to remove the influence of noise data and more accurately identify key fault data.
[0097] In one embodiment of the present application, based on the data matrix composed of each piece of fault data, the Laplace matrix, the transposed matrix corresponding to the data matrix, and the degree matrix, the characteristic information corresponding to each piece of fault data is calculated, including:
[0098] Substitute the data matrix composed of each piece of fault data, the Laplace matrix, the transposed matrix corresponding to the data matrix, and the degree matrix into the following formula to obtain the feature information corresponding to each piece of fault data;
[0099] XL T A=λXDX T A
[0100] Among them, X represents the data matrix, L represents the Laplace matrix, X T represents the transposed matrix corresponding to the data matrix X, λ represents the eigenvalues that retain the local structural relationship between each fault data during dimensionality reduction, and A represents the projection matrix composed of eigenvectors corresponding to the eigenvalues; wherein each eigenvector is the characteristic information of a corresponding fault data.
[0101] In the embodiment of the present application, the above formula can be used to achieve: capturing the local structural information between the fault data and ensuring that the relationship between the fault data is preserved during the dimensionality reduction process. The dimensionality reduction and feature expression of the fault data are achieved through the projection matrix A composed of the eigenvalue λ and the eigenvector, which can not only simplify the calculation complexity, but also improve the accuracy and efficiency of the fault diagnosis model. The extracted feature information not only enhances the interpretability of the fault data, but also provides a solid foundation for subsequent fault diagnosis, cluster analysis and prediction, thereby improving the overall analysis effect.
[0102] In an embodiment of the present application, determining the fault feature distribution information corresponding to the feature information of each piece of faulty label data and the feature distribution information corresponding to the feature information of each piece of non-faulty label data includes:
[0103] Determine the fault category corresponding to the characteristic information of each piece of faulty label data;
[0104] Calculate the probability distribution of each feature information corresponding to each type of fault category to obtain fault feature distribution information;
[0105] The probability distribution of the feature information of each piece of fault-free label data is calculated to obtain the feature distribution information.
[0106] In the embodiment of the present application, firstly, by determining the fault category corresponding to the characteristic information of each piece of data with a fault label, the accuracy of fault classification is ensured, laying a solid foundation for fault management. Secondly, the probability distribution of characteristic information corresponding to each type of fault is calculated, and the characteristics of different faults are deeply understood to enhance the effectiveness of fault detection and diagnosis. In addition, analyzing the probability distribution of characteristic information of data without fault labels is helpful for subsequent classification and labeling of data without fault labels.
[0107] In an embodiment of the present application, determining the fault label corresponding to each piece of non-fault label data according to the fault feature distribution information and the feature distribution information includes:
[0108] Feature distribution information for each piece of fault-free label data:
[0109] Determine the KL divergence value between the characteristic distribution information of the fault-free label data and the fault characteristic distribution information corresponding to each type of fault category;
[0110] The fault category corresponding to the minimum KL divergence value is used as the fault label of the fault-free label data.
[0111] In an embodiment of the present application, accurate fault identification can be achieved by calculating the KL divergence value between the characteristic distribution information of the fault-free label data and the characteristic distribution information of each fault category. Specifically, the smaller the KL divergence value, the closer the characteristic distribution of the data is to a certain fault category, so that the fault category is used as the label of the fault-free label data. By determining the fault label of the fault-free label data through the KL divergence value, the accuracy of fault detection can be improved and the misclassification rate can be reduced. By accurately matching the characteristic distribution, potential fault categories can be quickly identified, supporting timely corrective measures and saving time and resources.
[0112] In one embodiment of the present application, the fault diagnosis model is used to obtain the classification label with the highest probability corresponding to each fault data in the test set, including:
[0113] For each fault data in the test set, execute:
[0114] Based on the following formula 1, the fault diagnosis model is used to calculate the probability that the fault data is classified as Y under different feature information conditions:
[0115]
[0116] Among them, P(Y|F1,...,F n ) characterizes the fault data in the characteristic information F1 to F n Under the condition of , they are the probabilities of classification label Y, P(Y) represents the probability of fault data being classification label Y, P(F i |Y) represents the classification label of the fault data as Y, and the feature information is F i The probability of n represents n feature information;
[0117] Based on the following formula 2, the fault diagnosis model is used to determine the classification label with the highest probability corresponding to the fault data:
[0118]
[0119] in, The maximum probability classification label corresponding to the fault data is represented by P(Y), which represents the probability that the fault data is the classification label Y. i |Y) represents the classification label of the fault data as Y, and the feature information is F i The probability of n represents n feature information.
[0120] In the embodiment of the present application, the probability of fault data being classified as label Y under different feature information conditions can be effectively combined with the prior probability P(Y) and the conditional probability P(F i|Y) for inference. By comprehensively considering the influence of each feature information and providing a probability for each possible classification label, the fault diagnosis model is more reasonable and accurate in detecting and judging faults. Then, by maximizing the posterior probability to determine the classification label with the highest probability corresponding to the number of faults, it can ensure that the optimal label is selected to adapt to the given feature information set, improve the accuracy of the fault diagnosis model, and enhance the robustness and reliability of the fault diagnosis model in different scenarios.
[0121] In one embodiment of the present application, the accuracy of the classification labels marked by the fault diagnosis model is evaluated using a test set, including:
[0122] Determine the number of fault data in the test set whose corresponding classification label is the same as the corresponding fault label;
[0123] Calculate the percentage of the ratio of the number to the number of fault data in the test set, and use the percentage of the ratio as the accuracy of the classification label marked by the fault diagnosis model.
[0124] In the embodiment of the present application, the accuracy of the fault diagnosis model can be evaluated by calculating the number of fault data with the same classification label and fault label in the test set and converting the ratio of the number of fault data to the total number of fault data into a percentage. This indicator reflects the ability of the fault diagnosis model to identify and correctly label fault data.
[0125] In one embodiment of the present application, a random partitioning method is adopted to divide the training set and the test set from the fault data set.
[0126] In the embodiment of the present application, a training set and a test set are divided from the fault data set by random partitioning. Since the diversified feature distribution helps the fault diagnosis model to better adapt to unseen data, the generalization ability of the fault diagnosis model can be enhanced. At the same time, random partitioning reduces the risk of sample selection bias and makes the training and testing process fairer. In addition, random partitioning can usually balance the complexity of the training and test sets, improve training efficiency, and thus develop a more robust and accurate fault detection model.
[0127] In an embodiment of the present application, obtaining at least one piece of fault data of a server includes:
[0128] Obtain at least one piece of historical server fault data;
[0129] The historical fault data of the server is normalized to obtain the fault data.
[0130] In the embodiment of the present application, by obtaining and normalizing the historical fault data of the server, it is possible to ensure that all features are analyzed on the same scale. This process reduces the deviation between features, making the algorithm's learning of different variables more balanced. In addition, the normalization process can improve the convergence speed and stability of the fault diagnosis model, thereby improving the training effect and prediction accuracy of the model.
[0131] Specifically, the normalization process is a minimum-maximum normalization method, a fractional scaling normalization method, or a maximum absolute value normalization method.
[0132] It should be noted that the historical fault data includes but is not limited to server hardware and software related information such as CPU usage, memory usage, network bandwidth utilization, disk usage, server temperature and fan speed.
[0133] like Figure 2 In order to more clearly illustrate the technical solution and advantages of the present application, a fault diagnosis model training method provided by an embodiment of the present application is described in detail below, which may specifically include the following steps:
[0134] Step 201: Obtain at least one piece of historical server failure data.
[0135] Specifically, different historical failure data of different servers are obtained to provide data support for subsequent processing and modeling.
[0136] Step 202: normalize the historical fault data of the server to obtain fault data.
[0137] Specifically, normalization makes the data more consistent, eliminates the impact of different feature scales, ensures the stability of subsequent algorithms, and makes it easier to discover hidden patterns. In addition, it can improve the convergence speed and computational efficiency of the algorithm.
[0138] Step 203: Calculate the Euclidean distance between every two pieces of fault data.
[0139] Specifically, the Euclidean distance is used to measure the similarity between data points (i.e., fault data), which is helpful for cluster analysis and anomaly detection. It also enables the algorithm to more intuitively identify similar fault modes.
[0140] Step 204: for each piece of fault data, determine, from among the fault data, k adjacent fault data having the closest Euclidean distance to the fault data.
[0141] Specifically, finding the nearest k neighbors helps to strengthen the local characteristics of fault data, reveal similarities in local patterns, and help improve the sensitivity of fault diagnosis models to local data structures.
[0142] Step 205: Based on k adjacent fault data, calculate the weight value of the weight relationship between every two fault data.
[0143] Specifically, the weight value can reflect the relative strength of the correlation between fault data, providing a quantifiable standard to measure the similarity between features. A higher weight value indicates a high correlation between fault data, which helps to identify clusters or patterns more accurately.
[0144] Step 206: Substitute each weight value to obtain a weight matrix.
[0145] Specifically, the weight matrix concisely represents the connection relationship between all fault data in matrix form, which is convenient for mathematical and statistical analysis.
[0146] Step 207: Substitute each weight value to obtain a degree matrix for characterizing the multidimensional data relationship of each fault data.
[0147] Specifically, the degree matrix can be calculated by the weight values between each piece of fault data. Since the degree matrix provides the total number of connections or the weight sum of each piece of fault data, the overall connection structure of the data set of the fault data can be determined.
[0148] Step 208: Calculate the difference between the degree matrix and the weight matrix to obtain a Laplace matrix for characterizing the structural relationship between each piece of fault data.
[0149] Specifically, the Laplacian matrix captures the topological properties of the graph and is the basis for graph signal processing and spectral clustering. It reflects the diffusion properties of the network and is effectively used to identify different clusters and data discontinuities.
[0150] Step 209: Calculate the feature information corresponding to each piece of fault data based on the data matrix composed of each piece of fault data, the Laplace matrix, the transposed matrix corresponding to the data matrix, and the degree matrix.
[0151] Specifically, by extracting characteristic information of fault data, data representation can be simplified, making complex fault data easier to process and analyze.
[0152] Step 210: Determine the fault category corresponding to the characteristic information of each piece of faulty label data.
[0153] Specifically, the characteristic information is mapped to a specific fault category to facilitate accurate fault diagnosis and shorten identification time.
[0154] Step 211: Calculate the probability distribution of each feature information corresponding to each fault category to obtain fault feature distribution information.
[0155] Specifically, determining the probability distribution helps to identify the frequency of occurrence of characteristic information under different fault categories, improve the accuracy and reliability of fault identification, and determine the characteristic patterns of specific categories.
[0156] Step 212: Calculate the probability distribution of the characteristic information of each piece of fault-free label data to obtain characteristic distribution information.
[0157] Specifically, by analyzing the feature distribution of unlabeled data, establishing benchmark comparisons, and enhancing the comprehensiveness and flexibility of diagnostic models, it helps to improve unsupervised learning methods.
[0158] , where the data with fault labels are the data with fault classification labels in the fault data, and the data without fault labels are the data without fault classification labels in the fault data.
[0159] Step 213: for each piece of feature distribution information of non-fault label data, determine the KL divergence value between the feature distribution information of the non-fault label data and the fault feature distribution information corresponding to each type of fault category.
[0160] Specifically, determine the feature distribution of the fault-free label data, and then determine the information gap between it and the fault feature distribution. Quantifying the data distribution difference through KL divergence helps to accurately identify the closest fault category, improve fault identification efficiency and accuracy, and reduce the misjudgment rate.
[0161] Step 214: The fault category corresponding to the minimum KL divergence value is used as the fault label of the non-fault label data.
[0162] Specifically, the smaller the KL divergence value, the closer the characteristic distribution of the data is to a certain fault category. This method ensures accurate identification of fault categories and improves diagnostic accuracy by minimizing information gaps, thereby enhancing the performance of automatic fault classification and prediction.
[0163] Step 215: Integrate the non-fault labeled data and the fault labeled data into a fault data set, and divide the fault data set into a training set and a test set.
[0164] Specifically, by reasonably dividing the data set, the generalization ability of the fault diagnosis model is improved, ensuring that the fault diagnosis model can perform well on unseen test data, and providing a scientific basis for model evaluation.
[0165] It is understandable that the training set and the test set are divided randomly. The ratio of the training set to the test set can be 70%:30%, 80%:20%, 90%:10%, 60%:40%, 60%:40%.
[0166] Step 216: Build a fault diagnosis model using the training set.
[0167] Specifically, accurate fault diagnosis models are created through training sets to support automation and real-time monitoring, reduce human errors, and significantly improve diagnostic efficiency, effectively reducing maintenance costs.
[0168] Step 217: using the fault diagnosis model, obtain the classification label with the highest probability corresponding to each fault data in the test set, wherein the classification label represents the label of the fault classification of the fault data.
[0169] Specifically, by determining the classification label with the highest probability for the fault data in the test set, it helps to quickly identify the most likely fault type of the test data, which helps in the subsequent improvement of the fault diagnosis model.
[0170] When determining the most probable classification label for each fault data in the test set, first determine the probability that the fault data is classified as label Y under different feature information conditions through step a. Then determine the most probable classification label corresponding to the fault data through step b. Calculating the probability that the fault data belongs to a certain category under specific feature conditions can quantify the importance of each feature to the classification decision. This probabilistic analysis makes fault diagnosis more interpretable and transparent, and helps identify the feature information that has the greatest impact on the fault category judgment. Use maximum likelihood estimation to select the most likely fault category label. This method ensures that the fault diagnosis model can quickly classify each point in the feature space, thereby improving the accuracy and efficiency of fault detection. It makes fault diagnosis not only fast but also highly reliable, suitable for real-time system applications.
[0171] Step a:
[0172] For each fault data in the test set, execute:
[0173] Based on the following formula 1, the fault diagnosis model is used to calculate the probability that the fault data is classified as Y under different feature information conditions:
[0174]
[0175] Among them, P(Y|F1,...,Fn) represents the probability that the fault data is the classification label Y under the condition that the feature information is F1 to Fn, P(Y) represents the probability that the fault data is the classification label Y, P(Fi|Y) represents the probability that the feature information is Fi when the classification label of the fault data is Y, and n represents n feature information.
[0176] Step b:
[0177] Based on the following formula 2, the fault diagnosis model is used to determine the classification label with the highest probability corresponding to the fault data:
[0178]
[0179] in, Represents the classification label with the highest probability corresponding to the fault data, P(Y) represents the probability that the fault data is the classification label Y, P(Fi|Y) represents the probability that the feature information is Fi when the classification label of the fault data is Y, and n represents n feature information.
[0180] Step 218: Determine the number of fault data in the test set whose corresponding classification labels are the same as the corresponding fault labels, calculate the percentage of the ratio of the number to the number of fault data in the test set, and use the percentage of the ratio as the accuracy of the fault diagnosis model for marking the classification labels.
[0181] Specifically, by counting the number of classification labels marked by the fault diagnosis model that are the same as the original fault labels of the fault data, the fault diagnosis model can be determined to determine how the fault data is marked. This is helpful for the subsequent evaluation of the accuracy of the fault diagnosis model labeling. By determining the ratio of the number of fault labels marked by the fault diagnosis model to the number of actual fault labels, the fault classification ability of the fault diagnosis model can be evaluated to help improve and tune the fault diagnosis model.
[0182] like Figure 3 As shown, the present application provides a fault diagnosis model training device, comprising:
[0183] The data acquisition module 301 is used to acquire at least one piece of fault data of the server;
[0184] A feature extraction module 302 is used to extract feature information corresponding to each piece of the fault data acquired by the data acquisition module 301 by using a local preservation projection method;
[0185] The distribution calculation module 303 is used to determine the fault feature distribution information corresponding to the feature information of each piece of fault-labeled data extracted by the feature extraction module 302, and the feature distribution information corresponding to the feature information of each piece of non-fault-labeled data, wherein the fault-labeled data is the data with a fault classification label in the fault data, and the non-fault-labeled data is the data without a fault classification label in the fault data;
[0186] The data processing module 304 is used to determine the fault label corresponding to each piece of the non-fault label data according to the fault feature distribution information and the feature distribution information determined by the distribution calculation module 303; integrate the non-fault label data and the fault label data into a fault data set, and divide the fault data set into a training set and a test set;
[0187] The model management module 305 is used to build a fault diagnosis model using the training set divided by the data processing module 304; use the fault diagnosis model to obtain the classification label with the highest probability corresponding to each fault data in the test set, wherein the classification label represents the label of the fault classification of the fault data; and use the test set to evaluate the accuracy of the classification label marked by the fault diagnosis model.
[0188] The embodiments of the present application provide an electronic device, and the specific embodiments of the present application do not limit the specific implementation of the electronic device.
[0189] The electronic device may include: a processor, a communication interface, a memory, and a communication bus.
[0190] The processor, the communication interface, and the memory communicate with each other via a communication bus.
[0191] Communication interface, used to communicate with other electronic devices or servers.
[0192] The processor is used to execute the program, and specifically can execute the relevant steps in the above method embodiment.
[0193] Specifically, the program may include program codes including computer operation instructions.
[0194] The processor may be a CPU, a GPU (Graphic Processing Unit), an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in the smart device may be processors of the same type, such as one or more CPUs; or may be processors of different types, such as one or more CPUs and one or more ASICs.
[0195] The memory is used to store programs. The memory may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory.
[0196] The program may include multiple computer instructions. Specifically, the program may enable a processor to execute operations corresponding to the method described in any of the aforementioned method embodiments through the multiple computer instructions.
[0197] The specific implementation of each step in the program can refer to the corresponding description of the corresponding steps and units in the above method embodiment, and has corresponding beneficial effects, which will not be repeated here. The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described devices and modules can refer to the corresponding process description in the above method embodiment, which will not be repeated here.
[0198] The present application also provides a computer storage medium on which a computer program is stored, and when the program is executed by a processor, the method described in any of the above-mentioned multiple method embodiments is implemented. The computer storage medium includes but is not limited to: a compact disc read-only memory (CD-ROM), a random access memory (RAM), a floppy disk, a hard disk or a magneto-optical disk, etc.
[0199] An embodiment of the present application also provides a computer program product, including computer instructions, which instruct a computing device to execute operations corresponding to any one of the above-mentioned multiple method embodiments.
[0200] In addition, it should be noted that the user-related information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to sample data used to train the model, data used for analysis, stored data, displayed data, etc.) involved in the embodiments of the present application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0201] It should be pointed out that, according to the needs of implementation, the various components / steps described in the embodiments of the present application can be split into more components / steps, or two or more components / steps or partial operations of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of the present application.
[0202] The above-mentioned method according to the embodiment of the present application can be implemented in hardware, firmware, or implemented as software or computer code that can be stored in a recording medium (such as a CD-ROM, RAM, floppy disk, hard disk or magneto-optical disk), or implemented as a computer code originally stored in a remote recording medium or a non-temporary machine-readable medium downloaded through a network and stored in a local recording medium, so that the method described herein can be stored in such software processing on a recording medium using a general-purpose computer, a dedicated processor or programmable or dedicated hardware (such as an application-specific integrated circuit (ASIC) or a field programmable gate array (FPGA)). It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component (e.g., a random access memory (RAM), a read-only memory (ROM), a flash memory, etc.) that can store or receive software or computer code, and when the software or computer code is accessed and executed by a computer, a processor or hardware, the method described herein is implemented. In addition, when a general-purpose computer accesses the code for implementing the method shown here, the execution of the code converts the general-purpose computer into a dedicated computer for executing the method shown here.
[0203] Those of ordinary skill in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for specific applications, but such implementation should not be considered to be beyond the scope of the embodiments of the present application.
[0204] The above implementation methods are only used to illustrate the embodiments of the present application, and are not limitations on the embodiments of the present application. Ordinary technicians in the relevant technical field can make various changes and modifications without departing from the spirit and scope of the embodiments of the present application. Therefore, all equivalent technical solutions also belong to the scope of the embodiments of the present application. The scope of patent protection of the embodiments of the present application should be limited by the claims.
Claims
1. A fault diagnosis model training method, characterized in that: include: Obtain at least one piece of fault data from the server; Extracting characteristic information corresponding to each piece of fault data by using a local preservation projection method; Determine the fault feature distribution information corresponding to the feature information of each piece of data with a fault label, and the feature distribution information corresponding to the feature information of each piece of data without a fault label, wherein the data with a fault label is data with a fault classification label in the fault data, and the data without a fault label is data without a fault classification label in the fault data; Determine the fault label corresponding to each piece of the non-fault label data according to the fault feature distribution information and the feature distribution information; Integrate the non-fault label data and the fault label data into a fault data set, and divide the fault data set into a training set and a test set; Building a fault diagnosis model using the training set; Using the fault diagnosis model, obtaining a classification label with the highest probability corresponding to each piece of fault data in the test set, wherein the classification label represents a label of the fault classification of the fault data; The test set is used to evaluate the accuracy of the classification labels marked by the fault diagnosis model.
2. The method according to claim 1, characterized in that The extracting characteristic information corresponding to each piece of the fault data by using the local preservation projection method includes: Calculating the Euclidean distance between every two pieces of fault data; For each piece of the fault data, determine, from each piece of the fault data, k adjacent fault data having the closest Euclidean distance to the fault data; Based on k adjacent fault data, calculating the weight value of the weight relationship between every two fault data; Substituting each of the weight values, a weight matrix is obtained; Substituting each of the weight values, a degree matrix for characterizing the multidimensional data relationship of each of the fault data is obtained; Calculating the difference between the degree matrix and the weight matrix to obtain a Laplace matrix for characterizing the structural relationship between each piece of the fault data; Based on a data matrix composed of the various pieces of fault data, the Laplace matrix, a transposed matrix corresponding to the data matrix, and the degree matrix, characteristic information corresponding to each piece of fault data is calculated.
3. The method according to claim 2, characterized in that The calculating the weight value of the weight relationship between each two pieces of the fault data based on the k adjacent fault data includes: The weight value of the weight relationship between each two pieces of fault data is calculated using the following formula: Among them, S ij Characterization fault data X i With fault data X j The weight value between , t is the heat kernel parameter, and the value range of t is (0,1).
4. The method according to claim 2, characterized in that: The calculating the characteristic information corresponding to each piece of the fault data based on the data matrix composed of each piece of the fault data, the Laplace matrix, the transposed matrix corresponding to the data matrix and the degree matrix comprises: Substituting the data matrix composed of each piece of the fault data, the Laplace matrix, the transposed matrix corresponding to the data matrix and the degree matrix into the following formula, the feature information corresponding to each piece of the fault data is obtained; XLX T A=λXDX T A Wherein, X represents the data matrix, L represents the Laplace matrix, X T represents the transposed matrix corresponding to the data matrix X, λ represents the eigenvalue that retains the local structural relationship between each piece of the fault data during dimensionality reduction, and A represents the projection matrix composed of the eigenvectors corresponding to the eigenvalues; wherein each of the eigenvectors is the feature information of a corresponding piece of fault data.
5. The method according to claim 1, characterized in that The determining of the fault feature distribution information corresponding to the feature information of each piece of faulty label data and the feature distribution information corresponding to the feature information of each piece of non-faulty label data includes: Determine the fault category corresponding to the characteristic information of each piece of the faulty label data; Calculate the probability distribution of each of the characteristic information corresponding to each type of fault category to obtain fault characteristic distribution information; The probability distribution of the feature information of each piece of fault-free label data is calculated to obtain the feature distribution information.
6. The method according to claim 5, characterized in that The determining, according to the fault feature distribution information and the feature distribution information, the fault label corresponding to each piece of the non-fault label data comprises: The characteristic distribution information for each piece of fault-free label data: Determine the KL divergence value between the characteristic distribution information of the fault-free label data and the fault characteristic distribution information corresponding to each type of the fault category; The fault category corresponding to the minimum KL divergence value is used as the fault label of the fault-free label data.
7. The method according to any one of claims 1 to 6, characterized in that: The method of using the fault diagnosis model to obtain the classification label with the highest probability corresponding to each fault data in the test set includes: For each fault data in the test set, execute: Based on the following formula 1, the fault diagnosis model is used to calculate the probability that the fault data has a classification label of Y under different feature information conditions: Among them, P(Y|F1,...,F n ) represents that the fault data has characteristic information F1 to F n Under the condition of , they are the probabilities of classification label Y, P(Y) represents the probability that the fault data is classification label Y, P(F i |Y) represents that when the classification label of the fault data is Y, the characteristic information is F i The probability of n represents n feature information; Based on the following formula 2, the fault diagnosis model is used to determine the classification label with the highest probability corresponding to the fault data: in, represents the classification label with the highest probability corresponding to the fault data, P(Y) represents the probability that the fault data is the classification label Y, P(F i |Y) represents that when the classification label of the fault data is Y, the characteristic information is F i The probability of n represents n feature information; and / or, The method of evaluating the accuracy of the classification labels marked by the fault diagnosis model using the test set includes: Determine the number of fault data in the test set whose corresponding classification label is the same as the corresponding fault label; Calculate the percentage of the ratio of the number to the number of fault data in the test set, and use the percentage of the ratio as the accuracy rate of the classification label marked by the fault diagnosis model; and / or, Use random partitioning to divide the fault data set into training set and test set; and / or, The obtaining of at least one piece of fault data of the server includes: Obtain at least one piece of historical server fault data; The historical fault data of the server is normalized to obtain fault data.
8. A fault diagnosis model training device, characterized in that: include: A data acquisition module, used to acquire at least one piece of fault data of a server; A feature extraction module, used to extract feature information corresponding to each piece of fault data acquired by the data acquisition module by using a local preservation projection method; A distribution calculation module, used to determine the fault feature distribution information corresponding to the feature information of each piece of fault-labeled data extracted by the feature extraction module, and the feature distribution information corresponding to the feature information of each piece of non-fault-labeled data, wherein the fault-labeled data is data with a fault classification label in the fault data, and the non-fault-labeled data is data without a fault classification label in the fault data; A data processing module, configured to determine the fault label corresponding to each piece of the non-fault label data according to the fault feature distribution information and the feature distribution information determined by the distribution calculation module; integrate the non-fault label data and the faulty label data into a fault data set, and divide the fault data set into a training set and a test set; A model management module is used to build a fault diagnosis model using the training set divided by the data processing module; using the fault diagnosis model, obtain the classification label with the highest probability corresponding to each fault data in the test set, wherein the classification label represents the label of the fault classification of the fault data; and using the test set to evaluate the accuracy of the classification label marked by the fault diagnosis model.
9. A computer program product comprising a computer program / instructions, wherein: When the computer program / instructions are executed by a processor, the method steps of any one of claims 1 to 7 are implemented.
10. A computer storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.