Equipment small sample incremental fault diagnosis method based on LNN and self-supervised learning

By using the Liquid-LTransformer backbone network and self-supervised learning methods, the challenge of incremental fault diagnosis in aerospace equipment with small sample sizes was solved. This enabled rapid adaptation to new fault categories and stable identification of old fault categories, thereby improving the accuracy and scalability of fault diagnosis.

CN121145003APending Publication Date: 2025-12-16ROCKET FORCE UNIV OF ENG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511207595.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-27
Publication Date
2025-12-16

AI Technical Summary

Technical Problem

In aerospace equipment, components such as electric servo mechanisms exhibit new failure modes under complex and ever-changing service conditions. Vibration signals show strong non-stationary characteristics, and the early labeled samples of the failure are limited. Existing deep learning models are difficult to adapt to cross-condition feature changes and are prone to catastrophic forgetting, resulting in a decline in recognition performance.

Method used

A Liquid-LTransformer backbone network combined with self-supervised learning is adopted. Pseudo-labels are generated through SimCLR. Vibration signal features are extracted by continuous-time modeling of LNN and self-attention mechanism of LTransformer. Attention weighting and prototype distillation strategies are used to maintain the recognition ability of old categories in incremental learning and quickly adapt to new fault categories.

Benefits of technology

It enables rapid identification of new fault categories and stable maintenance of old fault categories under complex operating conditions, improving the accuracy of fault diagnosis and the scalability of the model, and is suitable for resource-constrained embedded fault diagnosis devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121145003A_ABST
    Figure CN121145003A_ABST
Patent Text Reader

Abstract

An equipment small sample incremental fault diagnosis method based on LNN and self-supervised learning belongs to the technical field of aerospace equipment fault diagnosis, constructs a backbone network through combination of a liquid neural network and a lightweight Transform, captures local time sequence features of non-stationary vibration signals by using a learnable time constant of the LNN, and performs fault diagnosis on the non-stationary vibration signals. And a global dependency feature is extracted through a self-attention mechanism of a Transform. Then introducing a self-supervision pseudo-label generation strategy based on SimCLR, generating pseudo-labels for a small amount of unmarked data in the incremental diagnosis task, and jointly training a backbone network with marked samples; a backbone network is frozen in an incremental diagnosis task, and a new fault can be quickly adapted without old data based on a prototype distillation strategy combining attention weighting and distillation optimization. The method is suitable for cross-working-condition scenes with scarce newly added fault category data annotations, the accuracy of new and old fault recognition of the servo mechanism can be remarkably improved, and the model storage and maintenance cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of aerospace equipment fault diagnosis, and particularly relates to an equipment small sample incremental fault diagnosis method based on LNN and self-supervised learning. BACKGROUND

[0002] As the core execution unit in aerospace equipment, components such as electric servo mechanisms are widely used in key links such as attitude control and thrust vector adjustment of aerospace equipment, and their operation reliability is directly related to the performance and safety of the whole machine. Under complex and variable service conditions, new fault modes often occur, and the corresponding vibration signals show strong non-stationary characteristics. At the same time, the labeled samples that can be obtained in the early stage of fault are very limited, which makes fault diagnosis face the double challenges of "small sample-incremental class". Therefore, how to effectively extract the features of non-stationary vibration signals under the condition of only a small amount of labeled data, and at the same time ensure the recognition accuracy of new and old fault classes in the subsequent incremental process, has become a key problem to be solved at present.

[0003] In recent years, intelligent fault diagnosis methods based on deep learning have made significant progress, and the good feature extraction and generalization ability of deep models have made them widely used in mechanical equipment fault diagnosis. However, in the scene of small sample incremental learning, the traditional deep learning model still has the following outstanding limitations: first, the commonly used convolutional neural network or recurrent neural network has insufficient dynamic representation ability for the above-mentioned strong non-stationary vibration sequence, and it is difficult to adapt to the feature changes across working conditions; second, when a new fault class is introduced, the model is prone to catastrophic forgetting, which leads to a serious decline in the recognition performance of the learned faults. In view of these problems, researchers have proposed incremental learning strategies such as data playback, regularization constraints, and prototype networks to alleviate the forgetting phenomenon. For example, by mixing some old class data playback or applying knowledge distillation constraints when training new classes, the old knowledge can be maintained to a certain extent. However, this method also has some shortcomings in practical application: as the number of incremental diagnosis tasks increases, saving old data will bring storage and privacy problems, and the imbalance between the number of old and new classes will make the model biased towards the class with more samples, and even the method of using generative adversarial networks to synthesize old data does not work well in engineering.

[0004] Some existing researches on small sample incremental fault diagnosis combine small sample learning, semi-supervised learning and incremental learning to a certain extent, which improves the adaptability of the model to new classes and achieves good results in bearing, gearbox, motor and other fault diagnosis. However, there are still some shortcomings in the complex service scenarios such as cross-load and cross-speed of aerospace equipment: the time sequence dynamic characteristics of non-stationary vibration signals are not fully mined, the suppression ability of old class forgetting is limited, and the reasoning calculation amount of the model is high when the new class is connected. SUMMARY

[0005] This invention aims to solve the above-mentioned problems and provide a small-sample incremental fault diagnosis method for aerospace equipment based on LNN and self-supervised learning, which can effectively cope with the continuous emergence of new faults in aerospace equipment during long-term operation.

