A method and system for diagnosing mechanical equipment faults

CN121705747BActive Publication Date: 2026-05-26SUZHOU UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SUZHOU UNIV
Filing Date
2026-02-11
Publication Date
2026-05-26

Smart Images

  • Figure CN121705747B_ABST
    Figure CN121705747B_ABST
Patent Text Reader

Abstract

This invention discloses a method for diagnosing mechanical equipment faults, comprising: acquiring equipment operating information, including vibration signals from equipment operation; and, based on the equipment operating information, performing fault diagnosis using a pre-trained mechanical equipment fault diagnosis model to obtain a diagnostic prediction. The training of the mechanical equipment fault diagnosis model includes: constructing a total objective function and optimizing the model using stochastic gradient descent, outputting the final fault diagnosis result. The total objective function includes the classification total loss of cross-entropy, branch consistency loss, and bidirectional distillation loss. This invention also discloses a method and system for diagnosing mechanical equipment faults, based on a fault diagnosis method for incremental scenarios using branch fusion distillation and memory enhancement. Implemented within a lifelong learning framework, this method enables incremental fault diagnosis that aligns the distributions of new and old class features, while avoiding large-scale data storage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of rotating machinery fault diagnosis technology, specifically to a mechanical equipment fault diagnosis method and system, and more particularly to a bearing fault diagnosis method under a lifelong learning framework. Background Technology

[0002] In rotating machinery technology, bearings are core components of rotating mechanical equipment (such as aircraft engines, wind turbines, and high-speed train bogies), and their operating status directly affects the performance, efficiency, and safety of the entire mechanical system. Because these devices typically operate under harsh conditions such as high speed, heavy load, and complex alternating loads for extended periods, bearings are highly susceptible to wear, fatigue spalling, and other failures. If a bearing fails and is not detected and addressed in a timely manner, it can lead to equipment downtime and production stoppages, causing significant economic losses, or even catastrophic safety accidents and social impacts. Therefore, developing efficient and accurate bearing fault diagnosis technology is of paramount importance for ensuring the safe and reliable operation of critical equipment.

[0003] With the rapid development of Industrial Internet of Things (IIoT) and Artificial Intelligence (AI) technologies, data-driven intelligent fault diagnosis methods have gradually replaced traditional signal processing methods, becoming a current research hotspot. Deep learning-based diagnostic models (such as convolutional neural networks and residual networks) can automatically extract high-dimensional features from massive amounts of monitoring data, achieving end-to-end fault identification and significantly improving diagnostic accuracy and efficiency. However, traditional deep learning diagnostic methods typically assume that training data for all fault types has been collected all at once before training, and that the training and test data follow the same probability distribution. In actual industrial production scenarios, equipment operation is a long-term dynamic process, and new fault types often appear gradually over time, rather than all at once. This requires diagnostic models to have the ability to "learn for life," that is, to quickly learn newly emerging fault patterns while maintaining the ability to identify previously learned faults, even without accessing or only accessing a small amount of old data. However, existing deep learning models often face a severe "catastrophic forgetting" problem when dealing with this type of incremental learning task: when the model updates its parameters using new data to adapt to the new task, its performance on the old task drops sharply, or even completely loses its ability to diagnose old faults.

[0004] To mitigate catastrophic forgetting, existing lifelong learning methods primarily employ strategies such as data replay or regularization constraints. However, directly storing large amounts of original old data for replay not only consumes enormous storage space but may also raise data privacy and security issues. Meanwhile, simple regularization or knowledge distillation often struggles to maintain clear decision boundaries in complex fault feature spaces, leading to confusion or feature drift between new and old categories.

[0005] Therefore, designing an incremental fault diagnosis method that can effectively overcome catastrophic forgetting, avoid large-scale data storage, and accurately align the distribution of new and old class features is a key technical challenge that urgently needs to be solved in this field. Summary of the Invention

[0006] This invention overcomes the shortcomings of existing technologies and provides a method and system for diagnosing mechanical equipment faults. It is a fault diagnosis method based on branch fusion distillation and memory enhancement in incremental scenarios. The mechanical equipment fault diagnosis implemented under this lifelong learning framework can align incremental fault diagnosis with the distribution of new and old class features and avoid large-scale data storage.

[0007] To achieve the above objectives, the technical solution adopted by the present invention is as follows: a mechanical equipment fault diagnosis method, comprising: acquiring equipment operation information, including vibration signals of equipment operation; and obtaining a diagnostic prediction by performing fault diagnosis through a pre-trained mechanical equipment fault diagnosis model based on the equipment operation information; wherein, the training of the mechanical equipment fault diagnosis model includes: optimizing the mechanical equipment fault diagnosis model by constructing a total objective function and using stochastic gradient descent, and outputting the final fault diagnosis result, wherein the total objective function includes the classification total loss of cross entropy, branch consistency loss, and bidirectional distillation loss.

[0008] In a preferred embodiment of the present invention, the training step of the mechanical equipment fault diagnosis model includes:

[0009] Step S1: Based on the equipment operation information under different fault types, construct a memory containing an initial task dataset and an incremental task dataset as a diagnostic dataset. The initial task dataset contains initial fault classes, and the incremental task dataset contains incremental fault classes. The initial task dataset is used for basic knowledge learning in the early stage of training. The incremental task dataset contains new fault types as new class samples, and the incremental task contains several incremental stages arranged in chronological order.

[0010] Step S2, the initial task includes: training the constructed branch fusion distillation network model with memory enhancement module on the initial task dataset; and generating memory enhancement samples for playback in the incremental stage based on the memory enhancement module;

[0011] Step S3, the incremental stage includes: when a new fault type appears, the new fault type is taken as a new class sample, and the outputs of the two branches in the constructed dual-branch structure are adaptively fused using the entropy gating mechanism to obtain the branch consistency loss.

[0012] Step S4: Constrain each branch of the student model to closely follow the teacher model in terms of old knowledge representation through branch consistency loss; perform bidirectional progressive distillation on the output of the teacher model and student model after fusion to obtain bidirectional distillation loss, and replay the memory enhancement samples from the previous stage.

[0013] Step S5: Parameterize the cluster centers of the current new class samples into updatable samples, combine feature alignment loss and total classification loss to iteratively optimize the updatable samples to obtain iteratively optimized memory-enhanced samples, and expand the memory bank to obtain an updated diagnostic dataset.

[0014] In a preferred embodiment of the present invention, during the incremental phase operation in step S3:

[0015] The construction of the dual-branch structure includes: in the incremental stage, a linear fully connected classification branch and a cosine metric classification branch are used to construct the dual-branch structure. The linear fully connected classification branch divides the decision boundary through a hyperplane, and the cosine metric classification branch measures feature similarity through an angle.

[0016] Adaptive fusion using entropy gating mechanism includes: calculating the predicted entropy value for each input sample on the output of the linear fully connected classification branch and the cosine metric classification branch respectively, obtaining the entropy difference of the predicted entropy value, generating dynamic gating coefficients using the entropy difference, and performing adaptive weighted fusion on the Logits output of the linear fully connected classification branch and the cosine metric classification branch based on the dynamic gating coefficients, biasing towards the branch with higher confidence.

[0017] The constraints of the branch consistency loss include: calculating the difference between the teacher model and the student model in the predicted distribution of the old class dimension; using dynamic gating coefficients to weight and sum the difference values ​​of the linear fully connected classification branch and the cosine metric classification branch to obtain the consistency loss; and using the consistency loss to constrain each branch of the student model to closely follow the teacher model in the old knowledge representation.

[0018] In a preferred embodiment of the present invention, the bidirectional progressive distillation operation in step S4 includes:

[0019] The difference between the outputs of the teacher model and the student model after fusion is calculated and ranked by difficulty. Based on the outputs after difference calculation and difficulty ranking, bidirectional progressive distillation is performed to obtain the bidirectional distillation loss.

[0020] Based on bidirectional distillation loss, bidirectional alignment with soft labels in stages enables the student model to fully absorb the knowledge of the teacher model, achieving a smooth transition of knowledge.

