Weak supervision soft contrast distillation fault diagnosis method, system and equipment based on micro automatic enhancement, and storage medium

By adopting a weakly supervised soft contrast distillation method based on micro-automatic enhancement in rolling bearing fault diagnosis, the problem of fewer training samples is solved, high-precision fault diagnosis is achieved, and calculation overhead is reduced.

CN119719865APending Publication Date: 2025-03-28XI AN JIAOTONG UNIV

Patent Information

Application Number
CN202411941102.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The prior art has problems such as few training samples in rolling bearing fault diagnosis, generalization errors, pseudo-related and adversarial attacks, making it difficult for deep learning models to achieve high-precision monitoring and fault diagnosis in actual industry.

Method used

Weak-supervised soft contrast distillation fault diagnosis method based on micro-automatic enhancement is adopted. By obtaining the vibration signals of mechanical equipment for segmentation processing and enhancement, we generate enhanced views for feature extraction, and using contrast pre-trained feature extractors and knowledge distillation strategies, we reduce calculation overhead and improve diagnostic accuracy.

Benefits of technology

With few training samples marked, high-precision fault classification accuracy is achieved, which reduces calculation overhead and improves the robustness of diagnostic results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119719865A_ABST
    Figure CN119719865A_ABST
Patent Text Reader

Abstract

The invention discloses a weak supervision soft contrast distillation fault diagnosis method and system based on micro automatic enhancement, equipment and a storage medium, and the method comprises the steps: obtaining a vibration signal of mechanical equipment operation, and dividing a sample set; the sample set is enhanced, and two different enhanced views are generated from each sample; performing feature extraction on the enhanced view to obtain deep feature coding representation; summing the comparison loss of the deep feature codes of each batch, and obtaining a comparison pre-training feature extractor after joint optimization; performing knowledge migration on the comparison pre-training feature extractor to a lightweight feature extractor by adopting a knowledge distillation strategy; using a lightweight feature extractor to obtain distinguishable feature representation, and training the distinguishable feature representation and the samples with the labels to obtain a fault state classification model; and the vibration signal passes through the lightweight feature extractor and then is input into the fault state classification model to obtain a fault diagnosis result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of fault diagnosis, and relates to a weakly supervised soft contrast distillation fault diagnosis method, system, device and storage medium based on differentiable automatic enhancement. Background Art

[0002] Prognostic and Health Management (PHM) is an emerging discipline that supports the implementation of predictive maintenance for complex production systems. An effective PHM system can provide early detection and isolation of early failures of components or sub-components. The detected initial fault state is then monitored and diagnosed until it is necessary to take some maintenance measures or replace it. At the same time, as one of the key supporting components of rotating mechanical equipment, rolling bearings directly affect the reliability of the equipment. Under harsh working conditions such as high temperature, speed change and heavy load, rolling bearings are prone to various failures. Therefore, fault diagnosis and reliability assessment of rolling bearings can help to repair them in time and avoid major accidents, which plays an important role in reliability maintenance.

[0003] At present, the existing rolling bearing fault detection work can be roughly divided into two types: signal analysis-based and machine learning-based (or data-driven). Signal analysis-based methods rely on signal processing methods that analyze in the time domain, frequency domain, and time-frequency domain. These methods are highly interpretable, but have the following disadvantages: (1) Noise reduction is often required, and early fault information is often weakened while eliminating noise interference. (2) Manual design of criteria and thresholds is often required, which undermines the versatility of the method. In contrast, machine learning-based methods have gained great popularity in recent years due to their ability to automatically extract features and achieve state classification. In order to achieve intelligent detection or diagnosis, these methods usually include two main steps: (1) feature extraction; (2) using classification algorithms to build detection models. The current success of deep learning models is mainly based on training on fully labeled data. However, in actual industry, there are the current situations such as low fault frequency and high cost of manual labeling. It is difficult to obtain enough fault labels. In addition, they are also subject to generalization errors, pseudo-correlations, and adversarial attacks. The performance of traditional intelligent fault diagnosis models is seriously degraded, and it is difficult to achieve high-precision monitoring and fault diagnosis tasks. Summary of the invention

[0004] The purpose of the present invention is to overcome the shortcomings of the above-mentioned prior art and provide a weakly supervised soft contrast distillation fault diagnosis method, system, device and storage medium based on differentiable automatic enhancement, which can obtain high-precision fault classification accuracy when the training samples are less labeled.

[0005] In order to achieve the above object, the present invention adopts the following technical solutions: A weakly supervised soft contrast distillation fault diagnosis method based on differentiable automatic enhancement includes the following processes: S1, obtain the vibration signal of the mechanical equipment, process each vibration signal in segments, and divide it into a sample set of batch size; S2, enhance the sample set, and generate two different enhanced views for each sample; S3, for each sample in the batch, two enhanced views are generated, and deep feature encoding representation is obtained after feature extraction; S4, sums the contrast loss of deep feature encoding for each batch, and obtains the contrast pre-trained feature extractor through joint optimization; S5, adopts the knowledge distillation strategy to transfer the knowledge from the pre-trained feature extractor to the lightweight feature extractor; S6, using a lightweight feature extractor to obtain a distinguishable feature representation, and training the distinguishable feature representation together with the labeled samples to obtain a fault state classification model; S7, the vibration signal of the mechanical component to be diagnosed is passed through a lightweight feature extractor and then input into a fault state classification model to obtain a fault diagnosis result.

