Small sample incremental fault diagnosis method combining contrastive learning and multi-label learning
By combining contrastive learning and multi-label learning methods, the problems of negative transfer and overfitting in traditional incremental fault diagnosis are solved, and efficient diagnosis of fine-grained faults in industrial equipment and identification of new categories are achieved.
Patent Information
- Application Number
- CN202510752550.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-06
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2045-06-06
AI Technical Summary
In the face of changing operating conditions and the emergence of new failure modes, existing technologies for fault diagnosis of industrial equipment are prone to negative model transfer and overfitting, making it difficult to effectively identify fine-grained faults and recognize new categories.
By combining contrastive learning and multi-label learning methods, a feature extractor for a pre-trained model is constructed by collecting and segmenting multi-sensor signal data and constructing a small sample set. The linear classifier head is then fine-tuned on the target domain data to improve the ability to distinguish fault features and adaptability.
It improves the accuracy of fine-grained fault diagnosis and the generalization ability of the model, enabling it to quickly adapt to new fine-grained fault categories, overcoming the shortcomings of traditional methods and improving fault identification performance.
Smart Images

Figure CN120632569B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of intelligent manufacturing and equipment health management, and particularly relates to a small sample incremental fault diagnosis method and system combining contrast learning and multi-label learning, a storage medium and an electronic device. BACKGROUND
[0002] In modern industrial production, stable operation of equipment is conducive to ensuring production efficiency and product quality, and how to accurately predict equipment failure has become an important issue.
[0003] In related technologies, traditional incremental fault diagnosis methods such as transfer learning methods and supervised contrast learning methods generally adopt a two-stage incremental learning paradigm of "pre-training" and "fine-tuning":
[0004] First, the transfer learning method mainly performs supervised fault classification on the feature extractor in similar diagnosis tasks, and then fine-tunes the feature extraction model with a small number of target domain samples to realize 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 contrast learning pre-trains the model by reducing the distance between positive samples of the same class in the feature space and increasing the distance between negative samples of different classes in the feature space, obtains the similarity and difference rules of known fault modes, and then fine-tunes the feature extraction model with a small number of samples to realize 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 multi-scale dynamic supervised contrast learning [J]. 2024, 243: 109805.).
[0006] However, in real-world fault diagnosis scenarios, constantly changing operating conditions lead to the emergence of new fault modes, resulting in large-scale, complex fault types distinct from traditional faults. Furthermore, the number of samples that can be collected for each fault type is limited. Traditional incremental fault diagnosis methods are prone to negative model transfer and overfitting during the incremental learning process for new categories. Additionally, due to the large number of categories and the very weak differences between the signals of these subcategories, the discriminative power and separability of the extracted fault features are poor. Therefore, it is necessary to provide a new scheme capable of sufficiently fine-grained fault identification. Summary of the Invention
[0007] (a) Technical problems to be solved
[0008] To address the shortcomings of existing technologies, this 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] (II) Technical Solution
[0010] To achieve the above objectives, the present invention provides the following technical solution:
[0011] A few-sample incremental fault diagnosis method combining contrastive learning and multi-label learning includes:
[0012] Multi-sensor signal data is collected and segmented to construct a small sample set containing all fine-grained fault categories. The small sample set is then divided into source domain data and target domain data. The fine-grained fault categories are determined according to the values of different attribute labels, which include at least the fault condition, known fault categories, and fault severity. The fine-grained fault categories corresponding to the source domain data and the target domain data do not overlap.
[0013] Based on the source domain data, the model combining supervised contrastive learning and multi-attribute learning is pre-trained.
[0014] 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;
[0015] The multi-sensor signal data to be diagnosed is used as input to a fine-tuned model to predict the corresponding fine-grained fault category.
[0016] Preferably, the multi-sensor signal data is divided using a uniform sampling method.
[0017] Preferably, a batch in the pre-training phase is defined as comprising N samples, and the source domain data is represented as follows: For Y fine-grained fault categories, the number of fault samples in each category is: Let the i-th sample x i All samples under the corresponding fine-grained fault category are used as x i The set of positive samples, and all samples under other fine-grained fault categories as x. i The 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 size of the sample set; P(i) represents the set of positive sample indices, where p is any positive sample index and p≠i; A(i) is the set of all positive and negative sample indices, where 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 Sample x i x p x a Through feature extractor f θ The obtained normalized embedding.
[0021] Preferably, the i-th sample x is defined. i A tag with L attributes, where the l-th attribute has a total of C. l Each possible value For x i The unique hot tag of the l-th attribute;
[0022] During the pre-training process of 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] Where CE is the cross-entropy; For x i The soft-max prediction probability of the l-th attribute.
[0025] Preferably, during the pre-training process of 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] Where λ>0 is the balance coefficient.
[0028] Preferably, one batch defining the fine-tuning stage includes M samples, and the target domain data is represented as The jth sample The label of the fine-grained fault class of the jth sample is
[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, the classification cross-entropy loss is constructed:
[0030]
[0031] Wherein, CE is the cross-entropy; g φ represents the linear classification head with parameters φ; f θ represents the feature extractor with parameters θ.
[0032] A small sample incremental fault diagnosis system combining contrast learning and multi-label learning, comprising:
[0033] A data acquisition and division module is configured to acquire and divide multi-sensor signal data, construct a small sample set containing all fine-grained fault classes, and divide the small sample set into source domain data and target domain data; wherein the fine-grained fault classes are determined according to the values of different attribute labels, and the attribute labels at least include fault working conditions, known fault classes and fault degrees; the fine-grained fault classes corresponding to the source domain data and the target domain data do not coincide;
[0034] A model pre-training module is configured to pre-train a model combining supervised contrast learning and multi-attribute learning based on the source domain data;
[0035] A model fine-tuning module is 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] A model application module is configured to input the multi-sensor signal data to be diagnosed into the fine-tuned model to predict the corresponding fine-grained fault class.
[0037] A storage medium storing a computer program for small sample incremental fault diagnosis combining contrast learning and multi-label learning, wherein the computer program causes the 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 comprising a small sample incremental fault diagnosis method as described above.
[0040] (III) Beneficial Effects
[0041] The present application provides a small sample incremental fault diagnosis method, system, storage medium and electronic equipment combining contrast learning and multi-label learning. Compared with the prior art, it has the following advantages
[0042] Beneficial Effects:
[0043] In the present application, first, 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; second, based on the source domain data, the model combining supervised contrast learning and multi-attribute learning is pre-trained; third, the feature extractor of the pre-trained model is frozen, and based on the target domain data, the linear classification head of the pre-trained model is fine-tuned; finally, the multi-sensor signal data to be diagnosed is input into the fine-tuned model to predict the corresponding fine-grained fault category. Based on the source domain data of known fine-grained fault categories, the model is trained to obtain a preliminary generalizable feature extractor, and then based on the target domain data regarded as unknown fine-grained fault categories, the linear classification head of the small sample fine-tuned model is used 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 DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, brief descriptions will be given below to the drawings needed to be used in the embodiments or prior art descriptions. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.
[0045] Figure 1 A block diagram of a small sample incremental fault diagnosis method combining contrast learning and multi-label learning provided by an embodiment of the present application;
[0046] Figure 2 A flowchart of a small sample incremental fault diagnosis method combining contrast learning and multi-label learning provided by an embodiment of the present application;
[0047] Figure 3 A precision comparison diagram of a small sample incremental fault diagnosis method provided by an embodiment of the present application and a traditional transfer learning method and a supervised contrast learning method (bearing fault diagnosis);
[0048] Figure 4 The precision comparison chart (planetary gearbox fault diagnosis) of the small sample incremental fault diagnosis method provided for the embodiments of the present application and the traditional transfer learning method and the supervised contrast learning method. DETAILED DESCRIPTION
[0049] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application are described clearly and completely. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the protection scope of the present application.
[0050] The technical problems of how to fully perform fine-grained fault identification are solved by providing a small sample incremental fault diagnosis method, system, storage medium and electronic device combining contrast learning and multi-label learning.
[0051] The technical solutions in the embodiments of the present application are as follows to solve the above technical problems:
[0052] The original small sample incremental fault diagnosis method does not fully perform fine-grained fault identification. In actual fault diagnosis scenarios, due to the continuous change of working conditions and the continuous emergence of new fault modes, large-scale complex fault types different from traditional faults are generated, that is, more detailed attribute information such as working condition environment, severity, fault mechanism, etc. under a certain specific fault type is considered, which is used as a new sub-fault type, so as to form more sub-fault modes with more categories and weaker differences between each other, which is called fine-grained fault category.
[0053] Considering that the number of samples that can be collected for each fault type is small, the phenomenon of model negative transfer and overfitting is prone to occur in the incremental learning process of new categories. At the same time, due to the large number of categories and the very weak differences between these sub-fault signals, the discrimination ability and separability of the extracted fault features are poor. Specifically:
[0054] In the process of model training, the migration learning only learns the fault category label, ignoring the potential attribute semantic information of the fault. In incremental fault diagnosis, due to the large number of categories and the small number of samples in each category, overfitting phenomenon may easily occur during fine-tuning, resulting in poor new fault recognition effect. The supervised contrast learning learns the similarity and difference distribution rules of the original data, and they focus more on whether two samples belong to the same category, rather than which category they belong to. Therefore, for two fine-grained fault samples with extremely similar data distribution and extremely weak feature difference, the contrast learning may be difficult to distinguish, and the boundary sample misclassification may easily occur, so it is difficult to solve the fine-grained fault diagnosis problem. At the same time, the supervised contrast learning focuses on the aggregation and separation relationship of the trained features, extracts more discriminative feature representations, and ignores the domain-invariant feature representations with semantic information, so the generalization and universality of the features are poor, which is not conducive to incremental fault diagnosis and new fault recognition.
[0055] In the above background, the embodiment of the present application aims to propose a new small sample incremental fault diagnosis method to improve its diagnosis effect and universality in the fine-grained fault situation, and improve the classification ability and generalization of the model for large-scale complex faults. By combining the supervised contrast learning and multi-label learning methods, the model is pre-trained for known faults, the discrimination ability of the model for fine-grained fault features is improved, and on this basis, the adaptability and diagnosis effect of the model for new faults are improved through small sample fine-tuning, so as to fully overcome the shortcomings of the prior art method in feature discrimination and new class recognition. The core points are as follows:
[0056] (1) Since the current contrast learning and other existing small sample cross-domain fault diagnosis methods have limitations, they can distinguish traditional fault features to some extent, but it is difficult to deal with fine-grained faults with many categories. The multi-label learning method can provide prior knowledge of fine-grained fault attributes, so introducing multi-label learning into the process of supervised contrast learning can help to distinguish fine-grained fault features that are difficult to distinguish through fault attribute knowledge, and to play the fine-grained fault diagnosis ability that traditional contrast learning methods cannot possess.
[0057] (2) The attribute learning process of multi-label learning learns the cross-category attribute semantic information instead of the fault category itself, which is the strategy of the current zero-shot learning in the field of fault diagnosis. This information is possessed by both the known faults of the source domain and the new faults of the target domain, so introducing the multi-label learning method is helpful to guide the classification of new fine-grained faults in the target domain and improve the effect of incremental fault diagnosis.
[0058] (3) In the case of a small number of fault samples in each category, the incremental diagnosis effect of the application is verified by comparing the accuracy indicators of each method, which shows the reliability and advancement of the application in the context of small sample and fine-grained fault diagnosis, thereby effectively dealing with the overfitting phenomenon of existing incremental fault diagnosis methods when adapting to new faults with few samples.
[0059] In order to better understand the above technical solutions, the above technical solutions will be described in detail below in conjunction with the drawings and specific embodiments of the specification.
[0060] Embodiment 1:
[0061] As Figure 1 indicated, the embodiment of the application provides a small sample incremental fault diagnosis method combining contrast learning and multi-label learning, which comprises:
[0062] 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 categories are determined according to the values of different attribute labels, and the attribute labels at least include fault working conditions, known fault categories and fault degrees; the fine-grained fault categories corresponding to the source domain data and the target domain data do not coincide;
[0063] S2, based on the source domain data, pre-training the model combining supervised contrast learning and multi-attribute learning;
[0064] S3, freeze the feature extractor of the pre-trained model, and based on the target domain data, fine-tune the linear classification head of the pre-trained model;
[0065] S4, input the multi-sensor signal data to be diagnosed into the fine-tuned model as input to predict the corresponding fine-grained fault category.
[0066] The embodiment of the application is a small sample incremental fault diagnosis method for variable working condition scenarios and large-scale complex fault classification, which can be applied to fine-grained fault identification and new fault recognition of various mechanical equipment such as rotating machinery and gearboxes in different working condition environments, and can effectively locate the working condition environment, severity and specific type of fault occurrence, and accurately trace the real cause and details of fault occurrence.
[0067] As Figure 2 indicated, Figure 2 a flowchart of a small sample incremental fault diagnosis method combining contrast learning and multi-label learning is disclosed. Referring to Figure 2 , the above scheme generally follows the two-stage learning paradigm of the small sample incremental fault diagnosis method, and specifically can be divided into three processes of fine-grained fault sample acquisition, model pre-training and small sample fine-tuning.
[0068] Next, the various steps of the scheme will be described in detail. Figure 2
[0069] In step S1, multi-sensor signal data is collected and divided, a few-sample set containing all fine-grained fault categories is constructed, and the few-sample set is divided into source domain data and target domain data.
[0070] This step corresponds to the fine-grained fault sample acquisition part in Figure 2 In general, the fine-grained fault sample acquisition part in
[0071] Through multi-sensor acquisition of original signal data under various working conditions and various fault types, on the basis of which, according to fault conditions, known fault types (relatively coarse-grained fault categories), fault degrees and other specific fault attributes, the fault categories of the data are more detailed and comprehensive, thereby obtaining fine-grained fault categories belonging to different fault attributes under different value combinations. It can be understood that a complete attribute value combination corresponds to a specific fine-grained fault category.
[0072] Furthermore, in order to enable the model to consider various fault attributes and all possible fine-grained fault categories to the same extent, this step balances the sampling of data for each fine-grained fault category when dividing the data, ensuring that each type of fault in the final obtained few-sample set has the same number of samples.
[0073] In addition, it should be noted that in order to facilitate the subsequent pre-training and fine-tuning, the few-sample set is also divided into source domain data and target domain data, and the corresponding fine-grained fault categories of the two do not overlap. In the preferred case, the sum of the corresponding fine-grained fault categories of the two is the total number of fine-grained fault categories, so as to make full use of the constructed few-sample set. For example, assuming that the total number of fault categories is C, the number of fine-grained fault categories corresponding to the source domain data is Y, then the number of fine-grained fault categories corresponding to the target domain data is C-Y.
[0074] In step S2, based on the source domain data, a model combining supervised contrastive learning and multi-attribute learning is pre-trained.
[0075] This step corresponds to the model pre-training part combining supervised contrastive learning and multi-attribute learning in Figure 2 In general, the model pre-training part combining supervised contrastive learning and multi-attribute learning in
[0076] For the source domain data of known fine-grained fault categories, Figure 2 The process involves comparative learning and multi-label attribute learning for each of the Y fine-grained fault categories. For example, a one-dimensional convolutional neural network (1DCNN) can be used to learn the deep representation features of known fault signals to fully adapt to multi-channel vibration signals. A multi-task learning strategy is employed to perform comparative learning of fault features and fine-grained fault attribute learning in parallel on the original samples. The comparative learning process is based on supervised training; for similar fault samples, the feature representation distance is reduced, while for dissimilar fault samples, the feature representation distance is increased. Simultaneously, various fault samples are used for the multi-label learning process of fine-grained fault attributes. For each fault sample, multiple fault attributes are learned, such as the specific operating condition, severity, and location of the fault, rather than its specific category.
[0077] This step integrates the two learning processes described above using a unified loss function, as detailed below:
[0078] First, a batch in the pre-training phase is defined as consisting of N samples, and the source domain data is represented as follows: For Y fine-grained fault categories, the number of fault samples in each category is: Let the i-th sample x i All samples under the corresponding fine-grained fault category are used as x i The set of positive samples, and all samples under other fine-grained fault categories as x. i The negative sample set.
[0079] Accordingly, in the pre-training process, this step constructs a supervised contrastive loss:
[0080]
[0081] Where |·| is the size of the sample set; P(i) represents the set of positive sample indices, where p is any positive sample index and p≠i; A(i) is the set of all positive and negative sample indices, where 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 Sample x i x p x a Through feature extractor f θ The obtained normalized embedding.
[0082] Secondly, define the i-th sample x i A tag with L attributes, where the l-th attribute has a total of C. la value, is x i a one-hot label of the lth attribute.
[0083] Correspondingly, the step also constructs a multi-attribute cross-entropy loss in the pre-training process:
[0084]
[0085] wherein CE is cross-entropy; is x i a soft-max prediction probability of the lth attribute.
[0086] Finally, based on the supervised contrastive loss and the multi-attribute cross-entropy loss, the step constructs a multi-task learning and pre-training loss:
[0087]
[0088] wherein λ>0 is a balance coefficient.
[0089] 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.
[0090] It should be noted that fine-tuning needs to be performed after pre-training is completed, and the pre-training completion here refers to that the multi-task learning and pre-training loss reaches a convergent state.
[0091] The step corresponds to the incremental fault diagnosis part of the few-shot fine-tuning in Figure 2 In general:
[0092] For the incremental learning process of unknown fine-grained faults (here, the target domain is regarded as an unknown fine-grained fault category, and Figure 2 corresponding to C-Y fine-grained fault categories in), 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 mode of fine-grained faults, and the model has strong generalization ability, so it can effectively learn and distinguish unknown new faults. Because the fault attribute information is common to known fault samples of the source domain and unknown fault samples of the target domain.
[0093] Similarly, the step represents the learning process based on the following loss function:
[0094] First, define that one batch in the fine-tuning stage includes M samples, and the target domain data is represented as the label of the fine-grained fault category of the jth sample
[0095] Correspondingly, the step builds a classification cross-entropy loss in the process of fine-tuning:
[0096]
[0097] where CE is the cross-entropy; g φ represents a linear classification head with parameters φ; f θ represents a feature extractor with parameters θ.
[0098] In step S4, the multi-sensor signal data to be diagnosed is input into the fine-tuned model to predict the corresponding fine-grained fault class.
[0099] It should be noted that the application needs to be performed after fine-tuning is completed, where the completion of fine-tuning refers to the convergence of the above classification cross-entropy loss.
[0100] This step uses the finally obtained model to process the multi-sensor signal data to be diagnosed to predict the corresponding fine-grained fault class. Thus, the embodiment of the present application completes the entire process of the small sample incremental fault diagnosis method combining contrastive learning and multi-label learning.
[0101] In order to better understand the superiority of the embodiment of the present application, the following two specific examples are also provided:
[0102] Example 1: Bearing fault diagnosis
[0103] Dataset: The bearing dataset of Huazhong University of Science and Technology (for specific information of the dataset, please refer to the paper ZHAO C, 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) is adopted. The bearing model used is ER-16K deep groove ball bearing, the sampling frequency is 25.6KHz, the collection time of each fault under each speed is 10.2s, and the number of sampling points is 262144. The fault signals of 11 working conditions, 3 fault degrees and 5 fault types are collected. Among all possible attribute values, 99 fine-grained classes are constructed (for example: 20Hz-severe fault-inner ring fault, which represents a fine-grained fault class under a specific attribute value, and if the fault degree is not severe, the fault type will be healthy). The attribute division method and attribute specific values are shown in Table 1:
[0104] Table 1 Fault attribute division of bearing dataset of Huazhong University of Science and Technology
[0105]
[0106] Sample configuration: From the already divided fault categories, 75 categories were randomly selected as known fault samples for model pre-training in the source domain, and the remaining 24 categories were used as unknown fault samples for few-shot fine-tuning in the target domain; 50 training samples per category, and the feature number of the fault sample was 4096 and the channel number was 3 by sliding window sampling.
[0107] Results: The average accuracy of the target domain was 93.02% after 10 repeated experiments, which was an average improvement of 4.8% compared to traditional transfer learning methods and an average improvement of 4.76% compared to supervised contrast learning methods. The specific results of each method are shown in Figure 3 .
[0108] Example 2: Planetary gearbox fault diagnosis
[0109] Dataset: The Tsinghua University gearbox dataset (for more information about this dataset, see the paper HAN T, LI Y F, QIAN M. A hybrid generalization network for intelligent fault diagnosis of rotating machinery under unseen working conditions [J]. IEEE Transactions on Instrumentation and Measurement, 2021, 70: 3520011.) was used, which was collected from a HS-200 single-stage planetary gearbox test bench. The vibration signals were collected along the X and Y directions using two accelerometers, with a sampling frequency of 20 kHz, and the rotational speed at the input end varied from 20 to 40 Hz, with a sampling point number of 1048575. Specifically, fault signals of 16 working conditions, 5 fault levels, and 3 fault types were collected, with a sampling rate of 20 kHz, involving 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 level is no fault, the fault type must be healthy). The attribute division method and attribute specific values are shown in Table 2:
[0110] Table 2 Fault attribute division of Tsinghua University gearbox dataset
[0111]
[0112] Sample configuration: From the already divided 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-shot fine-tuning in the target domain; 50 training samples per category, and the feature number of the fault sample is 4096 and the channel number is 2 by sliding window sampling.
[0113] Results: The average diagnostic accuracy of the target domain is 90.65%, which is an average improvement of 45.55% compared to the traditional transfer learning method and an average improvement of 23.12% compared to the supervised contrastive learning method. The specific results of each method are shown in Table 1. Figure 4
[0114] Embodiment 2
[0115] The embodiment of the application provides a small sample incremental fault diagnosis system combining contrastive learning and multi-label learning, comprising:
[0116] A data acquisition and division module is configured to acquire and divide multi-sensor signal data, construct a few-shot set containing all fine-grained fault categories, and divide the few-shot set into source domain data and target domain data. The fine-grained fault categories are determined according to the values of different attribute labels, and the attribute labels at least include fault conditions, known fault categories and fault degrees. The fine-grained fault categories corresponding to the source domain data and the target domain data do not overlap.
[0117] A model pre-training module is configured to pre-train a model combining supervised contrastive learning and multi-attribute learning based on the source domain data.
[0118] A model fine-tuning module is 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.
[0119] A model application module is configured to input the multi-sensor signal data to be diagnosed into the fine-tuned model to predict the corresponding fine-grained fault category.
[0120] Embodiment 3
[0121] The embodiment of the application 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 the computer to execute the small sample incremental fault diagnosis method as described in Embodiment 1.
[0122] Embodiment 4
[0123] The embodiment of the application provides an electronic device comprising:
[0124] 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 comprising a small sample incremental fault diagnosis method as described in Embodiment 1.
[0125] It can be understood that the small sample incremental fault diagnosis system, storage medium and electronic equipment provided by the embodiments of the present application correspond to the small sample incremental fault diagnosis method provided by the embodiments of the present application, and the relevant content explanation, examples and beneficial effects of the small sample incremental fault diagnosis method can be referred to the corresponding part of the small sample incremental fault diagnosis method, which will not be repeated here.
[0126] In summary, compared with the prior art, the following beneficial effects are achieved:
[0127] 1. The embodiments of the present application train the model based on the source domain data of known fine-grained fault categories to obtain a preliminary generalizable feature extractor, and then based on the target domain data regarded as unknown fine-grained fault categories, a linear classification head of a few-shot fine-tuning model is used to quickly adapt to new fine-grained fault categories, thereby fully overcoming the shortcomings of traditional methods in feature discrimination and new category recognition.
[0128] 2. In the pre-training process, the embodiments of the present application share the feature extractor based on the multi-task learning strategy, use a supervised contrast learning method to improve the discrimination effect of various known faults, and introduce a multi-label learning method to learn various fault attributes to enhance the understanding of fault semantics by the model, thereby facilitating the identification of new faults.
[0129] It should be noted that in this document, relational terms such as first and second and the like can only be used to distinguish one entity or action from another entity or action, without necessarily requiring or implying that there is any such actual relationship or order between these entities or actions. Moreover, the terms "comprises", "comprising", or any other variations thereof are intended to cover non-exclusive inclusions, so that a process, method, article, or apparatus including a list of elements does not only include those elements, but also includes other elements not explicitly listed, or further includes elements inherent in such a process, method, article, or apparatus. Without more limitations, the element defined by the statement "comprises a" does not exclude the presence of additional identical elements in the process, method, article, or apparatus including the element.
[0130] The above examples are only used to illustrate the technical solutions of the present application, and are not intended to limit the present application; although the present application has been described in detail with reference to the foregoing examples, those skilled in the art should understand that the technical solutions recorded in the foregoing examples can be modified, or some technical features can be replaced by equivalent features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A small sample incremental fault diagnosis method combining contrastive learning and multi-label learning, characterized in that, The method comprises the following steps: Collect and divide multi-sensor signal data, construct a few-shot set containing all fine-grained fault categories, and divide the few-shot 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 at least include fault working conditions, known fault categories and fault degrees; the fine-grained fault categories corresponding to the source domain data and the target domain data do not coincide; Based on the source domain data, a model combining supervised contrastive learning and multi-attribute learning is pre-trained; One batch of the pre-training stage includes 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 All samples in the i-th sample xi corresponding to the fine-grained fault category are regarded as the positive sample set of xi, and all samples in other fine-grained fault categories are regarded as the negative sample set of xi, and a supervised contrast loss is constructed The i-th sample xi has L attribute labels, and the l-th attribute has Cl values, The one-hot label of the l-th attribute of xi is constructed, and a multi-attribute cross-entropy loss is constructed Based on the supervised contrast loss And the multi-attribute cross-entropy loss , a multi-task learning and pre-training loss is constructed ; in the multi-task learning and pre-training loss After reaching the convergence state, 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. One batch of the fine-tuning stage includes M samples, and the target domain data is represented as The label of the jth sample is , and a classification cross-entropy loss is constructed; after the classification cross-entropy loss reaches a convergence state, the multi-sensor signal data to be diagnosed is input into the fine-tuned model to predict the corresponding fine-grained fault category.
2. The small sample increment fault diagnosis method of claim 1, wherein, The multi-sensor signal data is divided by using a uniform sampling method.
3. The small sample increment fault diagnosis method of claim 2, wherein, The supervised contrastive loss is constructed, comprising: Wherein |·| 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 a logarithmic function, exp is an exponential function, sim is a similarity function; τ is a temperature coefficient; zi, zp and za are the normalized embeddings of samples xi, xp and xa obtained by the feature extractor fθ.
4. The small sample increment fault diagnosis method of claim 3, wherein, The multi-attribute cross-entropy loss is constructed, comprising: where CE is the cross-entropy; is the soft-max predicted probability of the xi-th attribute.
5. The small sample increment fault diagnosis method of claim 4, wherein, The multi-task learning and pre-training loss is constructed, comprising: Wherein λ>0 is a balance coefficient.
6. The small sample increment fault diagnosis method of claim 2, wherein, The classification cross-entropy loss is constructed, comprising: Wherein CE is the cross-entropy; gφ represents the linear classification head with parameter φ; fθ represents the feature extractor with parameter θ.
7. A small sample incremental fault diagnosis system combining contrastive learning and multi-label learning, characterized in that, The method comprises the following steps: A data collection and division module is configured to collect and divide multi-sensor signal data, construct a few-shot set containing all fine-grained fault categories, and divide the few-shot 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 at least include fault working conditions, known fault categories and fault degrees; the fine-grained fault categories corresponding to the source domain data and the target domain data do not coincide; The model pre-training module is used to pre-train a model combining supervised contrastive learning and multi-attribute learning based on the source domain data; a batch in the pre-training phase includes N samples, and the source domain data is represented as follows: For Y fine-grained fault categories, the number of fault samples in each category is: A supervised contrastive loss is constructed by taking all samples under the fine-grained fault category corresponding to the i-th sample xi as the positive sample set of xi, and all samples under other fine-grained fault categories as the negative sample set of xi. The i-th sample xi has L attribute labels, and the l-th attribute has Cl values. For the one-hot label of the l-th attribute of xi, construct a multi-attribute cross-entropy loss. Based on the supervised contrast loss and the multi-attribute cross-entropy loss Construct multi-task learning and pre-training loss The model fine-tuning module is used for the multi-task learning and pre-training loss. After reaching convergence, the feature extractor of the pre-trained model is frozen, and the linear classifier head of the pre-trained model is fine-tuned based on the target domain data; a batch in the fine-tuning phase includes M samples, and the target domain data is represented as... The j-th sample The labels for fine-grained fault categories are Construct a classification cross-entropy loss; A model application module is configured to input the multi-sensor signal data to be diagnosed into the fine-tuned model to predict the corresponding fine-grained fault category after the classification cross-entropy loss reaches a convergence state.
8. A storage medium, characterized by The computer program for combining contrastive learning and multi-label learning small sample incremental fault diagnosis is stored in the computer program, wherein the computer program causes the computer to execute the small sample incremental fault diagnosis method according to any one of claims 1-6.
9. An electronic device, comprising: The method comprises the following steps: 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, and the programs comprise a program for executing the small sample incremental fault diagnosis method according to any one of claims 1-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