[0021] In a preferred embodiment of the present invention, step S5: parameterizing the cluster centers of the new class of samples into updatable samples includes the following steps: performing K-means clustering on the features of the new class of samples, selecting cluster centers and adding perturbations to the cluster centers, initializing them as trainable parameterized pseudo-samples, and using them as updatable samples;

[0022] The method of iteratively optimizing the updated samples by combining feature alignment loss and total classification loss to obtain iteratively optimized memory-enhanced samples includes the following steps: using feature alignment loss to constrain the parameterized samples to approximate the feature mean distribution of the real samples, using classification loss to determine discriminability, updating the values ​​of parameterized samples through backpropagation to obtain iteratively optimized memory-enhanced samples, and adding the iteratively optimized memory-enhanced samples to the memory bank for subsequent playback.

[0023] In a preferred embodiment of the present invention, in step S2, the method for initial task training of the branch-fusion distillation network model containing the memory enhancement module using the initial fault dataset is as follows:

[0024] The one-dimensional vibration fault signal from the collected equipment operation information is converted into a two-dimensional amplitude spectrum using a fast Fourier transform, and then constructed as a three-channel input data. The input data is fed into the feature extractor of the deep convolutional neural network to obtain the feature vector matrix X. Where N represents the batch size and D represents the feature dimension. This indicates the backbone network feature extraction operation;

[0025] The feature vectors are input into the cosine metric classification branch, and the feature vector matrix X and the externally stored weight matrix library of the classifier are compared. L2 normalization is performed separately, and the formula is as follows:

[0026] Where C represents the number of categories of the current task. Represents the L2 norm;

[0027] Calculate the cosine similarity between the normalized features and weights, and introduce a scaling factor s to obtain the classifier's output. The output Logits are converted into a probability distribution using the Softmax function, and the cross-entropy loss function is calculated. The network parameters are then updated using the stochastic gradient descent algorithm until the model converges.

[0028] In a preferred embodiment of the present invention, in the construction of the dual-branch structure in step S3, the input feature vector matrix X is processed through branch A and branch B respectively in the incremental stage, wherein branch A is a linear fully connected classification branch and branch B is a cosine metric classification branch.

[0029] For the linear fully connected classification branch, the weight matrix is ​​used. and bias vector Calculate the linear output : Where C represents the number of categories in the current task, and D represents the feature dimension;

[0030] For the cosine metric classification branch, the same algorithm as in the initial stage is used to obtain the cosine output. , ;

[0031] And / or, step S3, which uses an entropy gating mechanism to calculate weights for adaptive fusion of the two-branch outputs, includes:

[0032] Combined with temperature coefficient Apply a Softmax transform to the outputs of the two branches to obtain their output probability distributions. , The formula is:

[0033] ;

[0034] in, For temperature coefficient, These represent the outputs of the linear branch and the cosine branch, respectively.

[0035] Calculate the entropy value of each sample i on both branches. To measure the uncertainty of a forecast, the formula includes:

[0036] ;

[0037] in, C represents a constant used to stabilize the values, and C' represents the total number of dimensions in the old class. This represents the probability that the i-th sample belongs to the c-th class;

[0038] Calculating the gating coefficient based on entropy difference ,

[0039] ,in, A scaling factor to adjust the degree of influence of entropy difference;

[0040] The final fused output is obtained by weighting and fusing the linear fully connected classification branch and the cosine metric classification branch using gating coefficients. : ;

[0041] And / or, the constraint method for branch consistency loss in step S3, used to maintain the stability of each branch on the learned old class knowledge, includes:

[0042] In the incremental phase, the output of the category dimension corresponding to the old class is extracted from the slices of the Logits output of the teacher model and the student model. The KL divergence between the predicted distributions of the teacher model and the student model in the linear fully connected classification branch and the cosine metric classification branch are calculated respectively. The formula includes:

[0043] ;

[0044] Where C' represents the total number of dimensions in the old class. These represent the predicted probabilities of the teacher model and the student model on the linear fully connected classification branch, respectively. These represent the predicted probabilities of the teacher model and the student model on the cosine metric classification branch, respectively.

[0045] Using gating coefficient As a weighting factor, combined with the temperature coefficient Calculate branch consistency loss , ;

[0046] in, This means that the expected value of all samples in the current batch is calculated. Through the branch consistency loss function, the branch with higher confidence plays a leading role in preserving knowledge of the old class, while the branch with lower confidence plays a supporting role.

[0047] In a preferred embodiment of the present invention, step S4, calculating the branch fusion output difference and difficulty ranking, includes:

[0048] Obtain the output Logits of the teacher model and student model after fusion in the two branches, denoted as and For each category c, calculate the mean absolute difference between the teacher model and the student model across all samples in the current batch. The formula includes:

[0049] ;

[0050] Where N represents the batch size, and C'' is the total number of old categories. The model's prediction score for the i-th sample in the c-th fault category;

[0051] The differences in each category are sorted in descending order, with larger differences indicating greater difficulty in classifying that category.

[0052] And / or, the bidirectional incremental distillation in step S4 includes the following steps:

[0053] Constructing a staged distillation mask: Let the total number of stages in the gradual distillation be K, k=1,…,K; the set of categories included in the k-th stage. Category set The subset of categories with the highest difficulty ranking (k);

[0054] Construct the corresponding mask When category c belongs to the category set If the mask value is 1, then the mask value is 1; otherwise, it is 0. The algorithm includes: ;

[0055] In the distillation direction from difficult to easy, a mask is used. The stage probability distribution of the teacher model and the student model is calculated using the distillation temperature coefficient T. and The formula includes:

[0056] ;

[0057] in, The result of branch fusion representing the teacher model. The result of branch fusion representing the student model. This represents element-wise multiplication;

[0058] Calculate the KL divergence of the teacher-student model in stage k. The distillation loss from difficult class to all class was then obtained. The formula includes:

[0059] ;

[0060] ;

[0061] in, This represents the probability that the current sample belongs to the c-th type of fault after the teacher model branches are fused in the k-th stage. This represents the probability that the current sample belongs to the c-th type of fault after the student model branches are fused in the k-th stage. The stage weight is T, where T is the temperature coefficient.

[0062] After completing the distillation from the hardest class to all classes and updating the model parameters, a reverse distillation (from all classes to the hardest class) is performed. This involves gradually shrinking from a stage containing all classes to a stage containing only the hardest class, and the distillation loss in the second direction is calculated. Adding the losses in both directions gives the bidirectional distillation loss. .

[0063] And / or, in step S5, obtaining updatable samples includes: extracting features of new class real samples using the trained and frozen student model, and performing K-means clustering in the feature space to obtain K cluster center samples. Introducing disturbances Initialize the cluster centers as a trainable set of parameterized samples. The formulas for parameterized sample initialization include: ;

[0064] And / or, in step S5, obtaining the feature alignment loss includes: constructing a reference sample subset: to avoid the parameterized samples only fitting the cluster centers and ignoring the intra-cluster distribution, this includes: for each cluster generated by clustering, selecting the sample closest to the cluster center. and farthest Sample construction class-level reference subset ;Calculate the feature difference between the parameterized sample set and the reference subset as the feature alignment loss. The formula for approximating the feature mean distribution of the true sample using constrained parameterized samples includes: ;in, This represents the feature extractor for the student model that has been trained and frozen. Represents a set of trainable parameterized samples. The reference sample set represents the frozen parameters; the frozen student model is used to... The samples in the dataset are classified and the cross-entropy loss is obtained. Cross-entropy loss Feature alignment loss Combined with memory enhancement loss The formula includes: ;in, For the sample predicted value, For the true labels of the samples, These are the feature alignment weight coefficients;

[0065] And / or, in step S5, obtaining the total classification loss includes: in the incremental phase, calculating the classification loss of the model on new class samples (new fault categories) using the cross-entropy loss function. The classification loss of old class samples and memory-enhanced samples after parameter updates. The total classification loss is obtained. The calculation method is as follows: ;in, The weighting coefficient for balancing the old and new classes can be dynamically adjusted as the number of memorized samples increases to emphasize the retention of knowledge from the old classes.