[0006] Preferably, in S1, the vibration signal of the mechanical equipment operation includes a normal state and a fault state of the mechanical equipment operation, and the types of the fault state include outer ring faults and inner ring faults of different degrees.

[0007] Preferably, in S2, one or more enhancement strategies including random timestamp masking, amplitude scaling, adding Gaussian noise, truncation, obtaining subsequences and wavelet filtering are used, the supervision information in sparse labels is utilized, an adaptive enhancement view is generated based on information theory, a reparameterization strategy is adopted to ensure the differentiability of back propagation, and positive sample pairs and negative sample pairs are constructed according to the time scale and batch scale.

[0008] Preferably, in S3, for the two enhanced views generated for each sample in the batch, two overlapping subsequences are randomly extracted from the signal, and the consistency of the context representation on the common segment is encouraged. The subsequences are respectively input into the linear projection layer for encoding, and a multi-layer hole convolution module is used as a feature extractor to extract the context representation of each timestamp to obtain a deep feature encoding representation.

[0009] Preferably, in S4, soft temporal contrast loss and soft instance contrast loss are applied to the deep feature encoding representation of each batch, a soft allocation of contrast loss is calculated based on the difference between the instance distance and the signal timestamp, and multi-level pooling operations are performed in the time dimension. A hierarchical framework is used, and the total loss is summed at multiple scales. A hierarchical contrast loss is designed to jointly optimize the feature extractor to obtain a contrast pre-trained feature extractor.

[0010] Preferably, in S5, the pre-trained feature extractor is used as the teacher model, and the lightweight model is used as the student model. The adaptively fused teacher features and student features are first projected into one through a linear transformation layer. In the dimensional embedding subspace, the embedding features of the teacher network and the embedding features of the student network are mapped to the unit hypersphere through L2 normalization, and the similarity between the two is measured by the inner product. Multiple negative samples are randomly selected for the sample, and these negative samples are sent to the teacher network to obtain their respective embedding features. Similarly, the idea of ​​contrastive learning is used to shorten the distance between the student embedding features of the positive samples and the teacher embedding features, while moving away from the distance between the embedding features of the negative samples.

[0011] Preferably, in S6, a distinguishable feature representation is obtained by comparing pre-training and knowledge distillation, the representation vector is input into a support vector machine together with the actual training label for training, and a grid search is introduced for parameter optimization to obtain the optimal parameters of the fault classifier.

[0012] A weakly supervised soft contrast distillation fault diagnosis system based on differentiable automatic enhancement, comprising: The sample division module is used to obtain the vibration signal of the mechanical equipment, segment each vibration signal, and divide it into a batch size sample set; An enhanced view generation module is used to enhance the sample set, and each sample is generated to obtain two different enhanced views; A feature extraction module is used to extract features from two enhanced views generated for each sample in a batch to obtain a deep feature encoding representation; The loss summation module is used to sum the contrast loss of each batch of deep feature encodings, and obtain the contrast pre-trained feature extractor through joint optimization; The knowledge distillation module is used to adopt the knowledge distillation strategy to transfer the knowledge from the pre-trained feature extractor to the lightweight feature extractor; A classification model acquisition module is used to obtain a distinguishable feature representation using a lightweight feature extractor, and train the distinguishable feature representation together with labeled samples to obtain a fault state classification model; The fault diagnosis module is used to pass the vibration signal of the mechanical component to be diagnosed through a lightweight feature extractor, and then input it into the fault state classification model to obtain the fault diagnosis result.

[0013] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the weakly supervised soft contrast distillation fault diagnosis method based on differentiable automatic enhancement are implemented.

[0014] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the weakly supervised soft contrast distillation fault diagnosis method based on differentiable automatic enhancement.

[0015] Compared with the prior art, the present invention has the following beneficial effects: The present invention extracts features from signals based on self-supervised contrastive learning, and can more fully mine the information of the signal itself compared to the sparse label signals used in supervised learning. The present invention makes full use of a small amount of known label information, proposes an automatic enhancement generator based on information theory, constructs a good enhancement view for contrastive learning, and is conducive to learning more meaningful representations. The present invention can effectively reduce the number of parameters of the contrastive pre-trained feature extractor through the knowledge distillation strategy, can reduce the computational overhead used in actual operation, and is conducive to application on resource-constrained devices. The diagnostic framework proposed by the present invention can effectively deal with the problem of a large number of missing data label samples in actual industry. After contrast pre-training and knowledge distillation of all samples, a small number of labeled samples are used to train the fault classification model, and a higher fault state classification accuracy can be achieved. The present invention uses context consistency to improve the robustness of the learned feature representation by forcibly constructing the reconstruction task of the signal enhancement view in different contexts at the timestamp level. The contrast feature representation pre-training and knowledge distillation method of the present invention are simple and reliable, and are easy to implement mechanical fault detection in actual engineering practice.

