Bearing fault diagnosis method and system based on bimodal feature pyramid fusion

By employing a dual-modal feature pyramid fusion method, utilizing a three-branch feature extraction module and meta-learning pre-training, combined with feature distribution alignment fine-tuning, the problem of insufficient stability and accuracy in cross-domain diagnosis of small samples in bearing fault diagnosis is solved, achieving efficient representation and adaptation to complex fault modes.

CN121834664APending Publication Date: 2026-04-10FOSHAN UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-24
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing deep learning methods rely on a large amount of high-quality labeled data for bearing fault diagnosis, and the difficulty in obtaining labels leads to insufficient stability and accuracy in cross-domain fault diagnosis with small samples.

Method used

A dual-modal feature pyramid fusion method is adopted. The bearing fault diagnosis model is constructed by pre-training with meta-learning and fine-tuning with feature distribution alignment through a three-branch feature extraction module. High-quality training samples are generated by overlapping sampling. Multimodal features are extracted by combining Swin Transformer, multi-scale ResNet and GRU branches. The model is stably adapted to new working conditions with a very small number of samples by using the FD-Align fine-tuning strategy.

Benefits of technology

It improves the stability and accuracy of cross-domain fault diagnosis with small samples, achieves comprehensive characterization of complex fault modes, and enhances the model's adaptability and generalization performance under new operating conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121834664A_ABST
    Figure CN121834664A_ABST
Patent Text Reader

Abstract

The invention discloses a bearing fault diagnosis method and system based on bimodal feature pyramid fusion, and the method comprises the steps: obtaining one-dimensional bearing vibration signals under different working conditions, carrying out the data preprocessing, and constructing a time-frequency image of bearing vibration data; a three-branch feature extraction module and a feature pyramid fusion module are introduced, a bearing fault diagnosis model is constructed, and a fine-tuned bearing fault diagnosis model is constructed through meta-learning pre-training and feature distribution alignment fine tuning; and based on the fine-tuned bearing fault diagnosis model, carrying out bearing fault diagnosis on the time-frequency image of the bearing vibration data and the one-dimensional bearing vibration signal to obtain a bearing fault diagnosis result. According to the invention, the stability of small sample cross-domain fault diagnosis can be improved, and the bearing fault diagnosis precision is improved. The bearing fault diagnosis method and system based on bimodal feature pyramid fusion can be widely applied to the technical field of bearing fault diagnosis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of bearing fault diagnosis technology, and in particular to a bearing fault diagnosis method and system based on dual-modal feature pyramid fusion. Background Technology

[0002] With the rapid development of modern industrial systems towards intelligence and automation, ensuring the safe, reliable, and continuous operation of core mechanical equipment (such as motors, fans, and gearboxes) has become the lifeline of industrial production. Rotating machinery, especially its key component, rolling bearings, is the core of most mechanical transmission systems. Therefore, timely and accurate fault diagnosis of bearings is of paramount economic and social significance for preventing catastrophic accidents, reducing maintenance costs, and achieving predictive maintenance.

[0003] Traditional fault diagnosis relies on signal processing techniques and expert experience. Engineers need to extract time-domain features such as peak value, root mean square (RMS), and kurtosis from vibration signals, or obtain spectral features through Fourier transform, and then combine them with pattern recognition algorithms for classification. This method is highly dependent on the prior knowledge of experts, and the feature extraction process is cumbersome and has limited generalization ability.

[0004] In recent years, artificial intelligence technologies, represented by deep learning, have brought revolutionary changes to fault diagnosis. Models such as Convolutional Neural Networks (CNNs) and Recurrent Neural Networks (RNNs) can automatically learn and extract deep, discriminative features from raw data, avoiding the drawbacks of manual feature engineering and achieving diagnostic accuracy surpassing traditional methods in many scenarios. For example, researchers have proposed CNN-Transformer hybrid networks (Dconformer) to jointly perform signal denoising and fault diagnosis, or designed reliable multi-scale attention CNN models to improve robustness under strong noise. However, these advanced deep learning methods generally suffer from a fatal Achilles' heel: they are extremely dependent on a large amount of high-quality, labeled training data. Only when the amount of data is large enough and covers all possible fault modes can the model learn reliable patterns. However, in actual industrial settings, this prerequisite is often difficult to meet: 1) Data scarcity: Mechanical equipment operates normally most of the time, and failures are low-probability events. Therefore, collecting a large number of failure samples, especially serious ones, is difficult, costly, and poses safety risks.

[0005] 2) Difficulty in obtaining labels: Specialized labeling of the collected massive amounts of data requires domain experts to invest a lot of time and energy, resulting in extremely high labeling costs. Summary of the Invention

[0006] To address the aforementioned technical problems, the present invention aims to provide a bearing fault diagnosis method and system based on dual-modal feature pyramid fusion, which can improve the stability of small-sample cross-domain fault diagnosis and thus improve the accuracy of bearing fault diagnosis.

[0007] The first technical solution adopted in this invention is a bearing fault diagnosis method based on dual-modal feature pyramid fusion, comprising the following steps: One-dimensional bearing vibration signals under different working conditions are acquired and data preprocessed to construct a time-frequency image of bearing vibration data. A three-branch feature extraction module and a feature pyramid fusion module are introduced to construct a bearing fault diagnosis model. The model is then fine-tuned by pre-training with meta-learning and aligning with the feature distribution. Based on the fine-tuned bearing fault diagnosis model, bearing fault diagnosis is performed on the time-frequency image of bearing vibration data and the one-dimensional bearing vibration signal to obtain bearing fault diagnosis results.

[0008] Furthermore, the step of acquiring one-dimensional bearing vibration signals under different working conditions and performing data preprocessing to construct a time-frequency image of the bearing vibration data specifically includes: One-dimensional bearing vibration signals under different working conditions are acquired and overlapped to obtain continuously overlapping bearing vibration data sample signals. Standardize and label the continuously overlapping bearing vibration data sample signals to obtain labeled bearing vibration data sample signals. Short-time Fourier transform is performed on the labeled bearing vibration data sample signals to obtain the time-frequency image of the bearing vibration data.

[0009] Furthermore, the step of introducing a three-branch feature extraction module and a feature pyramid fusion module to construct a bearing fault diagnosis model, and then fine-tuning it through meta-learning pre-training and feature distribution alignment to construct a fine-tuned bearing fault diagnosis model, specifically includes: A bearing fault diagnosis model is constructed by introducing a three-branch feature extraction module and a feature pyramid fusion module. The three-branch feature extraction module includes a Swing Transformer branch module, a multi-scale ResNet branch module, and a GRU branch module. The labeled bearing vibration data sample signals are divided into data segments to construct a source domain bearing fault diagnosis dataset and a target domain bearing fault diagnosis dataset. Based on the source domain bearing fault diagnosis dataset, the bearing fault diagnosis model is pre-trained using meta-learning to obtain the pre-trained bearing fault diagnosis model. Based on the target domain bearing fault diagnosis dataset, the pre-trained bearing fault diagnosis model is fine-tuned by feature distribution alignment to construct the fine-tuned bearing fault diagnosis model.

[0010] Furthermore, the step of performing meta-learning pre-training on the bearing fault diagnosis model based on the source domain bearing fault diagnosis dataset to obtain the pre-trained bearing fault diagnosis model specifically includes: Based on the source domain bearing fault diagnosis dataset, the three-branch feature extraction module of the bearing fault diagnosis model is pre-trained. A large number of N-way K-shot tasks were sampled from the source domain bearing fault diagnosis dataset, and source domain bearing fault support set samples and source domain bearing fault query set samples were constructed. Based on the N-way K-shot task, the feature mean of each category is calculated from the source domain bearing fault support set samples, and the classification loss is calculated based on distance from the source domain bearing fault query set samples for backpropagation optimization, resulting in a pre-trained bearing fault diagnosis model.