[0066] In a preferred embodiment of the present invention, step S6 is further included: minimizing the overall objective function. Update the parameters of the mechanical equipment fault diagnosis model to achieve adaptive learning for new fault types and memory retention of old fault types;

[0067] The formula for the overall objective function in the k-th incremental stage includes:

[0068] ;

[0069] Where α is used to control the strength of the retention of old knowledge in the distillation process, and β is used to control the strength of the consistency constraint within the branch; This is due to losses during two-way distillation. For branch consistency constraints, Total loss by category.

[0070] In a preferred embodiment of the present invention, a mechanical equipment fault diagnosis system includes the following steps for implementing a mechanical equipment fault diagnosis method:

[0071] The input module is used to acquire equipment operation information, including vibration signals from the equipment operation.

[0072] The diagnostic analysis module, based on equipment operation information, performs fault diagnosis and obtains diagnostic predictions through a pre-trained mechanical equipment fault diagnosis model.

[0073] Output module; used to output the diagnostic results of the mechanical equipment fault diagnosis model.

[0074] This invention addresses the deficiencies in the technical background, and the beneficial technical effects of this invention are:

[0075] A method and system for diagnosing mechanical equipment faults is proposed. It is a fault diagnosis method for incremental scenarios based on branch fusion distillation and memory enhancement. The mechanical equipment fault diagnosis implemented under this lifelong learning framework can align incremental fault diagnosis with the distribution of new and old class features and avoid large-scale data storage.

[0076] 1. This invention constructs a lifelong learning framework comprising an initial task and incremental tasks. In the initial task, a cosine classifier is used to establish basic feature representations, laying a solid foundation for subsequent incremental learning. This invention addresses the severe catastrophic forgetting inherent in existing deep learning diagnostic models when faced with continuously emerging fault types.

[0077] 2. This invention employs a bidirectional progressive distillation strategy, enabling phased bidirectional knowledge transfer from difficult to easy and from easy to difficult. This allows the model to prioritize consolidating easily forgotten difficult categories, achieving a smooth transition and deep integration of new and old knowledge. This invention addresses the problems of high storage overhead and low privacy and security associated with traditional replay methods due to storing original samples.

[0078] 3. This invention proposes a parameterized memory enhancement method. By initializing cluster centers as trainable parameters and iteratively optimizing them using feature alignment and classification loss, highly representative pseudo-memory samples are generated. This method avoids the storage pressure and privacy leakage risks associated with directly storing the original vibration signals. Furthermore, it more accurately restores the feature distribution of old classes than traditional static sample playback, thus effectively maintaining the diagnostic accuracy of historical fault types with extremely low storage overhead. Attached Figure Description

[0079] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0080] Figure 1 This is a flowchart illustrating a preferred embodiment of the mechanical equipment fault diagnosis method of the present invention;

[0081] Figure 2 This is a schematic diagram of the fault diagnosis model structure of a preferred embodiment of the present invention;

[0082] Figure 3 This is a schematic diagram of the confusion matrix obtained after completing the incremental task according to a preferred embodiment of the present invention;

[0083] Figure 4 This is a schematic diagram of feature visualization obtained after completing the incremental task according to a preferred embodiment of the present invention;

[0084] Figure 5 This is a fault type table of a preferred embodiment of the present invention;

[0085] Figure 6 This is a preferred embodiment of the flywheel bearing testing system of the present invention;

[0086] Figure 7 This is a description table of preferred embodiments of the present invention and existing baseline methods;

[0087] Figure 8 This is a structure table of the feature learning backbone network in a preferred embodiment of the present invention;

[0088] Figure 9 This is a training parameter table of a preferred embodiment of the present invention;

[0089] Figure 10 Accuracy curves of BFDMA and existing baseline methods at various stages, representing a preferred embodiment of the present invention;

[0090] Figure 11 This is a structural diagram of the memory enhancement framework according to a preferred embodiment of the present invention;

[0091] Among them, 1. outer shell; 2. flywheel; 3. bearing. Detailed Implementation

[0092] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments of the present invention and the specific features in the embodiments are detailed descriptions of the technical solution of the present invention, rather than limitations thereof. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments can be combined with each other.

[0093] It should be noted that if directional indicators (such as up, down, bottom, top, etc.) are involved in the embodiments of the present invention, these directional indicators are only used to explain the relative positional relationship and movement of the components in a specific posture. If the specific posture changes, the directional indicators will also change accordingly. The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, features defined with "first" and "second" may explicitly or implicitly include one or more of that feature. Unless otherwise explicitly specified and limited, the terms "set," "connected," and "linked" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal connection of two components. For those skilled in the art, the specific meaning of the above terms in the present invention can be understood according to the specific circumstances.

[0094] Example 1: In order to address the problem that existing deep learning models are prone to catastrophic forgetting when faced with continuously increasing types of faults, and that traditional replay methods have limitations in sample storage.

[0095] like Figure 1 As shown, a method for diagnosing mechanical equipment faults includes:

[0096] Acquire equipment operation information, including vibration signals from the equipment during operation;

[0097] Based on equipment operation information, fault diagnosis is performed using a pre-trained mechanical equipment fault diagnosis model to obtain diagnostic predictions;

[0098] The training of the mechanical equipment fault diagnosis model includes:

[0099] By constructing a total objective function and using stochastic gradient descent to optimize the mechanical equipment fault diagnosis model, the final fault diagnosis result is output. The total objective function includes the classification total loss of cross entropy, branch consistency loss, and bidirectional distillation loss.

[0100] Specifically, the training steps for a mechanical equipment fault diagnosis model include:

[0101] Step S1: Based on the equipment operation information under different fault types, construct a memory containing an initial task dataset and an incremental task dataset as a diagnostic dataset. The initial task dataset contains initial fault classes, and the incremental task dataset contains incremental fault classes. The initial task dataset is used for basic knowledge learning in the early stage of training. The incremental task dataset contains new fault types as new class samples, and the incremental task contains several incremental stages arranged in chronological order.

[0102] Step S2, the initial task includes: training the constructed branch fusion distillation network model with memory enhancement module on the initial task dataset; and generating memory enhancement samples for playback in the incremental stage based on the memory enhancement module;

[0103] Step S3, the incremental stage includes: when a new fault type appears, the new fault type is taken as a new class sample, and the outputs of the two branches in the constructed dual-branch structure are adaptively fused using the entropy gating mechanism to obtain the branch consistency loss.

[0104] Step S4: Constrain each branch of the student model to closely follow the teacher model in terms of old knowledge representation through branch consistency loss; perform bidirectional progressive distillation on the output of the teacher model and student model after fusion to obtain bidirectional distillation loss, and replay the memory enhancement samples from the previous stage.

[0105] Step S5: Parameterize the cluster centers of the current new class samples into updatable samples, combine feature alignment loss and total classification loss to iteratively optimize the updatable samples to obtain iteratively optimized memory-enhanced samples, and expand the memory bank to obtain an updated diagnostic dataset.

[0106] Working principle:

[0107] This invention proposes a bearing fault diagnosis method based on a lifelong learning framework, which effectively alleviates the catastrophic forgetting problem in bearing fault diagnosis and achieves continuous and accurate diagnosis of newly added fault types. This invention effectively mitigates the catastrophic forgetting problem by constructing a lifelong learning framework with initial and incremental tasks. In the incremental stage, a novel linear and cosine dual-branch structure is introduced, utilizing an entropy gating mechanism to adaptively fuse the output and apply branch consistency constraints, solving the problem of unstable decision-making by a single classifier when handling complex faults. Simultaneously, a bidirectional progressive distillation strategy is adopted, performing knowledge transfer from difficult to easy and from easy to difficult in stages according to difficulty ranking, ensuring that the model accurately retains old class features when learning new faults. Furthermore, this invention uses a parameterized memory enhancement module to replace the original data storage, generating highly representative pseudo-memory samples through iterative optimization, significantly reducing storage costs and privacy risks while effectively preventing feature distribution drift. Compared to traditional methods, this invention has stronger robustness when facing continuously added fault types and is more in line with the actual application needs of industrial sites.