[0016] Furthermore, the present invention adopts soft contrast loss between instances and within signals to update parameters, calculates the soft allocation of contrast loss based on the difference between instance distances and signal timestamps, and divides the signal into different hierarchical levels through the maximum pooling operation of the signal time dimension, so as to extract different fine-grained feature indicators of the vibration signal. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 A flowchart of the weakly supervised soft contrast distillation fault diagnosis method based on differentiable automatic enhancement of the present invention is provided; Figure 2 A schematic diagram of a bearing test bench in an embodiment of the present invention; Figure 3 A schematic diagram of a collection of different enhancement methods used in the present invention; Figure 4 Schematic diagram of the principle of the hollow convolution module in the present invention; Figure 5 A detailed structural diagram of the feature extractor used in the present invention; Figure 6 Schematic diagram of the knowledge distillation strategy used in the present invention; Figure 7This is a feature visualization result diagram before and after training in an embodiment of the present invention (the last layer of the feature extractor); Figure 8 Receiver operating characteristic curve (ROC curve) diagram of the test set of the present invention; Fig. 9 It is a statistical histogram of the experimental comparison between the method of the present invention and other methods under the 5% labeling situation.

[0018] Fig.10 It is a statistical histogram of the experimental comparison between the method of the present invention and other methods under the 2.5% labeling situation. DETAILED DESCRIPTION

[0019] The embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.

[0020] The disclosure below provides many different embodiments or examples to realize different structures of the present invention. In order to simplify the disclosure of the present invention, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present invention. In addition, the present invention can repeat reference numbers and / or reference letters in different examples, and this repetition is for the purpose of simplicity and clarity, which itself does not indicate the relationship between the various embodiments and / or settings discussed. In addition, the present invention provides various specific examples of processes and materials, but those of ordinary skill in the art can be aware of the application of other processes and / or the use of other materials.

[0021] like Figure 1 As shown, the weakly supervised soft contrast distillation fault diagnosis method based on differentiable automatic enhancement according to the present invention comprises the following steps: Step 1: Obtain a large number of vibration signals of mechanical equipment from the sensor device, of which only a small number of samples have label information. After segmenting each vibration signal using a sliding window operation, randomly divide a batch-sized sample set from the data set according to the set sample batch.

[0022] Step 2: Use one or more enhancement strategies including random timestamp masking, amplitude scaling, adding Gaussian noise, truncation, obtaining subsequences and wavelet filtering, utilize the supervision information in sparse labels, generate adaptive enhancement views based on information theory, adopt reparameterization strategy to ensure the differentiability of back propagation, and construct positive sample pairs and negative sample pairs according to the time scale and batch scale.

[0023] Step 3: For the two enhanced views generated for each sample in the batch, two overlapping subsequences are randomly extracted from the signal, and the consistency of the context representation on the common segment is encouraged. The subsequences are input into the linear projection layer for encoding respectively, and a multi-layer hole convolution module is used as a feature extractor to extract the context representation of each timestamp to obtain a deep feature encoding representation.

[0024] Step 4: Apply soft temporal contrast loss and soft instance contrast loss to the deep feature encoding representation of each batch, calculate the soft allocation of contrast loss based on the difference between the instance distance and the signal timestamp, and perform multi-level pooling operations in the time dimension. Using a hierarchical framework, the total loss is summed at multiple scales. After joint optimization, a contrast pre-trained feature extractor is obtained, which can extract different fine-grained features of vibration signals.

[0025] Step 5: By applying the knowledge distillation strategy, the knowledge transfer from the pre-trained feature extractor (i.e., the teacher network) to the lightweight student network is realized, which reduces the complexity and computing requirements of the intelligent network and effectively improves the processing efficiency of edge devices with limited resources.

[0026] Step 6: Use a lightweight feature extractor to obtain a distinguishable feature representation, and input it together with the label into the fault state classifier for training to obtain a fault state classification model.

[0027] Step 7: The vibration signal of the mechanical component to be diagnosed in an unknown state is subjected to a feature extractor after comparison pre-training and knowledge distillation, and then input into the fault state classification model to obtain a fault diagnosis result of the mechanical component to be diagnosed.

[0028] The specific process of the above method is: 1) Obtain vibration signals of mechanical equipment from the sensor device. The data contains both the normal state and fault state of the mechanical equipment. The types of fault states include outer ring faults and inner ring faults of varying degrees. After segmenting each vibration signal using a sliding window operation, a sample set of batch size is randomly divided from the data set according to the set sample batch.

[0029] 2) For input signal ,in , is the batch size, Represents an input signal with a length of A one-dimensional vector of , defining a set of enhancement methods for vibration signals, including six enhancement strategies: random timestamp masking, amplitude scaling, adding Gaussian noise, truncation, obtaining subsequences, and wavelet filtering, defined as Each enhancement method is based on The probability of is applied to the input signal, and we get in , the final combined enhanced view expression is , and use the reparameterization strategy to apply it to the Bernoulli distribution to ensure the differentiability of back propagation. Repeat the above enhancement operation twice. Based on the information bottleneck theory, a small amount of label information is used to guide the generation of enhanced views through weak supervision to obtain different enhanced views, which are recorded as , and its optimization goal is:

[0030] in represents mutual information, Represents a small amount of label information, is a weight hyperparameter. The two enhanced views of the same sample are positive samples for each other, and they constitute negative samples with other enhanced views of the batch.

