A method for enhancing the small sample diagnostic ability of fault diagnosis model based on meta-learning framework
By adopting a meta-learning framework and self-supervised learning method in the fault diagnosis model, the problem of insufficient generalization ability of the fault diagnosis model under small sample data conditions is solved, and higher diagnostic performance and accuracy are achieved.
Patent Information
- Application Number
- CN202411765496.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-12-04
AI Technical Summary
Existing fault diagnosis models are difficult to generalize effectively under small sample data conditions, especially in the case of data imbalance and inter-category distribution uncertainty, resulting in poor diagnostic performance.
The fault diagnosis model based on the meta-learning framework is adopted to enhance the generalization ability of the model through meta-learning, establish a diagnostic model and train it on small sample data, and combine self-supervised learning and direct push learning methods to perform feature extraction and classification prediction.
It significantly improves the generalization ability of the fault diagnosis model under small sample data, improves diagnostic performance and accuracy, and is suitable for fault detection of electromechanical products.
Smart Images

Figure CN119226963B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method for enhancing the small sample diagnostic capability of a fault diagnosis model based on a meta-learning framework, and belongs to the technical field of electrical data processing. Background Art
[0002] In the development of fault diagnosis models, monitoring data sets from actual engineering often consist of a large amount of normal state data and a small amount of fault data, and there is also a significant imbalance between fault categories. This non-ideal data condition will have an adverse effect on the feature extraction and classification capabilities of the diagnostic model, making it impossible for most deep learning models to take advantage of data-driven. Under such data conditions, effective knowledge must be introduced from outside the information provided by the current data set in order to achieve a credible improvement in the ability of the diagnostic model. Domain priors and similar task information are two relatively easy sources of knowledge. Two traditional solutions are to pre-train and fine-tune historical tasks in a supervised learning manner, and to use historical task models for migration. However, these two methods tend to over-optimize the training of feature extraction networks in the direction of distinguishing differences between sample categories in the training data, which is not better for generalization on unseen categories.
[0003] Self-Supervised Learning (SSL) is a learning method that uses unlabeled data to learn effective representations by setting different pretext tasks (also called proxy tasks). It can be used as a feature extraction network for downstream tasks, or trained as an auxiliary task to improve the performance of the main task. At the same time, in order to cope with data scarcity, complex working conditions, and time-consuming modeling, meta-learning methods can be applied to the field of small sample fault diagnosis.
[0004] When performing self-supervised learning on unlabeled data, unbalanced data categories may cause the representation learned by self-supervision to lack the capture of minority samples, which further affects the downstream diagnostic tasks. Therefore, it is necessary to perform a preliminary balance on the categories of unlabeled data during meta-self-supervised learning. The core difference between transductive learning and traditional inductive learning is that transductive learning allows the model to directly access unlabeled test data during model training. This method can obtain additional information from the distribution of unlabeled test data, and therefore has a natural advantage in small sample classification problems. This setting is not suitable for the application scenario of online fault diagnosis, but is suitable for the task of annotating a large amount of unlabeled historical data. Most transductive learning methods are based on distance metrics and label propagation in various feature spaces, and can be well combined with metric-based meta-learning methods.
[0005] The Chinese invention patent application with publication number CN118606815A discloses a bearing fault diagnosis method, device and medium based on small sample learning, the method comprising: constructing a prototype network based on U-shaped feature extraction and cluster correction, the prototype network comprising an improved U-Net feature extraction module, a parallel hybrid attention module, a cluster correction module and a classification prediction module; training the prototype network through labeled support set samples and labeled query set samples; inputting the target sample into the trained prototype network to generate a fault diagnosis result; the training of the prototype network through labeled support set samples and labeled query set samples The steps of the prototype network include: inputting the support set samples and the query set samples into the improved U-Net feature extraction module for multi-level feature extraction and jump connection processing to generate feature information of different scales; inputting the feature information into the parallel hybrid attention module for adaptive adjustment to generate target features that integrate spatial importance and channel importance; inputting the target features into the clustering correction module for clustering and fusion processing to correct the class prototype; calculating the distance between the query set samples and the corrected class prototype through the classification prediction module to predict the classification probability of the query set samples; and updating the prototype network according to the classification probability.
[0006] However, this method ignores the distribution uncertainty of data domains between different tasks, resulting in excessive confidence in unlabeled samples for tasks with domain deviation, which reduces the generalization ability of class prototypes. Summary of the invention
[0007] In order to overcome the shortcomings of the prior art, the object of the present invention is to provide a method for enhancing the small sample diagnostic capability of a fault diagnosis model based on a meta-learning framework, which enhances the generalization ability of small sample diagnosis of fault models through meta-learning.
[0008] To achieve the above-mentioned object of the invention, the present invention provides a method for enhancing the small sample diagnostic capability of a fault diagnosis model based on a meta-learning framework, which comprises the following steps:
[0009] Step 1: Establish a diagnostic model based on meta-learning;
[0010] Step 2: Obtain a small sample of the target to be diagnosed;
[0011] Step 3: Obtain the confidence of the small sample of the target to be diagnosed, compare the confidence with the threshold, reject the diagnosis for the small sample of the target to be diagnosed whose confidence is less than the threshold, and proceed to step 4 for the small sample of the target to be diagnosed whose confidence is greater than or equal to the threshold;
[0012] Step 4: Use the diagnostic model to infer the label of the failure mode of the small sample of the target to be diagnosed, and output it as a diagnostic result with a confidence level not less than a threshold.
[0013] Compared with the existing technology, the method for enhancing the small sample diagnostic ability of the fault diagnosis model based on the meta-learning framework provided by the present invention has the following beneficial effects:
[0014] The diagnostic model established by meta-learning enhances the generalization ability of small sample diagnosis of fault model. It is mainly used for fault detection of electromechanical products as a whole and the components of the products. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 It is a flow chart of the method for enhancing the small sample diagnostic capability of the fault diagnosis model based on the meta-learning framework provided by the present invention. DETAILED DESCRIPTION
[0016] In order to make the technical means, creative features, objectives and effects achieved by the present invention easy to understand, the present invention is further explained below in conjunction with specific implementation methods.
[0017] In the present invention, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance.
[0018] Figure 1 is a flow chart of a method for enhancing the small sample diagnostic capability of a fault diagnosis model based on a meta-learning framework provided by the present invention, such as Figure 1 As shown in FIG, the method for enhancing the small sample diagnostic capability of the fault diagnosis model based on the meta-learning framework includes the following steps:
[0019] Step 1: Establish a diagnostic model based on meta-learning;
[0020] Step 2: Obtain a small sample of the target to be diagnosed ;
[0021] Step 3: Obtain a small sample of the target to be diagnosed The confidence level is compared with the threshold. For small samples of the target to be diagnosed whose confidence level is less than the threshold, Reject diagnosis for small samples of targets to be diagnosed whose confidence is greater than or equal to the threshold , then continue to step 4;
[0022] Step 4: Use the diagnostic model to infer the small sample of the target to be diagnosed Failure mode label , and output it as a diagnosis result with a confidence level not lower than a threshold.
[0023] In the present invention, ,
[0024] In the formula, is the diagnostic model; the small sample set of the target to be diagnosed ; Represents the data in the small sample set of the target to be diagnosed The label belonging to fault category c is , c=1,…,C; represents the parameters of the diagnostic model; C is the total number of fault categories, Represents statistical data The label belonging to fault category c is the number of Indicates The label of the fault class at which the maximum value is taken.
[0025] The diagnostic model is formed by training the meta-learner. Training the meta-learner into a diagnostic model includes the following steps:
[0026] S2-1: From the meta-training set D meta-train Get the training task from the training dataset, which includes the labeled training dataset and unlabeled training dataset , based on the labeled training data set Compute the class prototype for each fault category c:
[0027] ,
[0028] In the formula, , indicating labeled training data Tags Fault Category 1 when it is, otherwise 0;
[0029] S2-2: Based on the unlabeled training dataset The class prototype of each fault category c Updated to :
[0030] ,
[0031] In the formula, ,C is the total number of fault categories; Indicates distance;
[0032] S2-3: From the meta-training set D meta-train Get the test dataset from , , get the label annotation loss of the diagnosis task:
[0033] ;
[0034] S2-4: Loss through labeling Update the classifier and meta-learner Parameters:
[0035] ,
[0036] ,
[0037] In the formula, and is the learning rate, For The gradient of For The gradient;
[0038] S2-5: Determine label loss Is it the smallest? If the label loss If the label loss is not reached, return to S2-1. When the minimum is reached, the training is terminated and the classifier is obtained. and diagnostic models .
[0039] In the present invention, training the meta-learner into a diagnostic model further includes the following steps:
[0040] S2-6: Unlabeled training dataset Perform small addition and subtraction transformations on the original value to obtain a small transformation data set ,
[0041] In the formula, is the transformation amplitude;
[0042] S2-7: Calculate the first self-supervised loss according to the following formula:
[0043] ,
[0044] In the formula, is a hyperparameter;
[0045] S2-8: Through the first self-supervised loss Update the meta-learner Parameters:
[0046] ,
[0047] In the formula, is the learning rate, For The gradient of
[0048] S2-9: Determine the first self-supervision loss Is it the smallest? If the first self-supervision loss If the first self-supervision loss is not reached, return to step 2-6. When the minimum is reached, the training is terminated to obtain the diagnostic model. .
[0049] In the present invention, training the meta-learner into a diagnostic model further includes:
[0050] S2-10: Unlabeled training dataset Perform large-scale addition and subtraction transformations on the basis of the original values to obtain large-scale transformation data sets ,
[0051] In the formula, is the transformation amplitude; ;
[0052] S2-11: Calculate the second self-supervised loss according to the following formula:
[0053] ,
[0054] In the formula, is a hyperparameter;
[0055] S2-12: Calculate the third loss according to the following formula:
[0056] ,
[0057] In the formula, Represents unlabeled samples Under small changes, the probability is greater than the threshold The value of Indicates that the probability test value exceeds 1 when it is, otherwise 0; represents cross entropy; Represents unlabeled data Obtain the probability vector of the pseudo label y under a small transformation; Represents unlabeled data Obtain the probability vector of the pseudo-label y under large-scale transformation;
[0058] S2-13: Obtain the total loss function according to the following formula:
[0059] ,
[0060] In the formula, is the learning coefficient;
[0061] S2-14: Through the total loss function Update the meta-learner Parameters:
[0062] ,
[0063] In the formula, is the learning rate, For The gradient of
[0064] S2-15: Determine the total loss function Is it the minimum? If the total loss function If the total loss function does not reach the minimum, return to S2-11; When the minimum is reached, the training is terminated to obtain the diagnostic model. .
[0065] In the present invention, .
[0066] In the present invention, .
[0067] The present invention trains meta-learning into a fault model, thereby enhancing the generalization ability of the small sample diagnosis of the fault model. The present invention is mainly applied to the fault detection of the whole electromechanical product and the components of the product.
[0068] The present invention also provides a system, which includes a storage medium and one or more processors, wherein the storage medium is used to store a computer program, and the computer program can be called by one or more processors to implement the above method as the above computer program.
[0069] The present invention also provides a computer program product, which is a program code compiled by a computer language according to the above method, and the program code can be called and executed by one or more processors.
[0070] The above shows and describes the basic principles and main features of the present invention and the advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited to the above embodiments. The above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.
Claims
1. A method for enhancing the small sample diagnostic capability of a fault diagnosis model based on a meta-learning framework, characterized in that: The steps include: Step 1: Establish a diagnostic model based on meta-learning; Step 2: Obtain a small sample of the target to be diagnosed ; Step 3: Obtain a small sample of the target to be diagnosed The confidence level is compared with the threshold. For small samples of the target to be diagnosed whose confidence level is less than the threshold, Reject diagnosis for small samples of targets to be diagnosed whose confidence is greater than or equal to the threshold , then continue to step 4; Step 4: Use the diagnostic model to infer the small sample of the target to be diagnosed Failure mode label , and output it as a diagnosis result with a confidence level not lower than the threshold. in, , In the formula, is the diagnostic model; the small sample set of the target to be diagnosed ; Represents the data in the small sample set of the target to be diagnosed The label belonging to fault category c is , c=1,…,C; represents the parameters of the diagnostic model; C is the total number of fault categories, Represents statistical data The label belonging to fault category c is the number of Indicates The label of the fault class at which the maximum value is taken.
2. The method for enhancing the small sample diagnostic capability of a fault diagnosis model based on a meta-learning framework according to claim 1 is characterized in that: The diagnostic model is formed by training the meta-learner. Training the meta-learner into a diagnostic model includes the following steps: S2-1: From the meta-training set D meta-train Get the training task from the training dataset, which includes the labeled training dataset and unlabeled training dataset , based on the labeled training data set Compute the class prototype for each fault category c: , In the formula, , indicating labeled training data Tags Fault Category 1 when it is, otherwise 0; S2-2: Based on the unlabeled training dataset The class prototype of each fault category c Updated to : , In the formula, ,C is the total number of fault categories; Indicates distance; S2-3: From the meta-training set D meta-train Get the test dataset from , , get the label annotation loss of the diagnosis task: , S2-4: Loss through labeling Update the classifier and meta-learner Parameters: , ,, In the formula, and is the learning rate, For The gradient of For The gradient; S2-5: Determine label loss Is it the smallest? If the label loss If the label loss is not reached, return to S2-1. When the minimum is reached, the training is terminated and the classifier is obtained. and diagnostic models .
3. The method for enhancing the small sample diagnostic capability of a fault diagnosis model based on a meta-learning framework according to claim 2 is characterized in that: Training the meta-learner into a diagnostic model also includes the following steps: S2-6: Unlabeled training dataset Perform small addition and subtraction transformations on the original value to obtain a small transformation data set , In the formula, is the transformation amplitude; S2-7: Calculate the first self-supervised loss according to the following formula: , In the formula, is a hyperparameter; S2-8: Through the first self-supervised loss Update the meta-learner Parameters: , In the formula, is the learning rate, For The gradient of S2-9: Determine the first self-supervision loss Is it the smallest? If the first self-supervision loss If the first self-supervision loss is not reached, return to step 2-6. When the minimum is reached, the training is terminated to obtain the diagnostic model. .
4. The method for enhancing the small sample diagnostic capability of a fault diagnosis model based on a meta-learning framework according to claim 3 is characterized in that: Training the meta-learner into a diagnostic model also involves: S2-10: Unlabeled training dataset Perform large addition and subtraction transformations on the original value to obtain a large transformation data set , In the formula, is the transformation amplitude; ; S2-11: Calculate the second self-supervised loss according to the following formula: , In the formula, is a hyperparameter; S2-12: Calculate the third loss according to the following formula , In the formula, Represents unlabeled samples Under small changes, the probability is greater than the threshold The value of Indicates that the probability test value exceeds 1 when it is, otherwise 0; represents cross entropy; Represents unlabeled data Obtain the probability vector of the pseudo label y under a small transformation; Represents unlabeled data Obtain the probability vector of the pseudo-label y under large-scale transformation; S2-13: Obtain the total loss function according to the following formula: ; , where is the learning coefficient; S2-14: Through the total loss function Update the meta-learner Parameters: , In the formula, is the learning rate, For The gradient of S2-15: Determine the total loss function Is it the minimum? If the total loss function If the total loss function does not reach the minimum, return to S2-11; When the minimum is reached, the training is terminated to obtain the diagnostic model. .
5. The method for enhancing the small sample diagnostic capability of a fault diagnosis model based on a meta-learning framework according to claim 4 is characterized in that: 。 6. The method for enhancing the small sample diagnostic capability of a fault diagnosis model based on a meta-learning framework according to claim 5 is characterized in that: 。
Citation Information
Patent Citations
Bearing fault diagnosis method and device based on small sample learning and medium
CN118606815A
Equipment fault diagnosis method based on semi-supervised small sample
CN116451150A
Distributed system fault diagnosis method and device based on machine learning
CN117034143A