[0108] Example 2, based on Example 1, further includes step S6, which involves minimizing the overall objective function. Update the parameters of the mechanical equipment fault diagnosis model to achieve adaptive learning for new fault types and memory retention of old fault types;

[0109] The formula for the overall objective function in the k-th incremental stage includes:

[0110] ;

[0111] Where α is used to control the strength of the retention of old knowledge in the distillation process, and β is used to control the strength of the consistency constraint within the branch; This is due to losses during two-way distillation. For branch consistency constraints, It is constructed by combining the total loss of the classification.

[0112] Example 3 is based on Example 1 or Example 2.

[0113] Specifically, in the incremental phase operation of step S3:

[0114] The construction of the dual-branch structure includes: in the incremental stage, a linear fully connected classification branch and a cosine metric classification branch are used to construct the dual-branch structure. The linear fully connected classification branch divides the decision boundary through a hyperplane, and the cosine metric classification branch measures feature similarity through an angle.

[0115] Adaptive fusion using entropy gating mechanism includes: calculating the predicted entropy value for each input sample on the output of the linear fully connected classification branch and the cosine metric classification branch respectively, obtaining the entropy difference of the predicted entropy value, generating dynamic gating coefficients using the entropy difference, and performing adaptive weighted fusion on the Logits output of the linear fully connected classification branch and the cosine metric classification branch based on the dynamic gating coefficients, biasing towards the branch with higher confidence.

[0116] The constraints of the branch consistency loss include: calculating the difference between the teacher model and the student model in the predicted distribution of the old class dimension; using dynamic gating coefficients to weight and sum the difference values ​​of the linear fully connected classification branch and the cosine metric classification branch to obtain the consistency loss; and using the consistency loss to constrain each branch of the student model to closely follow the teacher model in the old knowledge representation.

[0117] Specifically, the bidirectional progressive distillation operation in step S4 includes:

[0118] The difference calculation and difficulty ranking are performed on the outputs of the teacher and student models after fusion. Based on the outputs after difference calculation and difficulty ranking, bidirectional progressive distillation is performed to obtain bidirectional distillation loss. Based on the bidirectional distillation loss, phased soft label bidirectional alignment is used to ensure that the student model fully absorbs the knowledge of the teacher model, achieving a smooth knowledge transition. Further, the difference calculation and difficulty ranking steps include: calculating the absolute error of the Logits of the student model and the teacher model in the old class dimension, using the absolute error as an indicator to measure the difficulty of class classification, and sorting the Logits of all old class dimensions in descending order of difficulty to obtain a difficulty ranking; based on the difficulty ranking, distillation is performed "from difficult classes to all classes," that is, prioritizing the distillation of the most difficult (local) classes, and then gradually expanding the distillation scope to all classes (global), prioritizing knowledge transfer for classes with high forgetting risk; subsequently, reverse distillation is performed "from all classes to difficult classes," achieving distillation from all classes (global) to difficult classes (local), achieving a smooth knowledge transition through phased soft label alignment. Through multiple rounds of bidirectional alignment, it is ensured that the student model fully absorbs the knowledge of the teacher model while retaining its own generalization ability.

[0119] In a preferred embodiment of the present invention, step S5: parameterizing the cluster centers of the new class of samples into updatable samples includes the following steps: performing K-means clustering on the features of the new class of samples, selecting cluster centers and adding perturbations to the cluster centers, initializing them as trainable parameterized pseudo-samples, and using them as updatable samples;

[0120] The method of iteratively optimizing the updated samples by combining feature alignment loss and total classification loss to obtain iteratively optimized memory-enhanced samples includes the following steps: using feature alignment loss to constrain the parameterized samples to approximate the feature mean distribution of the real samples, using classification loss to determine discriminability, updating the values ​​of the parameterized samples through backpropagation to obtain iteratively optimized memory-enhanced samples, and adding the iteratively optimized memory-enhanced samples to the memory bank for subsequent playback, replacing the original data storage.

[0121] Example 4 is based on any one of Examples 1 to 3.

[0122] Specifically, in step S2, the method for initial task training of the branch-fusion distillation network model containing the memory enhancement module using the initial fault dataset is as follows:

[0123] The one-dimensional vibration fault signal from the collected equipment operation information is converted into a two-dimensional amplitude spectrum using a fast Fourier transform, and then constructed as a three-channel input data. The input data is fed into the feature extractor of the deep convolutional neural network to obtain the feature vector matrix X. Where N represents the batch size and D represents the feature dimension. This indicates the backbone network feature extraction operation;

[0124] The feature vectors are input into the cosine metric classification branch, and the feature vector matrix X and the externally stored weight matrix library of the classifier are compared. L2 normalization is performed separately, and the formula is as follows:

[0125] Where C represents the number of categories of the current task. Represents the L2 norm;

[0126] Calculate the cosine similarity between the normalized features and weights, and introduce a scaling factor s to obtain the classifier's output. The output Logits are converted into a probability distribution using the Softmax function, and the cross-entropy loss function is calculated. The network parameters are then updated using the stochastic gradient descent algorithm until the model converges.

[0127] Specifically, in the construction of the dual-branch structure in step S3, during the incremental stage, the input feature vector matrix X is processed through branches A and B, respectively. Branch A is a linear fully connected classification branch, and branch B is a cosine metric classification branch. For the linear fully connected classification branch, the weight matrix is ​​used... and bias vector Calculate the linear output : Where C represents the number of categories in the current task, and D represents the feature dimension; for the cosine metric classification branch, the same algorithm as the cosine metric classification branch in the initial stage is used to obtain the cosine output. , .

[0128] Specifically, step S3, which uses an entropy gating mechanism to calculate weights for adaptive fusion of the two branch outputs, includes: incorporating a temperature coefficient. Apply a Softmax transform to the outputs of the two branches to obtain their output probability distributions. , The formula is:

[0129] ;

[0130] in, For temperature coefficient, These represent the outputs of the linear branch and the cosine branch, respectively.

[0131] Calculate the entropy value of each sample i on both branches. To measure the uncertainty of a forecast, the formula includes:

[0132] ;

[0133] in, C represents a constant used to stabilize the values, and C' represents the total number of dimensions in the old class. This represents the probability that the i-th sample belongs to the c-th class;

[0134] Calculating the gating coefficient based on entropy difference ,

[0135] ,in, A scaling factor to adjust the degree of influence of entropy difference;

[0136] The final fused output is obtained by weighting and fusing the linear fully connected classification branch and the cosine metric classification branch using gating coefficients. : .

[0137] Specifically, the constraint method for branch consistency loss in step S3, used to maintain the stability of each branch on the learned old class knowledge, includes:

[0138] In the incremental phase, the output of the category dimension corresponding to the old class is extracted from the slices of the Logits output of the teacher model and the student model. The KL divergence between the predicted distributions of the teacher model and the student model in the linear fully connected classification branch and the cosine metric classification branch are calculated respectively. The formula includes:

[0139] ;

[0140] Where C' represents the total number of dimensions in the old class. These represent the predicted probabilities of the teacher model and the student model on the linear fully connected classification branch, respectively. These represent the predicted probabilities of the teacher model and the student model on the cosine metric classification branch, respectively.

[0141] Using gating coefficient As a weighting factor, combined with the temperature coefficient Calculate branch consistency loss , ;

[0142] in, This means that the expected value of all samples in the current batch is calculated. Through the branch consistency loss function, the branch with higher confidence plays a leading role in preserving knowledge of the old class, while the branch with lower confidence plays a supporting role.

[0143] Specifically, step S4 calculates the branch fusion output differences and difficulty ranking, including:

[0144] Obtain the output Logits of the teacher model and student model after fusion in the two branches, denoted as and For each category c, calculate the mean absolute difference between the teacher model and the student model across all samples in the current batch. The formula includes:

[0145] ;

[0146] Where N represents the batch size, and C'' is the total number of old categories. The model's prediction score for the i-th sample in the c-th fault category;