[0006] In a first aspect, the present invention provides a method for small-sample incremental fault diagnosis of equipment based on LNN and self-supervised learning, comprising the following steps: Step 1: Data Acquisition and Classification; Acquire one-dimensional vibration signal data during equipment operation, and deploy sensors on the target component to collect high-frequency vibration signals; Perform preliminary labeling and classification of the collected high-frequency vibration signals according to fault type to construct a basic diagnostic task dataset and multiple incremental diagnostic task datasets; The basic diagnostic task dataset contains labeled samples of historical fault types; The incremental diagnostic task dataset corresponds to the new fault type of each incremental diagnostic task, and contains a small number of labeled samples and some unlabeled samples of the new type.

[0007] Step 2: Self-supervised pseudo-label generation based on SimCLR; In the basic diagnostic task stage, self-supervised contrastive learning is performed on unlabeled samples from future incremental diagnostic tasks. The unlabeled sample data is input into the SimCLR contrastive learning framework, and two different views of the same signal are generated through random data augmentation. Low-dimensional feature representations are extracted through a projection head network. The similarity between positive and negative sample pairs is calculated using normalized temperature parameters to scale cross-entropy to train feature representations, where the loss function is defined as: Where, sim(z) i ,z j ) represents the eigenvector z i With z j The cosine similarity, where τ is the temperature parameter, and z i and z j The projection features of two views obtained by augmenting the same unlabeled sample data. The denominator terms traverse the enhanced view of all samples in the current batch except for i; Robust feature representations of unlabeled samples are obtained through the above comparative learning, and the nearest neighbor clustering method based on cosine similarity threshold is used to classify unlabeled samples with similar features into one class, generating corresponding pseudo-labels for the unlabeled data.

[0008] Step 3, backbone network pre-training: The labeled samples of the basic diagnostic task in Step 1 and the unlabeled data samples generated by pseudo-labels in Step 2 are merged as the expanded training set to train the Liquid-LTransformer backbone network and establish an initial classifier, thus realizing the pre-training of the model. The Liquid-LTransformer backbone network is composed of a liquid neural network (LNN) and a lightweight Transformer in series, for jointly extracting local and global time sequence features of the vibration signal. The LNN models the input sequence in continuous time through a differential equation, and the evolution of its hidden state with time t satisfies the following relationship: where h t represents the hidden state of the LNN at time t, x t is the current input signal, W h and W x are weight matrices, b is a bias term, σ is a nonlinear activation function, and τ is a learnable time constant for controlling the speed of state update; by discretizing the above equation, the iterative update form of the LNN can be obtained as follows: where Δt is the discrete time step, and the learnable time constant of the LNN enables it to dynamically adjust the evolution speed of the hidden state according to the input changes, thereby effectively capturing the short-term transient features and time-dependent relationships in the vibration signal; the LTransformer in the backbone network follows the LNN and is used to model the global dependence of the time sequence features output by the LNN; the LTransformer adopts a multi-head self-attention mechanism, and its core calculation is as follows: where Q = φ(x)W q , K = φ(x i )W k , V = φ(x i )W v , φ(x) represents the feature representation of the input sequence extracted by the LNN, W q , W k , and W v are learnable projection matrices, and d k is a scaling factor; The LTransformer adopts a double-head self-attention mechanism, which obtains the feature correlation in different subspaces through parallel computation of two attention heads, concatenates the attention outputs of each head, inputs them into a feedforward network, and adds a residual connection to obtain the final output: Y = FFN(Concat(Attention1, Attention2,...)) + X (5) Where Concat denotes concatenating the outputs of the two-head attention, FFN is the feed-forward network, X is the input signal, and ensures the stability of information flow; through the pre-training of the Liquid-LTransformer backbone network, the model can simultaneously learn the local dynamic patterns and cross-period global features of the vibration signal, obtaining an initial feature extractor and classifier for fault classification.

[0009] Step four, incremental fault class access; in the incremental learning stage, for each incremental diagnosis task, only a small number of labeled samples and optional unlabeled samples of the new fault class in this stage are provided; for the new fault class in the current incremental stage, the prototype vector of the class is extracted from a small number of samples of the class through attention weighting; specifically, a trainable attention module is used to calculate the attention weight of each new class sample feature vector x i An attention weight a is assigned i : a i = softmax(W a x i +b a ) (6) Where W a and b a are learnable parameters for attention weight calculation; then the weighted feature vector x i ′= a i · x i is obtained by weighting each sample feature; the initial prototype vector p c of the class is obtained by averaging the weighted features of the n c new class samples: Where N c is the number of new class samples; next, the prototype p c is optimized using the prototype distillation strategy to improve its representation ability for the new class and maintain compatibility with the feature space of the old class; the prototype distillation is realized through knowledge distillation regularization, that is, a loss function is constructed: Where C old denotes the existing old class set, is the prototype of the old class c′ before the start of the incremental stage (i.e., the classifier weight of the last incremental session), is the current optimized prototype of the old class; The model retains the memory of the characteristics of the old class by minimizing the distribution difference between the new and old prototypes, thereby reducing the performance degradation caused by the prototype shift of the old class due to the addition of the new class in the incremental learning. In actual optimization, the above distillation regular term and the classification loss of the new class sample are used to act on the classifier parameters, and only a single small gradient update is performed to complete the refinement adjustment of the new class prototype and the update of the classifier.