[0031] 3) For the obtained enhanced view, randomly sample two subsequences with overlapping parts respectively , so that , the common part of the two subsequences is , the two signal subsequences are input into the linear projection layer Then we get the latent vector , is the feature dimension after projection, and its calculation formula is ; By forcing each timestamp to reconstruct itself in different contexts, the robustness of encoded representation learning is improved, and the representations of the same timestamp in two enhanced contexts are regarded as positive pairs, while the representations of different timestamps and the representations of different samples in the same batch are regarded as negative pairs; constructing a multi-layer dilated convolution module as a feature extractor, which can provide a larger receptive field for different regions and obtain a deep representation feature vector.

[0032] 4) For a batch of deep representation feature vectors, the maximum pooling operation is continuously performed in the time dimension to obtain hierarchical levels of different fine-grained levels, and the time scale and instance scale are comprehensively considered. The soft allocation of contrast loss is calculated based on the difference between the distance between instances and the signal timestamp. According to the constructed positive and negative sample pairs, the hierarchical contrast loss is designed to jointly optimize the feature extractor to obtain the contrast pre-trained feature extractor. Specifically, each level includes soft time contrast loss and soft instance contrast loss, which are expressed as:

[0033] Where i is the index of a batch of input vibration signal samples, t is the timestamp, is the batch size, T is the signal length, is the soft temporal contrast loss, is the soft instance contrast loss, A hyperparameter to balance the two losses.

[0034] 5) The pre-trained feature extractor is used as the teacher model and the lightweight model is used as the student model. First, the adaptive fusion teacher features and student features are projected into one through the linear transformation layer. In the dimensional embedding subspace, the embedding features of the teacher network and the student network are Then, the embedding features are normalized by L2 and Mapped to the unit hypersphere, the similarity between the two is measured by the inner product, and the formula is as follows:

[0035] Where: and are the trainable parameters of the linear transformation layer of the teacher network and the student network respectively; is the similarity between two features.

[0036] Random sample choose K Negative samples , these negative samples are sent to the teacher network to obtain their respective embedding features , also using the idea of ​​contrastive learning, pull in the student embedding features of the positive sample and teacher embedding features The distance between them, and at the same time away from the negative sample embedding features Therefore, the optimization objective of the student network under knowledge distillation is as follows:

[0037] Where: are the parameters of the student network; is the temperature coefficient, which controls the model’s ability to distinguish negative samples; is the number of negative samples; is the total number of training samples in the dataset. 6) By comparing the pre-training and knowledge distillation, a distinguishable feature representation is obtained. The representation vector and the actual training label are input into the fault classifier support vector machine for training. Grid search is introduced for parameter optimization to obtain the optimal parameters of the fault classifier.

[0038] 7) Input the unknown state test samples into the feature extractor and the fault classifier successively, and output the fault state information. Finally, after using the above method to diagnose the faults of multiple samples in the test set, the relevant index values ​​used to evaluate the reliability of the diagnosis are statistically analyzed, including: Fault classification accuracy:

[0039] Weighted F1-score( ):

[0040] macro F1-score( ):

[0041] in, The number of samples correctly classified for the population, represents the total number of samples, Represents the category index, represents the proportion of samples of this type, No. The number of samples in the class.

[0042] The content of the present invention is further described in detail below in combination with actual conditions. This embodiment verifies the effectiveness of the invention in combination with the data of mechanical vibration signals with few labels.

[0043] (1) Extract vibration signals from a mechanical equipment operation test bench, such as Figure 2 As shown in Figure 1, the sampling frequency of the vibration signal is 64 khz. The data also contains the normal state and fault state of the mechanical equipment. The types of fault states include outer ring faults and inner ring faults of different degrees. Each type of inner ring and outer ring fault has five different fault degrees. In general, there are 11 health states, as shown in Table 1. After each vibration signal is segmented using a sliding window operation, a sample set of batch size is randomly divided from the data set according to the set sample batch.

[0044] Table 1 Bearing experimental data set

[0045] In this embodiment, after sliding the window, each category (including 1 normal category and 10 fault categories, a total of 11 categories) has 120 samples, and the total number of samples is 2640. The ratio of the training set to the test set is 5:5, and the training set contains a total of 1320 samples. In order to meet the experimental conditions of less labeling, only 5% of the labeled data is given in the training set, and the number of labeled data samples is 66, and the rest are unlabeled data. It is stipulated that the training set containing 5% labels is used for model training, and the status diagnosis of samples with unknown fault status is performed.

[0046] (2) For input signal ,in , is the batch size, Represents that the input signal is of length The one-dimensional vector defines the set of enhancement methods for vibration signals, including six enhancement strategies: random timestamp masking, amplitude scaling, adding Gaussian noise, truncation, obtaining subsequences, and wavelet filtering. The time domain comparison diagram is shown in the figure below. Figure 3 As shown, it is defined as Each enhancement method is The probability of is applied to the input signal, and we get in , the final combined enhanced view expression is , and use the reparameterization strategy to apply it to the Bernoulli distribution to ensure the differentiability of back propagation. Repeat the above enhancement operation twice. Based on the information bottleneck theory, a small amount of label information is used to guide the generation of enhanced views through weak supervision to obtain different enhanced views, which are recorded as , and its optimization goal is:

[0047] in represents mutual information, Represents a small amount of label information, is a weight hyperparameter. The two enhanced views of the same sample are positive samples for each other, and they constitute negative samples with other enhanced views of the batch.

