Comparative learning and multi-label learning combined small sample incremental fault diagnosis method
By combining contrastive learning and multi-label learning methods, the problems of model negative transfer and overfitting in traditional incremental fault diagnosis are solved, efficient identification of fine-grained faults of industrial equipment and rapid adaptation to new faults are achieved, and the accuracy and generalization ability of fault diagnosis are improved.
Patent Information
- Application Number
- CN202510752550.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-06
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2045-06-06
AI Technical Summary
In the fault diagnosis of industrial equipment facing changes in operating conditions and the emergence of new failure modes, traditional incremental fault diagnosis methods are prone to model negative transfer and overfitting, making it difficult to effectively perform fine-grained fault screening and new category identification.
Combining contrastive learning and multi-label learning methods, by collecting and dividing multi-sensor signal data, a small sample set of fine-grained fault categories is constructed. The feature extractor of the model is pre-trained using source domain data, and the linear classification head is fine-tuned on target domain data to improve the model's ability to recognize fine-grained faults.
The model has improved its accuracy and adaptability in fine-grained fault diagnosis, can quickly identify new fault categories, overcomes the shortcomings of traditional methods in feature identification and new category recognition, and improves the accuracy and generalization ability of fault diagnosis.
Smart Images

Figure CN120632569A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent manufacturing and equipment health management, and in particular to a small sample incremental fault diagnosis method, system, storage medium and electronic device that combine contrastive learning and multi-label learning. Background Art
[0002] In modern industrial production, the stable operation of equipment is conducive to ensuring production efficiency and product quality. How to accurately predict equipment failures has become an important issue.
[0003] In related technologies, traditional incremental fault diagnosis methods such as transfer learning and supervised contrastive learning generally adopt a two-stage incremental learning paradigm of "pre-training" and "fine-tuning":
[0004] First, transfer learning methods mainly perform supervised fault classification on feature extractors in similar diagnostic tasks, and then fine-tune the feature extraction model with a small number of target domain samples to achieve incremental fault diagnosis. For example, the paper (SHAO S, MCALEER S, YAN R, et al. Highly accurate machine fault diagnosis using deep transfer learning [J]. IEEE Transactions on Industrial Informatics, 2019, 15(4): 2446-2455.)
[0005] Second, supervised contrastive learning pre-trains the model by reducing the distance between positive samples of the same category in the feature space and increasing the distance between negative samples of different categories. This method captures the similarity and difference patterns of known fault modes, and then fine-tunes the feature extraction model with a small number of samples to achieve incremental fault diagnosis. For example, the paper (DONG Y, JIANG H, YAO R, et al. Rolling bearing intelligent fault diagnosis towards variable speed and imbalanced samples using multiscale dynamic supervised contrast learning [J]. 2024, 243: 109805.)
[0006] However, in real-world fault diagnosis scenarios, new fault modes constantly emerge due to constantly changing operating conditions, resulting in a large number of complex fault types that differ from traditional fault types. Furthermore, the number of samples that can be collected for each fault type is small. Traditional incremental fault diagnosis methods are prone to model negative transfer and overfitting during the incremental learning process of new categories. Furthermore, due to the large number of categories and the subtle differences between these subclass fault signals, the discriminative power and separability of the extracted fault features are poor. Therefore, it is necessary to provide a new solution that can fully perform fine-grained fault identification. Summary of the Invention
[0007] (1) Technical problems solved
[0008] In response to the shortcomings of the existing technology, the present invention provides a small sample incremental fault diagnosis method, system, storage medium and electronic device that combines contrastive learning and multi-label learning, solving the technical problem of how to fully perform fine-grained fault identification.
[0009] (2) Technical solution
[0010] To achieve the above objectives, the present invention is implemented through the following technical solutions:
[0011] A small-sample incremental fault diagnosis method combining contrastive learning and multi-label learning, including:
[0012] Collect and divide multi-sensor signal data, construct a small sample set containing all fine-grained fault categories, and divide the small sample set into source domain data and target domain data; wherein the fine-grained fault categories are determined according to the values of different attribute labels, and the attribute labels include at least the fault condition, known fault category, and fault severity; the fine-grained fault categories corresponding to the source domain data and the target domain data do not overlap;
[0013] Pre-training a model combining supervised contrastive learning and multi-attribute learning based on the source domain data;
[0014] Freezing the feature extractor of the pre-trained model and fine-tuning the linear classification head of the pre-trained model based on the target domain data;
[0015] The multi-sensor signal data to be diagnosed are taken as input to the fine-tuned model to predict the corresponding fine-grained fault categories.
[0016] Preferably, a uniform sampling method is used to divide the multi-sensor signal data.
[0017] Preferably, a batch in the pre-training phase is defined to include N samples, and the source domain data is represented as For Y fine-grained fault categories, the number of fault samples in each category is The i-th sample x i All samples under the corresponding fine-grained fault category are taken as x i The positive sample set of all other fine-grained fault categories is x i A set of negative samples;
[0018] In the process of pre-training the model combining supervised contrastive learning and multi-attribute learning based on the source domain data, a supervised contrastive loss is constructed:
[0019]
[0020] Where |·| is the sample set size; P(i) represents the positive sample index set, p is any positive sample index, and p≠i; A(i) is the set of all positive-negative sample indexes, a is any negative sample index, and a≠i; log is the logarithmic function, exp is the exponential function, sim is the similarity function; τ is the temperature coefficient; z i 、z p 、z a are samples x i 、x p 、x a Through the feature extractor f θ The resulting normalized embedding.
[0021] Preferably, define the i-th sample x i With L attribute labels, the lth attribute has C l A value, is x i The one-hot label of the lth attribute;
[0022] In the process of pre-training the model combining supervised contrastive learning and multi-attribute learning based on the source domain data, a multi-attribute cross entropy loss is constructed:
[0023]
[0024] Among them, CE is cross entropy; is x i The soft-max predicted probability of the l-th attribute.
[0025] Preferably, in the process of pre-training the model combining supervised contrastive learning and multi-attribute learning based on the source domain data, a multi-task learning and pre-training loss is constructed based on the supervised contrastive loss and the multi-attribute cross entropy loss:
[0026]
[0027] Among them, λ>0 is the balance coefficient.
[0028] Preferably, a batch in the fine-tuning phase is defined to include M samples, and the target domain data is represented as The jth sample The labels of the fine-grained fault categories are
[0029] In the process of freezing the feature extractor of the pre-trained model and fine-tuning the linear classification head of the pre-trained model based on the target domain data, a classification cross entropy loss is constructed:
[0030]
[0031] Among them, CE is cross entropy; g φ represents a linear classification head with parameter φ; f θ represents a feature extractor with parameters θ.
[0032] A small-sample incremental fault diagnosis system combining contrastive learning and multi-label learning, comprising:
[0033] A data acquisition and partitioning module is configured to acquire and partition multi-sensor signal data, construct a small sample set containing all fine-grained fault categories, and partition the small sample set into source domain data and target domain data; wherein the fine-grained fault categories are determined according to the values of different attribute labels, and the attribute labels include at least the fault condition, known fault category, and fault severity; the fine-grained fault categories corresponding to the source domain data and the target domain data do not overlap;
[0034] A model pre-training module, configured to pre-train a model combining supervised contrastive learning and multi-attribute learning based on the source domain data;
[0035] A model fine-tuning module, configured to freeze the feature extractor of the pre-trained model and fine-tune the linear classification head of the pre-trained model based on the target domain data;
[0036] The model application module is used to take the multi-sensor signal data to be diagnosed as the input of the fine-tuned model to predict the corresponding fine-grained fault category.
[0037] A storage medium stores a computer program for small sample incremental fault diagnosis combining contrastive learning and multi-label learning, wherein the computer program enables a computer to execute the small sample incremental fault diagnosis method as described above.
[0038] An electronic device, comprising:
[0039] One or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the programs including a program for executing the small sample increment fault diagnosis method as described above.
[0040] (3) Beneficial effects
[0041] The present invention provides a small sample incremental fault diagnosis method, system, storage medium and electronic device that combines contrastive learning and multi-label learning. Compared with the existing technology, it has the following advantages:
[0042] Beneficial effects:
[0043] In the present invention, multi-sensor signal data is first collected and divided to construct a small sample set containing all fine-grained fault categories, and the small sample set is divided into source domain data and target domain data. Secondly, based on the source domain data, a model combining supervised contrastive learning and multi-attribute learning is pre-trained. The feature extractor of the pre-trained model is frozen again, and the linear classification head of the pre-trained model is fine-tuned based on the target domain data. Finally, the multi-sensor signal data to be diagnosed is used as the input of the fine-tuned model to predict the corresponding fine-grained fault category. The model is trained based on source domain data with known fine-grained fault categories to obtain a preliminary generalizable feature extractor. Then, based on target domain data that is considered to be an unknown fine-grained fault category, the linear classification head of the model is fine-tuned using a small sample to quickly adapt to new fine-grained fault categories, fully overcoming the shortcomings of traditional methods in feature discrimination and new category recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0045] Figure 1 A block diagram of a small sample incremental fault diagnosis method combining contrastive learning and multi-label learning provided by an embodiment of the present invention;
[0046] Figure 2 A flowchart of a small sample incremental fault diagnosis method combining contrastive learning and multi-label learning provided by an embodiment of the present invention; Figure 3 A comparison chart of the accuracy of the small sample incremental fault diagnosis method provided by an embodiment of the present invention, the traditional transfer learning method, and the supervised comparative learning method (bearing fault diagnosis); Figure 4A comparison chart of the accuracy of the small sample incremental fault diagnosis method provided by an embodiment of the present invention, the traditional transfer learning method, and the supervised comparative learning method (planetary gearbox fault diagnosis). DETAILED DESCRIPTION
[0047] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention are clearly and completely described. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0048] The embodiments of the present application solve the technical problem of how to fully perform fine-grained fault identification by providing a small sample incremental fault diagnosis method, system, storage medium and electronic device that combine contrastive learning and multi-label learning.
[0049] The technical solution in the embodiments of the present application is to solve the above technical problems, and the overall idea is as follows:
[0050] The original small-sample incremental fault diagnosis method did not fully perform fine-grained fault identification. In actual fault diagnosis scenarios, due to the continuous changes in operating conditions, new fault modes continue to emerge, resulting in large-scale complex fault types that are different from traditional faults. That is, under a specific fault type, more detailed attribute information such as the operating environment, severity, and fault mechanism in which it occurs is considered at the same time, and this is used as a new subdivided fault type, thereby forming sub-fault modes with more categories and weaker differences between each other, which are called fine-grained fault categories.
[0051] Considering that the number of samples that can be collected for each type of fault is small, the model is prone to negative transfer and overfitting during the incremental learning process of new categories. At the same time, due to the large number of categories and the very weak differences between the fault signals of these subcategories, the discriminative ability and separability of the extracted fault features are poor. Specifically:
[0052] During model training, transfer learning only learns fault category labels, ignoring the underlying semantic information about fault attributes. In incremental fault diagnosis, due to the large number of categories and small number of samples per category, overfitting can easily occur during fine-tuning, resulting in poor new fault recognition. Supervised contrastive learning, on the other hand, learns the similarities and differences in the distribution patterns of the original data. It focuses on whether two samples belong to the same category, rather than their specific categories. Therefore, contrastive learning can struggle to distinguish between two types of fine-grained fault samples with extremely similar data distributions and minimal feature differences, making it prone to misclassification of boundary samples and thus difficult to solve the problem of fine-grained fault diagnosis. Furthermore, supervised contrastive learning focuses on the aggregation and separation relationships of training features, extracting more discriminative feature representations while neglecting domain-invariant feature representations with semantic information. As a result, the features suffer from poor generalization and versatility, which is detrimental to incremental fault diagnosis and new fault recognition.
[0053] Against this backdrop, the present invention aims to propose a novel small-sample incremental fault diagnosis method to improve its diagnostic effectiveness and versatility in fine-grained fault scenarios, and enhance the model's classification and generalization capabilities for large-scale complex faults. By combining supervised contrastive learning and multi-label learning methods to pre-train the model for known faults, the model's ability to discriminate fine-grained fault features is enhanced. On this basis, through small-sample fine-tuning, the model's adaptability and diagnostic effectiveness for new faults are enhanced, fully overcoming the shortcomings of existing technical methods in feature discrimination and new category recognition. The key points are as follows:
[0054] (1) Due to the limitations of existing small-sample cross-domain fault diagnosis methods such as contrastive learning, although they can distinguish traditional fault features to a certain extent, they are difficult to deal with fine-grained faults with a large number of categories. Multi-label learning methods can provide prior knowledge of fine-grained fault attributes. Therefore, introducing multi-label learning into the supervised contrastive learning process helps to identify fine-grained fault features that are difficult to distinguish through fault attribute knowledge, and give full play to the fine-grained fault diagnosis capabilities that traditional contrastive learning methods cannot possess.
[0055] (2) The attribute learning process of multi-label learning draws on the zero-shot learning strategy in the current fault diagnosis field. The object of learning is cross-category attribute semantic information rather than the fault category itself. This information is available for both known faults in the source domain and new faults in the target domain. Therefore, the introduction of multi-label learning methods helps to guide the classification of new fine-grained faults in the target domain and improve the effect of incremental fault diagnosis.
[0056] (3) When the number of fault samples of each type is small, the incremental diagnosis effect of the proposed invention is verified by comparing the accuracy indicators of various methods, illustrating its reliability and advancement in the fault diagnosis scenario of a small number of samples and fine-grainedness, thereby effectively dealing with the overfitting phenomenon that occurs in existing incremental fault diagnosis methods when adapting to new faults with a small number of samples.
[0057] In order to better understand the above technical solution, the above technical solution will be described in detail below with reference to the accompanying drawings and specific implementation methods.
[0058] Example 1:
[0059] like Figure 1 As shown, an embodiment of the present invention provides a small sample incremental fault diagnosis method combining contrastive learning and multi-label learning, including:
[0060] S1. Collect and divide multi-sensor signal data, construct a small sample set containing all fine-grained fault categories, and divide the small sample set into source domain data and target domain data; wherein the fine-grained fault category is determined according to the values of different attribute labels, and the attribute labels at least include the fault condition, known fault category, and fault severity; the fine-grained fault categories corresponding to the source domain data and the target domain data do not overlap;
[0061] S2. Pre-training a model combining supervised contrastive learning and multi-attribute learning based on the source domain data;
[0062] S3. Freeze the feature extractor of the pre-trained model and fine-tune the linear classification head of the pre-trained model based on the target domain data;
[0063] S4. The multi-sensor signal data to be diagnosed is used as the input of the fine-tuned model to predict the corresponding fine-grained fault category.
[0064] The embodiment of the present invention is a small-sample incremental fault diagnosis method for variable operating conditions and large-scale complex fault classification. It can be applied to fine-grained fault screening and new fault identification of various types of mechanical equipment such as rotating machinery and gearboxes under different operating conditions. It can effectively locate the operating conditions, severity and specific type of the fault, and accurately trace the true cause and detailed logic of the fault.
[0065] like Figure 2 As shown, Figure 2 A flowchart of a small sample incremental fault diagnosis method combining contrastive learning and multi-label learning is disclosed. Figure 2 ,The above scheme generally follows the two-stage learning paradigm of ,small-sample incremental fault diagnosis method, which can be ,specifically divided into three processes: fine-grained fault sample acquisition, model ,pretraining, and few-sample fine-tuning.
[0066] Next, we will combine Figure 2 Detailed description of each step of the program:
[0067] In step S1 , multi-sensor signal data is collected and divided, a small sample set containing all fine-grained fault categories is constructed, and the small sample set is divided into source domain data and target domain data.
[0068] This step corresponds to Figure 2 In the fine-grained fault sample acquisition section, in summary:
[0069] By collecting raw signal data from multiple sensors under various operating conditions and fault types, we then perform a more detailed and comprehensive classification of the data into specific fault categories based on specific fault attributes, such as the fault operating condition, known fault type (relatively coarse-grained fault category), and fault severity. This results in fine-grained fault categories for different fault attributes at different values. It is understood that a complete combination of attribute values corresponds to a specific fine-grained fault category.
[0070] Furthermore, to ensure that the model takes into account all possible fault attributes and all possible fine-grained fault categories to the same extent, this step performs balanced sampling of the data for each fine-grained fault category when dividing the data, ensuring that the final small sample set contains the same number of samples for each type of fault.
[0071] In addition, it should be noted that to facilitate subsequent pre-training and fine-tuning, the few-shot set is divided into source domain data and target domain data, ensuring that the fine-grained fault categories corresponding to the two do not overlap. Preferably, the sum of the fine-grained fault categories corresponding to the two equals the total number of fine-grained fault categories, ensuring full utilization of the constructed few-shot set. For example, assuming the total number of fault categories is C, the number of fine-grained fault categories corresponding to the source domain data is Y, and the number of fine-grained fault categories corresponding to the target domain data is CY.
[0072] In step S2, a model combining supervised contrastive learning and multi-attribute learning is pre-trained based on the source domain data.
[0073] This step corresponds to Figure 2 In the pre-training part of the model that combines supervised contrastive learning and multi-attribute learning, in summary:
[0074] For source domain data with known fine-grained fault categories ( Figure 2Corresponding to Y fine-grained fault categories in the dataset) perform contrastive learning and multi-label attribute learning processes. Exemplarily, the deep representation features of known fault signals can be learned based on a one-dimensional convolutional neural network (1D Convolutional Neural Network, referred to as 1DCNN) to fully adapt to multi-channel vibration signals, and adopt a multi-task learning strategy to carry out contrastive learning of fault features and attribute learning of fine-grained faults in parallel for the original samples. Among them, the contrastive learning process is based on a supervised training method. For similar fault samples, the feature representation distance is reduced, and for heterogeneous fault samples, the feature representation distance is expanded. At the same time, various types of fault samples are used in the multi-label learning process of fine-grained fault attributes. For each fault sample, multiple fault attributes such as the specific working condition, severity, and specific fault location are learned, rather than their specific categories.
[0075] This step integrates the two learning processes described above and represents them based on a unified loss function, as shown below:
[0076] First, a batch of N samples is defined in the pre-training stage, and the source domain data is represented as For Y fine-grained fault categories, the number of fault samples in each category is The i-th sample x i All samples under the corresponding fine-grained fault category are taken as x i The positive sample set of all other fine-grained fault categories is x i The negative sample set.
[0077] Accordingly, in this step, a supervised contrast loss is constructed during pre-training:
[0078]
[0079] Where |·| is the sample set size; P(i) represents the positive sample index set, p is any positive sample index, and p≠i; A(i) is the set of all positive-negative sample indexes, a is any negative sample index, and a≠i; log is the logarithmic function, exp is the exponential function, sim is the similarity function; τ is the temperature coefficient; z i 、z p 、z a are samples x i 、x p 、x a Through the feature extractor f θ The resulting normalized embedding.
[0080] Next, define the i-th sample x i With L attribute labels, the lth attribute has C lA value, is x i The one-hot label of the l-th attribute.
[0081] Correspondingly, in the pre-training process, this step also constructs a multi-attribute cross entropy loss:
[0082]
[0083] Among them, CE is cross entropy; is x i The soft-max predicted probability of the l-th attribute.
[0084] Finally, based on the supervised contrast loss and the multi-attribute cross entropy loss, this step constructs multi-task learning and pre-training losses:
[0085]
[0086] Among them, λ>0 is the balance coefficient.
[0087] In step S3, the feature extractor of the pre-trained model is frozen, and the linear classification head of the pre-trained model is fine-tuned based on the target domain data.
[0088] Note that fine-tuning needs to be performed after pre-training is completed. The end of pre-training here means that the multi-task learning and pre-training loss have reached a convergence state.
[0089] This step corresponds to Figure 2 In the Incremental Fault Diagnosis with Few-Shot Fine-tuning section of
[15] , in summary:
[0090] For unknown fine-grained faults (here the target domain is regarded as an unknown fine-grained fault category, and Figure 2 The incremental learning process is performed for the CY fine-grained fault categories in the source domain, and the feature extractor obtained in the pre-training stage is frozen. At this time, the feature extractor has learned the attribute structure knowledge and fault discrimination method of fine-grained faults. The model has strong generalization ability, so it can effectively learn and distinguish unknown new faults, because the fault attribute information is shared by the known fault samples in the source domain and the unknown fault samples in the target domain.
[0091] Similarly, this step represents the above learning process based on the following loss function, see below for details:
[0092] First, a batch of M samples is defined in the fine-tuning stage, and the target domain data is represented as The jth sample The labels of the fine-grained fault categories are
[0093] Accordingly, in this step, the classification cross entropy loss is constructed during the fine-tuning process:
[0094]
[0095] Among them, CE is cross entropy; g φ represents a linear classification head with parameter φ; f θ represents a feature extractor with parameters θ.
[0096] In step S4 , the multi-sensor signal data to be diagnosed is used as input to the fine-tuned model to predict the corresponding fine-grained fault category.
[0097] Please note that the application needs to be performed after fine-tuning is completed. The end of fine-tuning here means that the above-mentioned classification cross entropy loss reaches a convergence state.
[0098] This step uses the final model to process the multi-sensor signal data to be diagnosed to predict the corresponding fine-grained fault category. This embodiment of the present invention has completed the entire process of the small sample incremental fault diagnosis method combining contrastive learning and multi-label learning.
[0099] In order to better understand the advantages of the embodiments of the present invention, the following two specific examples are provided:
[0100] Example 1: Bearing Fault Diagnosis
[0101] Dataset: The Huazhong University of Science and Technology bearing dataset was used (for details, see the paper ZHAOC, ZIO E, SHEN W M. Domain generalization for cross-domain fault diagnosis: An application-oriented perspective and a benchmark study [J]. Reliability Engineering & System Safety, 2024, 245: 109964). The bearing model used was an ER-16K deep groove ball bearing, with a sampling frequency of 25.6 kHz. The acquisition time for each fault at each speed was 10.2 seconds, and the number of sampling points was 262,144. Fault signals were collected for 11 operating conditions, three fault severity levels, and five fault types. A total of 99 fine-grained categories were constructed from all possible attribute values (e.g., 20 Hz - severe fault - inner race fault, representing a fine-grained fault category under a specific attribute value, and if the fault severity is not severe, the fault type is always healthy). The attribute classification method and specific attribute values are shown in Table 1:
[0102] Table 1 Fault attribute classification of bearing dataset from Huazhong University of Science and Technology
[0103]
[0104] Sample configuration: From the already classified fault categories, 75 categories are randomly selected as known fault samples for model pre-training in the source domain, and the remaining 24 categories are used as unknown fault samples for few-sample fine-tuning in the target domain. Each category has 50 training samples, and the number of features and channels of the fault samples obtained through sliding window sampling is 4096 and 3 respectively.
[0105] Results: The results of 10 repeated experiments were averaged, and the average diagnostic accuracy of the target domain was 93.02%, which was an average improvement of 4.8% compared to the traditional transfer learning method and 4.76% compared to the supervised contrastive learning method. Figure 3 shown.
[0106] Example 2: Planetary Gearbox Fault Diagnosis
[0107] Dataset: The Tsinghua University gearbox dataset was used (for detailed information on this dataset, see the paper HAN T, LI YF, QIAN MA hybrid generalization network for intelligent fault diagnosis of rotating machinery under unseen working conditions[J]. IEEE Transactions on Instrumentation and Measurement, 2021, 70: 3520011.). It was collected from the HS-200 single-stage planetary gearbox test bench. Vibration signals were collected along the X and Y directions using two accelerometers on the sun gear and planet gear. The sampling frequency was 20kHz, the speed at the input end ranged from 20 to 40Hz, and the number of sampling points was 1048575. Specifically, fault signals of 16 working conditions, 5 fault degrees, and 3 fault types were collected. The sampling rate was 20kHz, involving a total of 144 fine-grained categories (e.g., 25Hz-crack depth 1 / 8-sun gear fault, representing a fine-grained fault category under a specific attribute value, and if the fault degree is no fault, the fault type must be healthy). The attribute division method and specific attribute values are shown in Table 2:
[0108] Table 2 Fault attribute classification of Tsinghua University gearbox dataset
[0109]
[0110] Sample configuration: From the already classified fault categories, 108 categories are randomly selected as known fault samples for model pre-training in the source domain, and the remaining 36 categories are used as unknown fault samples for few-sample fine-tuning in the target domain. Each category has 50 training samples, and the number of features and channels of the fault samples obtained through sliding window sampling is 4096 and 2 respectively.
[0111] Results: The results of 10 repeated experiments were averaged, and the average diagnostic accuracy of the target domain was 90.65%, which was an average improvement of 45.55% compared with the traditional transfer learning method and 23.12% compared with the supervised contrastive learning method. Figure 4 shown.
[0112] Example 2:
[0113] An embodiment of the present invention provides a small sample incremental fault diagnosis system that combines contrastive learning and multi-label learning, including:
[0114] A data acquisition and partitioning module is configured to acquire and partition multi-sensor signal data, construct a small sample set containing all fine-grained fault categories, and partition the small sample set into source domain data and target domain data; wherein the fine-grained fault categories are determined according to the values of different attribute labels, and the attribute labels include at least the fault condition, known fault category, and fault severity; the fine-grained fault categories corresponding to the source domain data and the target domain data do not overlap;
[0115] A model pre-training module, configured to pre-train a model combining supervised contrastive learning and multi-attribute learning based on the source domain data;
[0116] A model fine-tuning module, configured to freeze the feature extractor of the pre-trained model and fine-tune the linear classification head of the pre-trained model based on the target domain data;
[0117] The model application module is used to take the multi-sensor signal data to be diagnosed as the input of the fine-tuned model to predict the corresponding fine-grained fault category.
[0118] Example 3:
[0119] An embodiment of the present invention provides a storage medium storing a computer program for small sample incremental fault diagnosis combining contrastive learning and multi-label learning, wherein the computer program enables a computer to execute the small sample incremental fault diagnosis method as described in Example 1.
[0120] Example 4:
[0121] An embodiment of the present invention provides an electronic device, including:
[0122] One or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, the programs including a method for executing the small sample incremental fault diagnosis method as described in Example 1.
[0123] It can be understood that the small sample incremental fault diagnosis system, storage medium and electronic device combined with contrastive learning and multi-label learning provided in the embodiments of the present invention correspond to the small sample incremental fault diagnosis method combined with contrastive learning and multi-label learning provided in the embodiments of the present invention. The explanation, examples and beneficial effects of the relevant contents can refer to the corresponding parts in the small sample incremental fault diagnosis method, and will not be repeated here.
[0124] In summary, compared with the existing technology, the present invention has the following beneficial effects:
[0125] 1. The embodiment of the present invention trains a model based on source domain data with known fine-grained fault categories to obtain a preliminary generalizable feature extractor. Then, based on target domain data that is considered to have unknown fine-grained fault categories, the linear classification head of the model is fine-tuned using a few samples to quickly adapt to new fine-grained fault categories, fully overcoming the shortcomings of traditional methods in feature discrimination and new category recognition.
[0126] 2. In the pre-training process, the embodiment of the present invention allows contrastive learning and attribute learning to share a feature extractor based on a multi-task learning strategy, adopts a supervised contrastive learning method to improve the effect of distinguishing various known faults, and introduces a multi-label learning method to learn various fault attributes to enhance the model's understanding of fault semantics and facilitate the identification of new faults.
[0127] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0128] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A small sample incremental fault diagnosis method combining contrastive learning and multi-label learning, characterized in that: include: Collect and divide multi-sensor signal data, construct a small sample set containing all fine-grained fault categories, and divide the small sample set into source domain data and target domain data; wherein the fine-grained fault categories are determined according to the values of different attribute labels, and the attribute labels include at least the fault condition, known fault category, and fault severity; the fine-grained fault categories corresponding to the source domain data and the target domain data do not overlap; Pre-training a model combining supervised contrastive learning and multi-attribute learning based on the source domain data; Freezing the feature extractor of the pre-trained model and fine-tuning the linear classification head of the pre-trained model based on the target domain data; The multi-sensor signal data to be diagnosed are taken as input to the fine-tuned model to predict the corresponding fine-grained fault categories.
2. The small sample incremental fault diagnosis method according to claim 1, characterized in that: The multi-sensor signal data is divided using a uniform sampling method.
3. The small sample incremental fault diagnosis method according to claim 2, characterized in that: A batch in the pre-training stage is defined to include N samples, and the source domain data is represented as For Y fine-grained fault categories, the number of fault samples in each category is The i-th sample x i All samples under the corresponding fine-grained fault category are taken as x i The positive sample set of all other fine-grained fault categories is x i A set of negative samples; In the process of pre-training the model combining supervised contrastive learning and multi-attribute learning based on the source domain data, a supervised contrastive loss is constructed: Where |·| is the size of the sample set; P(i) represents the positive sample index set, p is any positive sample index, and p≠i; A(i) is the set of all positive-negative sample indexes, a is any negative sample index, and a≠i; log is the logarithmic function, exp is the exponential function, sim is the similarity function; τ is the temperature coefficient; z i 、z p 、z a are samples x i 、x p 、x a Through the feature extractor f θ The resulting normalized embedding.
4. The small sample increment fault diagnosis method according to claim 3, characterized in that: Define the i-th sample x i With L attribute labels, the lth attribute has C l A value, is x i The one-hot label of the lth attribute; In the process of pre-training the model combining supervised contrastive learning and multi-attribute learning based on the source domain data, a multi-attribute cross entropy loss is constructed: Among them, CE is cross entropy; is x i The soft-max predicted probability of the l-th attribute.
5. The small sample incremental fault diagnosis method according to claim 4, characterized in that: In the process of pre-training the model combining supervised contrastive learning and multi-attribute learning based on the source domain data, a multi-task learning and pre-training loss is constructed based on the supervised contrastive loss and the multi-attribute cross entropy loss: Among them, λ>0 is the balance coefficient.
6. The small sample increment fault diagnosis method according to claim 2, characterized in that: A batch in the fine-tuning stage is defined to include M samples, and the target domain data is represented as The jth sample The labels of the fine-grained fault categories are In the process of freezing the feature extractor of the pre-trained model and fine-tuning the linear classification head of the pre-trained model based on the target domain data, a classification cross entropy loss is constructed: Among them, CE is cross entropy; g φ represents a linear classification head with parameter φ; f θ represents a feature extractor with parameters θ.
7. A small sample incremental fault diagnosis system combining contrastive learning and multi-label learning, characterized by: include: A data acquisition and partitioning module is configured to acquire and partition multi-sensor signal data, construct a small sample set containing all fine-grained fault categories, and partition the small sample set into source domain data and target domain data; wherein the fine-grained fault categories are determined according to the values of different attribute labels, and the attribute labels include at least the fault condition, known fault category, and fault severity; the fine-grained fault categories corresponding to the source domain data and the target domain data do not overlap; A model pre-training module, configured to pre-train a model combining supervised contrastive learning and multi-attribute learning based on the source domain data; A model fine-tuning module, configured to freeze the feature extractor of the pre-trained model and fine-tune the linear classification head of the pre-trained model based on the target domain data; The model application module is used to take the multi-sensor signal data to be diagnosed as the input of the fine-tuned model to predict the corresponding fine-grained fault category.
8. A storage medium, characterized in that: It stores a computer program for small sample incremental fault diagnosis combining contrastive learning and multi-label learning, wherein the computer program enables a computer to execute the small sample incremental fault diagnosis method according to any one of claims 1 to 6.
9. An electronic device, characterized in that: include: one or more processors; Memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the programs including instructions for executing the small sample incremental fault diagnosis method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Mechanical equipment fault diagnosis method based on parallel network and transfer learning
CN115758212A
Rolling bearing fault diagnosis method based on semi-supervised learning
CN116773196A
Medical image classification unsupervised domain self-adaption and multi-granularity alignment system and method
CN119600355A
Online domain adaptation
US20250037441A1