[0011] Furthermore, the step of fine-tuning the pre-trained bearing fault diagnosis model based on the target domain bearing fault diagnosis dataset by aligning its feature distribution and constructing the fine-tuned bearing fault diagnosis model specifically includes: Based on the target domain bearing fault diagnosis dataset, a labeled partial dataset is obtained to construct fine-tuned samples and input into the three-branch feature extraction module of the pre-trained bearing fault diagnosis model for forward propagation to obtain the initial target domain bearing fault features. First, the isolated forest algorithm is used to detect anomalies in the bearing fault features of the initial target domain. Then, the K-means clustering algorithm is used to cluster the features to obtain pseudo features of the target domain. The fine-tuned samples are input into the three-branch feature extraction module of the bearing fault diagnosis model for feature extraction to obtain the true features of the target domain; The similarity between the pseudo-features and the real features of the target domain is calculated to obtain the initial feature similarity distribution before fine-tuning; The fine-tuned samples are input into the three-branch feature extraction module of the pre-trained bearing fault diagnosis model to extract features and obtain pseudo features under the target domain iteration rounds. The similarity between the pseudo-features of the target domain and the pseudo-features of the target domain in each iteration round is calculated to obtain the current distribution; Calculate the KL divergence of the current distribution relative to the initial feature similarity distribution before fine-tuning, and use it as the distribution alignment loss. Introduce the classification loss to construct the total loss function. Perform backpropagation to update the pre-trained bearing fault diagnosis model and construct the fine-tuned bearing fault diagnosis model.

[0012] Furthermore, the expression for the total loss function is as follows: ; In the above formula, Represents the total loss function. This represents the distribution alignment loss. Represents classification loss, This represents hyperparameters.

[0013] Furthermore, the step of performing bearing fault diagnosis on the time-frequency image of bearing vibration data and the one-dimensional bearing vibration signal based on the fine-tuned bearing fault diagnosis model to obtain the bearing fault diagnosis result specifically includes: The time-frequency image of bearing vibration data and the one-dimensional bearing vibration signal are input into the fine-tuned bearing fault diagnosis model. The Swin Transformer branch module based on the fine-tuned bearing fault diagnosis model captures global dependencies and long-range context information from the time-frequency images of bearing vibration data to obtain global features of bearing faults. Based on the multi-scale ResNet branch module of the fine-tuned bearing fault diagnosis model, local detail features are extracted from the time-frequency image of bearing vibration data to obtain a multi-scale local feature set of bearing fault. Based on the fine-tuned bearing fault diagnosis model, the GRU branch module captures the dynamic change law and sequence dependence of the one-dimensional bearing vibration signal in the time dimension, and obtains the temporal characteristics of bearing fault. Based on the feature pyramid fusion module of the fine-tuned bearing fault diagnosis model, the global features of bearing faults, the multi-scale local feature set of bearing faults, and the temporal features of bearing faults are projected onto a unified feature dimension and fused to obtain the fused bearing fault features. The bearing fault diagnosis results are determined based on the integrated bearing fault characteristics.

[0014] The second technical solution adopted in this invention is: a bearing fault diagnosis system based on dual-modal feature pyramid fusion, comprising: The first module is used to acquire one-dimensional bearing vibration signals under different working conditions and perform data preprocessing to construct a time-frequency image of bearing vibration data. The second module is used to introduce the three-branch feature extraction module and the feature pyramid fusion module to build a bearing fault diagnosis model and fine-tune it by pre-training through meta-learning and aligning it with the feature distribution to build a fine-tuned bearing fault diagnosis model. The third module is used to perform bearing fault diagnosis on the time-frequency image of bearing vibration data and one-dimensional bearing vibration signal based on the fine-tuned bearing fault diagnosis model, and obtain the bearing fault diagnosis result.

[0015] The beneficial effects of the method and system of this invention are as follows: By acquiring one-dimensional bearing vibration signals under different working conditions and performing data preprocessing, a time-frequency image of bearing vibration data is constructed. This enables the efficient generation of a large-scale, high-quality training sample set from limited original vibration signals. Furthermore, a three-branch feature extraction module and a feature pyramid fusion module are introduced to construct a bearing fault diagnosis model. Through meta-learning pre-training and feature distribution alignment fine-tuning, a fine-tuned bearing fault diagnosis model is constructed. The pseudo-feature prototype is used as the distribution anchor point, and explicit distribution alignment constraints are applied. This makes the fine-tuning process of the model under a very small number of target domain samples exceptionally stable and efficient. It successfully achieves the goal of fully adapting to new working conditions while maximizing the model's generalization ability, overcoming the core challenge of cross-domain fault diagnosis with small samples. Finally, based on the fine-tuned bearing fault diagnosis model, bearing fault diagnosis is performed on the time-frequency image of bearing vibration data and the one-dimensional bearing vibration signal to obtain the bearing fault diagnosis result. The dual-modal three-branch network achieves a comprehensive representation of the vibration signal, improving the accuracy of bearing fault diagnosis. Attached Figure Description

[0016] Figure 1 This is a flowchart of the bearing fault diagnosis method based on dual-modal feature pyramid fusion of the present invention; Figure 2 This is a structural block diagram of the bearing fault diagnosis system based on dual-modal feature pyramid fusion of the present invention; Figure 3 This is a schematic diagram illustrating the principle of meta-learning pre-training and feature distribution alignment fine-tuning provided in a specific embodiment of the present invention; Figure 4 This is a flowchart illustrating the feature distribution alignment (FD-Align) constraint fine-tuning provided in a specific embodiment of the present invention; Figure 5 This is a schematic diagram of data preprocessing provided in a specific embodiment of the present invention; Figure 6 This is a schematic diagram of the accuracy distribution (5-shot) of 12 repeated tasks with 10 random seeds provided in a specific embodiment of the present invention; Figure 7 This is a schematic diagram of the accuracy distribution (1-shot) of 12 repeated tasks with 10 random seeds provided in a specific embodiment of the present invention; Figure 8 This is a schematic diagram of a comparative experiment using broken lines provided in a specific embodiment of the present invention; Figure 9 This is a comparative experimental column diagram provided in a specific embodiment of the present invention. Detailed Implementation

[0017] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments. The step numbers in the following embodiments are only for ease of explanation and do not limit the order of the steps. The execution order of each step in the embodiments can be adapted according to the understanding of those skilled in the art.

[0018] First, the technical terms used in the embodiments of this invention will be explained: 1) Meta-learning: A method that enables a model to learn by training it on a large number of related tasks, allowing it to quickly adapt to new tasks with only a small number of samples.

[0019] 2) Few-Shot Learning (FSL): refers to machine learning scenarios where only a very small number (e.g., 1 or 5) of labeled samples are available for learning in each category.

[0020] 3) Domain: Refers to a specific data distribution, usually determined by operating conditions (such as rotational speed and load). The source domain is the domain where the training data is located, and the target domain is the new domain to be adapted.

[0021] 4) Prototype: In metric learning, it refers to the average representation or center point of all samples of a class in the feature space.

[0022] 5) KL divergence (Kullback–Leibler Divergence): A measure of the difference between two probability distributions.

[0023] Furthermore, it should be noted that, in order to overcome the core bottleneck of "data scarcity," related technologies further utilize the intersection of transfer learning and few-shot learning for cross-domain few-shot fault diagnosis. The core idea is to leverage knowledge learned from one or more source domains (typically richly labeled fault data collected under controlled laboratory conditions) to quickly assist the model in fault diagnosis in a target domain (the actual industrial field environment) with very limited data and different operating conditions.

[0024] Currently, existing technological approaches to solving this problem can be divided into two categories: Category 1: Domain Adaptive Methods.