[0010] In this process, the backbone network parameters remain frozen, and only the weights in the classifier are adjusted: the classification weights of the old class are frozen or strongly constrained to maintain their stability, and the weights of the added new class are adjusted by the optimized prototype vector p c are directly replaced or adjusted; through the above steps, the model quickly accepts new fault classes in the incremental diagnosis task while the decision boundary of the old classes remains basically unchanged, thereby avoiding catastrophic forgetting.

[0011] Step five: cyclic expansion; repeat step four, introduce new fault classes in subsequent incremental diagnosis tasks, update the classifier according to the attention weighted prototype extraction and prototype distillation optimization strategy, and continuously expand the range of fault classes that the fault diagnosis model can recognize; after each incremental update, the classification performance of the model on all learned fault classes is evaluated to measure the balance between the model's ability to retain old faults and its ability to adapt to new faults. Through multiple incremental iterations, the method of the present application can realize the continuous expansion of fault type recognition under cross-condition conditions, and significantly improve the diagnosis ability of equipment facing new faults in the long-term service process.

[0012] Further, the equipment small sample incremental fault diagnosis method based on LNN and self-supervised learning provided by the present application, the LNN in the Liquid-LTransformer backbone network uses a continuous time dynamic equation to model the vibration signal, specifically including: The update of the hidden state satisfies: The dynamic speed of the control hidden state update; through Euler discrete approximation, the discrete time hidden state iteration formula is obtained: So that the LNN can simulate the continuous evolution of non-stationary vibration signals and extract long-term time series dependent features.

[0013] Further, the equipment small sample incremental fault diagnosis method based on LNN and self-supervised learning provided by the present application, the LTransformer in the Liquid-LTransformer backbone network uses a multi-head self-attention mechanism to extract global features, including, the attention calculation formula is: Wherein, Q, K, V are respectively query vector, key vector and value vector obtained by projecting input features through a learnable matrix; Q = φ (x) W q , K = φ (x i ) W k , V = φ (x i ) W v , φ (x) represents the feature representation of the input sequence extracted by LNN, W q , W k , W v are learnable projection matrices, d k is a scaling factor; the LTransformer uses double-head self-attention and combines feedforward networks and residual connections to improve feature expression capability; by reducing the number of attention heads and model parameters, the LTransformer simplifies the computational overhead and is suitable for deployment in resource-constrained embedded fault diagnosis devices, while using the self-attention mechanism to enhance the robustness of features under different working conditions.

[0014] The equipment small sample incremental fault diagnosis method based on LNN and self-supervised learning provided by the application comprises the following steps: By applying random enhancement including time offset, noise addition, etc. to unlabeled samples to generate two different but related views, and using a projection head comprising at least one fully connected network to map the high-dimensional features corresponding to the views to a low-dimensional space, paired projection features are obtained; the NT-Xent contrastive loss optimizes the parameters of the feature extraction network by shortening the feature distance of the same sample enhancement views and lengthening the feature distance between different samples; when the cosine similarity sim (z i , z j ) is larger and the temperature τ is appropriate, the two views of the same sample are closer in the feature space, thereby improving the discrimination ability of the model for unlabeled fault data; using the projection features of a plurality of unlabeled samples, nearest neighbor clustering is performed using a predetermined cosine similarity threshold: when the similarity between the features of two unlabeled samples is higher than the threshold, they are regarded as the same potential fault type and are assigned the same pseudo-label, until all unlabeled samples are traversed; through the above pseudo-label generation strategy, the representation information of new fault categories can be introduced in advance for the subsequent incremental learning stage without increasing the cost of manual labeling.

[0015] Further, the attention weighting strategy in step four of the equipment small sample incremental fault diagnosis method based on LNN and self-supervised learning provided by the application comprises: when calculating the class prototype vector of the new fault category introduced each time incremental learning, a weight coefficient α i, the weight is determined by the correlation of the sample feature with other samples, and is normalized by the following Softmax function; wherein z i is the i-th component of the sample feature; e is the base of natural logarithm; n is the number of all sample features; is the sum of all feature exponents, used to normalize all weights.

[0016] The initial prototype p c is obtained by weighted sum of the sample features based on the obtained weights. The new class prototype obtained in this way can highlight the features that are most important for distinguishing the fault class, and improve the representativeness of the feature expression within the class even with a small number of samples.

[0017] Further, the prototype distillation optimization strategy in step five of the equipment small sample incremental fault diagnosis method based on LNN and self-supervised learning includes: refining the new class prototype and stabilizing the old class decision boundary by adding a regularization loss about the old class prototype in the incremental diagnosis task, and the loss function includes two parts of the classification loss of the new class and the stability loss of the old class prototype; the stability loss of the old class prototype is defined as the difference degree between the new and old prototype vectors, adopts an L2 norm form, and is used to punish the model for producing too large deviation of the prototype of the historical fault class; the optimization adjustment of the new class prototype and the update of the classifier are completed by minimizing the above loss function through only performing a gradient update on the classifier parameters, wherein the classifier weight vector corresponding to the new class is obtained by assigning the optimized new class prototype, and the classifier weight of the old class remains unchanged through the regularization constraint; the prototype distillation process makes the model dynamically update the new class prototype while retaining the discriminant knowledge of the old class in each incremental learning, thereby effectively alleviating the catastrophic forgetting in incremental learning.