[0048] (3) For the obtained enhanced view, two subsequences with overlapping parts are randomly sampled: , so that , the common part of the two subsequences is , the two signal subsequences are input into the linear projection layer Then we get the latent vector , is the feature dimension after projection, and its calculation formula is ; By forcing each timestamp to reconstruct itself in different contexts, the robustness of encoded representation learning is improved, and the representations of the same timestamp in two enhanced contexts are regarded as positive pairs, while the representations of different timestamps and the representations of different samples in the same batch are regarded as negative pairs; constructing a multi-layer dilated convolution module as a feature extractor, which can provide a larger receptive field for different regions and obtain a deep representation feature vector.

[0049] Compared with the standard convolution, the dilation rate is used more often in the dilation module, which refers to the number of kernel intervals (the standard convolution is 1). It can expand the receptive field, capture multi-scale context information, and does not change the size of the signal output feature. Its basic principle is as follows: Figure 4 shown.

[0050] Since the vibration signal is a one-dimensional time series, a one-dimensional multi-layer dilated convolution is used for stacking. Increasing the number of network layers can enhance the feature representation capability. In this example, the number of layers selected is 10. The specific structural parameters of the constructed feature extractor are as follows: Figure 5 shown.

[0051] (4) For a batch of deep representation feature vectors, the maximum pooling operation is continuously performed in the time dimension to obtain hierarchical levels of different fine-grained levels. The time scale and instance scale are comprehensively considered, and the soft allocation of contrast loss is calculated based on the difference between the distance between instances and the signal timestamp. According to the constructed positive and negative sample pairs, the hierarchical contrast loss is designed to jointly optimize the feature extractor to obtain the contrast pre-trained feature extractor. Specifically, each level includes soft time contrast loss and soft instance contrast loss, which are expressed as:

[0052] Where i is the index of a batch of input vibration signal samples, t is the timestamp, is the batch size, T is the signal length, is the soft temporal contrast loss, is the soft instance contrast loss, A hyperparameter to balance the two losses.

[0053] make as well as for Two enhancements to , specifically, the soft temporal contrast loss:

[0054] in, is the soft maximum probability of relative similarity, is a soft assignment of a pair of timestamps between signals, is the sigmoid function.

[0055] Soft instance contrast loss:

[0056] Similar to the soft temporal contrast loss, It is also the soft maximum probability of relative similarity, Soft assignment.

[0057] The pseudo code of the hierarchical contrast loss algorithm used in this article is as follows:

[0058] (5) The pre-trained feature extractor is used as the teacher model and the lightweight model is used as the student model. First, the adaptively fused teacher features and student features are projected into one through the linear transformation layer. In the dimensional embedding subspace, the embedding features of the teacher network and the student network are Then, the embedding features are normalized by L2 and Mapped to the unit hypersphere, the similarity between the two is measured by the inner product, and the formula is as follows:

[0059] Where: and are the trainable parameters of the linear transformation layer of the teacher network and the student network respectively; is the similarity between two features.

[0060] Random sample choose K Negative samples , these negative samples are sent to the teacher network to obtain their respective embedding features , also using the idea of ​​contrastive learning, pull in the student embedding features of the positive sample and teacher embedding features The distance between them, and at the same time away from the negative sample embedding features Therefore, the optimization objective of the student network under knowledge distillation is as follows:

[0061] Where: are the parameters of the student network; is the temperature coefficient, which controls the model’s ability to distinguish negative samples; is the number of negative samples; is the total number of training samples in the dataset. Figure 6 A schematic diagram of the knowledge distillation strategy is shown. After distillation, the number of parameters is reduced from 0.637M to 0.464M, a reduction of about 27.2%.

[0062] (6) After comparative pre-training and knowledge distillation of the training samples, meaningful feature representation is obtained. The representation vector is input into the fault classifier support vector machine together with the actual training label for training. Grid search is introduced for parameter optimization to obtain the optimal parameters of the fault classifier.

[0063] (7) The unknown state test samples are input into the feature extractor and the fault classifier in turn, and the fault state information is output. Finally, after the fault diagnosis is performed on multiple samples of the test set using the above method, the relevant index values ​​used to evaluate the reliability of the diagnosis are statistically analyzed, including: Fault classification accuracy: .

[0064] Weighted F1-score( ): .

[0065] macro F1-score( ): .

[0066] in, The number of samples correctly classified for the population, represents the total number of samples, Represents the category index, represents the proportion of samples of this type, No. The number of samples in the class.

[0067] It can be seen from the relevant numerical values ​​that the weakly supervised soft contrast distillation fault diagnosis method based on differentiable automatic enhancement proposed in the present invention can achieve a fault state classification accuracy of up to 97.58% in the test set when the number of labels is only 5%, and has excellent performance.

[0068] The features obtained by the feature extractor after pre-training and knowledge distillation are analyzed, and the feature representation of the test set is visualized by dimensionality reduction using the T-SNE feature dimensionality reduction technique. The results are as follows: Figure 7 As shown in the figure below, it can be seen that through pre-training, different health states are well distinguished in the feature space, which proves that the weakly supervised soft contrast pre-training based on differentiable automatic enhancement of the present invention can effectively learn the knowledge in the vibration signal and help implement fault diagnosis.