[0025] These methods utilize both labeled source domain data and unlabeled (or poorly labeled) target domain data during the training phase. By designing specific loss functions, they explicitly narrow down the distributions of the source and target domains in the feature space, making the features learned by the model insensitive to changes in the domains. For example, some methods employ adversarial training, while others use statistics (such as Maximum Mean Difference, MMD) to measure and minimize inter-domain differences. Although effective, these methods typically assume access to the target domain data during training, and often require retraining whenever a completely new target domain is introduced, resulting in insufficient flexibility.

[0026] The second category: methods based on meta-learning.

[0027] Meta-learning, or "learning to learn," is a more promising emerging paradigm. It trains the model by simulating few-shot learning tasks in the source domain, enabling the model to acquire a "rapid adaptive capability." Specifically, during the pre-training phase, the model no longer learns how to identify specific fault categories, but rather learns "how to quickly learn to identify new categories based on a small number of samples." Among these methods, metric-based meta-learning, especially prototype networks, has become one of the most favored models for few-shot fault diagnosis due to its simple structure and efficient training. This is also the implementation scheme most similar to that of this invention.

[0028] 1) The basic working principle of prototype networks and their variants: Embedding function: First, a neural network (usually a convolutional neural network CNN, such as ResNet) is used as an "embedding function" or "feature extractor" to map input samples (such as the time-frequency plot of a vibration signal) into a low-dimensional feature space.

[0029] Prototype computation: For a new task (e.g., a target domain with 5 fault types, each with only 1 labeled sample), these few labeled samples constitute the "support set". Each sample in the support set is input into an embedding function to obtain its feature vector. Then, the average of the feature vectors of all samples in the same class is taken; this average is called the "prototype" of that class. The prototype can be understood as the "center point" or "representative" of that type of fault in the feature space.

[0030] Classification decision: For a "query" sample to be classified, it is mapped to the feature space, and then the distance between its feature vector and each class prototype is calculated (usually using Euclidean distance). The closer the distance, the higher the probability of belonging to that class. Finally, a probability distribution is output through a Softmax function.

[0031] 2) Improved variants for fault diagnosis: Researchers recognized the limited feature extraction capabilities of the basic prototype network and therefore proposed several improvement schemes, such as: Recursive Prototype Network (RPN): To address the issue of inaccurate prototype calculations caused by outliers, RPN introduces a coordinate attention mechanism, allowing the model to focus more on key regions in the signal that are relevant to the fault. Simultaneously, it employs recursive computation, iteratively updating the prototype representation multiple times, making the final prototype more resistant to outlier interference, thus resulting in greater stability and representativeness.

[0032] Generalized Model-Independent Meta-Learning (GMAML): To handle "heterogeneous" data from different sensors or signals, GMAML constructs a powerful, multi-kernel, efficient channel attention feature encoder to extract general diagnostic knowledge from diverse signals. Furthermore, it introduces a flexible weight guidance factor to optimize the model's training strategy across different meta-tasks, enhancing its generalization ability.

[0033] In summary, the core idea of ​​the relevant technologies can be summarized as follows: using a (usually a convolutional neural network) as the backbone feature extractor, pre-training it in the source domain through meta-learning (especially the prototype network paradigm) to achieve good feature extraction and rapid adaptation capabilities; when facing the target domain, calculating the prototype using a very small number of samples, and performing nearest neighbor classification in the feature space. Subsequent improvements mainly focus on two directions: "optimizing the structure of the feature extractor" and "improving the method of prototype calculation and measurement".

[0034] However, the relevant technologies still have the following technical drawbacks: 1) Insufficient feature extraction: Existing prototype networks usually use feature extractors with relatively simple structures (such as a single CNN or ResNet), which are difficult to fully and adequately characterize the complex time-domain, frequency-domain and time-frequency-domain features in industrial vibration signals, resulting in insufficient ability to identify complex fault modes, especially under strong noise and nonlinear conditions.

[0035] 2) Inter-domain distribution shift problem: When the operating conditions (such as rotational speed) between the source domain and the target domain differ significantly, the data distribution will shift significantly. When fine-tuning the model with a very small number of target domain samples, a dilemma arises: if the entire network is fine-tuned, it is prone to overfitting; if only the classifier is fine-tuned, the feature extractor cannot adapt to the target domain distribution, resulting in a sharp decline in the model's generalization performance.

[0036] 3) The fine-tuning process is unstable: Under the constraint of very few samples in the target domain (such as 1 sample per class), traditional fine-tuning strategies lack effective constraints and are prone to overfitting and training oscillations, resulting in unstable model performance.

[0037] Therefore, the objective of this invention is: 1) Provide a feature extraction network architecture that can fully extract multi-modal and multi-scale complementary features of vibration signals, thereby improving the model's ability to represent complex fault modes.

[0038] 2) Provides a fine-tuning strategy that can effectively alleviate the distribution shift between the source and target domains and improve the generalization performance of the model in cross-domain scenarios.

[0039] 3) Provide a training mechanism that can stably fine-tune and suppress overfitting with a very small number of samples, ensuring the robustness of the model under small sample conditions.

[0040] Reference Figure 1 This invention provides a bearing fault diagnosis method based on dual-modal feature pyramid fusion, which includes the following steps: S100: Acquire one-dimensional bearing vibration signals under different working conditions and perform data preprocessing to construct a time-frequency image of bearing vibration data; Specifically, one-dimensional bearing vibration signals under different working conditions are acquired and overlapped to obtain continuously overlapping bearing vibration data sample signals; the continuously overlapping bearing vibration data sample signals are standardized and labeled to obtain labeled bearing vibration data sample signals; the labeled bearing vibration data sample signals are subjected to short-time Fourier transform to obtain the time-frequency image of bearing vibration data.

[0041] In this embodiment, bearing vibration signals under different operating conditions are collected. The original one-dimensional vibration signal is oversampled, with each sample containing 1024 data points, and then standardized. Subsequently, each one-dimensional sample is converted into a 33-row × 63-column time-frequency image using a short-time Fourier transform (STFT). Therefore, the network input includes data in two modes: the original one-dimensional time-series signal and the time-frequency image.

[0042] More specifically, such as Figure 5 As shown, the specific steps are as follows: 1) Continuous signal acquisition; A vibration acceleration sensor mounted on the bearing housing collects continuous vibration acceleration signals of rotating machinery during operation. This signal contains dynamic information about the bearing under various health conditions (normal, inner ring fault, outer ring fault, rolling element fault, etc.).

[0043] 2) Overlap sampling strategy; In order to make full use of the limited raw data, increase the number of training samples to improve the generalization ability of the model, and ensure that complete fault impact features can be captured, this invention adopts a fixed-length overlapping sampling method.

[0044] As shown in the attached diagram, the specific sampling parameters are set as follows: Sample length: Each data sample contains 1024 consecutive data points. This length has been carefully chosen to cover the typical impact response cycle caused by bearing failure, ensuring that a single sample contains complete fault characteristic information.

[0045] Step size: The interval between two adjacent samples, i.e., the step size, is set to 80 data points.

[0046] Overlap: Since the step size (80) is much smaller than the sample length (1024), there is a large amount of data overlap between adjacent samples. The overlap is 1024 - 80 = 944 data points. This high overlap sampling strategy can effectively generate a large number of training samples from limited original data, which is especially suitable for small sample learning scenarios and can maximize the mining and utilization of data value.

[0047] 3) Sample construction and dataset formation; According to the sampling parameters, data segments are extracted one after another from the continuous vibration signal, thus generating a series of continuous, partially overlapping data samples. Each sample shares most of the data with its neighboring samples, but also slides along the time axis.

[0048] Subsequently, each sample is labeled with a fault category based on its corresponding bearing health condition. Finally, all these labeled samples are aggregated to construct a structured bearing fault diagnosis dataset, which is used for subsequent model training and testing.