[0018] In a second aspect, the present application provides an equipment small sample incremental fault diagnosis device based on LNN and self-supervised learning, comprising a memory and a processor; the memory is used to store a computer program; the processor is used to realize the equipment small sample incremental fault diagnosis method based on LNN and self-supervised learning of the first aspect when the computer program is executed.

[0019] In a third aspect, the present application provides a computer readable storage medium, the storage medium stores a computer program, and when the computer program is executed by a processor, the equipment small sample incremental fault diagnosis method based on LNN and self-supervised learning of the first aspect is realized.

[0020] Compared with the prior art, the equipment small sample incremental fault diagnosis method based on LNN and self-supervised learning has the following technical effects: (1)Highly fine timing feature extraction capability: by introducing continuous time modeling and adjustable time constant through LNN, it can flexibly adapt to the changes of different frequency components in the vibration signal, capture the transient and long-term dependence characteristics of the non-stationary signal; combined with the self-attention mechanism of LTransformer, further refine the relevant patterns across working conditions, greatly improve the integrity and discriminability of feature representation; (2)High-efficiency small sample self-supervised learning: make full use of the potential information of unlabeled data through SimCLR contrast learning framework, automatically generate pseudo-labels for model training, integrate the feature distribution of future new faults in the basic diagnosis task stage, reduce the knowledge gap in subsequent incremental learning of the model, and improve the generalization ability of the model under the condition of labeled data scarcity; (3)Robust fusion of new and old knowledge: the proposed attention prototype distillation strategy ensures the representativeness of new class prototypes through sample attention weighting, and stabilizes the old class prototypes through knowledge distillation regularization, realizes the rapid integration of new fault knowledge and the stable maintenance of old fault knowledge. Since only the classifier layer needs to be updated and single-step small-scale updating is adopted, the method has low computational cost and avoids overfitting, which is particularly suitable for the online incremental updating requirements of embedded devices.

[0021] In summary, the present application realizes a new type of fault diagnosis model that can continuously learn under complex working conditions of equipment. Under the premise of ensuring that the accuracy of old fault diagnosis does not decrease substantially, the model can quickly adapt to new faults with a small amount of samples, has good expansibility and robustness, and can be widely used in intelligent operation and maintenance and fault diagnosis of key components of aerospace equipment. BRIEF DESCRIPTION OF DRAWINGS

[0022] Figure 1 The liquid-Transformer time series self-supervised network (LTTSNet) overall framework diagram described in the embodiment of the present application; Figure 2 The Liquid-LTransformer backbone network structure diagram described in the embodiment of the present application; Figure 3 The self-supervised learning based on SimCLR for label generation process diagram described in the embodiment of the present application; Figure 4 The collected vibration signal example diagram described in the embodiment of the present application; Figure 5 The confusion matrix result diagram of each diagnosis task described in the embodiment of the present application. DETAILED DESCRIPTION

[0023] The LNN and self-supervised learning-based small sample incremental fault diagnosis method of equipment according to the present application will be further described in detail below in combination with the accompanying drawings and examples. It should be pointed out that the following examples are intended to help understand the method steps and technical details of the present application, but are not used to limit the protection scope of the present application.

[0024] The overall framework process is as shown in Figure 1 The present application method divides the set of fault types to be identified into a basic diagnosis task (Task0) and subsequent incremental diagnosis tasks (Task 1, Task 2, Task 3, …) for the equipment fault diagnosis task. The basic diagnosis task contains the historical fault types and their sufficient labeled samples, and the newly appeared fault types are divided into each incremental diagnosis task, each of which only provides a small amount of labeled samples and possibly unlabeled samples of the new fault to simulate the situation that new faults continuously appear and lack of labels in practice.

[0025] In the embodiments of the present disclosure, the LNN and self-supervised learning-based small sample incremental fault diagnosis method of equipment is executed in the following steps in sequence: Step one, data acquisition. Acquire the vibration signal data of the target components of the equipment under different working conditions and various fault types.

[0026] Step two, data preprocessing and label generation. In the data acquisition process, the vibration signals of different fault modes are labeled to obtain preliminary fault category labels. Each sample is accurately calibrated to ensure that high-quality labels are provided for the labeled data set of the basic diagnosis task stage. In order to construct the training set of incremental learning, part of the unlabeled samples are extracted from the fault data, which will be used in the subsequent SimCLR self-supervised learning process to generate pseudo labels and enhance the feature learning ability.

[0027] Step three, Liquid-LTransformer backbone network construction. As shown in Figure 2 , the backbone network is constructed. First, the parameters of LNN are initialized, including the hidden layer weight matrix W h , the input weight matrix W x , the bias b, and the time constant τ, etc. LNN receives a one-dimensional vibration signal sequence x1, x2, …, x T as input to update the hidden state h(t) in continuous time form. LNN uses discrete time steps Δt to simulate state evolution, and updates the hidden state h t+Δt according to the above formulas (2) and (3) at each time step. After multiple iterations, LNN outputs the final hidden state vector or its transformation as the feature representation φ(x) of the sequence.

