A few-label industrial equipment fault diagnosis method based on self-supervised interactive learning
Patent Information
- Application Number
- CN202611351376.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-02
- Publication Date
- 2026-10-30
AI Technical Summary
现有部分方法虽引入时间域与时频域数据共同参与训练,但往往仅将其中一种表示作为辅助视图,未能通过特征融合方式充分挖掘时间域特征与时频域特征之间的相关关系和交互信息
本发明基于背景技术中的问题,研究了一种面向少标签场景的自监督故障诊断方法。本发明所提方法能够利用无标签运行数据进行预训练,降低对人工标注样本的依赖;通过时域与时频域特征交互,获得具有判别性、互补性和稳定性的特征表示;同时避免模型性能过度依赖人工设计的数据增强策略,从而提高模型在少标签训练和工况变化条件下的诊断准确性与泛化能力。相较于基于监督学习的故障诊断方法与已有的基于自监督学习的故障诊断方法,本发明所提方法在标注样本稀缺场景下具有更好的诊断准确性和跨工况泛化性能。
Smart Images

Figure CN123012773A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial equipment fault diagnosis technology, and is a few-label industrial equipment fault diagnosis method based on self-supervised interactive learning. Background Technology
[0002] Industrial equipment is widely used in critical sectors such as manufacturing, energy, transportation, and aerospace. Its operational status directly impacts production efficiency, system safety, and equipment reliability. Key components such as motors, bearings, gears, pump sets, and turntables are susceptible to load fluctuations, changes in operating conditions, assembly errors, wear and aging, and external disturbances during long-term operation, leading to faults such as structural loosening, impact damage, electrical anomalies, and transmission failures. Failure to identify these faults in a timely manner can result in equipment performance degradation, increased downtime maintenance costs, and even safety accidents. Therefore, utilizing sensor-collected operating signals such as vibration, current, and temperature for condition monitoring and fault diagnosis of industrial equipment has become an important technological direction in intelligent operation and maintenance and predictive maintenance.
[0003] Existing fault diagnosis methods mainly include traditional signal processing-based methods and data-driven methods based on deep learning. Traditional methods typically rely on techniques such as time-domain statistical features, frequency-domain spectral analysis, short-time Fourier transform (STFT), wavelet transform, and empirical mode decomposition (EMD) to extract fault features, and combine them with classifiers such as support vector machine (SVM) and random forest (RF) to achieve state recognition. These methods have a certain degree of interpretability, but their diagnostic performance is highly dependent on expert experience and the quality of manually designed features. When equipment is under complex operating conditions, strong noise interference, or multiple fault coupling states, manually designed features are difficult to fully characterize the deep differences between fault states, thus limiting diagnostic accuracy and generalization ability. With the development of deep learning, methods such as Convolutional Neural Networks (CNN), Recurrent Neural Networks (RNN), Transformers, and multi-scale convolutional networks have been used to automatically learn fault features, reduce the manual feature design process, and achieve better diagnostic results when there is sufficient labeled data.
[0004] However, most existing deep learning-based fault diagnosis methods are based on the supervised learning paradigm, requiring a large amount of data with clearly labeled fault categories for model training. In real-world industrial scenarios, equipment is often in a normal or slightly degraded state for extended periods, resulting in a low frequency of typical fault samples. Furthermore, fault labeling typically relies on downtime inspections, maintenance records, or expert interpretation, leading to high costs, long cycles, and difficulty in obtaining large-scale, high-quality, and class-balanced labeled samples. Under conditions of scarce labeled samples, deep neural networks are prone to overfitting, insufficient feature discriminative power, and decreased diagnostic performance. To alleviate these problems, semi-supervised learning, transfer learning, data augmentation, and self-supervised learning (SSL) methods have been gradually introduced into the field of fault diagnosis. Among these, self-supervised learning can learn general feature representations from a large amount of unlabeled running data by constructing pre-training tasks that do not require manual labeling, and then complete downstream diagnostic tasks using a small number of labeled samples, thus possessing high engineering application value.
[0005] Existing self-supervised fault diagnosis methods still have certain shortcomings. Some methods rely on artificially designed data augmentation strategies such as random pruning, masking, flipping, amplitude scaling, and frequency domain perturbation to construct positive and negative sample pairs. However, if these augmentation strategies are not designed properly, they may destroy the physical meaning of the industrial signals themselves, causing the model to learn perturbation invariances unrelated to the actual fault mechanism. Furthermore, the model performance is quite sensitive to sample distribution and augmentation strategies. While reconstruction-based self-supervised methods can utilize unlabeled data for feature learning, their optimization objective is mainly focused on recovering the input signal itself. The model may be more concerned with restoring signal details and may not be able to fully learn the deep semantic features related to fault category discrimination. In addition, industrial fault signals usually contain information in both the time domain and the frequency domain. Time-domain signals can retain information such as impact amplitude, waveform abrupt changes, and transient response, while time-frequency domain representations can reveal the laws governing the change of fault frequency components over time. Although some existing methods introduce time-domain and time-frequency domain data to participate in training, they often only use one of the representations as an auxiliary view and fail to fully explore the correlation and interaction information between time-domain features and time-frequency domain features through feature fusion. Summary of the Invention
[0006] This invention addresses the problems of existing technologies by disclosing a method for fault diagnosis of industrial equipment with few labels based on self-supervised interactive learning. The invention aims to initially extract discriminative health status features without data labeling by constraining the pre-training task through the correlation of signal time-domain and time-frequency domain features, fine-tuning the model parameters obtained from stage transfer pre-training, and adaptively fusing time-domain and time-frequency domain features through a bidirectional cross-domain attention mechanism. This enables high-precision fault diagnosis in scenarios where labeled data is scarce.
[0007] This invention provides the following technical solutions: A method for fault diagnosis of few-label industrial equipment based on self-supervised interactive learning, the method comprising the following steps: Step 1: Collect the status monitoring signals that appear in the form of time series during the operation of industrial equipment, divide and standardize the data by sliding window, and generate the corresponding time-frequency domain transformation based on short-time Fourier transform to form time-frequency domain input pairs for subsequent unsupervised pre-training and supervised fine-tuning; Step 2: Self-supervised pre-training based on feature interaction: extract features from the time domain and time-frequency domain representations of the signal, and perform feature projection and prediction. Based on the projected and predicted features, construct a pre-training task based on feature correlation to achieve preliminary extraction of fault features without the need for labels. Step 3: Supervised fine-tuning based on bidirectional cross-domain attention mechanism, the bidirectional feature extractor initially trained in the pre-training stage is transferred to the downstream task, and the bidirectional cross-domain attention mechanism is used to interact the bidirectional features, and feature fusion is performed in conjunction with the adaptive pooling strategy. Step 4: After obtaining the dual-domain fusion diagnostic features, construct a fault classifier to identify the operating status of industrial equipment. Input the fusion features into the classifier to obtain the predicted probability of the fault category.
[0008] Preferably, step 1 specifically comprises: For the vibration accelerometer status monitoring signals from the drive end and fan end during the operation of the bearing fault acquisition platform in the CWRU dataset, a sliding window method is used for sample segmentation, with the window length set to 1. The sliding step size is , No. Each time-domain sample is represented by the following formula:
[0009] in, This indicates the acquired equipment status monitoring signal. Indicates the number of input channels. Indicates the length of a continuous signal. ; The segmented time-domain samples are standardized, and a short-time Fourier transform is performed on the time-domain samples to obtain the corresponding time-frequency domain, which is expressed by the following formula:
[0010] in, Represents the window function. Indicates the position of the time window. Indicates frequency index, Indicates an imaginary singular number; The amplitude is taken as the input in the time-frequency domain, that is... ,in , Represents the frequency dimension. Indicates the time frame dimension; The time-domain samples and their corresponding time-frequency domain representations are used to construct paired samples in two domains:
[0011] Obtain the unlabeled pre-trained dataset:
[0012] Few-label downstream training dataset:
[0013] in, Indicates the fault category label, Indicates the number of unlabeled samples. This indicates the number of labeled samples.
[0014] Preferably, during training, a batch of samples is selected from the dataset to form the time-domain input. and time-frequency domain input It is used in the subsequent self-supervised pre-training stage and the few-label fine-tuning stage.
[0015] Preferably, step 2 specifically comprises: Step 2.1: For batch input in the time domain Through the temporal initial feature mapping module Extracting shallow temporal features, described as follows:
[0016] in, For time-frequency domain batch input Through the time-frequency domain initial feature mapping module Extracting shallow temporal features, described as follows:
[0017] in, , Indicates batch size. Indicates the number of input channels. This represents the number of feature channels after mapping. This represents the mapped temporal feature dimension. and These represent the frequency dimension and time frame dimension of the mapped time-frequency domain features, respectively. Output of the initial feature mapping module and These are respectively used as inputs to the first multi-scale feature extraction unit in the time-domain branch and the time-frequency branch, for the... Multi-scale feature extraction units, with the input features of the temporal branch being... The output features are The time-frequency domain branch input features are: The output features are ,in , Indicates the number of multi-scale feature extraction modules; Step 2.2: Set up projection heads after the time-domain coded features and the time-frequency domain coded features respectively. The projection process is represented as follows:
[0018] in, and These represent the time-domain projection head and the time-frequency domain projection head, respectively. , This indicates the dimension of the projection space, and the projection head is a linear layer containing non-linear activation; To achieve cross-domain prediction between the time domain and the time-frequency domain, prediction heads are set after the projection head. The time-domain prediction head generates prediction features to match the time-frequency domain projection representation based on the time-domain projection representation. The prediction process is represented as follows:
[0019] in, and These represent the time-domain projection head and the time-frequency domain projection head, respectively. The prediction head is also a linear layer containing nonlinear activation; Step 2.3: Construct a bidirectional cross-domain interactive self-supervised pre-training objective. To establish interaction constraints between time-domain features and time-frequency domain features under unlabeled conditions, calculate the cross-domain correlation matrix between the predicted representation and the projection representation of the other domain. For any set of predicted representations... and target projection representation Its cross-domain correlation matrix is defined as:
[0020] in, , This represents the L2 norm calculated along the batch dimension for each feature dimension, where the L2 norm in the matrix is the least significant factor. Line 1 Column elements are represented as:
[0021] in, Indicates the first The nth sample in the prediction representation Feature values in each dimension Indicates the first The nth sample in the target projection representation Feature values in each dimension; According to the cross-domain correlation matrix Construct a correlation-constrained loss:
[0022] in, Represents the diagonal elements of the correlation matrix. Represents the off-diagonal elements of the correlation matrix. The loss balance coefficient is shown. The first term is used to enhance the consistency of the same feature dimension between the time domain and the time-frequency domain, and the second term is used to suppress redundant correlations between different feature dimensions. Time-domain prediction representation With time-frequency domain projection representation Establish correlation constraints and time-frequency domain prediction representation With time-domain projection representation Establish relevance constraints; The loss in the time-to-frequency domain direction is:
[0023] The loss from the time-frequency domain to the time domain is:
[0024] in, This indicates stopping gradient operations, used to block gradient backpropagation on the target branch to improve pre-training stability and avoid representation degradation; The total loss of the self-supervised pre-training task is:
[0025] On the unlabeled pre-training dataset, by minimizing The dual-domain self-supervised interactive pre-training model is optimized so that the temporal feature encoding network and the time-frequency domain feature encoding network learn cross-domain consistent and non-redundant fault feature representations. After pre-training, the parameters of the temporal feature encoding network and the time-frequency domain feature encoding network are retained and transferred to the subsequent few-label supervised fine-tuning stage. The projection head and prediction head are only used in the self-supervised pre-training stage and do not participate in classification prediction in the downstream fault diagnosis stage.
[0026] Preferably, step 2.1 further includes: For the time-domain branch, the first The multi-scale feature extraction module uses multiple one-dimensional convolutional branches with different receptive fields to perform parallel feature extraction, obtaining temporal multi-scale features:
[0027] For the time-frequency domain, we have:
[0028] in, and The time-domain and time-frequency domain multi-scale feature extraction modules are respectively based on the scale of the time-domain and time-frequency domain multi-scale feature extraction modules. The convolutional feature extraction branch, Represents the set of convolution scales. and These represent the pooling branches in the time domain and the time-frequency domain, respectively. This indicates feature concatenation along the channel dimension; Multi-scale features in the time domain and time-frequency domain multi-scale features Both employ the CBAM attention mechanism for channel-space attention enhancement, addressing multi-scale temporal features. The channel attention weights are calculated, and the time-domain branch performs global average pooling and global max pooling along the time dimension, while the time-frequency domain branch performs global average pooling and global max pooling along the frequency and time frame dimensions.
[0029]
[0030] Time-domain and time-frequency domain channel enhancement features are obtained based on channel attention weights. and ,right and Average pooling and max pooling are performed along the channel dimension, and spatial attention weights are generated through convolutional mapping:
[0031]
[0032] Temporal enhancement features are obtained based on spatial attention weights. With time-frequency domain enhancement features ,in, This represents the Sigmoid activation function. Indicates a shared multilayer perceptron. , This represents the spatial attention convolution mapping in the CBAM attention mechanism used in the time and frequency domains. This represents element-wise multiplication, where attention weights are matched to the input feature dimensions via a broadcasting mechanism. The first The input features of each multi-scale feature extraction unit are residually fused with the attention-enhanced multi-scale features to obtain the output of the coding unit. The temporal branch is as follows:
[0033] The time-frequency domain branch is as follows:
[0034] in, This indicates a batch normalization operation. To correct the activation function of the linear unit, cascading is used. A multi-scale feature extraction module constitutes a time-domain feature coding network and a time-frequency domain feature coding network; Initial feature mapping module and A multi-scale feature extraction module constitutes a temporal feature coding network. Time-frequency domain feature coding network The complete feature extraction processes in the time domain and time-frequency domain are respectively denoted as... , The features obtained in the time domain and time-frequency domain are denoted as follows: and Global average pooling is then performed on each feature to obtain fixed-dimensional dual-domain encoded features. and ,in .
[0035] Preferably, step 3 specifically comprises: Step 3.1: Obtain and rearrange the dual-domain features. For training samples with few labels, construct the time-domain input. and the corresponding time-frequency domain input The two are then input into the pre-trained time-domain feature encoding network and time-frequency domain feature encoding network, respectively, to obtain dual-domain high-level features. and In batch mode , , Indicates batch size. Indicates the number of feature channels. Indicates the encoded time dimension. and These represent the frequency dimension and time frame dimension after encoding, respectively; In the few-label supervised fine-tuning stage, to preserve local fault information at temporal and time-frequency locations, the high-level feature maps output from the end of the encoding network are retained and rearranged. and ,in , ; Step 3.2: Construct a dual-domain cross-domain attention feature interaction and fusion module, respectively for... and A linear mapping is performed to obtain the query matrix, key matrix, and value matrix. A multi-head attention mechanism is used for cross-domain interaction, with the number of attention heads set to 1. The feature dimension of each attention head is ,in, Indicates the number of input feature channels; For the For each attention head, the query, key, and value representation of time-domain and time-frequency domain features is as follows:
[0036] in, ; , , , , , For the first Each attention head corresponds to a learnable linear mapping parameter; A bidirectional cross-domain attention interaction mechanism is constructed, using time-domain features as queries and time-frequency domain features as keys and values. The complementary relationship between time-frequency domain information and time-domain features is calculated. The cross-domain attention weights for each attention head are:
[0037] No. The temporal cross-domain enhancement features corresponding to each attention head are:
[0038] Will The outputs of each attention head are concatenated and linearly mapped to obtain the time-domain interaction features enhanced with time-frequency domain information:
[0039] in, The output mapping parameters represent the time-domain direction. ; For the time-frequency domain enhancement direction, using time-frequency domain features as the query and time-domain features as the key and value, the first... The cross-domain attention weights for each attention head are:
[0040] The corresponding time-frequency domain cross-domain enhancement features are:
[0041] Will The outputs of each attention head are concatenated and linearly mapped to obtain the time-frequency domain interaction features enhanced with time-domain information:
[0042] in, The output mapping parameters represent the time-frequency domain direction. .
[0043] Preferably, the interactive features are converted into fixed-length features for final diagnosis, including time-domain interactive features. Interaction features in the time and frequency domains Weighted pooling is performed separately. For temporal interaction features, the positional weights are expressed as follows:
[0044] in, and For learnable parameters in time-domain weighted pooling, ; According to weight The temporal interactive features are weighted and summed to obtain the temporal diagnostic features. ,in ; Calculate position weights for time-frequency domain interaction features:
[0045] in, and For learnable parameters in time-frequency domain weighted pooling, ; According to weight We obtain the time-frequency domain diagnostic features by weighted summation of the time-frequency domain interaction features. ,in ; By fusing time-domain diagnostic features and time-frequency domain diagnostic features, a dual-domain fused diagnostic feature is obtained. , .
[0046] Preferably, in obtaining dual-domain fusion diagnostic features Then, a fault classifier is constructed to identify the operating status of industrial equipment. The fused features are input into the classifier to obtain the predicted probability of the fault category:
[0047] in, and This represents the learnable parameters in the classifier. , Indicates the number of fault categories. Indicates the first The sample belongs to the first Predicted probability of fault states; For a small number of labeled samples, the cross-entropy loss function is used for supervised fine-tuning:
[0048] in, Indicates the first The true label of the sample in the first... Values on a class are minimized. The temporal feature coding network, the time-frequency feature coding network, the bidirectional cross-domain attention interaction module, the weighted pooling module, and the classifier are jointly fine-tuned. The fault diagnosis result is determined by the category corresponding to the maximum predicted probability:
[0049] in, Indicates the first By using the above-described fault diagnosis process with few labeled samples, this invention can fully utilize the dual-domain feature representation obtained through self-supervised pre-training under the condition of a small number of labeled samples, and enhance the complementary relationship between the time domain and the time-frequency domain through bidirectional cross-domain feature interaction, thereby improving the accuracy and generalization ability of fault diagnosis.
[0050] A computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement a method for fault diagnosis of industrial equipment based on self-supervised interactive learning.
[0051] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement a few-label industrial equipment fault diagnosis method based on self-supervised interactive learning.
[0052] The present invention has the following beneficial effects: This invention addresses the problems described in the background section by proposing a self-supervised fault diagnosis method for scenarios with few labels. The proposed method utilizes unlabeled runtime data for pre-training, reducing reliance on manually labeled samples. Through the interaction of time-domain and time-frequency domain features, it obtains discriminative, complementary, and stable feature representations. Simultaneously, it avoids excessive reliance on manually designed data augmentation strategies for model performance, thereby improving the model's diagnostic accuracy and generalization ability under conditions of few labels and changing operating conditions. Compared to supervised learning-based fault diagnosis methods and existing self-supervised learning-based fault diagnosis methods, the proposed method exhibits better diagnostic accuracy and cross-condition generalization performance in scenarios with scarce labeled samples. Attached Figure Description
[0053] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0054] Figure 1 The flowchart shown is a method for fault diagnosis of industrial equipment based on self-supervised interactive learning according to the present invention. Figure 2 The graph shows the change in the loss function during the pre-training phase. Figure 3 The graph shows the change curves of the loss function and the accuracy during the fine-tuning phase for the training and validation sets. Figure 4 The results are displayed as a feature t-SNE visualization for fault diagnosis. Detailed Implementation
[0055] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0056] The present invention will be described in detail below with reference to specific embodiments. Specific Implementation Example 1: according to Figures 1 to 4 As shown, the specific optimized technical solution adopted by the present invention to solve the above-mentioned technical problems is: The present invention relates to a method for fault diagnosis of industrial equipment with few labels based on self-supervised interactive learning.
[0058] This invention presents experimental research based on the bearing failure dataset from Case Western Reserve University (CWRU). The experimental platform consists of a 2-horsepower electric motor, a torque sensor / decoder, a power meter, and an electronic controller. The dataset contains bearing failure data of different types and degrees. The bearing under test supports the motor shaft. The drive-end bearing is an SKF6205, and the sampling frequencies are 12kHz and 48kHz. Vibration accelerometer sampling sequences from the drive end, fan end, and base are obtained. The dataset includes normal samples and samples of different failure types, including outer ring damage, inner ring damage, and rolling element damage. Each failure type is further classified according to the failure diameter and motor load. For example, the failure diameter of the drive-end bearing is divided into three categories: 0.007 inches, 0.014 inches, and 0.028 inches. The load under each failure is divided into 0 horsepower, 1 horsepower, 2 horsepower, and 3 horsepower. Outer ring failures can be further classified according to their position relative to the load area into 6 o'clock, 3 o'clock, and 12 o'clock directions.
[0059] Based on the 12kHz sampling frequency data in the CWRU dataset, this invention constructs a ten-class fault diagnosis task, and the health status categories are shown in Table 1.
[0060] Table 1. CWRU Dataset Fault Diagnosis Task Categories
[0061] Wherein, N indicates that the bearing is in normal working condition, and IF, BF, and OF represent damage to the inner ring, rolling element, and outer ring, respectively. The outer ring fault selected in this invention is the 6 o'clock position under load.
[0062] The implementation process of this invention is described in detail below: Step 1: Construction of a dual-domain input dataset for industrial equipment operating signals: For the vibration accelerometer status monitoring signals from the drive end and fan end during the operation of the CWRU dataset bearing fault acquisition platform, a sliding window method is used for sample segmentation. Let the window length be... The sliding step size is , No. Each time-domain sample is represented as ,in This indicates the acquired equipment status monitoring signal. Indicates the number of input channels. Indicates the length of a continuous signal. During implementation, It is 2. It is 1024. The value is 512.
[0063] To reduce the impact of differences in amplitude scale and acquisition conditions across different channels, the segmented time-domain samples are standardized. Subsequently, a Short-Time Fourier Transform (STFT) is performed on the time-domain samples to obtain the corresponding time-frequency domain representation.
[0064] in, Represents the window function. Indicates the position of the time window. Indicates frequency index, This represents the imaginary unit. Since the STFT result is in complex form, its amplitude is taken as the time-frequency domain input, i.e. ,in , Represents the frequency dimension. Indicates the time frame dimension.
[0065] The time-domain samples and their corresponding time-frequency domain representations constitute a pair of dual-domain samples. This yields an unlabeled pre-trained dataset. and downstream training datasets with few labels ,in Indicates the fault category label, Indicates the number of unlabeled samples. This represents the number of labeled samples, and in scenarios with few labels, it usually satisfies... During training, a batch of samples is selected from the dataset to form the time-domain input. and time-frequency domain input It is used in the subsequent self-supervised pre-training stage and the few-label fine-tuning stage.
[0066] This invention reveals that while existing self-supervised learning-based industrial equipment fault diagnosis methods can utilize large amounts of unlabeled operational data for feature learning, reducing reliance on fault labels to some extent, the construction of their pre-training tasks still has room for improvement. One type of method mainly constructs different sample views through manually designed data augmentation operations such as random pruning, signal masking, and amplitude scaling, using the consistency between different augmented views as the self-supervised learning objective. However, the impact components, periodic components, and specific frequency band energy contained in industrial equipment operating signals are usually closely related to the actual fault mechanism. Inappropriate data augmentation may alter the local impact characteristics or spectral distribution in the original signal, causing the model to learn augmentation invariances unrelated to the actual health state of the equipment. Furthermore, the applicable data augmentation methods may differ under different equipment, speeds, and load conditions, increasing the complexity of the pre-training task design. Another type of self-supervised method based on signal reconstruction typically obtains representational capabilities by recovering the masked or disturbed input signal. Its optimization objective leans more towards recovering the input data itself, and the model tends to focus on reconstructing waveform details and local numerical information, while paying insufficient attention to the deep semantic features that can truly distinguish different fault states. Furthermore, the time-domain signal and its corresponding time-frequency domain representation essentially originate from the same device operation process. They describe the device state from the perspectives of transient waveform changes and frequency energy evolution, respectively. However, some existing methods have not fully utilized this naturally existing cross-domain correlation.
[0067] To address the aforementioned issues, this invention does not construct complex data augmentation samples, nor does it prioritize restoring the original input signal as the primary pre-training objective. Instead, it utilizes the time-domain signal of the same sample and its time-frequency domain representation obtained through short-time Fourier transform to form a naturally paired dual-domain input. High-level features are extracted through time-domain and time-frequency domain feature coding networks, respectively. Based on this, a projection head maps the two different coded features to a unified feature space, and a prediction head further performs cross-domain predictions from the time domain to the time-frequency domain and from the time-frequency domain to the time domain. By calculating the cross-domain feature correlation matrices in both directions, high consistency is maintained between time-domain and time-frequency domain features on the same semantic dimension, while suppressing unnecessary correlations between different feature dimensions. Furthermore, by setting a stopping gradient operation in the target branch, optimization instability caused by simultaneous changes in the two branches during mutual prediction can be reduced, preventing the network from tending to learn degenerate representations lacking effective information. Therefore, this embodiment can directly utilize the inherent physical correspondence between the time and time-frequency domains of industrial signals to construct a self-supervised learning task, allowing a large amount of unlabeled operational data to participate in the fault feature learning process without the need for manually defined complex sample augmentation rules.
[0068] Through the aforementioned dual-domain self-supervised interactive pre-training process, the two branches learn the semantic information of health status jointly reflected by both under the constraint of cross-domain correlation. Therefore, compared with methods that only perform feature learning for a single domain or only use the other domain as an auxiliary view, this process can reduce the ineffective redundancy between dual-domain features, strengthen features with consistent fault meanings in different domains, and improve the discriminativeness, stability, and information effectiveness of the features obtained from unlabeled pre-training. The dual-domain feature encoding network trained in this stage can form good basic fault features. When only a small number of labeled samples participate in the supervised training, there is no need to relearn the fault representation from the randomly initialized state. Instead, further category discrimination optimization can be performed on the basis of the already formed basic dual-domain fault feature space. This helps to reduce model overfitting under the condition of few labels, improve the feature separability between different fault states, and provide an effective feature foundation for obtaining higher recognition accuracy and better working condition adaptability for subsequent fault diagnosis. The specific scheme is shown in step 2: Step 2, Design of Dual-Domain Self-Supervised Interactive Pre-training Task: Obtaining time domain input and time-frequency domain input Subsequently, an Inception-ResNet feature encoding network architecture (CBAM-enhanced Inception-ResNet, CeIRNet) based on the CBAM attention mechanism was designed to perform dual-domain feature extraction and encoding, and to project and predict the encoded features for pre-training auxiliary task design.
[0069] Step 2.1: Perform feature encoding using a dual-domain feature encoding network. For time-domain batch input Through the temporal initial feature mapping module Extracting shallow temporal features can be described as... ,in For time-frequency domain batch input Through the time-frequency domain initial feature mapping module Extracting shallow temporal features can be described as ,in During the above transformation process, Indicates batch size. Indicates the number of input channels. This represents the number of feature channels after mapping. This represents the mapped temporal feature dimension. and These represent the frequency dimension and time frame dimension of the mapped time-frequency domain features, respectively. The initial feature mapping module consists of convolution, batch normalization, and nonlinear activation operations. It should be noted that the data dimensions of the time-domain input and the time-frequency domain input are different; the former is a one-dimensional time series structure, while the latter is a two-dimensional time-frequency representation structure. The two branches respectively use one-dimensional or two-dimensional convolution operators that match the input structure, but they maintain the same network design philosophy, both achieving fault-related feature extraction through initial feature mapping, multi-scale feature extraction, channel-space attention feature enhancement, and residual coding.
[0070] Output of the initial feature mapping module and These are respectively used as inputs to the first multi-scale feature extraction unit in the time-domain branch and the time-frequency branch. For the... Multi-scale feature extraction units, with the input features of the temporal branch being... The output features are The time-frequency domain branch input features are: The output features are ,in , This indicates the number of multi-scale feature extraction modules.
[0071] The specific process of the multi-scale feature extraction unit is as follows: First, for the time-domain branch, the first The multi-scale feature extraction module first uses multiple one-dimensional convolutional branches with different receptive fields to perform parallel feature extraction, obtaining temporal multi-scale features:
[0072] For the time-frequency domain, we have:
[0073] in, and The time-domain and time-frequency domain multi-scale feature extraction modules are respectively based on the scale of the time-domain and time-frequency domain multi-scale feature extraction modules. The convolutional feature extraction branch, Represents the set of convolution scales. and These represent the pooling branches in the time domain and the time-frequency domain, respectively. This indicates feature concatenation along the channel dimension. Each convolutional branch can contain channel projection convolutions for feature compression and channel information exchange, reducing the number of parameters and enhancing the fusion between features from different channels.
[0074] Subsequently, the temporal multi-scale features were analyzed. and time-frequency domain multi-scale features Both employ the CBAM attention mechanism for channel-space attention enhancement. For temporal multi-scale features... First, the channel attention weights are calculated. The time-domain branch performs global average pooling and global max pooling along the time dimension, and the time-frequency domain branch performs global average pooling and global max pooling along the frequency dimension and the time frame dimension.
[0075]
[0076] Time-domain and time-frequency domain channel enhancement features are obtained based on channel attention weights. and Furthermore, regarding and Average pooling and max pooling are performed along the channel dimension, and spatial attention weights are generated through convolutional mapping:
[0077]
[0078] Temporal enhancement features are obtained based on spatial attention weights. With time-frequency domain enhancement features .in, This represents the Sigmoid activation function. Indicates a shared multilayer perceptron. , This represents the spatial attention convolution mapping in the CBAM attention mechanism used in the time and frequency domains. This represents element-wise multiplication, where attention weights are matched to the input feature dimensions via a broadcast mechanism.
[0079] Finally, the first The input features of each multi-scale feature extraction unit are residually fused with the attention-enhanced multi-scale features to obtain the output of that coding unit. The temporal branch is as follows:
[0080] The time-frequency domain branch is as follows:
[0081] in, This indicates the batch normalization operation. To modify the activation function of the rectified linear unit. This is achieved through cascading. A multi-scale feature extraction module constitutes a time-domain feature coding network and a time-frequency domain feature coding network.
[0082] Initial feature mapping module and A multi-scale feature extraction module constitutes a temporal feature coding network. Time-frequency domain feature coding network The complete feature extraction processes in the time domain and time-frequency domain are respectively denoted as... , The features obtained in the time domain and time-frequency domain are denoted as follows: and By performing global average pooling (GAP) on each of them, we can obtain fixed-dimensional dual-domain encoded features. and ,in .
[0083] Step 2.2, Dual-Domain Feature Projection and Prediction To map the dual-domain encoded features to a unified self-supervised learning space, projection heads are set after the time-domain encoded features and the time-frequency domain encoded features, respectively. The projection process is represented as follows:
[0084] in, and These represent the time-domain projection head and the time-frequency domain projection head, respectively. , This represents the dimension of the projection space. The projection head is a linear layer containing non-linear activation.
[0085] To achieve cross-domain prediction between the time and time-frequency domains, prediction heads are set after the projection head. The time-domain prediction head generates prediction features to match the time-frequency domain projection representation based on the time-domain projection representation. The prediction process is represented as follows:
[0086] in, and These represent the time-domain projection head and the time-frequency domain projection head, respectively. The prediction head is also a linear layer containing nonlinear activations.
[0087] Step 2.3: Construct a bidirectional cross-domain interactive self-supervised pre-training target. To establish interaction constraints between time-domain features and time-frequency domain features under unlabeled conditions, cross-domain correlation matrices are calculated between the predicted representation and the projected representation in another domain. For any set of predicted representations... and target projection representation Its cross-domain correlation matrix is defined as:
[0088] in, , This represents the L2 norm calculated along the batch dimension for each feature dimension. The matrix represents the... Line 1 Column elements are represented as:
[0089] in, Indicates the first The nth sample in the prediction representation Feature values in each dimension Indicates the first The nth sample in the target projection representation Feature values in each dimension.
[0090] According to the cross-domain correlation matrix Construct a correlation-constrained loss:
[0091] in, Represents the diagonal elements of the correlation matrix. Represents the off-diagonal elements of the correlation matrix. This represents the loss balance coefficient. The first term enhances the consistency of the same feature dimension between the time domain and the time-frequency domain, while the second term suppresses redundant correlations between different feature dimensions.
[0092] In the self-supervised interactive learning process, the time-domain branch and the time-frequency domain branch serve as prediction targets for each other. Specifically, the time-domain prediction representation... With time-frequency domain projection representation Establish correlation constraints and time-frequency domain prediction representation With time-domain projection representation Establish relevance constraints.
[0093] The loss in the time-to-frequency domain direction is:
[0094] The loss from the time-frequency domain to the time domain is:
[0095] in, This indicates stopping gradient operations, used to block gradient backpropagation on the target branch to improve pre-training stability and avoid representation degradation.
[0096] Ultimately, the total loss for the self-supervised pre-training task is:
[0097] On the unlabeled pre-training dataset, by minimizing The dual-domain self-supervised interactive pre-training model is optimized to enable the temporal and time-frequency domain feature encoding networks to learn consistent and non-redundant fault feature representations across domains. After pre-training, the parameters of the temporal and time-frequency domain feature encoding networks are retained and transferred to the subsequent few-label supervised fine-tuning stage. The projection head and prediction head are only used in the self-supervised pre-training stage and do not participate in classification prediction in the downstream fault diagnosis stage.
[0098] Figure 2 The graph shows the change curve of the pre-training loss function during a single training session. In the pre-training phase, the loss function initially decreases rapidly and then gradually stabilizes. The rapid decrease in the initial loss value indicates that the model can effectively learn discriminative basic features from the original data. As training progresses, the rate of loss decrease gradually slows down and is accompanied by slight fluctuations, indicating that the model begins to optimize and adjust in a finer-grained representation space. Overall, the pre-training process converges stably without divergence, providing a good foundation for parameter initialization and features in the subsequent fine-tuning stage.
[0099] After the aforementioned dual-domain self-supervised interactive pre-training, the time-domain feature encoding network and the time-frequency domain feature encoding network can extract high-level features with fault relevance, and establish a certain degree of cross-domain semantic consistency through relevance constraints. However, obtaining only effective features from two domains does not mean that both types of information have been fully utilized. In some existing multi-domain or multi-view fault diagnosis methods, features from different domains are usually extracted independently by their respective encoding networks, and then directly concatenated, summed, or only one type of feature is retained for downstream classification. Although this type of processing can introduce multiple forms of data representation at the same time, it does not further establish the correspondence between local features of different domains, and it is difficult to fully utilize the effective information in one domain to supplement incomplete or easily disturbed features in another domain. Therefore, under the condition of a small number of labeled samples, how to further explore the complementary relationship between the time domain and the time-frequency domain while retaining the local features of both domains is a problem that needs to be solved to improve the performance of downstream diagnosis.
[0100] To address this issue, this invention retains the pre-trained time-domain and time-frequency-domain feature encoding networks during the few-label supervised fine-tuning stage, enabling the pre-trained feature extraction capabilities to be directly transferred to actual fault classification tasks. In this step, high-level feature maps with positional structures at the ends of the encoding networks are retained, and the time-domain and time-frequency-domain features are rearranged into feature sequences suitable for cross-domain interaction, thereby preserving local fault information at different time and frequency locations. Based on this, a bidirectional cross-domain attention mechanism is constructed: on the one hand, using time-domain features as query information and time-frequency-domain features as keys and values, the model can actively retrieve relevant frequency components and energy change information in the time-frequency domain based on the current time-domain fault features, thus enhancing the time-domain representation using time-frequency-domain features; on the other hand, using time-frequency-domain features as queries and time-domain features as keys and values, the model can further search for corresponding impacts or waveform changes in the time series based on abnormal energy distributions in the time-frequency domain, achieving a reverse supplementation of the time-frequency-domain representation by time-domain information. By establishing the aforementioned dependencies simultaneously in different feature subspaces through multi-head attention, we can avoid relying solely on a single correlation pattern for feature fusion, enabling the model to learn the complex correspondence between the time domain and the time-frequency domain under different fault states from multiple perspectives.
[0101] After completing the bidirectional cross-domain feature interaction, this invention does not apply equal weight to features at all locations. Instead, it adaptively determines the importance of different time and time-frequency locations based on the current diagnostic task through a learnable weighted pooling mechanism. This gives greater representation weight to locations related to fault impact, abnormal cycles, and characteristic frequency energy, while reducing the impact of background vibration, noise, and information weakly associated with the current fault category on the final diagnostic result. Subsequently, the time-domain diagnostic features, after cross-domain enhancement and adaptive aggregation, are fused with the time-frequency domain diagnostic features, so that the final features simultaneously contain the cross-domain correlation between the two types of information. Thus, compared to using features from different domains independently or directly splicing them together, this implementation can achieve adaptive interaction of dual-domain information based on sample features, enabling complementary fault information in the time and time-frequency domains to mutually enhance each other, and suppressing redundant or irrelevant information to a certain extent. With a small number of labeled samples participating in fine-tuning, this processing can fully inherit the prior fault features obtained in the unlabeled pre-training stage and further adjust the correlation between cross-domain features using limited class supervision information, thereby forming a more compact intra-class and more easily distinguishable inter-class fused feature representation, enhancing the model's ability to distinguish different fault states. Ultimately, this helps improve the accuracy and stability of fault diagnosis results under conditions with few labels, and enhances the model's robustness and generalization ability when faced with changes in operating conditions such as load and speed. Specifically, see step 3: Step 3: Two-way cross-domain feature interaction and fusion: After completing the dual-domain self-supervised interactive pre-training, the temporal feature encoding network is retained. Time-frequency domain feature coding network The parameters are used as the basis for feature extraction in the few-label supervised fine-tuning stage. Through cross-domain correlation constraints in the pre-training stage, the two feature encoding networks have initially learned fault representations in the time and time-frequency domains from unlabeled data. In the few-label supervised fine-tuning stage, the projection head and prediction head are no longer used. Instead, the pre-trained dual-domain feature encoding network is used to learn more discriminative feature representations by combining a small amount of labeled data. Furthermore, feature interaction and fusion are achieved through a bidirectional cross-domain attention mechanism to enhance fault diagnosis performance under few-label conditions.
[0102] Step 3.1: Obtain and rearrange the dual-domain features For training samples with few labels, construct the time-domain input. and the corresponding time-frequency domain input The two are then input into the pre-trained time-domain feature encoding network and time-frequency domain feature encoding network, respectively, to obtain dual-domain high-level features. and In batch mode , , Indicates batch size. Indicates the number of feature channels. Indicates the encoded time dimension. and These represent the frequency dimension and time frame dimension after encoding, respectively. During the self-supervised pre-training phase, global average pooling is used to obtain a fixed-dimensional encoded representation. In the few-label supervised fine-tuning phase, to preserve local fault information at both the time and time-frequency positions, the high-level feature maps output from the end of the encoding network are retained and rearranged. and ,in , .
[0103] Step 3.2: Construct a dual-domain cross-domain attention feature interaction and fusion module. To establish the cross-domain dependency between time-domain features and time-frequency domain features, respectively... and A linear mapping is performed to obtain the query matrix, key matrix, and value matrix. To enhance the model's ability to express cross-domain dependencies in different feature subspaces, a multi-head attention mechanism is employed for cross-domain interaction. Let the number of attention heads be . The feature dimension of each attention head is ,in, This indicates the number of input feature channels.
[0104] For the For each attention head, the query, key, and value representation of time-domain and time-frequency domain features is as follows:
[0105] in, ; , , , , , For the first Each attention head corresponds to a learnable linear mapping parameter.
[0106] Subsequently, a bidirectional cross-domain attention interaction mechanism is constructed. Using time-domain features as queries and time-frequency domain features as keys and values, the complementary relationship between time-frequency domain information and time-domain features is calculated. The cross-domain attention weights for each attention head are:
[0107] No. The temporal cross-domain enhancement features corresponding to each attention head are:
[0108] Will The outputs of each attention head are concatenated and linearly mapped to obtain the time-domain interaction features enhanced with time-frequency domain information:
[0109] in, The output mapping parameters represent the time-domain direction. .
[0110] Similarly, for the time-frequency domain enhancement direction, using time-frequency domain features as the query and time-domain features as the key and value, the th... The cross-domain attention weights for each attention head are:
[0111] The corresponding time-frequency domain cross-domain enhancement features are:
[0112] Will The outputs of each attention head are concatenated and linearly mapped to obtain the time-frequency domain interaction features enhanced with time-domain information:
[0113] in, The output mapping parameters represent the time-frequency domain direction. .
[0114] Through the aforementioned bidirectional cross-domain attention interaction, time-domain features can absorb time-frequency domain feature information from multiple feature subspaces, and time-frequency domain features can absorb time-domain feature information from multiple feature subspaces, thereby enhancing the complementary expressive ability between the two domain features.
[0115] Furthermore, the interacting features are converted into fixed-length features for final diagnosis, including the temporal interactive features. Interaction features in the time and frequency domains Weighted pooling is performed separately. For temporal interaction features, the positional weights are expressed as follows:
[0116] in, and For learnable parameters in time-domain weighted pooling, .
[0117] According to weight The temporal interactive features are weighted and summed to obtain the temporal diagnostic features. ,in .
[0118] Similarly, the position weights are calculated for the time-frequency domain interaction features:
[0119] in, and For learnable parameters in time-frequency domain weighted pooling, 0 According to weight We obtain the time-frequency domain diagnostic features by weighted summation of the time-frequency domain interaction features. ,in Finally, the time-domain diagnostic features and the time-frequency domain diagnostic features are fused to obtain dual-domain fused diagnostic features. , This fusion feature is used for subsequent fault state classification.
[0120] During fine-tuning, the training loss and training set accuracy fluctuated to some extent, while the validation set performance converged rapidly and maintained stable high accuracy. This phenomenon mainly stems from the high variance gradient estimation caused by small batches of data in the few-label scenario, leading to some instability during the training phase. However, despite the fluctuations in the training curve, the validation accuracy reached and remained at a high level within a very short number of iterations, while the validation loss continued to decrease. This indicates that the model can fully utilize the prior knowledge acquired during the pre-training phase and quickly learn feature representations with good discriminative power through fine-tuning strategies, achieving rapid adaptation and efficient generalization to the target task. Therefore, the local fluctuations during training did not affect the overall performance; on the contrary, they indirectly demonstrated the robustness and superiority of the method under few-sample conditions.
[0121] Step 4, Fault Diagnosis: In obtaining dual-domain fusion diagnostic features Next, a fault classifier is constructed to identify the operating status of industrial equipment. The fused features are input into the classifier to obtain the predicted probability of the fault category:
[0122] in, and This represents the learnable parameters in the classifier. , Indicates the number of fault categories. Indicates the first The sample belongs to the first Predicted probability of fault states.
[0123] For a small number of labeled samples, the cross-entropy loss function is used for supervised fine-tuning:
[0124] in, Indicates the first The true label of the sample in the first... Values on the class. By minimizing The temporal feature coding network, the time-frequency feature coding network, the bidirectional cross-domain attention interaction module, the weighted pooling module, and the classifier are jointly fine-tuned.
[0125] Ultimately, the fault diagnosis result is determined by the category corresponding to the highest predicted probability:
[0126] in, Indicates the first The fault diagnosis category of each sample. Through the above-described fault diagnosis process with few labels, this invention can fully utilize the dual-domain feature representation obtained by self-supervised pre-training under the condition of a small number of labeled samples, and enhance the complementary relationship between the time domain and the time-frequency domain through bidirectional cross-domain feature interaction, thereby improving the accuracy and generalization ability of fault diagnosis.
[0127] To illustrate the performance of the method proposed in this invention, five methods were selected for comparative experiments. The five comparative methods include: 1. Paper Proc. Adv. Neural Inf. Process. Syst. (NeurIPS) The method proposed in 2022 is abbreviated as TFC; 2. Paper Y. Liu, W. Wen, Y. Bai, and Q. Meng, “Self-supervised featureextraction via time-frequency contrast for intelligent fault diagnosis ofrotating machinery,” Measurement The method proposed in , vol. 210, Mar. 2023, Art. no. 112551, is abbreviated as CLFT; 3. Paper W. Wan, J. Chen, Z. Zhou, and Z. Shi, “Self-Supervised SimpleSiamese Framework for Fault Diagnosis of Rotating Machinery With UnlabeledSamples,” IEEE Trans. Neural Networks Learn. Syst. The method proposed in , vol. 35, no. 5, pp. 6380--6392, May. 2024, is abbreviated as SSF; 4. Paper L. Cheng, R. Wang, H. Qi, X. Kong, J. Zhang, and M. Yu, “S3M: Two-Stage-Based Semi-Self-Supervised Method for Intelligent Bearing FaultDiagnosis,” IEEE Trans. Instrum. Meas. The method proposed in , vol. 72, Aug. 2023, Art. no. 3527115. is abbreviated as S3M; 5. Paper X. Chen, R. Yang, Y. Xue, B. Song, and Z. Wang, “TFPred: Learning discriminative representations from unlabeled data for few-labelrotating machinery fault diagnosis,” Control Eng. Pract. The method proposed in , vol. 146, May. 2024, Art. no. 105900, is abbreviated as TFPred.
[0128] First, the performance of the methods in this invention was compared under the same working conditions. Experiments were conducted using three loads (1 hp, 2 hp, and 3 hp) from the CWRU dataset to simulate a scenario of scarce labeled data. The amount of labeled data for each health condition was set to 1, 3, and 5, respectively. Table 2 shows the fault diagnosis accuracy of different methods under a single working condition with scarce labeled data. The best-performing method for each load and amount of labeled data is highlighted in bold.
[0129] Table 2. Fault diagnosis accuracy of annotated sparse scenarios under a single working condition in the CWRU dataset.
[0130] As shown in Table 2, the proposed method exhibits optimal performance in most scenarios, demonstrating its effectiveness and superiority. To further illustrate the method's feature extraction capability, the features used by different methods for final fault diagnosis are visualized and analyzed using t-Distributed Stochastic Neighbor Embedding (t-SNE). Taking different operating conditions with a load of 1 horsepower as an example, the visualization results are as follows: Figure 4 As shown. Compared with other methods, the feature clusters of the proposed method have the characteristics of compact intra-class distance and clear inter-class boundaries, demonstrating the robustness of the method in feature extraction.
[0131] To further compare the fault diagnosis performance of different methods under varying operating conditions, six variable operating conditions were designed for comparative experiments. The amount of labeled data for each variable operating condition was set to 1, 3, and 5 to simulate the problem of scarce labeled data. Table 3 shows the fault diagnosis accuracy of different methods under a single operating condition with scarce labeled data. The best performing method for each variable operating condition and the amount of labeled data is marked in bold. In the table, A→B indicates that pre-training was performed using unlabeled data under load A horsepower, fine-tuning was performed using a small amount of labeled data under load B horsepower, and finally, performance testing was conducted under load B horsepower.
[0132] As shown in Table 3, the proposed method exhibits optimal performance in most scenarios, demonstrating its robustness and adaptability when operating conditions change, and verifying its application potential in complex operating conditions.
[0133] Table 3. Fault diagnosis accuracy of scarce scenarios labeled in the CWRU dataset under varying operating conditions.
[0134] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement a method for fault diagnosis of industrial equipment based on self-supervised interactive learning.
[0135] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement a method for fault diagnosis of industrial equipment with few labels based on self-supervised interactive learning.
[0136] The above description is merely a preferred embodiment of a fault diagnosis method for few-label industrial equipment based on self-supervised interactive learning. The scope of protection for this method is not limited to the above embodiments; all technical solutions falling within this framework are within the scope of protection of this invention. It should be noted that for those skilled in the art, any improvements and variations made without departing from the principles of this invention should also be considered within the scope of protection of this invention.
Claims
1. A method for fault diagnosis of industrial equipment with few labels based on self-supervised interactive learning, characterized by: The method includes the following steps: Step 1: Collect the status monitoring signals that appear in the form of time series during the operation of industrial equipment, divide and standardize the data by sliding window, and generate the corresponding time-frequency domain transformation based on short-time Fourier transform to form time-frequency domain input pairs for subsequent unsupervised pre-training and supervised fine-tuning; Step 2: Self-supervised pre-training based on feature interaction: extract features from the time domain and time-frequency domain representations of the signal, and perform feature projection and prediction. Based on the projected and predicted features, construct a pre-training task based on feature correlation to achieve preliminary extraction of fault features without the need for labels. Step 3: Supervised fine-tuning based on bidirectional cross-domain attention mechanism, the bidirectional feature extractor initially trained in the pre-training stage is transferred to the downstream task, and the bidirectional cross-domain attention mechanism is used to interact the bidirectional features, and feature fusion is performed in conjunction with the adaptive pooling strategy. Step 4: After obtaining the dual-domain fusion diagnostic features, construct a fault classifier to identify the operating status of industrial equipment. Input the fusion features into the classifier to obtain the predicted probability of the fault category.
2. The method according to claim 1, characterized in that: Step 1 specifically involves: For industrial equipment operating signals, a sliding window method is used for sample segmentation, with a window length of [value missing]. The sliding step size is , No. Each time-domain sample is represented by the following formula: in, This indicates the acquired equipment status monitoring signal. Indicates the number of input channels. Indicates the length of a continuous signal. ; The segmented time-domain samples are standardized, and a short-time Fourier transform is performed on the time-domain samples to obtain the corresponding time-frequency domain, which is expressed by the following formula: in, Represents the window function. Indicates the position of the time window. Indicates frequency index, Indicates an imaginary singular number; The amplitude is taken as the input in the time-frequency domain, that is... ,in , Represents the frequency dimension. Indicates the time frame dimension; The time-domain samples and their corresponding time-frequency domain representations are used to construct paired samples in two domains: Obtain the unlabeled pre-trained dataset: Few-label downstream training dataset: in, Indicates the fault category label, Indicates the number of unlabeled samples. This indicates the number of labeled samples.
3. The method according to claim 2, characterized in that: During training, a batch of samples is selected from the dataset to form the time-domain input. and time-frequency domain input It is used in the subsequent self-supervised pre-training stage and the few-label fine-tuning stage.
4. The method according to claim 3, characterized in that: Step 2 specifically involves: Step 2.1: For batch input in the time domain Through the temporal initial feature mapping module Extracting shallow temporal features, described as follows: in, For time-frequency domain batch input Through the time-frequency domain initial feature mapping module Extracting shallow temporal features, described as follows: in, , Indicates batch size. Indicates the number of input channels. This represents the number of feature channels after mapping. This represents the mapped temporal feature dimension. and These represent the frequency dimension and time frame dimension of the mapped time-frequency domain features, respectively. Output of the initial feature mapping module and These are respectively used as inputs to the first multi-scale feature extraction unit in the time-domain branch and the time-frequency branch, for the... Multi-scale feature extraction units, with the input features of the temporal branch being... The output features are The time-frequency domain branch input features are: The output features are ,in , Indicates the number of multi-scale feature extraction modules; Step 2.2: Set up projection heads after the time-domain coded features and the time-frequency domain coded features respectively. The projection process is represented as follows: in, and These represent the time-domain projection head and the time-frequency domain projection head, respectively. , This indicates the dimension of the projection space, and the projection head is a linear layer containing non-linear activation; To achieve cross-domain prediction between the time domain and the time-frequency domain, prediction heads are set after the projection head. The time-domain prediction head generates prediction features to match the time-frequency domain projection representation based on the time-domain projection representation. The prediction process is represented as follows: in, and These represent the time-domain projection head and the time-frequency domain projection head, respectively. The prediction head is also a linear layer containing nonlinear activation; Step 2.3: Construct a bidirectional cross-domain interactive self-supervised pre-training objective. To establish interaction constraints between time-domain features and time-frequency domain features under unlabeled conditions, calculate the cross-domain correlation matrix between the predicted representation and the projection representation of the other domain. For any set of predicted representations... and target projection representation Its cross-domain correlation matrix is defined as: in, , This represents the L2 norm calculated along the batch dimension for each feature dimension, where the L2 norm in the matrix is the least significant factor. Line number Column elements are represented as: in, Indicates the first The nth sample in the prediction representation Feature values in each dimension Indicates the first The nth sample in the target projection representation Feature values in each dimension; According to the cross-domain correlation matrix Construct a correlation-constrained loss: in, Represents the diagonal elements of the correlation matrix. Represents the off-diagonal elements of the correlation matrix. The loss balance coefficient is shown. The first term is used to enhance the consistency of the same feature dimension between the time domain and the time-frequency domain, and the second term is used to suppress redundant correlations between different feature dimensions. Time-domain prediction representation With time-frequency domain projection representation Establish correlation constraints and time-frequency domain prediction representation With time-domain projection representation Establish relevance constraints; The loss in the time-to-frequency domain direction is: The loss from the time-frequency domain to the time domain is: in, This indicates stopping gradient operations, used to block gradient backpropagation on the target branch to improve pre-training stability and avoid representation degradation; The total loss of the self-supervised pre-training task is: On the unlabeled pre-training dataset, by minimizing The dual-domain self-supervised interactive pre-training model is optimized so that the temporal feature encoding network and the time-frequency domain feature encoding network learn cross-domain consistent and non-redundant fault feature representations. After pre-training, the parameters of the temporal feature encoding network and the time-frequency domain feature encoding network are retained and transferred to the subsequent few-label supervised fine-tuning stage. The projection head and prediction head are only used in the self-supervised pre-training stage and do not participate in classification prediction in the downstream fault diagnosis stage.
5. The method according to claim 4, characterized in that: Step 2.1 further includes: For the time-domain branch, the first The multi-scale feature extraction module uses multiple one-dimensional convolutional branches with different receptive fields to perform parallel feature extraction, obtaining temporal multi-scale features: For the time-frequency domain, we have: in, and The time-domain and time-frequency domain multi-scale feature extraction modules are respectively based on the scale of the time-domain and time-frequency domain multi-scale feature extraction modules. The convolutional feature extraction branch, Represents the set of convolution scales. and These represent the pooling branches in the time domain and the time-frequency domain, respectively. This indicates feature concatenation along the channel dimension; Multi-scale features in the time domain and time-frequency domain multi-scale features Both employ the CBAM attention mechanism for channel-space attention enhancement, addressing multi-scale temporal features. The channel attention weights are calculated, and the time-domain branch performs global average pooling and global max pooling along the time dimension, while the time-frequency domain branch performs global average pooling and global max pooling along the frequency and time frame dimensions. Time-domain and time-frequency domain channel enhancement features are obtained based on channel attention weights. and ,right and Average pooling and max pooling are performed along the channel dimension, and spatial attention weights are generated through convolutional mapping: Temporal enhancement features are obtained based on spatial attention weights. With time-frequency domain enhancement features ,in, This represents the Sigmoid activation function. Indicates a shared multilayer perceptron. , This represents the spatial attention convolution mapping in the CBAM attention mechanism used in the time and frequency domains. This represents element-wise multiplication, where attention weights are matched to the input feature dimensions via a broadcasting mechanism. The first The input features of each multi-scale feature extraction unit are residually fused with the attention-enhanced multi-scale features to obtain the output of the coding unit. The temporal branch is as follows: The time-frequency domain branch is as follows: in, This indicates a batch normalization operation. To correct the activation function of the linear unit, cascading is used. A multi-scale feature extraction module constitutes a time-domain feature coding network and a time-frequency domain feature coding network; Initial feature mapping module and A multi-scale feature extraction module constitutes a temporal feature coding network. Time-frequency domain feature coding network The complete feature extraction processes in the time domain and time-frequency domain are respectively denoted as , The features obtained in the time domain and time-frequency domain are denoted as follows: and Global average pooling is then performed on each feature to obtain fixed-dimensional dual-domain encoded features. and ,in .
6. The method according to claim 5, characterized in that: Step 3 specifically involves: Step 3.1: Obtain and rearrange the dual-domain features. For training samples with few labels, construct the time-domain input. and the corresponding time-frequency domain input The two are then input into the pre-trained time-domain feature encoding network and time-frequency domain feature encoding network, respectively, to obtain dual-domain high-level features. and In batch mode , , Indicates batch size. Indicates the number of feature channels. Indicates the time dimension after encoding. and These represent the frequency dimension and time frame dimension after encoding, respectively; In the few-label supervised fine-tuning stage, to preserve local fault information at temporal and time-frequency locations, the high-level feature maps output from the end of the encoding network are retained and rearranged into... and ,in , ; Step 3.2: Construct a dual-domain cross-domain attention feature interaction and fusion module, respectively for... and A linear mapping is performed to obtain the query matrix, key matrix, and value matrix. A multi-head attention mechanism is used for cross-domain interaction, with the number of attention heads set to 1. The feature dimension of each attention head is ,in, Indicates the number of input feature channels; For the For each attention head, the query, key, and value representation of time-domain and time-frequency domain features is as follows: in, ; , , , , , For the first Each attention head corresponds to a learnable linear mapping parameter; A bidirectional cross-domain attention interaction mechanism is constructed, using time-domain features as queries and time-frequency domain features as keys and values. The complementary relationship between time-frequency domain information and time-domain features is calculated. The cross-domain attention weights for each attention head are: No. The temporal cross-domain enhancement features corresponding to each attention head are: Will The outputs of each attention head are concatenated and linearly mapped to obtain the time-domain interaction features enhanced with time-frequency domain information: in, The output mapping parameters represent the time-domain direction. ; For the time-frequency domain enhancement direction, using time-frequency domain features as the query and time-domain features as the key and value, the first... The cross-domain attention weights for each attention head are: The corresponding time-frequency domain cross-domain enhancement features are: Will The outputs of each attention head are concatenated and linearly mapped to obtain the time-frequency domain interaction features enhanced with time-domain information: in, The output mapping parameters represent the time-frequency domain direction. .
7. The method according to claim 6, characterized in that: The interactive features are converted into fixed-length features for final diagnosis, including time-domain interactive features. Interaction features in the time and frequency domains Weighted pooling is performed separately. For temporal interaction features, the positional weights are expressed as follows: in, and For learnable parameters in time-domain weighted pooling, ; According to weight The temporal interactive features are weighted and summed to obtain the temporal diagnostic features. ,in ; Calculate position weights for time-frequency domain interaction features: in, and For learnable parameters in time-frequency domain weighted pooling, ; According to weight We obtain the time-frequency domain diagnostic features by weighted summation of the time-frequency domain interaction features. ,in ; By fusing time-domain diagnostic features and time-frequency domain diagnostic features, a dual-domain fused diagnostic feature is obtained. , .
8. The method according to claim 7, characterized in that: In obtaining dual-domain fusion diagnostic features Then, a fault classifier is constructed to identify the operating status of industrial equipment. The fused features are input into the classifier to obtain the predicted probability of the fault category: in, and This represents the learnable parameters in the classifier. , Indicates the number of fault categories. Indicates the first The sample belongs to the first Predicted probability of fault states; For a small number of labeled samples, the cross-entropy loss function is used for supervised fine-tuning: in, Indicates the first The true label of the sample in the first... Values on a class are minimized. The temporal feature coding network, the time-frequency feature coding network, the bidirectional cross-domain attention interaction module, the weighted pooling module, and the classifier are jointly fine-tuned. The fault diagnosis result is determined by the category corresponding to the maximum predicted probability: in, Indicates the first By using the above-described fault diagnosis process with few labeled samples, this invention can fully utilize the dual-domain feature representation obtained through self-supervised pre-training under the condition of a small number of labeled samples, and enhance the complementary relationship between the time domain and the time-frequency domain through bidirectional cross-domain feature interaction, thereby improving the accuracy and generalization ability of fault diagnosis.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the method as claimed in any one of claims 1-8.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the method of any one of claims 1-8.