[0069] AUC (Area Under Curve) is defined as the area under the ROC curve. A larger AUC represents better performance. Figure 8 It can be seen from the ROC curve drawn in that no matter for the overall AUC or the AUC of each category, the area is close to 1, revealing the good model performance of the present invention.

[0070] In addition to implementing the present embodiment with the method proposed by the present invention, in order to further reflect the advantages of the present invention, a comparative method is also used to experiment with the same experimental settings, wherein the comparative method includes 3 typical fault diagnosis algorithms. The first is a fault diagnosis algorithm based on a deep convolutional neural network (CNN), which is widely used in the direction of intelligent fault diagnosis and has strong feature extraction capabilities. This method uses traditional supervised learning, that is, only labeled training samples are trained; the second is a support vector machine (SVM), which is widely used in small sample fault diagnosis and is also trained using supervised learning. The third is another common self-supervised contrastive learning paradigm, MoCo, which uses a positive encoder and momentum update rule to update the momentum encoder parameters instead of back-propagation update parameters. Table 2 shows the classification accuracy and F1 value indicators of different methods under the condition of only 5% labeling.

[0071] Table 2 Classification accuracy and F1 value of different methods under the condition of only 5% labeling

[0072] Furthermore, Figure 7 The histogram of accuracy and F1 value of each method under the condition of only 5% labeling is shown.

[0073] It can be seen that compared with the comparison method, the method proposed in the present invention can achieve higher fault classification accuracy and higher and value.

[0074] In addition, in order to verify the influence of less labeling on the method of the present invention, an experiment with 2.5% of labeled samples in the training set was also carried out in the embodiment. The experimental results are compared with Table 3 and Figure 8 shown.

[0075] Table 3 Classification accuracy and F1 value of different methods under the condition of only 2.5% labeling

[0076] It can be seen that the weakly supervised soft contrast distillation fault diagnosis method based on differentiable automatic enhancement proposed in the present invention can achieve high fault classification accuracy with very little labeling (2.5% and 5%).

[0077] By implementing all the above processes, the results of the embodiments show that the weakly supervised soft contrast distillation fault diagnosis method based on differentiable automatic enhancement proposed in the present invention can construct a differentiable automatic enhancement view generator based on information theory while ensuring that the vibration signal has fewer labels, and fully mine the characteristics of the signal itself through self-supervised contrast learning, effectively reduce the computational overhead by using the knowledge distillation strategy, and obtain high-precision fault diagnosis accuracy, providing effective guidance for the classification of fault states of weakly supervised mechanical equipment under few labels.

[0078] Although the present invention has been described according to a limited number of embodiments, it will be apparent to those skilled in the art, with the benefit of the above description, that other embodiments are contemplated within the scope of the invention thus described. The disclosure of the present invention is intended to be illustrative rather than restrictive of the scope of the invention, which is defined by the appended claims.

[0079] In order to solve the problem that a large number of monitoring data label samples are missing in actual industrial environments and it is difficult to perform high-precision monitoring and fault diagnosis tasks on mechanical equipment, the acquired vibration signal is first segmented using a sliding window operation and then divided into sample batches; then, six enhancement strategies, including random timestamp masking, amplitude scaling, adding Gaussian noise, truncation, obtaining subsequences, and wavelet filtering, are used to generate adaptive enhanced views based on information theory using the supervised information in sparse labels, and a re-parameterization strategy is used to ensure the differentiability of back propagation. The soft assignment of contrast loss is calculated based on the time scale and batch scale, and the difference between the distance between instances and the signal timestamps, to construct positive and negative sample pairs; secondly, for a single sample in the batch and the enhanced view, two overlapping subsequences are randomly extracted from the signal, and the consistency of the context representation on the common segment is encouraged. The subsequences are separated and classified into two parts. The input linear projection layer is encoded, and the multi-layer hole convolution module is used as a feature extractor to extract the context representation of each timestamp to obtain the deep feature encoding representation; again, soft time contrast loss and soft instance contrast loss are applied to the deep feature encoding representation of each batch, and multi-level pooling operations are performed on the time dimension. In the hierarchical framework, the total loss is summed at multiple scales, and the feature representations of vibration signals with different fine-grained levels are obtained through joint optimization; after pre-training, the knowledge distillation strategy is used to effectively reduce the number of parameters of the pre-training model and reduce the computational overhead. The obtained feature representation and label are input into the fault state classifier for fine-tuning to obtain the fault state classification model; finally, the vibration signal of the mechanical component to be diagnosed in the unknown state is compared with the pre-trained feature extractor, and then input into the fault state classification model to obtain the fault diagnosis result of the mechanical component to be diagnosed. This method is simple to implement and has significant effects, and provides an effective method for fault diagnosis of mechanical equipment with few labels.

[0080] The following are device embodiments of the present invention, which can be used to perform method embodiments of the present invention. For details not disclosed in the device embodiments, please refer to the method embodiments of the present invention.

[0081] In another embodiment of the present invention, a weakly supervised soft contrast distillation fault diagnosis system based on differentiable automatic enhancement is provided. The weakly supervised soft contrast distillation fault diagnosis system based on differentiable automatic enhancement can be used to implement the above-mentioned weakly supervised soft contrast distillation fault diagnosis method based on differentiable automatic enhancement. Specifically, the weakly supervised soft contrast distillation fault diagnosis system based on differentiable automatic enhancement includes a sample partitioning module, an enhanced view generation module, a feature extraction module, a loss summation module, a knowledge distillation module, a classification model acquisition module and a fault diagnosis module.