[0028] Then, the parameters of LTransformer are initialized, including the projection matrices for computing Q, K, V, and the weights in the multi-head attention and feed-forward network. LTransformer takes the feature φ(x) output by LNN as input, computes the self-attention distribution by the aforementioned formula (4), concatenates the outputs of the two attention heads, inputs them into the feed-forward network, and adds a residual connection to obtain the final output: Y = FFN(Concat(Attention1, Attention2)) + X. The output represents a feature vector that integrates the global correlation of the sequence. The output of LTransformer is fed into a fully connected classifier layer. The weight vector of the classifier layer can be randomly initialized or set according to the class prior of the underlying diagnostic task at the beginning.

[0029] At this point, the architecture of the backbone network is completed, where LNN focuses on local temporal pattern learning, and LTransformer focuses on global dependency modeling, together providing multi-scale features for fault class discrimination.

[0030] Step four, underlying diagnostic task phase. In the underlying diagnostic task phase, the labeled underlying data set obtained in step one is denoted as D base = (x i ,y i ), where y i is the fault class label of sample x i ; and the reserved unlabeled sample set D unl = x j , is used for self-supervised training. The label generation process based on SimCLR self-supervised learning is shown in Figure 3 .

[0031] First, the SimCLR contrastive learning is applied to the unlabeled sample set D unl : for each x j , two data views after random augmentation are generated and The two views are input into the backbone network (the parameters of the backbone network are randomly initialized at this time) to obtain the corresponding feature representations and Then, the low-dimensional projection vectors z j and z′ j are obtained through the projection head network. The positive sample pair (z j , z′ j ) and the negative sample pair (z j , z k ) (k≠j) are constructed, and the NT-Xent contrastive loss L NT-XentThe parameters of the backbone network are optimized using gradient descent, enabling the model to learn feature representations that are aggregated within classes and dispersed between classes on unlabeled data. After completing a certain number of rounds of self-supervised training, the currently trained backbone network is used to analyze D. unl Each sample in the dataset has a feature representation φ(x). j ), and perform clustering algorithms on these representations.