[0049] By employing the aforementioned fixed-length and step-size overlapping sampling strategy, this invention can efficiently generate a large-scale, high-quality training sample set from a limited set of original vibration signals. This method not only significantly increases the amount of data available for model training, helping to prevent overfitting, but more importantly, it ensures that each sample contains complete fault feature waveforms, providing an optimal input data foundation for subsequent deep feature extraction networks. This is a crucial prerequisite for improving the final diagnostic accuracy and model robustness.

[0050] S200: Introduce a three-branch feature extraction module and a feature pyramid fusion module to construct a bearing fault diagnosis model. Then, fine-tune the model by pre-training with meta-learning and aligning it with the feature distribution. Construct the fine-tuned bearing fault diagnosis model. S210. Introduce a three-branch feature extraction module and a feature pyramid fusion module to construct a bearing fault diagnosis model. The three-branch feature extraction module includes a Win Transformer branch module, a multi-scale ResNet branch module, and a GRU branch module. S220. Perform data segmentation processing on the labeled bearing vibration data sample signals to construct a source domain bearing fault diagnosis dataset and a target domain bearing fault diagnosis dataset. S230. Based on the source domain bearing fault diagnosis dataset, perform meta-learning pre-training on the bearing fault diagnosis model to obtain the pre-trained bearing fault diagnosis model. Specifically, based on the source domain bearing fault diagnosis dataset, the three-branch feature extraction module of the bearing fault diagnosis model is pre-trained; a large number of N-way K-shot tasks are sampled from the source domain bearing fault diagnosis dataset, and source domain bearing fault support set samples and source domain bearing fault query set samples are constructed; based on the N-way K-shot task, the feature mean of each category is calculated through the source domain bearing fault support set samples, and backpropagation optimization is performed on the source domain bearing fault query set samples based on distance to calculate the classification loss, thus obtaining the pre-trained bearing fault diagnosis model.

[0051] In this embodiment, the three-branch network is pre-trained on the source domain data using a prototype network meta-learning paradigm. Specifically, in each training episode, a large number of N-way K-shot tasks are randomly sampled from the source domain. For each task, the prototype (feature mean) for each class is calculated using the support set samples, and then the classification loss (cross-entropy loss) is calculated based on distance on the query set. The entire network is then optimized through backpropagation. The goal of this stage is to enable the network to learn to extract highly discriminative general features.

[0052] S240. Based on the target domain bearing fault diagnosis dataset, the pre-trained bearing fault diagnosis model is fine-tuned by feature distribution alignment to construct the fine-tuned bearing fault diagnosis model.

[0053] Specifically, based on the target domain bearing fault diagnosis dataset, a labeled subset of the dataset is obtained to construct fine-tuning samples, which are then input into the three-branch feature extraction module of the pre-trained bearing fault diagnosis model for forward propagation to obtain initial target domain bearing fault features. First, anomaly detection is performed on the initial target domain bearing fault features using the isolated forest algorithm, followed by clustering using the K-means clustering algorithm to obtain pseudo-features of the target domain. The fine-tuning samples are then input into the three-branch feature extraction module of the bearing fault diagnosis model for feature extraction to obtain the true features of the target domain. Finally, the pseudo-features and true features of the target domain are compared. Similarity calculation is performed to obtain the initial feature similarity distribution before fine-tuning. The fine-tuned samples are input into the three-branch feature extraction module of the pre-trained bearing fault diagnosis model for feature extraction to obtain pseudo-features under the target domain iteration rounds. The similarity between the pseudo-features of the target domain and the pseudo-features under the target domain iteration rounds is calculated to obtain the current distribution. The KL divergence of the current distribution relative to the initial feature similarity distribution before fine-tuning is calculated as the distribution alignment loss, and the classification loss is introduced to construct the total loss function. The pre-trained bearing fault diagnosis model is then backpropagated and updated to construct the fine-tuned bearing fault diagnosis model.

[0054] In this embodiment, when the model is applied to a new target domain, fine-tuning is performed using a very small number of labeled samples (e.g., 1 or 5 per class). The key innovation of this invention lies in the FD-Align fine-tuning strategy, as follows: 1) Constructing pseudo-feature prototypes: Using a pre-trained three-branch network, features are extracted from all fine-tuned samples in the target domain. The Isolation Forest algorithm is used to remove possible outlier features, and then K-means clustering is performed on the remaining features to generate K "pseudo-feature prototypes." These prototypes represent initial, reliable estimates of the feature distribution in the target domain.

[0055] 2) Feature Distribution Alignment Fine-tuning: During fine-tuning, for a batch of samples, the similarity between its features and all pseudo-feature prototypes is calculated, forming a "current feature distribution". Simultaneously, we save the similarity distribution of the samples in this batch with the same pseudo-feature prototypes before fine-tuning ("historical feature distribution"). This is achieved by introducing KL divergence loss. This constrains the feature distribution during the fine-tuning process to prevent it from deviating too far from the initial distribution, thereby maintaining the discriminative structure of the features.

[0056] 3) Layered learning rate strategy: Apply a higher learning rate (e.g., 10 times that of other parts) to the GRU branch and its fully connected layer, because the GRU branch is sensitive to changes in rotation speed and needs to adapt to the dynamic characteristics of the target domain more quickly.

[0057] 4) Total Loss Function: The fine-tuned total loss is the standard classification loss (such as cross-entropy loss). ), and the weighted sum of distribution alignment loss: ,in It is a hyperparameter used to control the strength of the alignment.

[0058] A comprehensive characterization of vibration signals was achieved through a dual-modal three-branch network. Cross-domain adaptation was stably and effectively realized with a very small number of samples through the FD-Align fine-tuning strategy. Finally, the diagnostic accuracy and robustness were significantly better than existing methods on multiple public datasets.

[0059] More specifically, to mitigate the domain offset between the source and target domains, the proposed FD-Align fine-tuning strategy addresses the challenge of fault diagnosis across speed operating conditions. It focuses on optimizing the GRU branch, which is sensitive to speed variations, enabling the model to adaptively learn the speed distribution characteristics of the target domain. This method employs a hierarchical learning rate strategy during fine-tuning, applying a higher learning rate specifically to the GRU temporal modeling branch and its fully connected layers to enhance the model's ability to extract dynamic speed features from the target domain. Simultaneously, by constructing pseudo-feature prototypes and utilizing KL divergence loss to constrain feature distribution alignment, it adapts to the specific speed distribution of the target domain while maintaining the discriminative feature structure obtained from pre-training in the source domain. The specific implementation is as follows: Given a fine-tuning dataset from the target domain... We first extract pseudo-features: ; in .

[0060] Construct pseudo-feature prototypes using K-means clustering with outlier removal: ; For a batch of samples, we calculate the similarity distribution before fine-tuning: ; in It is a temperature parameter.

[0061] During fine-tuning, we calculate the current distribution. And minimize the KL divergence: ; The total fine-tuning loss combines the classification loss and the alignment loss: ; in Control the alignment strength.

[0062] For scenarios involving multiple speeds, we employ a targeted fine-tuning strategy with differentiated learning rates: ; in This emphasizes the adaptation of the GRU branch, which is more sensitive to changes in rotational speed.

[0063] like Figure 4 The diagram shows the feature distribution alignment fine-tuning process. This FD-Align fine-tuning process is an iterative optimization process, as detailed below: 1) Target domain data preparation and initial feature extraction; First, a very small number of labeled bearing fault samples from the target domain are obtained, referred to as fine-tuning samples. These fine-tuning samples are then input into a pre-trained feature extraction network (i.e., the bimodal three-branch network) for forward propagation. At this point, the network parameters remain in their pre-trained state and have not yet been updated. The purpose of this step is to extract initial, high-quality feature representations from these scarce but valuable samples.