[0082] Among them, the sample division module is used to obtain the vibration signal of the mechanical equipment, segment each vibration signal, and divide it into a batch-sized sample set.

[0083] The enhanced view generation module is used to enhance the sample set, and each sample is generated to obtain two different enhanced views.

[0084] The feature extraction module is used to generate two enhanced views for each sample in the batch, and obtain a deep feature encoding representation through feature extraction.

[0085] The loss summation module is used to sum the contrast loss of deep feature encoding of each batch, and obtain the contrast pre-trained feature extractor through joint optimization.

[0086] The knowledge distillation module is used to adopt the knowledge distillation strategy to transfer the knowledge from the pre-trained feature extractor to the lightweight feature extractor.

[0087] The classification model acquisition module is used to obtain a distinguishable feature representation using a lightweight feature extractor, and train the distinguishable feature representation together with labeled samples to obtain a fault state classification model.

[0088] The fault diagnosis module is used to pass the vibration signal of the mechanical component to be diagnosed through a lightweight feature extractor, and then input it into the fault state classification model to obtain the fault diagnosis result.

[0089] In another embodiment of the present invention, a terminal device is provided, which includes a processor and a memory, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute the program instructions stored in the computer storage medium. The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, which is suitable for implementing one or more instructions, and is specifically suitable for loading and executing one or more instructions to implement the corresponding method flow or corresponding function; the processor described in the embodiment of the present invention can be used for the operation of the weakly supervised soft contrast distillation fault diagnosis method based on differentiable automatic enhancement, including: S1, obtaining the vibration signal of the mechanical equipment, segmenting each vibration signal, and dividing the sample set of batch size; S2, enhancing the sample set, and generating two different enhancements for each sample Strong view; S3, for the two enhanced views generated for each sample in the batch, a deep feature encoding representation is obtained through feature extraction; S4, the contrast loss of the deep feature encoding of each batch is summed, and a contrast pre-trained feature extractor is obtained through joint optimization; S5, a knowledge distillation strategy is adopted to transfer knowledge from the contrast pre-trained feature extractor to the lightweight feature extractor; S6, a distinguishable feature representation is obtained using the lightweight feature extractor, and the distinguishable feature representation is trained together with the labeled samples to obtain a fault state classification model; S7, the vibration signal of the mechanical part to be diagnosed is passed through the lightweight feature extractor and then input into the fault state classification model to obtain the fault diagnosis result.

[0090] In another embodiment, the present invention further provides a computer-readable storage medium (Memory), which is a memory device in a terminal device for storing programs and data. It is understandable that the computer-readable storage medium here can include both the built-in storage medium in the terminal device and the extended storage medium supported by the terminal device. The computer-readable storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory.

[0091] The processor may load and execute one or more instructions stored in a computer-readable storage medium to implement the corresponding steps of the weakly supervised soft contrast distillation fault diagnosis method based on differentiable automatic enhancement in the above-mentioned embodiment; one or more instructions in the computer-readable storage medium are loaded by the processor and the following steps are executed: S1, obtaining vibration signals of mechanical equipment operation, segmenting each vibration signal, and dividing a sample set of batch size; S2, enhancing the sample set, and generating two different enhanced views for each sample; S3, for the two enhanced views generated for each sample in the batch, After feature extraction, a deep feature coding representation is obtained; S4, the contrast loss of the deep feature coding of each batch is summed up, and a contrast pre-trained feature extractor is obtained through joint optimization; S5, a knowledge distillation strategy is adopted to transfer knowledge from the contrast pre-trained feature extractor to a lightweight feature extractor; S6, a distinguishable feature representation is obtained using the lightweight feature extractor, and the distinguishable feature representation is trained together with labeled samples to obtain a fault state classification model; S7, the vibration signal of the mechanical component to be diagnosed is passed through the lightweight feature extractor and then input into the fault state classification model to obtain the fault diagnosis result.

[0092] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0093] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0094] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0095] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0096] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0097] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0098] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

[0099] It should be understood that the above description is for illustration and not for limitation. Many embodiments and many applications beyond the examples provided will be apparent to those skilled in the art upon reading the above description. Therefore, the scope of this patent should not be determined with reference to the above description, but rather with reference to the preceding claims and the full scope of equivalents to which such claims are entitled. For the purpose of comprehensiveness, all articles and references, including disclosures of patent applications and publications, are incorporated herein by reference. The omission of any aspect of the subject matter disclosed herein in the preceding claims is not intended to be a waiver of such subject matter, nor should it be considered that the applicant has not considered such subject matter to be part of the disclosed inventive subject matter.

Claims