[0147] The differences in each category are sorted in descending order, with larger differences indicating greater difficulty in classifying that category.

[0148] Specifically, the bidirectional gradual distillation in step S4 includes the following steps:

[0149] Constructing a staged distillation mask: Let the total number of stages in the gradual distillation be K, k=1,…,K; the set of categories included in the k-th stage. Category set The subset of categories with the highest difficulty ranking (k);

[0150] Construct the corresponding mask When category c belongs to the category set If the mask value is 1, then the mask value is 1; otherwise, it is 0. The algorithm includes: ;

[0151] In the distillation direction from difficult to easy, a mask is used. The stage probability distribution of the teacher model and the student model is calculated using the distillation temperature coefficient T. and The formula includes:

[0152] ;

[0153] in, The result of branch fusion representing the teacher model. The result of branch fusion representing the student model. This represents element-wise multiplication;

[0154] Calculate the KL divergence of the teacher-student model in stage k. The distillation loss from difficult class to all class was then obtained. The formula includes:

[0155] ;

[0156] ;

[0157] in, This represents the probability that the current sample belongs to the c-th type of fault after the teacher model branches are fused in the k-th stage. This represents the probability that the current sample belongs to the c-th type of fault after the student model branches are fused in the k-th stage. The stage weight is T, where T is the temperature coefficient.

[0158] After completing the distillation from the hardest class to all classes and updating the model parameters, a reverse distillation (from all classes to the hardest class) is performed. This involves gradually shrinking from a stage containing all classes to a stage containing only the hardest class, and the distillation loss in the second direction is calculated. Adding the losses in both directions gives the bidirectional distillation loss. .

[0159] And / or, in step S5, obtaining updatable samples includes: extracting features of new class real samples using the trained and frozen student model, and performing K-means clustering in the feature space to obtain K cluster center samples. Introducing disturbances Initialize the cluster centers as a trainable set of parameterized samples. The formulas for parameterized sample initialization include: .

[0160] Specifically, in step S5, the acquisition of feature alignment loss includes: constructing a reference sample subset: to avoid the parameterized samples only fitting the cluster centers and ignoring the intra-cluster distribution, this includes: for each cluster generated by clustering, selecting the sample closest to the cluster center. and farthest Sample construction class-level reference subset ;Calculate the feature difference between the parameterized sample set and the reference subset as the feature alignment loss. The formula for approximating the feature mean distribution of the true sample using constrained parameterized samples includes: ;in, This represents the feature extractor for the student model that has been trained and frozen. Represents a set of trainable parameterized samples. The reference sample set represents the frozen parameters; the frozen student model is used to... The samples in the dataset are classified and the cross-entropy loss is obtained. Cross-entropy loss Feature alignment loss Combined with memory enhancement loss The formula includes: ;in, For the sample predicted value, For the true labels of the samples, These are the feature alignment weight coefficients.

[0161] Specifically, in step S5, obtaining the total classification loss includes: in the incremental phase, calculating the classification loss of the model on the new class samples (new fault categories) using the cross-entropy loss function. The classification loss of old class samples and memory-enhanced samples after parameter updates. The total classification loss is obtained. The calculation method is as follows: ;in, To adjust the weighting coefficient for balancing old and new classes, this coefficient can be dynamically adjusted as the number of memory samples increases to emphasize the retention of knowledge from older classes.

[0162] Example 5, based on any of Examples 1 to 4: In this example, in step S1, vibration sensors installed on the test bench are used to collect bearing vibration signals under different operating conditions, and a fault diagnosis dataset containing initial and incremental tasks is constructed. To obtain diverse faulty bearing samples, wire cutting technology is used to set cracks of different sizes on the inner ring, outer ring, and rollers of the bearing, thereby simulating the continuous evolution and new local faults of the bearing throughout its entire life cycle in actual production.

[0163] This invention divides fault tasks at different stages into initial tasks and incremental tasks, and determines the number of fault categories for the initial tasks and incremental tasks.

[0164] Specifically, the initial task refers to the training task conducted in the early stages of fault diagnosis model training using a pre-collected dataset of bearing vibration signals containing basic fault types. In the initial task, the model employs a deep residual network combined with a cosine classifier to learn the frequency domain energy distribution and feature representation of basic faults, and parameterizes some representative samples as trainable instances to initialize the memory bank, thereby constructing an initial fault diagnosis model with a stable feature base. This initial model provides the foundation for subsequent incremental tasks, in which the model jointly learns new and old fault categories through memory enhancement and branch fusion mechanisms to continuously improve its fault diagnosis accuracy and generalization ability.

[0165] Incremental tasks refer to the tasks that require the fault diagnosis model to learn and adapt when new fault types or new fault samples appear during the fault diagnosis process. These tasks consist of several incremental stages arranged chronologically. In each stage of the incremental task, the model no longer builds separate branches for each old task to avoid the infinite growth of model parameters. Instead, it constructs a unified two-branch structure of linear classification and cosine classification. The outputs of the two branches are adaptively fused through an entropy gating mechanism, and the stability of the decision boundary is maintained by combining branch consistency constraints. At the same time, the parameterized memory enhancement module is used to replay the memory samples from the previous stage, and a bidirectional progressive distillation strategy is combined to perform joint training on mixed data. This approach can both use parameterized samples to replace the original data storage to protect privacy and reduce overhead, and effectively mitigate catastrophic forgetting through a difficulty-graded distillation strategy, ensuring that the model maintains good performance on both new and old tasks.

[0166] Example 6, based on Example 5, Figure 6 The structure of the flywheel bearing analysis and simulation system is shown. The simulation system includes: a flywheel 2 assembled in the housing 1 using the assembly method of the prior art, a drive device connected to the flywheel 2, a test bearing 3, and a vibration sensor installed at the bearing 3.

[0167] In this embodiment, the bearing model used is 6203DDUJNSK (but not limited to this; it can be applied to other models of mechanical systems in other embodiments), and the fault is introduced by wire cutting. Specifically, in the experimental parameter settings, the motor speed is set to 800 r / min and the sampling frequency is 10 kHz. The constructed fault dataset contains 16 health states, such as... Figure 5 (Bearing health status and fault task settings) As shown, NO indicates normal status, IF indicates inner ring fault status, OF indicates outer ring fault status, and BF indicates roller fault status. Faulty bearings include single pitting faults in the inner ring, outer ring, and rollers at five different fault dimensions: 0.2mm, 0.3mm, 0.4mm, 0.5mm, and 0.6mm.

[0168] Example 7 is based on Example 6.

[0169] Step S1: The bearing fault vibration signal is collected using a vibration sensor (e.g., an accelerometer) and a dataset containing various fault types is constructed as a memory. The memory contains the initial task dataset and the incremental task dataset.

[0170] Fault diagnosis tasks are divided into an initial phase and an incremental phase:

[0171] In the initial stage, the mechanical equipment fault diagnosis model is in the dataset. Training is conducted on the above, among which This is the initial training data. These are the labels corresponding to the training data. This refers to the number of samples of different fault types in the initial task. During the incremental phase, the model needs to be updated in the dataset. The set of faults learned up to stage t during training is defined as follows: The newly introduced fault set at the current stage is ,satisfy The memory-enhanced sample set used for replay is The dataset used for training satisfy .

[0172] like Figure 5 As shown, the initial task has four fault types (labels 0-3). P1, P2, P3, and P4 are four incremental tasks, each containing three new fault types (labels 4, 5, and 6 correspond to P1; labels 7, 8, and 9 correspond to P2; labels 10, 11, and 12 correspond to P3; and labels 13, 14, and 15 correspond to P4). In this embodiment, to simulate a storage-constrained industrial scenario during incremental learning, sufficient training samples are provided for the new fault types of the current task, while for the fault types of all previous tasks, only a small number of parameterized samples are replayed from the memory for each category. For both the initial and incremental tasks, each health or fault type is configured with 200 training samples and 100 test samples.

[0173] Step S2: Construct a branch-fusion distillation network model with a memory enhancement module. Use the initial fault dataset to train the branch-fusion distillation network model with the memory enhancement module on the initial task. In the initial stage, the branch-fusion distillation network model with the memory enhancement module uses a deep convolutional network to extract features and connects to a cosine classifier.