[0064] 2) Construct pseudo-feature prototypes; This step serves as the baseline for subsequent distribution alignment, aiming to establish a stable and reliable initial feature distribution estimate for the target domain. It comprises two core sub-steps: Outlier detection: The Isolation Forest algorithm is used to detect anomalies in the features of all extracted fine-tuned samples. This algorithm can effectively identify and remove outliers or noise points in the feature space. This step is crucial because it prevents subsequent steps from being biased by a few outliers, ensuring the robustness of the constructed prototype.

[0065] Feature clustering: The K-means clustering algorithm is used on the feature set after outlier cleanup. After clustering, the center of each cluster is defined as a pseudo-feature prototype. The set of these pseudo-feature prototypes together constitutes the core, denoised representation of the initial distribution of the target domain's fine-tuned samples in the feature space.

[0066] 3) Calculate the initial similarity distribution; After constructing the pseudo-feature prototypes, we input the same batch of fine-tuned samples back into the un-fine-tuned network to extract their features. Then, we calculate the similarity between the features of each sample and all pseudo-feature prototypes (e.g., using the Softmax function based on Euclidean distance). This gives us a probability distribution of "membership" for each sample among the various pseudo-feature prototypes. Combining the distributions of all samples yields the initial feature similarity distribution before fine-tuning, denoted as Dist_pre. This distribution is fixed and used as anchor points for subsequent "alignment" during fine-tuning.

[0067] 4) Initiate the fine-tuning loop and calculate the current distribution; This step marks the beginning of the iterative fine-tuning loop. Fine-tuning samples are input into the network being optimized (at this point, the network parameters have begun to change), and features for the current iteration are extracted. Similarly, the similarity distribution between these new features and the constructed, fixed pseudo-feature prototypes is calculated to obtain the current distribution. .

[0068] 5) Calculate the distribution alignment loss; Current distribution Compared with the initial anchor point distribution Comparison. Specifically, calculation. Compared to The KL divergence is used as the distribution alignment loss. The value of this loss function measures the degree of "deviation" between the feature distribution and the initial distribution during the fine-tuning process. Its mathematical expression is: .

[0069] 6) Calculate the total loss; The overall optimization objective of the fine-tuning process consists of two parts. One part is the traditional classification loss. (For example, cross-entropy loss), which ensures that the model can correctly predict the fault category based on the features. Another part is the distribution alignment loss calculated in the previous step. Total loss It is the weighted sum of the two, that is ,in It is a hyperparameter used to precisely control the strength of distribution alignment in the overall optimization.

[0070] 7) Backpropagation and parameter update; Based on the calculated total loss The gradient of the loss function with respect to the parameters of each layer of the network is calculated using the backpropagation algorithm. Then, the parameters of the entire feature extraction network are updated using a gradient descent algorithm (such as Adam). Notably, during the update, a higher learning rate is applied to parts sensitive to changes in operating conditions, such as the GRU branch, to accelerate their adaptation to the target domain.

[0071] 8) Execute repeatedly; Steps 4) through 7) constitute a complete fine-tuning iteration. This process will be repeated until the preset number of iterations is reached or the loss converges. In each iteration, They all act like a "rubber band," distributing the changing characteristics. Pull towards the initial distribution This allows the model to adapt to new domains while firmly locking in the basic structure of its feature space, effectively avoiding overfitting and feature space collapse caused by insufficient samples.

[0072] Through the above-mentioned systematic fine-tuning process, the "pseudo-feature prototype" is creatively used as the distribution anchor point, and KL divergence loss is used for explicit distribution alignment constraints. This makes the fine-tuning process of the model under a very small number of target domain samples exceptionally stable and efficient. It successfully achieves the goal of fully adapting to new working conditions while maintaining the model's generalization ability to the greatest extent, thus overcoming the core challenge in cross-domain fault diagnosis with small samples.

[0073] S300: Based on the finely tuned bearing fault diagnosis model, bearing fault diagnosis is performed on the time-frequency image of bearing vibration data and the one-dimensional bearing vibration signal to obtain bearing fault diagnosis results.

[0074] S310. Input the time-frequency image of the bearing vibration data and the one-dimensional bearing vibration signal into the fine-tuned bearing fault diagnosis model. S320, the Swin Transformer branch module based on the fine-tuned bearing fault diagnosis model, captures global dependencies and long-range context information of the time-frequency image of bearing vibration data to obtain the global features of bearing faults. S330, a multi-scale ResNet branch module based on the fine-tuned bearing fault diagnosis model, extracts local detail features from the time-frequency image of bearing vibration data to obtain a multi-scale local feature set of bearing faults. S340. Based on the fine-tuned bearing fault diagnosis model, the GRU branch module captures the dynamic change law and sequence dependence of the one-dimensional bearing vibration signal in the time dimension to obtain the time sequence characteristics of bearing fault. In this embodiment, the feature extraction network includes three parallel branches, which process different input modalities and extract complementary features respectively: 1) Swin Transformer Branch: The input is a time-frequency image. This branch utilizes its hierarchical window self-attention mechanism to focus on capturing global dependencies and long-range contextual information in the time-frequency image, and outputs global features. .

[0075] 2) Multi-scale ResNet branch: The input is a time-frequency image. This branch extracts local detail features (such as edges and textures) at different scales from the time-frequency image through multiple convolutional layers and residual blocks, from shallow to deep, and outputs a multi-scale local feature set. .

[0076] 3) GRU Branch: The input is the original one-dimensional vibration signal. This branch uses a gated cyclic unit to capture the dynamic changes and sequence dependencies of the signal in the time dimension, and is particularly sensitive to changes in rotational speed, outputting time-series characteristics. .

[0077] S350, the feature pyramid fusion module based on the fine-tuned bearing fault diagnosis model, sequentially projects the global features of bearing faults, the multi-scale local feature set of bearing faults, and the temporal features of bearing faults to a unified feature dimension and performs fusion processing to obtain the fused bearing fault features. In this embodiment, firstly, the four multi-scale features of the ResNet branch are concatenated and globally averaged. Then, a multilayer perceptron (MLP) is used to project the Swin Transformer features, the pooled ResNet multi-scale features, and the GRU features onto a unified feature dimension d. Finally, the three projected feature vectors are concatenated and then fused and dimensionality-reduced using an MLP (containing ReLU activation and Dropout) to obtain the final, information-rich fused features. This feature simultaneously encompasses the signal's global frequency domain pattern, local time-frequency texture, and temporal dynamics.

[0078] More specifically, this embodiment employs a pyramid fusion three-branch network architecture, collaboratively integrating SwinTransformer, multi-scale ResNet, and GRU to extract complementary features of the vibration signal. Specifically, the SwinTransformer branch captures the global dependencies of the time-frequency image, the multi-scale ResNet extracts local features at four different levels, and the GRU branch models the temporal dynamic characteristics of the original signal. These heterogeneous features are projected into a unified embedding space through the Feature Pyramid Network (FPN) fusion module, achieving comprehensive fault characterization. The specific implementation is as follows: Given a one-dimensional vibration signal of length L=1024... We first use the Short Time Fourier Transform (STFT) to convert it into a time-frequency representation: ; in and These represent the frequency and time dimensions of the spectrum, respectively.

[0079] The network processes this input through three parallel branches: Swin Transformer branch: Processing the spectrogram to capture global frequency domain patterns: ; ResNet branch: Extracting multi-scale convolutional features from spectrograms: ; GRU branch: Modeling the temporal dependencies in the original signal: ; The feature pyramid fusion module first projects these multi-scale features onto a unified dimension. : ; The final fused features are obtained through connection and transformation: ; in It is the final embedding dimension, and MLP means a multilayer perceptron with ReLU activation and dropout.