[0032] Calculate the cosine similarity sim(φ(x) between any two unlabeled sample features. p ),φ(x q When the similarity exceeds a preset threshold δ, they are considered to belong to the same cluster. After clustering all unlabeled samples, each cluster is treated as a potential fault category, and samples in that cluster are assigned a pseudo-label. Then, these pseudo-labeled samples are merged with the labeled data from the original basic diagnostic task to form an expanded training set. in, For x j The pseudo-label category. Utilizing D′ base Train the backbone network and classifier using supervised learning: minimize the traditional cross-entropy loss to update the model parameters.

[0033] During training, data containing pseudo-labels constitutes only a small proportion, and these pseudo-labels may contain noise. Therefore, a lower loss weight or an early stopping strategy can be used for pseudo-labeled samples to prevent misleading the model. After training, the backbone network parameters are fully tuned, enabling the extraction of multi-scale representations that distinguish existing fault categories and some new fault features. The classifier learns the decision boundaries for all categories in the basic diagnostic task. At this point, the model has completed initialization and can proceed to the incremental diagnostic task phase.

[0034] Step four, incremental diagnostic task training. After entering the incremental learning phase, when a new fault category appears in the equipment, a small number of vibration signals related to that fault are collected and labeled to obtain an incremental sample set. All of them All are new category C new This incremental data is then fed into the pre-trained backbone network (with parameters frozen) to extract its feature representation. Due to N new Typically small, to fully utilize the information in each sample, this invention employs an attention-weighted prototyping method to obtain representative features of the new category: for each Calculate an attention score α i The attention score represents the importance of the sample in characterizing the features of the new class. A simple single-layer network is used to calculate the attention score: Where w is a learnable vector. At the start of the current incremental diagnostic task, w can be initialized as an all-zero vector (making all α...i Initial equal, then train in a few iterations to make it converge. The calculated a i After normalization of all new samples, the weighted features x i i , Take the mean of all x i ' to get the new class prototype p Cnew Next, keep the backbone extracted features unchanged, and only fine-tune the classifier layer once by designing a loss function: the loss includes two parts, one is the classification cross-entropy loss of new class samples where can be calculated from the output of the current classifier on ; the other is the prototype distillation regularization loss L distill , which is used to keep the stability of the old class classification decision as defined in the previous formula where, represents the prototype of the old class c' after the last diagnosis task (i.e. the corresponding weight vector in the classifier). In actual implementation, there is no need to store all old class samples to calculate Instead, the weight of the corresponding old class in the classifier is regarded as its prototype before each incremental stage, that is, (here is the classifier weight before increment). Similarly, is the new weight after increment. In this way, the L distill term essentially constrains the update amplitude of the classifier weight. By combining the above two parts, the total loss function L = L new + λL distill , where λ is the weighting coefficient, used to adjust the balance between new class adaptation and old class preservation. Use this loss to perform single-step or a small number of step gradient descent updates on the classifier parameters. In the ideal case, the weight of the old class can be approximately regarded as unchanged due to the strong constraint of the regularization term, while the weight of the new class will be adjusted to a position that can correctly classify new samples and appropriately separate from the old class decision boundary. After completing this update, the incremental diagnosis task training is completed: the classifier has been expanded to include new fault classes C new , while the backbone network remains unchanged and is not disturbed. Therefore, the previously learned fault feature extraction ability and old fault class discrimination ability are basically retained. If there are new incremental diagnosis tasks in the future, repeat the above process to introduce new fault classes one by one.

[0035] Step five, model evaluation. After each incremental learning, the performance of the model on all learned fault classes is evaluated, including the recognition accuracy of the new fault class and the forgetting rate. If it is found that the performance of the old class has decreased significantly, you can consider adjusting λ to increase the punishment of old knowledge, or add a small amount of old class sample replay to assist in stability during incremental training. ​

[0036] To verify the effectiveness of the LTTSNet framework in the small-sample class incremental fault diagnosis task, the Southeast University (SEU) provided public gearbox dataset is used for verification in the embodiments of the present disclosure. The SEU dataset contains two sub-datasets: bearing dataset and gear dataset, both of which are obtained on a dynamic simulator of a transmission system, with a rotational speed-load configuration (RS-LC) setting of 20 Hz-0 V and 30 Hz-2 V, and two working conditions, and the total number of categories is equal to 20. In each file, there are 8 rows of vibration signals, and the second row of vibration signals is used here.

[0037] Step one, data collection. Part of the vibration signals collected in the SEU gearbox dataset are shown in FIG. 1. Figure 4

[0038] Step two, dataset preparation and task division. In the experiment, the bearing sub-dataset in the SEU dataset is used, which contains 10 fault classes under two different operating conditions, of which 2 are normal states and 8 are different fault types. Four diagnosis tasks are set in the experiment, of which task 0 is the basic diagnosis task, which contains 4 fault categories and their labeled samples; the subsequent task 1, task 2 and task 3 are incremental diagnosis tasks, each of which adds 2 fault categories, as shown in Table 1.

[0039] (1) Basic diagnosis task (task 0): In task 0, the dataset contains 4 fault categories, namely fault 0-fault 3, and all categories have sufficient labeled samples. A total of 300 samples are included, each containing 1024 sampling points, which are divided into 100 training set samples for training the feature extractor and the preliminary classifier of the backbone network, and 200 test set samples for model testing. The pseudo-label generation process uses 30 unlabeled samples per class, which are used for feature learning and pseudo-label generation through the SimCLR framework. These pseudo-label samples will be used together with the labeled data to participate in the training of the basic diagnosis task.

[0040] (2) Incremental diagnosis task (task 1, task 2, task 3): In the incremental diagnosis task, 2 fault categories are added to each task, and only 20 labeled samples are provided for each new category, and 200 test set samples are also included for model testing. Specifically, the new categories of task 1 are fault 4 and fault 5, the new categories of task 2 are fault 6 and fault 7, and the new categories of task 3 are fault 8 and fault 9. Table 1 Specific fault modes and task division

[0041] ​Step three, basic diagnosis task training and pseudo-label generation. In the basic diagnosis task phase, 30 unlabeled samples of each class are subjected to SimCLR contrastive learning, and positive sample pairs and negative sample pairs are generated through data augmentation. The generated enhanced views are input into the backbone network, the feature representation of each sample pair is calculated, the similarity between samples is measured using cosine similarity, similar unlabeled samples are classified into a class, and pseudo-labels are assigned to these samples. Pseudo-labels are used together with the 100 labeled samples in the basic diagnosis task to train the backbone network, thereby enhancing the model's learning ability for unlabeled samples. The Liquid-LTransformer backbone network is trained using both the 100 labeled samples and the 30 pseudo-labeled samples in the basic diagnosis task.

[0042] Step four, incremental diagnosis task training and attention prototype distillation. Using only 20 labeled samples of each fault class in the current new class data, class prototypes are extracted using attention weighting, and new class representations are optimized through prototype distillation mechanism to update the classifier weights, while the backbone network remains frozen.

[0043] Step five, repeat step four, gradually introduce more new classes, and realize continuous expansion of fault recognition across working conditions and class levels. The performance of the model on all known classes is evaluated at each stage to measure its balance between maintaining old classes and adapting to new classes.

[0044] Step six, at the end of each incremental diagnosis task, the model's performance is evaluated using 200 test sets for each fault class to assess the model's ability to recognize new fault classes and its ability to maintain memory of old fault classes. The results are as follows: the accuracy of the four diagnosis tasks is 100%, 97.995%, 97.416%, and 94.277%, respectively, and the corresponding confusion matrices are shown in Figure 5 , where (a), (b), (c), and (d) are the test set confusion matrix results for tasks 0, 1, 2, and 3, respectively. The final average accuracy is 97.422%.

[0045] The experimental results show that the model performs well in the four incremental diagnosis tasks, with an average accuracy of 97.422%. In task 0, the model perfectly identifies all classes with an accuracy of 100%. With the introduction of new fault classes, the accuracy of tasks 1 and 2 is 97.995% and 97.416%, respectively, showing the model's good adaptability to new classes. Although the accuracy of task 3 drops to 94.277% and there are more misclassifications, especially for new classes (fault 9 and fault 10), the overall performance is still superior. This indicates that despite some catastrophic forgetting, the model can still maintain high recognition ability in incremental learning tasks, adapting to new classes while retaining memory of old classes. Embodiment two

[0046] The embodiment discloses an equipment small sample incremental fault diagnosis device based on LNN and self-supervised learning, comprising a memory and a processor; the memory is used for storing a computer program; the processor is used for realizing the equipment small sample incremental fault diagnosis method based on LNN and self-supervised learning in the foregoing embodiment one when the computer program is executed, and the specific diagnosis method steps are the same as those in the foregoing embodiment one, and will not be described here. Embodiment three

[0047] The embodiment discloses a computer readable storage medium, and the storage medium stores a computer program. When the computer program is executed by a processor, the equipment small sample incremental fault diagnosis method based on LNN and self-supervised learning in the foregoing embodiment one is realized, and the specific diagnosis method steps are the same as those in the foregoing embodiment one, and will not be described here.

[0048] The computer in the embodiment can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium. The computer readable storage medium can be any available medium that can be read by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media sets. The available media can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a digital versatile disc (DVD)), or a semiconductor medium (for example, a solid state disk (SSD)) and the like. The software formed by the computer storage code can be located in the mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, register and the like.

[0049] The functional modules in the embodiments of the present application can be integrated in one processing unit or module, or can be physically present in each module, or two or more modules can be integrated in one unit or module. In the above embodiments, all or part can be realized by software, hardware, firmware or any combination thereof. When using software, it can be realized in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, all or part of the processes or functions described in the embodiments of the present application are generated.

[0050] Those skilled in the art can easily understand that the above description is only a preferred embodiment of the present application, and is not intended to limit the present application. Any modification, equivalent replacement and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. An equipment small sample incremental fault diagnosis method based on LNN and self-supervised learning, characterized in that, Comprising the following steps: Step one, data acquisition and division; acquire one-dimensional vibration signal data in the running process of equipment, arrange sensors on target components to collect high-frequency vibration signals; preliminarily label and classify the collected high-frequency vibration signals according to fault types, and construct a basic diagnosis task data set and multiple incremental diagnosis task data sets; wherein the basic diagnosis task data set contains labeled samples of historical fault types; the incremental diagnosis task data set corresponds to a new fault type of each incremental diagnosis task, and contains a small amount of labeled samples and part of unlabeled samples of the new type; Step two, self-supervised pseudo-label generation based on SimCLR; in the basic diagnosis task stage, self-supervised contrastive learning is performed on the unlabeled samples from future incremental diagnosis tasks, the unlabeled sample data is input into the SimCLR contrastive learning framework, two different views of the same signal are generated through random data augmentation, and low-dimensional feature representation is extracted through the projection head network; the similarity of positive sample pairs and negative sample pairs is calculated by using a normalized temperature parameter to scale the cross-entropy, and the feature representation is trained, wherein the loss function is defined as: Where, sim(z) i ,z j ) represents the eigenvector z i With z j The cosine similarity, where τ is the temperature parameter, and z i and z j The projection features of two views obtained by augmenting the same unlabeled sample data. The denominator terms traverse the enhanced view of all samples in the current batch except for i; Robust feature representation of the unlabeled sample is obtained through the above contrastive learning, and a near neighbor clustering method based on cosine similarity threshold is used to classify the unlabeled samples with similar features into a class, thereby generating corresponding pseudo-labels for the unlabeled data; Step three, backbone network pre-training; the labeled samples of the basic diagnosis task in step one and the samples of the unlabeled data with pseudo-labels generated in step two are merged as an expanded training set, a Liquid-LTransformer backbone network is trained, and an initial classifier is established to realize pre-training of the model; The Liquid-LTransformer backbone network is composed of a liquid neural network (LNN) and a lightweight Transformer in series, and is used to jointly extract local and global time sequence features of the vibration signal; Step four, incremental fault class access; in the incremental learning stage, for each incremental diagnosis task, only a small number of labeled samples and optional unlabeled samples of new fault classes in this stage are provided; for the new fault classes in the current incremental stage, the prototype vector of the class is extracted from a small number of samples of the class by attention weighting; specifically, a trainable attention module is used to obtain the prototype vector of each new class sample i An attention weight α is assigned i : a i = softmax(W a x i + b a ) where W a and b a are learnable parameters for attention weight computation; then weight each sample feature to get the weighted feature vector x i ′ = a i · x i ; average the n c weighted features of the new class to get the initial prototype vector p c : where N c is the number of samples of the new class; next, the above new class prototype p c is optimized using a prototype distillation strategy; the prototype distillation is realized by knowledge distillation regularization, i.e., a loss function is constructed: where C old represents the existing old class set, is the prototype of the old class c' before the start of the increment phase, is the current optimized prototype of the old class; In this process, the backbone network parameters remain frozen, only the weights in the classifier are adjusted: the classification weights for the old classes are frozen or strongly constrained to maintain their stability, while the weights for the added new classes are adjusted by the optimized prototype vectors p c are directly replaced or adjusted; Step five: cyclic expansion; repeat step four, introduce new fault categories in subsequent incremental diagnosis tasks, update the classifier according to the attention weighted prototype extraction and prototype distillation optimization strategy, and continuously expand the range of fault categories that the fault diagnosis model can recognize; after each incremental update, the classification performance of the model on all learned fault categories is evaluated.