1. A weakly supervised soft contrast distillation fault diagnosis method based on differentiable automatic enhancement, characterized in that: The process includes: S1, obtain the vibration signal of the mechanical equipment, process each vibration signal in segments, and divide it into a sample set of batch size; S2, enhance the sample set, and generate two different enhanced views for each sample; S3, for each sample in the batch, two enhanced views are generated, and deep feature encoding representation is obtained after feature extraction; S4, sums the contrast loss of deep feature encoding for each batch, and obtains the contrast pre-trained feature extractor through joint optimization; S5, adopts the knowledge distillation strategy to transfer the knowledge from the pre-trained feature extractor to the lightweight feature extractor; S6, using a lightweight feature extractor to obtain a distinguishable feature representation, and training the distinguishable feature representation together with the labeled samples to obtain a fault state classification model; S7, the vibration signal of the mechanical component to be diagnosed is passed through a lightweight feature extractor and then input into a fault state classification model to obtain a fault diagnosis result.

2. The weakly supervised soft contrast distillation fault diagnosis method based on differentiable automatic enhancement according to claim 1 is characterized in that: In S1, the vibration signal of the mechanical equipment operation includes the normal state and the fault state of the mechanical equipment operation, and the types of the fault state include outer ring faults and inner ring faults of different degrees.

3. The weakly supervised soft contrast distillation fault diagnosis method based on differentiable automatic enhancement according to claim 1 is characterized in that: In S2, one or more enhancement strategies including random timestamp masking, amplitude scaling, adding Gaussian noise, truncation, obtaining subsequences and wavelet filtering are used. The supervision information in sparse labels is utilized to generate adaptive enhanced views based on information theory. The reparameterization strategy is adopted to ensure the differentiability of back propagation. Positive sample pairs and negative sample pairs are constructed according to the time scale and batch scale.

4. The weakly supervised soft contrast distillation fault diagnosis method based on differentiable automatic enhancement according to claim 1 is characterized in that: In S3, for the two enhanced views generated for each sample in the batch, two overlapping subsequences are randomly extracted from the signal, and the consistency of the context representation on the common segment is encouraged. The subsequences are input into the linear projection layer for encoding respectively, and a multi-layer hole convolution module is used as a feature extractor to extract the context representation of each timestamp to obtain a deep feature encoding representation.

5. The weakly supervised soft contrast distillation fault diagnosis method based on differentiable automatic enhancement according to claim 1 is characterized in that: In S4, soft temporal contrast loss and soft instance contrast loss are applied to the deep feature encoding representation of each batch. The soft assignment of contrast loss is calculated based on the difference between the instance distance and the signal timestamp, and multi-level pooling operations are performed in the time dimension. Using a hierarchical framework, the total loss is summed at multiple scales, and a hierarchical contrast loss is designed to jointly optimize the feature extractor to obtain a contrastive pre-trained feature extractor.

6. The weakly supervised soft contrast distillation fault diagnosis method based on differentiable automatic enhancement according to claim 1 is characterized in that: In S5, the pre-trained feature extractor is used as the teacher model, and the lightweight model is used as the student model. First, the adaptive fusion teacher features and student features are projected into one through the linear transformation layer. In the dimensional embedding subspace, the embedding features of the teacher network and the embedding features of the student network are mapped to the unit hypersphere through L2 normalization, and the similarity between the two is measured by the inner product. Multiple negative samples are randomly selected for the sample, and these negative samples are sent to the teacher network to obtain their respective embedding features. Similarly, the idea of ​​contrastive learning is used to shorten the distance between the student embedding features of the positive samples and the teacher embedding features, while moving away from the distance between the embedding features of the negative samples.

7. The weakly supervised soft contrast distillation fault diagnosis method based on differentiable automatic enhancement according to claim 1 is characterized in that: In S6, a distinguishable feature representation is obtained by comparing pre-training and knowledge distillation, and the representation vector is input into the support vector machine together with the actual training label for training. Grid search is introduced for parameter optimization to obtain the optimal parameters of the fault classifier.

8. A weakly supervised soft contrast distillation fault diagnosis system based on differentiable automatic enhancement, characterized in that: include: The sample division module is used to obtain the vibration signal of the mechanical equipment, segment each vibration signal, and divide it into a batch size sample set; An enhanced view generation module is used to enhance the sample set, and each sample is generated to obtain two different enhanced views; A feature extraction module is used to extract features from two enhanced views generated for each sample in a batch to obtain a deep feature encoding representation; The loss summation module is used to sum the contrast loss of each batch of deep feature encodings, and obtain the contrast pre-trained feature extractor through joint optimization; The knowledge distillation module is used to adopt the knowledge distillation strategy to transfer the knowledge from the pre-trained feature extractor to the lightweight feature extractor; A classification model acquisition module is used to obtain a distinguishable feature representation using a lightweight feature extractor, and train the distinguishable feature representation together with labeled samples to obtain a fault state classification model; The fault diagnosis module is used to pass the vibration signal of the mechanical component to be diagnosed through a lightweight feature extractor, and then input it into the fault state classification model to obtain the fault diagnosis result.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the weakly supervised soft contrast distillation fault diagnosis method based on differentiable automatic enhancement are implemented as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the weakly supervised soft contrast distillation fault diagnosis method based on differentiable automatic enhancement are implemented as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Lightweight defect detection method based on comparative knowledge distillation

    CN118887206A

Cited By

  • Cross-modal knowledge migration unmanned aerial vehicle motor fault diagnosis method based on knowledge distillation

    CN120470418A

  • Fault diagnosis method and system for rotating machine bearing

    CN121540426A

  • A method and system for diagnosing faults in a rotating machine bearing

    CN121540426B