[0174] Specifically, the collected one-dimensional vibration fault signal is converted into a two-dimensional amplitude spectrum using a fast Fourier transform, and then constructed as a three-channel input data. The input data is fed into the feature extractor of the deep convolutional neural network to obtain the feature vector matrix X, which is represented as: Where N represents the batch size and D represents the feature dimension. This represents the feature extraction operation of the backbone network. The feature vector is then input into the cosine classifier branch, and the feature vector matrix X and the externally stored classifier weight matrix are compared. After L2 normalization, the calculation is as follows: Where C represents the number of categories of the current task. This represents the L2 norm. The cosine similarity between the normalized features and weights is calculated, and a scaling factor s is introduced to obtain the classifier's output. Finally, the output Logits are converted into a probability distribution using the Softmax function, and the cross-entropy loss function is calculated. The network parameters are then updated using the stochastic gradient descent algorithm until the model converges.

[0175] Step S3: In the incremental stage, a dual-branch structure is constructed using a linear fully connected classification branch and a cosine metric classification branch. The weights are calculated using an entropy gating mechanism to adaptively fuse the outputs of the two branches, and the branch consistency loss is calculated.

[0176] Specifically, in the incremental phase, to balance the learning ability (plasticity) for new tasks and the retention ability (stability) of old knowledge, the model simultaneously constructs two parallel classification branches: the linear classification branch focuses on dividing the decision hyperplane in the feature space. For the input feature vector matrix X, weights are used... and bias Calculate linear output The cosine output is calculated according to step S2. .

[0177] By utilizing the entropy difference between the two branches, dynamic gating coefficients are generated using the Sigmoid function. This coefficient determines the weighting ratio during branch fusion, causing the model to automatically favor branches with higher confidence (lower entropy): ; ;in, To control the scaling factor for entropy difference sensitivity, The entropy of the two branches are respectively. This is the final branch fusion output.

[0178] Branch consistency loss is used to ensure that the student and teacher models within each branch perform consistently in the old class space. The branch consistency loss utilizes the aforementioned gating coefficients. We perform a weighted summation of the KL divergences of the two branches, enabling the student model to learn the teacher model more rigorously on branches with higher confidence, thus obtaining the branch consistency loss. The formula includes:

[0179] ;in, For temperature coefficient, To find the expected function This represents the KL divergence calculation function, where C' represents the total number of dimensions in the old class. The representative teacher model predicts the probability of type c faults on both branches. This represents the student model's predicted probability for type c faults on both branches.

[0180] Step S4: Calculate the difference in output between the teacher model and the student model after fusion, sort the outputs in the old category dimension by difficulty, and perform bidirectional progressive distillation from difficult category to all categories and from all categories to difficult category accordingly, and calculate the bidirectional distillation loss.

[0181] Specifically, based on the entropy-gated branch fusion in step S4, the fusion outputs of the teacher model and the student model on the old class dimension are obtained respectively. Calculate the mean absolute difference between the teacher and student models across each old class dimension in the current batch of samples. :

[0182] ;

[0183] Where N represents the batch sample size, and C'' represents the total number of samples in the old category. This represents the output value of the i-th sample in the c-th category. It also represents the difference between all the old categories. Arrange in descending order, with the categories at the top being the more difficult to classify.

[0184] Constructing a staged distillation mask and probability distribution: The distillation process is defined as having K stages, with the k-th stage containing the following set of categories. Construct a mask If category c belongs to the current stage set ,but Otherwise, it is 0. Calculate the probability distributions of the teacher model and student model in the k-th stage using the mask. and :

[0185] ;

[0186] Where T is the temperature coefficient. This represents an element-wise multiplication operation. Then, the distillation loss in the first direction (from difficult-to-class to all classes) is calculated, following the order of gradually expanding from difficult-to-class categories to all categories, taking into account the weighted effects of each stage, to calculate the distillation loss in the first direction. :

[0187] ;

[0188] Where K represents the total number of distillation stages. These are the weighting coefficients. To calculate the expected function, These represent the output probability values ​​of the teacher model and the student model in the c-th category at stage k, respectively. Similarly, the distillation loss in the second direction (from all categories to difficult categories) can be obtained. .

[0189] Calculate the total loss of bidirectional asymptotic distillation : .

[0190] Step S5: Replay the memory samples from the previous stage, and parameterize the cluster centers of the current new class samples into updatable samples. Combine feature alignment loss and classification loss to iteratively optimize these parameterized samples to obtain memory-enhanced samples and expand the memory bank.

[0191] Specifically, the student model trained on the current task is used as a feature extractor to extract features from samples of the new category, and K-Means clustering is performed in the feature space to generate K clusters. The center sample of each cluster is selected. And add perturbation Then, a set of initial sample sets with updatable parameters is formed. To avoid overfitting due to excessive reliance on cluster centers and to preserve sample distribution information, the nearest and farthest samples from each cluster center are selected to form a reference subset. .

[0192] Computation of parameterized sample sets Compared with the real sample set The mean difference is used to obtain the feature difference loss. : ;in, Represents the student model feature extractor. This represents the number of samples in the set. Subsequently, iterative optimization generates memory-enhanced samples, while simultaneously calculating the cross-entropy classification loss. Feature alignment loss By jointly optimizing and updating sample parameters, the total loss of memory augmentation is improved. for:

[0193] ;

[0194] in, For parameterized samples, For its corresponding tag, The weight coefficients of the feature alignment loss are obtained; This is a memory-enhancing sample, which is then stored in the memory bank. middle.

[0195] Specifically, in the incremental phase, the classification loss of the model on the new fault category is calculated using the cross-entropy loss function. The classification loss of old class samples and memory-enhanced samples after parameter updates. The total classification loss is obtained. The calculation method is as follows: ;in, To adjust the weighting coefficient for balancing old and new classes, this coefficient can be dynamically adjusted as the number of memory samples increases to emphasize the retention of knowledge from older classes.

[0196] Step S6: Combine the total classification loss of cross-entropy, the branch consistency loss, and the bidirectional distillation loss to construct the overall objective function. Optimize the model using stochastic gradient descent and output the final fault diagnosis result.

[0197] Losses from bidirectional gradual distillation Branch consistency constraints and total category loss The total loss function for the k-th incremental stage is constructed by combining the following methods:

[0198] ;

[0199] Here, α controls the strength of old knowledge retention during the distillation process, and β controls the strength of consistency constraints within branches. This is achieved by minimizing the overall objective function. Update the model parameters to achieve adaptive learning for new fault types and retention of memories for old fault types.

[0200] In summary, after the incremental task training is completed, that is... Figure 5 After P4 completes training, the resulting diagnostic model needs to be tested. The test data includes all learned fault types to verify whether the model has the ability to mitigate catastrophic amnesia. The test results are presented in the form of a confusion matrix. Figure 3 The confusion matrix shown demonstrates that this method has a good resistance to forgetting. Figure 4 Feature visualization further demonstrates the classification effectiveness of this method, showing that the trained model obtained by this method can effectively cluster features. This indicates that the method of this invention can effectively alleviate catastrophic forgetting and achieve continuous diagnosis of bearing faults caused by unexpected new failures.

[0201] Furthermore, such as Figure 7 The table shown is a list of correspondences between existing lifelong learning methods M1~M6 and the BFDMA (BranchFusion Distillation Network with Memory Augmentation) of this invention. Figure 8(This is the structure data table for BFDMA of the present invention). Fine-tuning in M1, as a baseline strategy, is achieved through direct fine-tuning, but this leads to severe catastrophic forgetting. EWC in M2 mitigates forgetting by limiting the amount of updates based on Fisher information of important parameters. LwF in M3 maintains the output stability of old tasks by introducing knowledge distillation loss. iCaRL in M4 combines a replay strategy with a prototype classifier for incremental representation learning. LUCIR in M5 addresses the imbalance between new and old tasks by enhancing the classifier and feature space. The freezing method in M6 permanently anchors learned features by fixing a portion of the network structure. A1 removes the branch fusion part and uniformly adopts a linear branch structure; A2 removes bidirectional progressive distillation (BPD); A3 aims to demonstrate the superiority of BPD over traditional knowledge distillation methods; and A4 evaluates the performance of the memory enhancement module.