[0080] S360. Determine the bearing fault diagnosis results based on the fused bearing fault characteristics.

[0081] Therefore, this embodiment of the invention first collects raw vibration signals from bearings under different operating conditions and constructs a structured source domain and target domain fault diagnosis dataset. Then, an innovative dual-modal three-branch feature pyramid fusion network is designed and built, and a subsequent feature distribution alignment fine-tuning strategy is integrated to form a complete fault diagnosis model architecture. On the known, data-rich source domain dataset ("Operating Condition 0"), the diagnostic model is pre-trained using meta-learning to acquire general fault feature extraction and rapid adaptation capabilities, resulting in a pre-trained model. Further, in a new, data-scarce target domain ("Operating Condition 1"), using a very small number of samples, the FD-Align fine-tuning strategy is activated, fine-tuning only some key parameters of the model. This allows it to adapt to the specific distribution of the target domain while maintaining generalization through distribution alignment constraints, resulting in a final, strongly adaptive fault diagnosis model. Finally, in practical applications, real-time vibration data of the bearing to be diagnosed is collected and input into the finally trained diagnostic model, automatically outputting its fault category to complete intelligent diagnosis.

[0082] Furthermore, such as Figure 3 The diagram illustrates the data flow, network structure, and optimization process of this invention in its two core stages (pre-training and fine-tuning): The illustration of meta-task construction demonstrates how to construct few-sample tasks for meta-learning from source domain data, including the partitioning of support and query sets, which provides the task foundation for the pre-training phase.

[0083] For the pre-training stage (source domain) network architecture: The structure of the core bimodal three-branch feature pyramid fusion network of this invention is described in detail.

[0084] For input and mode: the top path shows the original one-dimensional vibration signal converted into a time-frequency graph through short-time Fourier transform; the bottom path shows the original signal directly input.

[0085] For the Swing Transformer branch: It shows that the time-frequency plot input is processed through the Windowed Multi-Head Self-Attention (W-MSA) and Shifted Windowed Multi-Head Self-Attention (SW-MSA) modules, and is alternately processed by Swing Transformer blocks consisting of Layer Normalization (LN) and Multilayer Perceptron (MLP).

[0086] For the multi-scale ResNet branch: This demonstrates how the time-frequency plot input is processed through four levels of ResNet residual blocks to extract multi-scale features.

[0087] For the GRU branch: the original one-dimensional signal input gated cyclic cell network is shown to capture temporal dynamics.

[0088] For feature fusion: the features of the three branches are finally transformed and fused through a fully connected layer and output to a unified embedding space.

[0089] For the fine-tuning phase (target domain) optimization strategy: the core algorithm for fine-tuning with a small amount of data in the target domain is clearly demonstrated. The hierarchical learning rate update formula is explicitly stated mathematically regarding the GRU branch parameters. Use a higher learning rate Update the parameters for other branches. Use a lower learning rate Update.

[0090] For the total loss function: the fine-tuned total loss function is given. Classification loss The weighted distribution alignment loss is used to construct the current feature distribution. Compared with the feature distribution before fine-tuning The KL divergence between them.

[0091] For the visualization of the embedding space: the effect achieved by the present invention through distribution alignment loss is vividly expressed by the schematic points in the high-dimensional feature space: that is, the features of similar samples are more compactly clustered, the features of dissimilar samples are separated from each other, and the stability of the overall feature distribution before and after fine-tuning is maintained.

[0092] Therefore, the embodiments of the present invention have the following distinguishing technical features compared to the prior art: 1) Structure of a dual-modal three-branch feature extraction network: In particular, it is an architecture that uses time-frequency images (SwinTransformer branch, multi-scale ResNet branch) and raw time-series signals (GRU branch) as inputs to perform feature extraction in parallel.

[0093] 2) Feature Pyramid Fusion (FPN) module: The specific method and structure for uniformly projecting, stitching and fusing heterogeneous, multi-scale features extracted from the three branches.

[0094] 3) FD-Align fine-tuning strategy for the target domain: A method based on Isolation Forest and K-means clustering to construct "pseudo-feature prototypes". It utilizes the KL divergence loss constraint to align the feature distributions before and after fine-tuning. A hierarchical learning rate optimization strategy with a higher learning rate is adopted for the GRU branch.

[0095] 4) A complete training paradigm that combines meta-learning pre-training and FD-Align fine-tuning: including a meta-learning pre-training stage based on the prototype network in the source domain, and a fine-tuning process incorporating distribution alignment loss in the target domain.

[0096] The embodiments of the present invention have the following advantages over the prior art: 1) More comprehensive features and higher diagnostic accuracy: By fusing global, local, and temporal dynamic features through a dual-modal three-branch network, this invention provides richer and more discriminative fault features than a single CNN or RNN network. This is particularly advantageous in scenarios with low signal-to-noise ratios and complex fault modes. Experiments demonstrate that the diagnostic accuracy of this invention is comprehensively superior on the CWRU, JNU, and PU datasets.

[0097] 2) Stronger cross-domain generalization ability: The FD-Align fine-tuning strategy explicitly constrains the drift of feature distribution when the model adapts to new domains through pseudo-feature prototypes and KL divergence loss, effectively alleviating the problem of inter-domain distribution shift, so that the model can still maintain high accuracy under conditions of large changes in speed and load.

[0098] 3) More stable with small sample sizes and better resistance to overfitting: The distribution alignment loss, as a regularization term, works in conjunction with the hierarchical learning rate strategy to ensure the stability of the fine-tuning process with a very small number of samples (such as 1-shot), significantly suppressing overfitting and improving the robustness of the model.

[0099] Finally, the experimental verification of this embodiment is explained with reference to the accompanying drawings: 1) Figure 6 The experimental setups for the three public datasets used in the experiment are described below: The CWRU dataset is a widely used benchmark dataset in public applications. It features standardized experimental tasks and clearly defined single failure modes, making it ideal for initial model validation and providing a reliable benchmark for evaluating the performance of new methods. This study uses 12 kHz fault data collected from the drive end, covering four types of bearing fault locations: normal condition, ball bearing fault, inner ring fault, and outer ring fault. Each fault type includes three different damage sizes (0.007 inches, 0.014 inches, and 0.021 inches) and covers four load conditions (C1-0 hp, C2-1 hp, C3-2 hp, and C4-3 hp). Each load condition contains ten different bearing failure modes, detailed in Table 1.

[0100] The JNU dataset was collected by the Rotating Machinery Vibration Engineering Laboratory of Jiangsu University from a self-designed bearing failure test bench. The bearings used in the test had an inner diameter of 25 mm, an outer diameter of 52 mm, a thickness of 15 mm, and 10 rolling elements. This dataset covers four health conditions: inner ring failure, outer ring failure, rolling element failure, and normal condition (NC). The failures were generated by laser etching and include various damage sizes. The vibration data was collected at a sampling frequency of 50 kHz, with motor speeds of 600 rpm, 800 rpm, and 1000 rpm. Detailed information on each failure category and its corresponding label in the JNU dataset can be found in Table 1.

[0101] The PU dataset is a bearing failure simulation experimental platform from the Department of Mechanical Engineering at the University of Paderborn. The experiment used a drive-end bearing, model 6203, with an inner diameter of 17 mm, an outer diameter of 40 mm, a thickness of 12 mm, and 8 rolling elements. This dataset contains data on various artificially caused and real-world failures. This paper selects five failure types: artificially caused failures, real-world failures (inner and outer ring failures), and normal conditions. Three operating conditions were also selected from this data: N09_M07_F10, N15_M07_F10, and N15_M01_F10. N09 represents a rotational speed of 900 rpm, M07 represents a load torque of 0.7 Nm, and F10 represents a radial force of 1000 Nm. The detailed category distribution of the dataset is shown in Table 1.