2. The equipment small sample incremental fault diagnosis method based on LNN and self-supervised learning according to claim 1, characterized in that, The LNN in the Liquid-LTransformer backbone network performs continuous time modeling on the input sequence through a differentiable equation, and the evolution of its hidden state with time t satisfies the following relationship: where h t denotes the hidden state of LNN at time t, x t is the current input signal, W h and W x are weight matrices, b is a bias term, σ is a non-linear activation function, and τ is a learnable time constant used to control the speed of state updates. By discretizing the above equation, the iterative update form of the LNN can be obtained: Where Δt is the discrete time step, and the learnable time constant of the LNN enables it to dynamically adjust the evolution speed of the hidden state according to the input, thereby effectively capturing short-term transient features and time-dependent relationships in the vibration signal; the LTransformer in the backbone network follows the LNN and is used to model the global dependence of the time sequence features output by the LNN; the Transformer adopts a multi-head self-attention mechanism, and its core calculation is: where Q = φ(x)W q , K = φ(x i )W k , V = φ(x i )W v , φ(x) represents the feature representation of the input sequence extracted by the LNN, W q , W k , and W v are learnable projection matrices, and d k is a scaling factor; The LTransformer adopts double-head self-attention, obtains feature correlation in different subspaces through parallel calculation of two attention heads, splices the attention outputs of each head, inputs the spliced outputs into a feedforward network, and adds a residual connection to obtain a final output: Y=FFN(Concat(Attention1,Attention2,...))+X Wherein, Concat represents splicing the double-head attention outputs, FFN is a feedforward network, and X is an input signal to ensure the stability of information flow.