[0202] The diagnostic results of basic methods M1-M6 and the BFDMA used in this invention at different stages are as follows:

[0203] Fine-tuning of M1 exhibited severe catastrophic forgetting, with its accuracy dropping from 99.85% in stage 0 to 39.02% in stage 4, indicating that direct parameter updates failed to retain old knowledge. Although M2's EWC employed parameter regularization, its performance still significantly declined, reaching only 30.30% in stage 4, suggesting limited effectiveness under continuous fault type expansion. M3's LwF showed a similar degradation trend. M4's iCaRL achieved 85.47% accuracy in stage 4, while M5's LUCIR further improved performance through cosine normalization and bias correction, reaching 89.47%. M6's Freezing maintained relatively stable performance on older categories; however, its limited flexibility restricted its adaptability to new fault types, resulting in a final accuracy of 60.95%. The BFDMA proposed in this invention consistently outperformed all baseline models, maintaining an accuracy above 97% in all stages, reaching 97.13% in stage 4, approximately 7.7 and 11 percentage points higher than LUCIR and iCaRL, respectively. Figure 10 This demonstrates the changing accuracy trends of basic methods M1-M6 and the BFDMA used in this invention as lifelong learning tasks progress.

[0204] Example 8: A mechanical equipment fault diagnosis system, implementing the mechanical equipment fault diagnosis method of any one of Examples 1 to 7, includes the following steps:

[0205] The input module is used to acquire equipment operation information, including vibration signals from the equipment operation.

[0206] The diagnostic analysis module, based on equipment operation information, performs fault diagnosis and obtains diagnostic predictions through a pre-trained mechanical equipment fault diagnosis model.

[0207] Output module; used to output the diagnostic results of the mechanical equipment fault diagnosis model.

[0208] Working principle:

[0209] This invention collects vibration signals from bearings and converts them into spectrograms to construct a diagnostic dataset containing initial and incremental fault classes. It then constructs a bi-branch fault diagnosis model with a linear classification branch and a cosine metric branch. During the incremental task training phase, an entropy gating mechanism is used to adaptively fuse the bi-branch outputs, and branch consistency constraints are applied to maintain prediction stability. The output differences between the teacher and student networks are calculated to rank the classification difficulty, and bidirectional progressive distillation is performed accordingly, sequentially aligning the distribution from difficult samples to the entire sample and then in reverse. Simultaneously, a parameterized memory enhancement module is constructed, selecting samples close to the cluster center and boundaries as learnable memory units. The trained samples are updated by jointly optimizing the classification loss and feature alignment loss to obtain memory-enhanced samples. The final optimized model is used to diagnose the signal to be detected and output the fault type. Compared with traditional deep learning methods, this invention effectively alleviates the catastrophic forgetting problem in the incremental learning process, maintaining high-precision identification of old faults while learning new fault types, which is more in line with the actual scenario of dynamically increasing fault types in long-term operation of industrial equipment.

[0210] The above specific embodiments are specific support for the concept proposed in this invention, and should not be used to limit the scope of protection of this invention. Any equivalent changes or modifications made on the basis of this technical solution in accordance with the technical concept proposed in this invention shall still fall within the scope of protection of this invention.

Claims

1. A method for diagnosing mechanical equipment faults, characterized in that, include: Acquire equipment operation information, including vibration signals from the equipment operation; Based on the equipment operation information, a fault diagnosis prediction is obtained by using a pre-trained mechanical equipment fault diagnosis model; The training of the mechanical equipment fault diagnosis model includes: By constructing a total objective function and using stochastic gradient descent to optimize the mechanical equipment fault diagnosis model, the final fault diagnosis result is output. The total objective function includes the classification total loss of cross entropy, branch consistency loss, and bidirectional distillation loss. The training steps for a mechanical equipment fault diagnosis model include: Step S1: Based on the equipment operation information under different fault types, construct a memory containing an initial task dataset and an incremental task dataset as a diagnostic dataset. The initial task dataset contains initial fault classes, and the incremental task dataset contains incremental fault classes. The initial task dataset is used for basic knowledge learning in the early stage of training. The incremental task dataset contains new fault types as new class samples, and the incremental task contains several incremental stages arranged in chronological order. Step S2, the initial task includes: training the constructed branch fusion distillation network model with memory enhancement module on the initial task dataset; and generating memory enhancement samples for playback in the incremental stage based on the memory enhancement module; Step S3, the incremental stage includes: when a new fault type appears, the new fault type is taken as a new class sample, and the outputs of the two branches in the constructed dual-branch structure are adaptively fused using the entropy gating mechanism to obtain the branch consistency loss. Step S4: Constrain each branch of the student model in the bidirectional progressive distillation operation to closely follow the teacher model in terms of old knowledge representation by using the branch consistency loss; perform bidirectional progressive distillation on the output of the teacher model and student model after fusion to obtain the bidirectional distillation loss, and replay the memory enhancement samples from the previous stage. Step S5: Parameterize the cluster centers of the current new class samples into updatable samples, combine feature alignment loss and total classification loss to iteratively optimize the updatable samples to obtain iteratively optimized memory-enhanced samples, and expand the memory bank to obtain an updated diagnostic dataset.

2. The mechanical equipment fault diagnosis method according to claim 1, characterized in that: Also includes: In the incremental phase operation of step S3: The construction of the dual-branch structure includes: in the incremental stage, a linear fully connected classification branch and a cosine metric classification branch are used to construct the dual-branch structure. The linear fully connected classification branch divides the decision boundary through a hyperplane, and the cosine metric classification branch measures feature similarity through an angle. Adaptive fusion using entropy gating mechanism includes: calculating the predicted entropy value for each input sample on the output of the linear fully connected classification branch and the cosine metric classification branch respectively, obtaining the entropy difference of the predicted entropy value, generating dynamic gating coefficients using the entropy difference, and performing adaptive weighted fusion on the Logits output of the linear fully connected classification branch and the cosine metric classification branch based on the dynamic gating coefficients, biasing towards the branch with higher confidence. The constraints of the branch consistency loss include: calculating the difference between the teacher model and the student model in the old class dimension prediction distribution before branch fusion; using dynamic gating coefficients to weight and sum the difference values ​​of the linear fully connected classification branch and the cosine metric classification branch to obtain the consistency loss; and using the consistency loss to constrain each branch of the student model to closely follow the teacher model in the old knowledge representation.

3. The mechanical equipment fault diagnosis method according to claim 2, characterized in that: The bidirectional progressive distillation operation in step S4 includes: The difference between the outputs of the teacher model and the student model after fusion is calculated and ranked by difficulty. Based on the outputs after difference calculation and difficulty ranking, bidirectional progressive distillation is performed to obtain the bidirectional distillation loss. Based on bidirectional distillation loss, bidirectional alignment with soft labels in stages enables the student model to fully absorb the knowledge of the teacher model, achieving a smooth transition of knowledge.

4. The mechanical equipment fault diagnosis method according to claim 3, characterized in that: In step S5: The cluster centers of the new class of samples are parameterized into updatable samples, including the following steps: K-means clustering is performed on the features of the new class of samples, cluster centers are selected and perturbations are added to the cluster centers, initialized as trainable parameterized pseudo-samples, and used as updatable samples; The method of iteratively optimizing the updated samples by combining feature alignment loss and total classification loss to obtain iteratively optimized memory-enhanced samples includes the following steps: using feature alignment loss to constrain the parameterized samples to approximate the feature mean distribution of the real samples, using classification loss to determine discriminability, updating the values ​​of the parameterized samples through backpropagation to obtain iteratively optimized memory-enhanced samples, and adding the iteratively optimized memory-enhanced samples to the memory bank for subsequent playback, replacing the original data storage.