[0102] Table 1 Fault details of the dataset ; 2) Experiment setup and hyperparameter setting.

[0103] The operating environment for all experiments was: GTX4060 GPU, i9-13900HX CPU, 16GB RAM, Python 3.9, PyTorch-2.7.0 deep learning framework, and PyCharm as the IDE.

[0104] The hyperparameters of the proposed three-branch meta-learning framework were determined through systematic optimization: In the meta-training phase, training is performed in 5 batches, each batch containing 100 meta-tasks. The inner and outer loop learning rates are set to 0.001 and 0.0001, respectively, using the AdamW optimizer in conjunction with cosine annealing for learning rate scheduling. In the fine-tuning phase, K-shots are selected from each class in the target domain for 200 rounds of fine-tuning. The first 100 rounds use a fixed learning rate of 0.0001, and subsequent rounds are dynamically adjusted with a decay coefficient of 0.9. Key module parameters include: feature embedding dimension 256, Dropout rate 0.3, and feature alignment loss weight 5.5.

[0105] The total number of datasets and the splitting ratios are configured as follows: During the experimental phase, under different operating conditions for each dataset, the total number of samples for each fault type is 500. In both the source domain training and target domain testing phases, a small sample setting of N-way K-shot is used, with the support set accounting for 70% (350 samples / class) and the query set accounting for 30% (150 samples / class). In the fine-tuning phase, K samples are randomly selected from each fault class for model fine-tuning. Vibration signals in both the Swin Transformer and ResNet branches are converted to 33×63 time-frequency plots using STFT, with parameters set to... , , The GRU branch uses the original one-dimensional signal.

[0106] 3) Details of the 12 tasks constructed from the three datasets are shown in Table 2. Figure 6 and Figure 7 The accuracy distribution for 12 tasks under the same 10 random seeds is shown; detailed experimental results on three public bearing datasets, CWRU, JNU, and PU, are provided. Figure 9 As shown, comparisons with multiple baseline methods, including 1-shot and 5-shot settings, demonstrate the effectiveness of the present invention. Detailed results analysis is as follows: Table 2 Details of 12 Cross-Domain Tasks ; The CWRU bearing dataset is a commonly used public dataset in the field of fault diagnosis. This dataset contains only a single fault type, making it suitable for evaluating the fault classification capabilities of the proposed model. We selected three challenging cross-domain operating conditions on this dataset for comparative testing: Task A, Task B, and Task C. Tables 3 and 4 show the experimental results on the CWRU dataset. In both 1-shot and 5-shot scenarios, the proposed model achieved the highest accuracy across all operating conditions. Moreover, as... Figure 8 As shown, even when the sample size is reduced to 1, the accuracy only decreases by 0.23%, and it performs stably across all tasks. Furthermore, the accuracy is only below 99% in Task C, which indicates that DMFPF-DA has comprehensive advantages overall.

[0107] Table 3 Fault diagnosis accuracy CWRU (10-way, 1-shot) ; Table 4 Fault diagnosis accuracy CWRU (10-way, 1-shot) ; Compared to the CWRU dataset, the JNU dataset exhibits a larger speed range and contains both single and compound faults, increasing the difficulty of cross-domain diagnosis. We conducted three sets of cross-domain experiments on the JNU dataset, specifically Task G, Task H, and Task I. Figure 9 The average diagnostic accuracy of different methods in these cross-domain experiments is presented. DMFPF-DA achieved average accuracies of 97.21% and 95.52% in five-sample and single-sample scenarios, respectively. Although the RPN method slightly outperformed this method in Task I, and in 1-shot and 5-shot tasks with 0.67% and 0.14% respectively, this method was superior to other methods in Task G and Task H. When the task conditions changed, the performance of GMAML and RPN methods fluctuated significantly, while DMFPF-DA only fluctuated by about 1%. This demonstrates that DMFPF-DA has higher robustness under few-sample conditions and can more effectively generalize to unknown data under new conditions. Detailed data are shown in Tables 5 and 6.

[0108] The PU dataset, compared to CWRU and JNU, exhibits greater variation in operating conditions. Furthermore, the four fault datasets used in the experiments consist of artificially created and real faults, representing inner and outer ring faults with smaller class differences. This increases the diagnostic difficulty and demonstrates the model's ability to capture and classify subtle faults. We set up three cross-domain experimental conditions for the rail transit dataset: Task J, Task K, and Task L. Notably, Task L is a transfer task with the same rotational speed but different loads. Figure 9 The diagnostic results of all methods are presented in a 5-shot setting. In this setting, GMAML's average accuracy is only 62.78%, but it performs exceptionally well in Task L, possibly because the model's transferability is weakened when the rotational speed difference is too large. The average accuracy of the DMFPF-DA in 5-shot and 1-shot settings reaches 95.87% and 93.62%, respectively. In Task L, GMAML outperforms this model in 1-shot and 5-shot settings by 1.9% and 0.36%, respectively, which is indeed a limitation of this model; however, overall, this model performs more stably.

[0109] This further demonstrates that DMFPF-DA has superior performance and stronger robustness in fault diagnosis, as detailed in Tables 5, 6 and 7.

[0110] Table 5 Ablation Experiment Results ; Table 6 Comparative test results of JNU and PU (1-shot) ; Table 7 Comparative test results of JNU and PU (5-shot) ; 4) Detailed ablation experiments were provided, as shown in Table 5, verifying the effectiveness of the GRU branch, FDA module, and FPN module, as well as their synergistic effects. The specific analysis is as follows: To systematically evaluate the contribution of each module to the model performance, this invention conducted ablation experiments. In this part, we used the JNU and PU datasets to construct five challenging tasks to evaluate the effectiveness of each component of the proposed method. The models used for comparison are as follows: (1) A (Swin Transformer+Resnet+Finetuning), (2) A+GRU, (3) A+GRU+FDA, (4) A+GRU+FPN, and (5) DMFPF-DA. As shown in Table 5, the baseline model A achieved basic performance in the five cross-domain diagnostic tasks. After introducing the GRU module, the model showed significant improvement in most tasks, especially in tasks H and I, where the accuracy increased to 0.9083 and 0.9456, respectively, which is about 5.8% and 3.4% higher than the baseline model. This verifies the effectiveness of GRU in temporal feature extraction. However, the performance dropped in task J, indicating that the adaptability of a single GRU module to complex conditions is still limited.

[0111] Further integration of the FDA and FPN modules resulted in different enhancements to the model: the GRU+FDA combination achieved an excellent performance of 0.9596 in task G, highlighting the advantages of the frequency domain adaptive method; while the GRU+FPN architecture achieved stable improvements of 0.9373 and 0.8776 in tasks H and J, respectively, demonstrating the value of the feature pyramid structure in multi-scale feature fusion. Ultimately, the dual-modal feature pyramid fusion and distribution alignment (DMFPF-DA) model, which integrates multiple modules, achieved optimal performance across all tasks, with an accuracy improvement to 0.9105 in the most challenging task J, representing an improvement of approximately 7.9% over the baseline model. This fully validates the synergistic effect of the modules and the effectiveness of the overall architecture design.

[0112] 5) Detailed network parameter tables for the three branches, Swing Transformer, ResNet, and GRU, are provided, as shown in Tables 8, 9, and 10.

[0113] Table 8. Main parameters of Swin-transformer branches ; Table 9. Main parameters of the ResNet branch ; Table 10 Main Parameters of GRU Branch ; Reference Figure 2 A bearing fault diagnosis system based on dual-modal feature pyramid fusion includes: The first module 201 is used to acquire one-dimensional bearing vibration signals under different working conditions and perform data preprocessing to construct a time-frequency image of bearing vibration data. The second module 202 is used to introduce the three-branch feature extraction module and the feature pyramid fusion module to build a bearing fault diagnosis model and fine-tune it by pre-training through meta-learning and aligning it with the feature distribution to build a fine-tuned bearing fault diagnosis model. The third module 203 is used to perform bearing fault diagnosis on the time-frequency image of bearing vibration data and the one-dimensional bearing vibration signal based on the fine-tuned bearing fault diagnosis model, and obtain the bearing fault diagnosis result.