3. The LNN and self-supervised learning-based equipment small sample incremental fault diagnosis method according to claim 2, characterized in that, The LNN in the Liquid-LTransformer backbone network models the vibration signal using a continuous-time dynamic equation, specifically including: The continuous-time dynamic equation is used to model the vibration signal, and the update of the hidden state satisfies: The dynamic speed of controlling the hidden state update; the discrete-time hidden state iteration formula is obtained by Euler discrete approximation:

4. The equipment small sample incremental fault diagnosis method based on LNN and self-supervised learning according to claim 2, characterized in that, The LTransformer in the Liquid-LTransformer backbone network extracts global features using a multi-head self-attention mechanism, including an attention calculation formula: wherein Q, K, V are query vector, key vector and value vector obtained by projecting input features through learnable matrices respectively; Q = φ(x)W q , K = φ(x i )W k , V = φ(x i )W v , φ(x) represents the feature representation of the input sequence extracted by LNN, W q , W k , W v are learnable projection matrices, d k is a scaling factor; The LTransformer uses double-head self-attention combined with a feedforward network and a residual connection to improve feature expression capability.

5. The LNN and self-supervised learning-based equipment small sample incremental fault diagnosis method according to claim 1, characterized in that, The self-supervised pseudo-label generation strategy based on SimCLR includes: Two different but related views are generated by applying random augmentations including time offset and noise addition to unlabeled samples, and the high-dimensional features corresponding to the views are mapped to a low-dimensional space using a projection head containing at least one fully connected network, thereby obtaining paired projection features; Using the projection features of a number of unlabeled samples, nearest neighbor clustering is performed using a predetermined cosine similarity threshold: when the similarity between the features of two unlabeled samples is higher than the threshold, they are considered to be of the same potential fault type and are assigned the same pseudo-label, until all unlabeled samples are traversed.

6. The LNN and self-supervised learning-based equipment small sample incremental fault diagnosis method according to claim 1, characterized in that, The attention weighting strategy includes: Each new fault class introduced by each incremental learning computes a class prototype vector, which is weighted by a weight coefficient α for each sample feature of the class i , the weight is determined by the correlation of the sample feature with other samples and is normalized by the Softmax function; where z i is the i-th component of the sample feature; e is the base of the natural logarithm; n is the number of all sample features; is the sum of all feature indices, used to normalize all weights; weighting the sample features based on the resulting weights to obtain an initial prototype p c .

7. The LNN and self-supervised learning-based equipment small sample incremental fault diagnosis method according to claim 1, characterized in that, The prototype distillation optimization strategy includes: By adding a regularization loss about the old class prototype in the incremental diagnosis task to refine the new class prototype and stabilize the decision boundary of the old class, the loss function includes two parts: the classification loss of the new class and the stability loss of the old class prototype; the stability loss of the old class prototype is defined as the difference between the new and old prototype vectors, which is in the form of L2 norm, used to punish the model for producing too large a shift in the prototype of the historical fault class; by performing a gradient update on only the classifier parameters to minimize the above loss function, the optimization adjustment of the new class prototype and the update of the classifier are completed, wherein the classifier weight vector corresponding to the new class is obtained by assigning the optimized new class prototype, and the classifier weight of the old class remains unchanged through the regularization constraint.

8. An apparatus for small sample incremental fault diagnosis based on LNN and self-supervised learning, characterized in that: The memory is used to store a computer program, and the processor is used to implement the LNN and self-supervised learning-based small-sample incremental fault diagnosis method for equipment when executing the computer program.

9. A computer-readable storage medium, characterized in that, The storage medium has a computer program stored thereon, and when the computer program is executed by the processor, the LNN and self-supervised learning-based small-sample incremental fault diagnosis method for equipment is implemented.