5. The mechanical equipment fault diagnosis method according to claim 4, characterized in that: In step S2, the method for initial task training of the branch-fusion distillation network model containing the memory enhancement module using the initial fault dataset is as follows: The one-dimensional vibration fault signal from the collected equipment operation information is converted into a two-dimensional amplitude spectrum using a fast Fourier transform, and then constructed as a three-channel input data. The input data is fed into the feature extractor of the deep convolutional neural network to obtain the feature vector matrix X. Where N represents the batch size and D represents the feature dimension. This indicates the backbone network feature extraction operation; The feature vectors are input into the cosine metric classification branch, and the feature vector matrix X and the externally stored weight matrix library of the classifier are compared. L2 normalization is performed separately, and the formula is as follows: Where C represents the number of categories of the current task. Represents the L2 norm; Calculate the cosine similarity between the normalized features and weights, and introduce a scaling factor s to obtain the classifier's output. The output Logits are converted into a probability distribution using the Softmax function, and the cross-entropy loss function is calculated. The network parameters are then updated using the stochastic gradient descent algorithm until the model converges.

6. The mechanical equipment fault diagnosis method according to claim 5, characterized in that: In the construction of the dual-branch structure in step S3, the input feature vector matrix X is processed through branch A and branch B in the incremental stage. Branch A is a linear fully connected classification branch, and branch B is a cosine metric classification branch. For the linear fully connected classification branch, the weight matrix is ​​used. and bias vector Calculate the linear output : Where C represents the number of categories in the current task, and D represents the feature dimension; For the cosine metric classification branch, the same algorithm as in the initial stage is used to obtain the cosine output. , ; And / or, step S3, which uses an entropy gating mechanism to calculate weights to adaptively fuse the outputs of the two branches, includes: Combined with temperature coefficient Apply a Softmax transform to the outputs of the two branches to obtain the output probability distributions of the two branches. , The formula is: ; in, For temperature coefficient, These represent the outputs of the linear branch and the cosine branch, respectively. Calculate the entropy value of each sample i on both branches. To measure the uncertainty of a forecast, the formula includes: ; in, C represents a constant used to stabilize the values, and C' represents the total number of dimensions in the old class. and These represent the probabilities that the i-th sample belongs to the c-th class on the corresponding branch; Calculating the gating coefficient based on entropy difference , , ,in, A scaling factor to adjust the degree of influence of entropy difference; The final fused output is obtained by weighting and fusing the linear fully connected classification branch and the cosine metric classification branch using gating coefficients. : ; And / or, the constraint method for branch consistency loss in step S3, used to maintain the stability of each branch on the learned old class knowledge, includes: In the incremental phase, the output of the category dimension corresponding to the old class is extracted from the slices of the Logits output of the teacher model and the student model. The KL divergence between the predicted distributions of the teacher model and the student model in the linear fully connected classification branch and the cosine metric classification branch are calculated respectively. The formula includes: ; Where C' represents the total number of dimensions in the old class. These represent the predicted probabilities of the teacher model and the student model on the linear fully connected classification branch, respectively. These represent the predicted probabilities of the teacher model and the student model on the cosine metric classification branch, respectively. Using gating coefficient As a weighting factor, combined with the temperature coefficient Calculate branch consistency loss , ; in, This means that the expected value of all samples in the current batch is calculated. Through the branch consistency loss function, the branch with higher confidence plays a leading role in preserving knowledge of the old class, while the branch with lower confidence plays a supporting role.

7. The mechanical equipment fault diagnosis method according to claim 6, characterized in that: Step S4 calculates the branch fusion output differences and difficulty ranking, including: Obtain the output Logits of the teacher model and student model after fusion in the two branches, denoted as and For each category c, calculate the mean absolute difference between the teacher model and the student model across all samples in the current batch. The formula includes: ; Where N represents the batch size and C'' represents the total number of old categories. The model's prediction score for the i-th sample in the c-th fault category; The differences in each category are sorted in descending order, with larger differences indicating greater difficulty in classifying that category. And / or, the bidirectional incremental distillation in step S4 includes the following steps: Constructing a staged distillation mask: Let the total number of stages in the gradual distillation be K, k=1,…,K; the set of categories included in the k-th stage. Category set The subset of categories with the highest difficulty ranking (k); Construct the corresponding mask When category c belongs to the category set If the mask value is 1, then the mask value is 1; otherwise, it is 0. The algorithm includes: ; In the distillation direction from difficult to easy, a mask is used. The stage probability distribution of the teacher model and the student model is calculated using the distillation temperature coefficient T. and The formula includes: ; in, The result of branch fusion representing the teacher model. The result of branch fusion representing the student model. This represents element-wise multiplication; Calculate the KL divergence of the teacher-student model in stage k. The distillation loss from difficult class to all class was then obtained. The formula includes: ; ; in, This represents the probability that the current sample belongs to the c-th type of fault after the teacher model branches are fused in the k-th stage. This represents the probability that the current sample belongs to the c-th type of fault after the student model branches are fused in the k-th stage. The stage weights are T, where T is the distillation temperature coefficient. After completing the distillation from the hardest class to all classes and updating the model parameters, back distillation is performed, which involves gradually shrinking from the stage containing all classes to the stage containing only the hardest class, and the distillation loss in the second direction is calculated. Adding the losses in both directions gives the bidirectional distillation loss. ; And / or, in step S5, obtaining updatable samples includes: extracting features of new class real samples using the trained and frozen student model, and performing K-means clustering in the feature space to obtain K cluster center samples. Introducing disturbances Initialize the cluster centers as a trainable set of parameterized samples. The formulas for parameterized sample initialization include: ; And / or, in step S5, obtaining the feature alignment loss includes: constructing a reference sample subset: to avoid the parameterized samples only fitting the cluster centers and ignoring the intra-cluster distribution, this includes: for each cluster generated by clustering, selecting the sample closest to the cluster center. and farthest Sample construction class-level reference subset ;Calculate the feature difference between the parameterized sample set and the reference subset as the feature alignment loss. The formula for approximating the feature mean distribution of the true sample using constrained parameterized samples includes: ;in, This represents the feature extractor for the student model that has been trained and frozen. Represents a set of trainable parameterized samples. The reference sample set represents the frozen parameters; the frozen student model is used to... The samples in the dataset are classified and the cross-entropy loss is obtained. Cross-entropy loss Feature alignment loss Combined with memory enhancement loss The formula includes: ;in, For the sample predicted value, For the true labels of the samples, These are the feature alignment weight coefficients; And / or, in step S5, obtaining the total classification loss includes: in the incremental phase, calculating the classification loss of the model on the new fault category of the new class samples using the cross-entropy loss function. The classification loss of old class samples and memory-enhanced samples after parameter updates. The total classification loss is obtained. The calculation method is as follows: ;in, This represents a weighting coefficient that balances the old and new classes. As the number of memory samples increases, this coefficient can be dynamically adjusted to emphasize the retention of knowledge from the old classes.

8. The mechanical equipment fault diagnosis method according to claim 1, characterized in that: It also includes step S6, which involves minimizing the overall objective function. Update the parameters of the mechanical equipment fault diagnosis model to achieve adaptive learning for new fault types and memory retention of old fault types; The formula for the overall objective function in the k-th incremental stage includes: ; Where α is used to control the strength of the retention of old knowledge in the distillation process, and β is used to control the strength of the consistency constraint within the branch; This is due to losses during two-way distillation. For branch consistency constraints, Total loss by category.

9. A mechanical equipment fault diagnosis system, implementing the steps of the mechanical equipment fault diagnosis method according to any one of claims 1-8, characterized in that, include: The input module is used to acquire equipment operation information, including vibration signals from the equipment operation. The diagnostic analysis module, based on equipment operation information, performs fault diagnosis and obtains diagnostic predictions through a pre-trained mechanical equipment fault diagnosis model. Output module; Used to output the diagnostic results of mechanical equipment fault diagnosis models.

Citation Information

Patent Citations

  • Gearbox incremental fault diagnosis method and system based on lifelong learning

    CN114429153A

  • Method and system for monitoring fault type in fault bearing

    CN118260631A