[0114] The content of the above method embodiments is applicable to this system embodiment. The specific functions implemented in this system embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.

[0115] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the embodiments described. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of this application.

Claims

1. A bearing fault diagnosis method based on dual-modal feature pyramid fusion, characterized in that, Includes the following steps: One-dimensional bearing vibration signals under different working conditions are acquired and data preprocessed to construct a time-frequency image of bearing vibration data. A three-branch feature extraction module and a feature pyramid fusion module are introduced to construct a bearing fault diagnosis model. The model is then fine-tuned by pre-training with meta-learning and aligning with the feature distribution. Based on the fine-tuned bearing fault diagnosis model, bearing fault diagnosis is performed on the time-frequency image of bearing vibration data and the one-dimensional bearing vibration signal to obtain bearing fault diagnosis results.

2. The bearing fault diagnosis method based on dual-modal feature pyramid fusion according to claim 1, characterized in that, The step of acquiring one-dimensional bearing vibration signals under different operating conditions and performing data preprocessing to construct a time-frequency image of the bearing vibration data specifically includes: One-dimensional bearing vibration signals under different working conditions are acquired and overlapped to obtain continuously overlapping bearing vibration data sample signals. Standardize and label the continuously overlapping bearing vibration data sample signals to obtain labeled bearing vibration data sample signals. Short-time Fourier transform is performed on the labeled bearing vibration data sample signals to obtain the time-frequency image of the bearing vibration data.

3. The bearing fault diagnosis method based on dual-modal feature pyramid fusion according to claim 2, characterized in that, The step of introducing a three-branch feature extraction module and a feature pyramid fusion module to construct a bearing fault diagnosis model, and then fine-tuning it through meta-learning pre-training and feature distribution alignment to construct a fine-tuned bearing fault diagnosis model, specifically includes: A bearing fault diagnosis model is constructed by introducing a three-branch feature extraction module and a feature pyramid fusion module. The three-branch feature extraction module includes a Swing Transformer branch module, a multi-scale ResNet branch module, and a GRU branch module. The labeled bearing vibration data sample signals are divided into data segments to construct a source domain bearing fault diagnosis dataset and a target domain bearing fault diagnosis dataset. Based on the source domain bearing fault diagnosis dataset, the bearing fault diagnosis model is pre-trained using meta-learning to obtain the pre-trained bearing fault diagnosis model. Based on the target domain bearing fault diagnosis dataset, the pre-trained bearing fault diagnosis model is fine-tuned by feature distribution alignment to construct the fine-tuned bearing fault diagnosis model.

4. The bearing fault diagnosis method based on dual-modal feature pyramid fusion according to claim 3, characterized in that, The step of performing meta-learning pre-training on the bearing fault diagnosis model based on the source domain bearing fault diagnosis dataset to obtain the pre-trained bearing fault diagnosis model specifically includes: Based on the source domain bearing fault diagnosis dataset, the three-branch feature extraction module of the bearing fault diagnosis model is pre-trained. A large number of N-way K-shot tasks were sampled from the source domain bearing fault diagnosis dataset, and source domain bearing fault support set samples and source domain bearing fault query set samples were constructed. Based on the N-way K-shot task, the feature mean of each category is calculated from the source domain bearing fault support set samples, and the classification loss is calculated based on distance from the source domain bearing fault query set samples for backpropagation optimization, resulting in a pre-trained bearing fault diagnosis model.

5. The bearing fault diagnosis method based on dual-modal feature pyramid fusion according to claim 4, characterized in that, The step of fine-tuning the pre-trained bearing fault diagnosis model based on the target domain bearing fault diagnosis dataset by aligning the feature distribution and constructing the fine-tuned bearing fault diagnosis model specifically includes: Based on the target domain bearing fault diagnosis dataset, a labeled partial dataset is obtained to construct fine-tuned samples and input into the three-branch feature extraction module of the pre-trained bearing fault diagnosis model for forward propagation to obtain the initial target domain bearing fault features. First, the isolated forest algorithm is used to detect anomalies in the bearing fault features of the initial target domain. Then, the K-means clustering algorithm is used to cluster the features to obtain pseudo features of the target domain. The fine-tuned samples are input into the three-branch feature extraction module of the bearing fault diagnosis model for feature extraction to obtain the true features of the target domain; The similarity between the pseudo-features and the real features of the target domain is calculated to obtain the initial feature similarity distribution before fine-tuning; The fine-tuned samples are input into the three-branch feature extraction module of the pre-trained bearing fault diagnosis model to extract features and obtain pseudo features under the target domain iteration rounds. The similarity between the pseudo-features of the target domain and the pseudo-features of the target domain in each iteration round is calculated to obtain the current distribution; Calculate the KL divergence of the current distribution relative to the initial feature similarity distribution before fine-tuning, and use it as the distribution alignment loss. Introduce the classification loss to construct the total loss function. Perform backpropagation to update the pre-trained bearing fault diagnosis model and construct the fine-tuned bearing fault diagnosis model.

6. The bearing fault diagnosis method based on dual-modal feature pyramid fusion according to claim 5, characterized in that, The specific expression for the total loss function is as follows: ; In the above formula, Represents the total loss function. This represents the distribution alignment loss. Represents classification loss, This represents hyperparameters.

7. The bearing fault diagnosis method based on dual-modal feature pyramid fusion according to claim 6, characterized in that, The step of performing bearing fault diagnosis on the time-frequency image of bearing vibration data and the one-dimensional bearing vibration signal based on the fine-tuned bearing fault diagnosis model to obtain the bearing fault diagnosis result specifically includes: The time-frequency image of bearing vibration data and the one-dimensional bearing vibration signal are input into the fine-tuned bearing fault diagnosis model. The Swin Transformer branch module based on the fine-tuned bearing fault diagnosis model captures global dependencies and long-range context information from the time-frequency images of bearing vibration data to obtain global features of bearing faults. Based on the multi-scale ResNet branch module of the fine-tuned bearing fault diagnosis model, local detail features are extracted from the time-frequency image of bearing vibration data to obtain a multi-scale local feature set of bearing fault. Based on the fine-tuned bearing fault diagnosis model, the GRU branch module captures the dynamic change law and sequence dependence of the one-dimensional bearing vibration signal in the time dimension, and obtains the temporal characteristics of bearing fault. Based on the feature pyramid fusion module of the fine-tuned bearing fault diagnosis model, the global features of bearing faults, the multi-scale local feature set of bearing faults, and the temporal features of bearing faults are projected onto a unified feature dimension and fused to obtain the fused bearing fault features. The bearing fault diagnosis results are determined based on the integrated bearing fault characteristics.

8. A bearing fault diagnosis system based on dual-modal feature pyramid fusion, characterized in that, Includes the following modules: The first module is used to acquire one-dimensional bearing vibration signals under different working conditions and perform data preprocessing to construct a time-frequency image of bearing vibration data. The second module is used to introduce the three-branch feature extraction module and the feature pyramid fusion module to build a bearing fault diagnosis model and fine-tune it by pre-training through meta-learning and aligning it with the feature distribution to build a fine-tuned bearing fault diagnosis model. The third module is used to perform bearing fault diagnosis on the time-frequency image of bearing vibration data and one-dimensional bearing vibration signal based on the fine-tuned bearing fault diagnosis model, and obtain the bearing fault diagnosis result.