Cross-domain bearing fault diagnosis method and system based on visual basis model

CN122990232APending Publication Date: 2026-10-27NANJING TECH UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611116706.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-27
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0006]本发明的目的在于,提供一种基于(DINOv3)视觉基础模型的分层微调跨域轴承故障诊断方法,用以解决现有技术中因设备结构差异、运行工况变化、采样频率改变及传感器安装位置不同所导致的数据分布偏移、传统浅层神经网络跨域泛化能力差、以及一维振动信号与视觉基础模型之间的模态鸿沟问题

Benefits of technology

[0135]与现有技术相比,本发明具有以下有益效果:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122990232A_ABST
    Figure CN122990232A_ABST
Patent Text Reader

Abstract

A bearing fault diagnosis method and system based on a visual base model, through time-frequency mapping processing, one-dimensional vibration signals are converted into two-dimensional time-frequency images, the physical interpretability of fault transient impact is retained, and a pre-trained DINOv3 visual base model is used to extract deep semantic features; meanwhile, a hierarchical fine-tuning and joint contrast loss alignment strategy is designed to realize intra-class compactness and inter-class separability under the condition of few sample target domains. The diagnosis system adopting the diagnosis method comprises: a time-frequency image generation module for performing time-frequency mapping processing to convert one-dimensional vibration signals into two-dimensional time-frequency RGB images; a visual feature extraction module for loading a pre-trained model to extract features; a hierarchical fine-tuning and contrast alignment module for fine-tuning and joint loss optimization of the model; and a classification output module for outputting target domain fault classification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of mechanical fault diagnosis and deep learning technology, specifically involving a hierarchical fine-tuning cross-domain bearing fault diagnosis method and system based on a visual basic model. It is particularly suitable for intelligent fault diagnosis of rolling bearings in cross-domain scenarios such as changing equipment, changing operating conditions, changing sampling frequency, and changing sensor position. Background Technology

[0002] As a core component of rotating machinery, rolling bearings directly determine the safety and reliability of critical industrial equipment such as aerospace and wind power generation. Under long-term high loads and complex variable operating conditions, bearings are highly susceptible to fatigue damage, which can lead to serious accidents. In recent years, intelligent diagnostic methods based on deep learning have made breakthrough progress in controlled laboratory environments due to their powerful feature extraction capabilities. Existing research mainly focuses on two directions: first, constructing complex feature extraction networks, such as using wide-kernel CNNs or multi-scale networks to enhance noise robustness and frequency band sensing capabilities; second, integrating specific physical features, such as introducing variational mode decomposition or periodic sparse attention mechanisms to enhance the transient impact characteristics of bearings. However, traditional deep learning models implicitly assume that the training and test sets are independently and identically distributed, which faces severe cross-domain generalization challenges in practical industrial deployments.

[0003] In real-world industrial scenarios, differences in equipment structure, load fluctuations, and sensor topology changes can lead to significant data distribution shifts, causing a sharp decline in model performance. Therefore, transfer learning and domain adaptation techniques have become research hotspots. Early cross-domain diagnostic methods typically relied on distribution alignment strategies such as maximum mean difference or generative adversarial networks (e.g., DANN) to achieve knowledge transfer. While these methods have achieved some success, they are mostly built on shallow convolutional network architectures, which have limited ability to represent deep, general semantic features. When faced with extreme distribution differences across devices or frequencies, or high-risk scenarios with scarce target domain samples, shallow networks often struggle to maintain stable diagnostic performance.

[0004] To overcome the representational bottlenecks of traditional networks, visual foundational models based on self-supervised learning, such as the ViT and DINO series, have demonstrated strong zero-shot generalization potential thanks to their long-range semantic dependencies and global structure awareness learned from massive amounts of natural images. However, the modal gap between one-dimensional industrial vibration signals and the input of two-dimensional visual large models severely limits their direct application. Industrial vibration signals have typical one-dimensional temporal physical characteristics; forcibly or simply feeding them into visual foundational models not only causes severe cross-modal drift but also leads to the loss of physical interpretability of fault features.

[0005] How to organically integrate the physical properties of industrial signals while retaining the powerful cross-domain generalization ability of large models is a core problem that urgently needs to be solved in the current field of cross-domain fault diagnosis. Summary of the Invention

[0006] The purpose of this invention is to provide a hierarchical fine-tuning cross-domain bearing fault diagnosis method based on the (DINOv3) visual basic model, in order to solve the problems in the prior art caused by differences in equipment structure, changes in operating conditions, changes in sampling frequency and different sensor installation positions, poor cross-domain generalization ability of traditional shallow neural networks, and modal gap between one-dimensional vibration signals and visual basic models.

[0007] To achieve the above objectives, this invention proposes a hierarchical fine-tuning framework based on the (DINOv3) visual fundamental model. Through time-frequency mapping, one-dimensional vibration signals are mapped into two-dimensional time-frequency images, preserving the physical interpretability of transient impacts of faults. Deep semantic features are extracted using the pre-trained DINOv3 visual fundamental model. Simultaneously, a hierarchical fine-tuning and joint contrastive loss alignment strategy is designed to achieve intra-class compactness and inter-class separability under the condition of few sample target domains, thereby effectively improving diagnostic accuracy and noise robustness in various transfer scenarios such as cross-device, cross-frequency, and cross-location.

[0008] To address the aforementioned technical problems, this invention provides a hierarchical fine-tuning method for cross-domain bearing fault diagnosis based on the (DINOv3) visual model. This method includes five core steps: signal acquisition and preprocessing, time-frequency mapping processing, DINOv3 visual feature extraction, two-stage migration fine-tuning and comparison alignment, and fault classification output.

[0009] This layered fine-tuning method for diagnosing cross-domain bearing faults includes the following steps:

[0010] Step 1: Acquire one-dimensional vibration signals from the source and target domains, and construct a sample set by segmenting using a sliding window;

[0011] Step 2: Convert the one-dimensional vibration signal into a two-dimensional time-frequency image using time-frequency mapping processing;

[0012] Step 3: Input the two-dimensional time-frequency image into the pre-trained DINOv3 visual basic model, and use its self-attention mechanism to extract the fault impact cycle pattern in the time-frequency image from a global perspective, and output the depth feature vector.

[0013] Step 4: Perform two-stage transfer fine-tuning and feature alignment, specifically including:

[0014] Step 4.1: First stage - source domain supervised fine-tuning: Load the pre-trained weights of the DINOv3 vision base model, freeze the first N layers of Transformer blocks, update the remaining deep Transformer blocks and classification head parameters, and fine-tune using the classification loss as the supervision signal;

[0015] Step 4.2: Second stage - Target domain alignment fine-tuning: Load the model weights after source domain supervision fine-tuning, keep the same freeze settings, and jointly optimize the classification loss and contrast loss in the target domain. Cross-domain feature alignment is achieved by narrowing the feature distance of similar samples and widening the feature distance of dissimilar samples.

[0016] Step 5: Use the fine-tuned model to classify the target domain samples and output the bearing fault category.

[0017] In step 1, the steps for generating the sample set are as follows:

[0018] Step 1: Acquire source domain vibration signals and target domain vibration signals, wherein the source domain vibration signals and target domain vibration signals correspond to different mechanical structures, different working loads, different sampling frequencies, or different sensor installation positions;

[0019] Step 2: Use a sliding window to perform overlapping segmentation of the source domain vibration signal and the target domain vibration signal to construct the source domain sample set and the target domain sample set;

[0020] Step 3: Divide the source domain sample set into a source domain training set, a source domain validation set, and a source domain test set; divide the target domain sample set into a target domain fine-tuning set and a target domain inference validation set; wherein, the source domain training set is used for source domain supervised fine-tuning in the first stage, the target domain fine-tuning set is used for target domain alignment fine-tuning in the second stage, and the target domain inference validation set is used to evaluate the cross-domain diagnostic effect.

[0021] The different mechanical structures, different working loads, different sampling frequencies, or different sensor installation positions corresponding to the source domain vibration signal and the target domain vibration signal specifically include any one or more combinations of the following working condition migration types:

[0022] Cross-machine operating conditions: The source domain and target domain come from different mechanical equipment or different mechanical topologies, corresponding to differences in structural stiffness, load conditions and operating speed between the equipment;

[0023] Cross-frequency operating condition: The source domain and the target domain come from the same mechanical equipment, but the signal acquisition sampling frequencies of the two are different;

[0024] Cross-location condition: The source and target domains come from the same mechanical equipment and use the same sampling frequency, but their vibration sensors are installed in different physical locations on the equipment.

[0025] In step 2, the mapping of the one-dimensional vibration signal to a two-dimensional time-frequency image is as follows:

[0026] The one-dimensional vibration signal is mapped into a two-dimensional time-frequency image using time-frequency mapping processing. This time-frequency mapping processing is based on time-frequency analysis methods, aiming to convert the one-dimensional time-series signal into a two-dimensional time-frequency representation to preserve the time-frequency localization characteristics of the transient impact of the fault. As a preferred embodiment, an adaptive continuous wavelet transform can be used. By selecting an appropriate mother wavelet function and dynamically adjusting the scale range, the generated time-frequency image can have consistent visual characteristics at different sampling frequencies. Those skilled in the art can also use other time-frequency analysis methods such as short-time Fourier transform or Hilbert-Huang transform to achieve the same mapping objective.

[0027] In step 3, the pre-trained DINOv3 visual base model specifically adopts the ViT-B / 16 architecture, where:

[0028] The rotational position encoding described in step 3.1 uses RoPE to replace absolute position encoding in order to enhance the robustness of the model to periodic energy shifts in time-frequency images.

[0029] The self-attention mechanism of the multiple Transformer blocks mentioned in step 3.2 is global self-attention, and global self-attention interaction is performed between each image patch to model the cyclical pattern of fault impact on the time axis.

[0030] In step 4.1, source domain supervised fine-tuning is performed, and the fine-tuning strategy is as follows:

[0031] After loading the pre-trained weights of DINOv3 on the natural image dataset, the front-end weights in the DINOv3 visual base model are frozen. All parameters of the layer Transformer block are unfrozen and updated only for the remaining deep Transformer blocks and the classification head. The unfrozen parameters are then fine-tuned using cross-entropy loss as the classification loss signal. It is an integer greater than or equal to 1 and less than the total number of layers in the model.

[0032] In step 4.2, the target domain alignment fine-tuning is performed, and its joint optimization strategy is as follows:

[0033] Load the model weights saved after source domain supervised fine-tuning as initial parameters, maintaining the same freeze settings as in the source domain supervised fine-tuning stage; jointly optimize the total loss function in the target domain. ,in For cross-entropy loss, For cosine contrast loss, To balance the weights, the cosine contrast loss is used to bring the feature distance of similar samples closer together and push the feature distance of dissimilar samples further apart.

[0034] The cosine contrast loss The calculation formula is:

[0035]

[0036] in For batch size, To be consistent with the sample A set of positive sample indexes of the same type. For the sample and Cosine similarity between features This is the temperature coefficient. Attached Figure Description

[0037] Figure 1 This is a flowchart of an embodiment of the present invention;

[0038] Figure 2 This is an architecture diagram of the cross-domain bearing fault diagnosis method constructed in this invention;

[0039] Figure 3 This is a structural diagram of the transformer used in this invention;

[0040] Figure 4 These are the t-SNE results of six cross-machine migration diagnostic experiments. Detailed Implementation

[0041] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments. The following embodiments are for illustrative purposes only and are not intended to limit the scope of the invention.

[0042] Specifically, the steps of this method include:

[0043] Step 1: Acquire one-dimensional vibration signals from the source and target domains, and construct a sample set by segmenting using a sliding window. The source domain consists of laboratory or historical data with rich labeling information, while the target domain consists of unlabeled or minimally labeled data collected from actual industrial sites. The sliding window length is set to 1024 sampling points, with an overlap rate of 50% between adjacent windows to enhance sample diversity.

[0044] In step 1, the generation of the sample set includes the following steps:

[0045] The first step is to acquire the source domain vibration signal and the target domain vibration signal, where the source domain vibration signal and the target domain vibration signal correspond to different mechanical structures, different working loads, different sampling frequencies, or different sensor installation positions, respectively.

[0046] The second step involves using a sliding window to perform overlapping segmentation of the source domain vibration signal and the target domain vibration signal, thereby constructing the source domain sample set and the target domain sample set.

[0047] The third step involves dividing the source domain sample set into a source domain training set, a source domain validation set, and a source domain test set, and dividing the target domain sample set into a target domain fine-tuning set and a target domain inference validation set. The source domain training set is used for source domain supervised fine-tuning in the first stage, the target domain fine-tuning set is used for target domain alignment fine-tuning in the second stage, and the target domain inference validation set is used to evaluate the cross-domain diagnostic effect.

[0048] The different mechanical structures, different working loads, different sampling frequencies, or different sensor installation positions corresponding to the source domain vibration signal and the target domain vibration signal specifically include any one or more combinations of the following working condition migration types: cross-machine working condition, that is, the source domain and the target domain come from different mechanical equipment or different mechanical topologies, corresponding to differences in structural stiffness, load conditions, and operating speed between the equipment; cross-frequency working condition, that is, the source domain and the target domain come from the same mechanical equipment but the signal acquisition sampling frequencies of the two are different; cross-location working condition, that is, the source domain and the target domain come from the same mechanical equipment and use the same sampling frequency, but the vibration sensors of the two are installed in different physical locations of the equipment.

[0049] Step 2: The one-dimensional vibration signal is mapped to a two-dimensional time-frequency image using an adaptive continuous wavelet transform, with the wavelet parameters used in the source and target domains being exactly the same. This invention selects the complex Morlet wavelet as the mother wavelet function, which has the smallest time-frequency window area, thus preserving the transient impact texture caused by the fault to the greatest extent.

[0050] The specific steps for mapping the one-dimensional vibration signal to a two-dimensional time-frequency image in step 2 are as follows: The one-dimensional vibration signal is mapped to a two-dimensional time-frequency image using time-frequency mapping processing, and the mapping parameters used in the source domain and the target domain are exactly the same. In this embodiment, as a preferred time-frequency mapping implementation, an adaptive continuous wavelet transform is used, and a complex Morlet wavelet is selected as the mother wavelet function. Its time-frequency window area is the smallest, which can preserve the transient impact texture caused by the fault to the greatest extent.

[0051] The specific steps for mapping a one-dimensional vibration signal to a two-dimensional time-frequency image in step 2 are as follows:

[0052] The first step is to select the complex Morlet wavelet as the mother wavelet function Ψ;

[0053] The second step is to calculate the power spectrum for the source domain vibration signal and the target domain vibration signal respectively, extract the main energy concentration frequency band, and dynamically determine the upper and lower bounds of the wavelet scale sequence.

[0054] The third step is to follow the scale-frequency mapping relationship. The scale parameters are converted into actual physical frequencies, where The center frequency of the complex Morlet wavelet. denoted as the signal sampling frequency, and 'a' as the wavelet scale.

[0055] Fourth step, calculate the continuous wavelet transform coefficient matrix using the following formula: ,in is the complex conjugate of the mother wavelet function, and b is the translation parameter;

[0056] The fifth step is to uniformly resample the obtained two-dimensional time-frequency coefficient matrix to the set spatial resolution (preferably 224×224) through bicubic interpolation, and copy it as a three-channel RGB image, wherein the three channels are filled with the same energy density amplitude information to form the two-dimensional time-frequency image.

[0057] It should be noted that the above-mentioned continuous wavelet transform is only a preferred implementation of the time-frequency mapping process of the present invention. In other embodiments, alternative methods such as short-time Fourier transform or Hilbert-Huang transform can also be used, as long as the one-dimensional signal can be converted into a two-dimensional time-frequency representation.

[0058] Step 3: Input the two-dimensional time-frequency image into the pre-trained DINOv3 visual base model, and use its self-attention mechanism to extract the fault impact cycle pattern in the time-frequency image from a global perspective, outputting a deep feature vector. The DINOv3 visual base model specifically adopts the ViT-B / 16 architecture, with an image patch size of 16×16 pixels, containing 12 Transformer layers, a hidden layer feature dimension of 768, and 12 attention heads.

[0059] In step 3, the image is first divided into a patch sequence, and Rotational Position Encoding (RoPE) is added to replace Absolute Position Encoding. RoPE enhances the model's robustness to periodic energy shifts caused by variations in sampling frequency or rotational speed in the time-frequency image. Through a global self-attention mechanism using 12 Transformer layers, each image patch interacts globally with all other patches, enabling the model to not only identify local impact points but also model the cyclical patterns of fault impacts along the time axis from a global perspective. The final output is a 768-dimensional deep feature vector, which carries global semantic information from the time-frequency image.

[0060] Step 4: Perform two-stage migration fine-tuning and feature alignment.

[0061] Step 4.1: The first stage is source domain supervised fine-tuning: Load the pre-trained weights of the DINOv3 vision base model, freeze the first N Transformer layers, update the remaining deep Transformer layers and classification head parameters, and fine-tune using the classification loss as the supervision signal. Here, N is an integer greater than or equal to 1 and less than the total number of layers in the model.

[0062] In step 4.1, the specific strategy for source domain supervised fine-tuning is as follows: After loading the pre-trained weights of DINOv3 on a natural image dataset (preferably the LVD-1689M dataset), all parameters of the first N layers of the Transformer blocks in the DINOv3 visual base model are frozen. Only the parameters of the remaining deep Transformer blocks and the classification head are unfrozen and updated. The cross-entropy loss is used as the classification loss signal to supervise the fine-tuning of the unfrozen parameters. In a preferred embodiment, N is set to 6, that is, the Transformer blocks from layers 1 to 6 are frozen, and the parameters of layers 7 to 12 and the classification head are updated.

[0063] In step 4.1, the source domain fine-tuning uses the Adam optimizer, with an initial learning rate set to 1×10⁻. 4 The weight decay coefficient is 0. A StepLR learning rate scheduling strategy is adopted, multiplying the learning rate by 0.5 every 20 training epochs. The maximum number of training epochs is set to 100, and the batch size is set to 32. When the validation set loss no longer decreases for 5 consecutive training epochs, an early stopping mechanism is triggered, automatically terminating training and saving the model weights with the minimum validation loss.

[0064] Step 4.2: The second stage is fine-tuning the alignment of the target domain.

[0065] Load the model weights saved after source domain supervised fine-tuning as initial parameters, maintaining the same freeze settings as in the source domain supervised fine-tuning stage; jointly optimize the total loss function in the target domain:

[0066]

[0067] in Cross-entropy loss is used to supervise the classification error of a small number of labeled samples in the target domain; Cosine contrast loss is used to bring similar samples closer together and push apart dissimilar samples. The balancing weight λ is set to 0.25.

[0068] The formula for calculating the cosine contrast loss is:

[0069]

[0070] Where B is the batch size. For the set of positive sample indices of the same class as sample i, Let cosine similarity be the feature between samples i and j. The temperature coefficient is used. In a preferred embodiment, the batch size B is set to 32, and the temperature coefficient is... Set it to 0.07.

[0071] The optimizer, learning rate, and scheduling strategy in step 4.2 are the same as those in source domain fine-tuning, i.e., the Adam optimizer and the initial learning rate of 1×10⁻ are used. 4 StepLR decays by a factor of 0.5 every 20 epochs. The early stopping mechanism also applies: when the total loss of the validation set no longer decreases for 5 consecutive epochs, training is terminated and the optimal model weights are saved.

[0072] Step 5: Use the model fine-tuned in Step 4.2 to classify the target domain inference validation set samples and output the bearing fault categories. Fault categories include, but are not limited to, normal, inner race fault, outer race fault, rolling element fault, etc., specifically based on the source domain label definition.

[0073] This invention also provides a hierarchical fine-tuning cross-domain bearing fault diagnosis system based on the DINOv3 visual model, the system comprising:

[0074] Time-frequency image generation module: used to perform the adaptive continuous wavelet transform (time-frequency mapping processing) described in step 2, converting the one-dimensional vibration signal into a two-dimensional time-frequency RGB image;

[0075] Visual feature extraction module: used to load the pre-trained DINOv3-ViT-B / 16 model and perform the feature extraction described in step 3;

[0076] Hierarchical fine-tuning and contrast alignment module: used to perform the two-stage fine-tuning and joint loss optimization described in steps 4.1 and 4.2;

[0077] Classification output module: used to perform the target domain fault classification described in step 5.

[0078] In one embodiment, the time-frequency image generation module automatically identifies the sampling frequency of the input signal and dynamically adjusts the scale sequence range of the continuous wavelet transform so that the generated time-frequency image maintains consistent frequency band coverage at different sampling frequencies.

[0079] In one implementation, the visual feature extraction module can be replaced with other Vision Transformer architectures, such as DINOv2 or ViT-L / 16, as long as they have large-scale pre-trained weights on natural images.

[0080] In a preferred embodiment, the number N of frozen Transformer block layers in the layered fine-tuning and contrast alignment module can be adjusted according to the target domain sample size: when there are many target domain label samples, N can be reduced to unfreeze more shallow Transformer blocks; when there are very few target domain label samples, N can be increased to freeze more layers to prevent overfitting.

[0081] In a preferred embodiment, the temperature coefficient of the cosine contrast loss The value can be adjusted within the range of 0.05 to 0.1 according to the compactness of the feature distribution, and the balance weight λ can be adjusted within the range of 0.1 to 0.5.

[0082] The overall optimization objective of the method of this invention can be formalized as: finding the optimal input mapping function. and model parameter increment This makes the pre-trained weights... network Minimize the empirical risk of classification in the target domain:

[0083] .

[0085] Example 1: Cross-Machine Migration Diagnostics Experiment

[0086] This embodiment is used to verify the cross-machine migration diagnostic effect of the present invention between different mechanical devices.

[0087] The experiment used three publicly available bearing fault datasets: the CWRU dataset (drive end, sampling frequency 12kHz, denoted as dataset A), the JNU dataset (sampling frequency 50kHz, denoted as dataset B), and the HUST dataset (sampling frequency 64kHz, denoted as dataset C). The three datasets came from different test benches and had different mechanical structures, load conditions, and operating speeds, constituting a typical cross-machine migration scenario.

[0088] Data preparation: Dataset A (CWRU driver, 12kHz) selected 16 operating conditions, with 50 samples for each condition; Dataset B (JNU) selected 4 operating conditions, with 200 samples for each condition; Dataset C (HUST) selected 4 operating conditions, with 200 samples for each condition. The training, validation, and test sets were divided in a 7:2:1 ratio. The source domain training set contained complete fault category labels, while the target domain fine-tuning set used only 5 labeled samples per category (for scenarios with few samples), with the remaining target domain samples used for inference validation.

[0089] Construct six cross-machine migration tasks: A→B (CWRU to JNU), B→A (JNU to CWRU), A→C (CWRU to HUST), C→A (HUST to CWRU), B→C (JNU to HUST), and C→B (HUST to JNU).

[0090] Parameter settings: The scaling sequence of the continuous wavelet transform is adaptively determined based on the sampling frequency of each dataset. For dataset A ( =12kHz), with the scale range set to [1,120]; for dataset B ( =50kHz), the scale range is set to [1,500]; for dataset C ( =64kHz), with a scale range of [1,640]. The center frequency of the complex Morlet wavelet was set to 0.8125. The image size was uniformly 224×224×3 after resampling. The DINOv3 model adopted the ViT-B / 16 architecture, with the number of frozen layers N set to 6, i.e., the first 6 Transformer blocks were frozen, and the last 6 layers and the classification head were updated.

[0091] Training process: The first stage involves supervised fine-tuning on the source domain training set, using cross-entropy loss, freezing the first 6 Transformer layers, and updating layers 7-12 and the classification head. The Adam optimizer is used with an initial learning rate of 1×10⁻⁻. 4 StepLR decays by a factor of 0.5 every 20 epochs, with a batch size of 32, an early stopping tolerance of 5 epochs, and a maximum training epoch of 100. The second stage involves alignment fine-tuning on the target domain fine-tuning set, loading the optimal weights after source domain fine-tuning, maintaining the same freeze settings (freezing the first 6 layers, updating layers 7-12 and the classification head), and jointly using cross-entropy loss and cosine contrast loss (λ=0.25). =0.07), and the remaining training parameters are the same as in the first stage.

[0092] To verify the effectiveness of the present invention, the following five prior art techniques were selected as comparison methods. All comparison methods used the exact same time-frequency image input and training / test data division as the present invention.

[0093] The existing technology "DANN" refers to Domain-Adversarial Neural Network, proposed by Ganin et al. in 2014. This method introduces a gradient inversion layer to create adversarial training between the feature extractor and the domain discriminator, enabling the feature extractor to learn domain-invariant features. In this embodiment, the backbone network of the DANN adopts the same ViT-B / 16 structure as in this invention to eliminate the influence of differences in network capacity.

[0094] The existing technology "ResNet-50" refers to a residual network, proposed by He et al. in 2015. This network effectively alleviates the gradient vanishing problem in deep networks through residual connections, becoming a classic backbone network in the field of image classification. In this embodiment, ResNet-50 uses weights pre-trained on ImageNet as initialization and performs the same two-stage fine-tuning.

[0095] The existing technology "WDCNN" refers to a wide-kernel deep convolutional neural network. This network uses a wide convolutional kernel (64×1) in the first layer to directly process the original one-dimensional vibration signal without relying on time-frequency image conversion. In this embodiment, WDCNN adopts its original one-dimensional input form (1024-point vibration signal), and the remaining training strategies are consistent with those of this invention.

[0096] The existing technology "Swin Transformer" refers to the sliding window Transformer, proposed by Liu et al. in 2021. It achieves efficient feature extraction through a hierarchical structure and a moving window attention mechanism. In this embodiment, Swin Transformer uses ImageNet pre-trained weights, and the input is a time-frequency image after CWT transformation. The fine-tuning strategy is the same as that of this invention.

[0097] The existing technology "FSAMLM" refers to a few-shot adaptive multimodal large model, proposed by Zhang et al. in 2025. It combines a pre-trained vision-language model and an adapter module to achieve fast adaptation with few shots. In this embodiment, FSMLM uses the same DINOv3 visual encoder as the present invention and retains its adapter fine-tuning mechanism.

[0098] Hardware environment: Intel Core i9-10900K CPU, NVIDIA GeForce RTX 3060 GPU (12GB VRAM), 32GB DDR4 RAM. Software environment: Ubuntu 20.04 LTS operating system, PyTorch 2.7 deep learning framework, Python 3.9, CUDA 11.8, cuDNN 8.9. All experiments were independently repeated 5 times, and the average accuracy is reported.

[0099] The experimental results are shown in Table 1:

[0100]

[0101] Results Analysis: The method of this invention achieves an average accuracy of 97.37% on six cross-machine transfer tasks, significantly higher than all comparative methods. It improves accuracy by approximately 2.13 percentage points compared to the second-best Swin Transformer (95.24%), by approximately 4.45 percentage points compared to FSMLM (92.92%), and shows a more significant improvement compared to traditional CNN methods (ResNet-50 59.09%, WDCNN 41.00%) and adversarial domain adaptation methods (DANN 48.99%). In the A→B task, this invention achieves the highest accuracy of 92.29%; in the C→A task, it achieves a perfect accuracy of 100%. These results fully verify the superiority of this invention in handling complex cross-machine transfer scenarios with different mechanical equipment, structural stiffness, load conditions, and sampling frequencies.

[0102] Example 2: Cross-frequency migration diagnostic experiment

[0103] This embodiment is used to verify the cross-frequency migration diagnostic effect of the present invention between different sampling frequencies.

[0104] The experiment used driver-side data from the CWRU dataset, employing sampling frequencies of 12 kHz (dataset A) and 48 kHz (dataset D). Both subsets originated from the same mechanical equipment, the same sensor locations, and contained the same fault categories; the only difference was the sampling frequency, used to simulate sampling frequency changes caused by upgrades or replacements of the data acquisition equipment.

[0105] Data preparation: Dataset A (12kHz) selected 16 operating conditions, with 50 samples for each condition; Dataset D (48kHz) selected 16 operating conditions, with 50 samples for each condition. The training set, validation set, and test set were divided in a 7:2:1 ratio.

[0106] Construct two cross-frequency migration tasks: A→D (migrate from 12kHz to 48kHz) and D→A (migrate from 48kHz to 12kHz).

[0107] Parameter settings: The scale sequence of the continuous wavelet transform is adaptively determined according to the sampling frequency of each dataset. For dataset A (fs=12kHz), the scale range is set to [1,120]; for dataset D (fs=48kHz), the scale range is set to [1,480]. Through this adaptive mapping mechanism, fault impacts at different sampling frequencies have similar visual textures in the generated time-frequency images. The remaining parameters (mother wavelet, resampling size, model structure, training hyperparameters) are the same as in Example 1.

[0108] Comparison method: Five existing technologies (DANN, ResNet-50, WDCNN, SwinTransformer, FSAMLM) are used, with the same input format and training strategy as in Example 1.

[0109] The experimental results are shown in Table 2:

[0110] Table 2. Diagnostic accuracy (%) of each method in cross-frequency migration tasks.

[0111]

[0112] Results Analysis: The method of this invention achieves 100% accuracy on both the A→D and D→A tasks, and scores full marks on all evaluation metrics (accuracy, F1 score, and recall). Although ResNet-50 also achieves a high accuracy of 99.53% on the A→D task, it drops to 90.05% on the reverse task D→A, while the method of this invention maintains stable full marks in both directions. This indicates that the adaptive continuous wavelet transform of this invention can effectively eliminate the influence of sampling frequency differences on feature distribution, enabling the model to have consistent diagnostic capabilities under different sampling frequencies.

[0113] Example 3: Cross-location migration diagnostic experiment

[0114] This embodiment is used to verify the cross-location migration diagnostic effect of the present invention between different sensor installation locations.

[0115] The experiment used the CWRU dataset, employing 12kHz data from the drive end (dataset A) and 12kHz data from the fan end (dataset E). Both subsets originated from the same mechanical equipment, used the same sampling frequency (12kHz), and contained the same fault categories. The difference lay in the sensor installation location: the drive end was closer to the bearing load side, resulting in higher signal strength; the fan end was farther from the fault source, causing severe attenuation of the vibration signal after long-distance transmission through the mechanical structure. This scenario simulates signal distortion caused by variations in sensor installation location in real-world industrial applications.

[0116] Data preparation: Dataset A (driver end 12kHz) selected 16 operating conditions, with 50 samples for each condition; Dataset E (fan end 12kHz) selected 16 operating conditions, with 50 samples for each condition. The training set, validation set, and test set were divided in a 7:2:1 ratio.

[0117] Construct two cross-location migration tasks: A→E (migration from the driver end to the fan end) and E→A (migration from the fan end to the driver end).

[0118] Parameter settings: Since the sampling frequency is the same (both are 12kHz), the continuous wavelet transform scaling sequence ranges of the source and target domains are the same, both being [1, 120]. The remaining parameters are the same as in Example 1.

[0119] Comparison method: Five existing technologies, the same as in Example 1.

[0120] The experimental results are shown in Table 3:

[0121] Table 3. Diagnostic accuracy (%) of each method in cross-location migration tasks.

[0122]

[0123] Results Analysis: In the A→E task (driver end → fan end, severe signal attenuation), traditional CNN methods (ResNet-50 only 48.11%, WDCNN only 46.70%) almost lost their diagnostic ability, DANN 64.93%, SwinTransformer 70.00%, FSMLM 83.75%, while the method of this invention reached 99.59%. In the E→A task (fan end → driver end, signal changes from weak to strong), the method of this invention reached 99.79%. The average accuracy of this invention in both directions was 99.69%, significantly better than the second-best FSMLM (86.88%). The above results show that the global self-attention mechanism based on the ViT architecture can integrate the energy patterns distributed in different regions of the time-frequency image, reduce the dependence on local high-frequency features during decision-making, and instead utilize the global relative feature distribution, thus having stronger robustness to signal attenuation caused by changes in sensor position.

[0124] Example 4: Noise immunity performance test experiment

[0125] This embodiment is used to verify the diagnostic robustness of the present invention in the presence of strong background noise interference in the target domain.

[0126] Using the A→B (CWRU→JNU) transfer task as a benchmark, source domain dataset A consists of a clean 12kHz CWRU signal, and target domain dataset B consists of a 50kHz JNU signal. Gaussian white noise of varying intensities is added to the target domain inference validation set to test the noise robustness of each method.

[0127] Noise addition method: The signal-to-noise ratio (SNR) is used to control the noise intensity. The SNR calculation formula is as follows: Three noise levels were set: -10dB (low to medium intensity noise, close to actual industrial scenarios), -4dB (medium intensity noise), and 0dB (high intensity noise, where signal and noise power are equal). Except for the target domain inference validation set, both the source domain training set and the target domain fine-tuning set remained pure.

[0128] Parameter settings: exactly the same as the A→B task in Example 1.

[0129] Comparison method: Five existing technologies, the same as in Example 1.

[0130] The experimental results are shown in Table 4:

[0131] Table 4. Target domain diagnostic accuracy (%) of each method at different signal-to-noise ratios (Task A→B)

[0132]

[0133] Results Analysis: Under -10dB noise, the accuracy of the proposed method was 88.54%, compared to 85.00% for FSMLM, 64.29% for ResNet-50, 55.46% for DANN, 60.42% for Swin Transformer, and only 38.08% for WDCNN. Under -4dB noise, the accuracy of the proposed method was 83.96%, while other methods dropped to the 55%-63% range. Under 0dB high-intensity noise (signal and noise power equal), DANN and Swin Transformer dropped to 49.16% and 50.83% respectively, losing their effective diagnostic capability, while the proposed method still maintained a usable diagnostic accuracy of 77.29%. Compared to 92.29% under clean signal conditions, the performance drop of the proposed method under 0dB noise was only about 15 percentage points, far less than the drop of the comparative methods. The above results are attributed to two aspects: first, continuous wavelet transform, as a multi-resolution bandpass filter, can suppress white noise in specific frequency bands; second, cosine contrast loss drives the model to learn a compact feature space within classes and a large gap between classes, which enhances the fault tolerance of feature points under noise perturbation and prevents misclassification due to boundary crossing.

[0134] The above four embodiments correspond to four non-ablation experimental scenarios: cross-machine migration, cross-frequency migration, cross-location migration, and noise immunity performance testing, respectively, which comprehensively verify the effectiveness and robustness of the present invention in different cross-domain diagnostic tasks.

[0135] Compared with the prior art, the present invention has the following beneficial effects:

[0136] (i) This invention proposes a hierarchical fine-tuning cross-domain bearing fault diagnosis method based on the DINOv3 visual basic model. For the first time, the visual basic model is successfully applied to the cross-domain fault diagnosis of one-dimensional vibration signals, overcoming the generalization bottleneck of traditional deep learning models in complex industrial scenarios, and providing an effective path for the deployment of the visual basic model on industrial time-series signals.

[0137] (ii) The present invention designs an adaptive continuous wavelet transform physical-visual modal mapping mechanism, which successfully transforms one-dimensional transient fault impact into a two-dimensional high-frequency visual texture that is highly sensitive to large models, while solving the problem of cross-device sampling frequency alignment and effectively bridging modal domain offset.

[0138] (III) This invention develops a hierarchical fine-tuning and feature alignment strategy for scenarios with few samples, which only unfreezes deep Transformer blocks and classification heads, thereby significantly reducing computational overhead while preventing overfitting; it innovatively introduces cosine contrast loss as auxiliary supervision, which achieves efficient intra-class compactness and accurate decision boundary partitioning of features under unknown target domain conditions.

[0139] (iv) Experiments have shown that the present invention achieves average accuracy of 97.37%, 100%, and 99.69% in various transfer tasks across machines, frequencies, and locations, respectively. It also maintains an accuracy of over 77% in a 0dB strong noise environment, which is significantly better than existing domain adaptive and deep transfer learning methods and has great industrial application value.

[0140] (v) The method of the present invention is suitable for deployment in rotating machinery condition monitoring systems and is applicable to key equipment such as wind turbine generators, aero engines, and industrial robots, providing reliable technical support for intelligent maintenance and predictive maintenance.

Claims

1. A cross-domain bearing fault diagnosis method based on a visual fundamental model, characterized in that, Includes the following steps: Step 1: Collect one-dimensional vibration signals from the source and target domains to construct a sample set; Step 2: Convert the one-dimensional vibration signal into a two-dimensional time-frequency image using time-frequency mapping processing; Step 3: Input the two-dimensional time-frequency image into the pre-trained visual base model, extract the fault impact cycle pattern in the time-frequency image, and output the corresponding depth feature vector; Step 4: Fine-tune the basic visual model; Step 5: Use the fine-tuned visual base model to classify the target domain samples and output the bearing fault category; The underlying visual model is the DINOv3 model; In step 3, the fault impact cycle pattern in the time-frequency image is extracted from the global perspective using the self-attention mechanism of the DINOv3 model, and the corresponding deep feature vector is output. In step 4, a two-stage migration fine-tuning and feature alignment are performed, namely: Step 4.1: The first stage is source domain supervised fine-tuning, the method is as follows: After loading the pre-trained weights of the DINOv3 model on the natural image dataset, freeze the front-end weights of the DINOv3 model. All parameters of the layer Transformer block are processed, and only the parameters of the remaining deep Transformer blocks and the classification head are unfrozen and updated; the unfrozen parameters are supervised and fine-tuned using cross-entropy loss as the classification loss signal; in, N is an integer greater than or equal to 1 and less than the total number of layers in the model; N is adjusted according to the number of target domain samples: when the number of target domain label samples is greater than the highest threshold, the value of N is decreased; when the number of target domain label samples is less than the lowest threshold, the value of N is increased. Step 4.2: The second stage is fine-tuning the target domain alignment, using the following method: Load the source domain-supervised fine-tuned DINOv3 model weights as initial parameters, maintaining the same freeze settings as in the first stage; jointly optimize the total loss function in the target domain. ,in For cross-entropy loss, For cosine contrast loss, To balance the weights; Cosine contrast loss is used to narrow the feature distance between similar samples and widen the feature distance between dissimilar samples to achieve cross-domain feature alignment. The optimization objective in step 4 can be formalized as: finding the optimal input mapping function. and model parameter increment This makes the pre-trained weights... model network Minimize the empirical risk of classification in the target domain: , In the formula, T represents transpose, x is the model input, y is the model output, and D is the dataset.

2. The cross-domain bearing fault diagnosis method based on a visual fundamental model according to claim 1, characterized in that, The steps for generating the sample set in step 1 are as follows: 1.1) Acquire source domain vibration signals and target domain vibration signals, wherein the source domain vibration signals and target domain vibration signals correspond to different mechanical structures, different working loads, different sampling frequencies, or different sensor installation positions, respectively; 1.2) A sliding window is used to perform overlapping segmentation of the source domain vibration signal and the target domain vibration signal to construct the source domain sample set and the target domain sample set; 1.3) Divide the source domain sample set into a source domain training set, a source domain validation set, and a source domain test set, and divide the target domain sample set into a target domain fine-tuning set and a target domain inference validation set; wherein, the source domain training set is used for source domain supervised fine-tuning in the first stage, the target domain fine-tuning set is used for target domain alignment fine-tuning in the second stage, and the target domain inference validation set is used to evaluate the cross-domain diagnostic effect.

3. The cross-domain bearing fault diagnosis method based on a visual fundamental model according to claim 1, characterized in that, In step 1.1), the source domain vibration signal and the target domain vibration signal correspond to any one or more combinations of the following working condition migration types: Cross-machine operating conditions: The source domain and the target domain come from different mechanical equipment or different mechanical topologies, corresponding to differences in structural stiffness, load conditions and operating speed between the equipment; Cross-frequency operation: The source domain and the target domain come from the same mechanical equipment, but the signal acquisition sampling frequencies of the source domain and the target domain are different; Cross-location condition: The source and target domains come from the same mechanical equipment and use the same sampling frequency, but the vibration sensors in the source and target domains are installed in different physical locations on the equipment.

4. The cross-domain bearing fault diagnosis method based on a visual fundamental model according to claim 1, characterized in that, Step 2 specifically includes: 2.1) Complex Morlet wavelet is selected as the mother wavelet function. ; 2.2) Calculate the power spectrum for the source domain vibration signal and the target domain vibration signal respectively, extract the main energy concentration frequency band, and dynamically determine the upper and lower bounds of the wavelet scale sequence; 2.3) According to the scale-frequency mapping relationship scale parameters Convert to actual physical frequency ,in The center frequency of the complex Morlet wavelet. The sampling frequency of the signal; 2.4) Calculate the continuous wavelet transform coefficient matrix using the following formula: , in The complex conjugate of the mother wavelet function; Let x(t) be the translation parameter; x(t) be the vibration signal, where t represents time. 2.5) The obtained two-dimensional time-frequency coefficient matrix is ​​uniformly resampled to the set spatial resolution through bicubic interpolation and copied into a three-channel RGB image, in which the three channels are filled with the same energy density amplitude information to form a two-dimensional time-frequency image.

5. The cross-domain bearing fault diagnosis method based on a visual fundamental model according to claim 1, characterized in that, The pre-trained DINOv3 model uses the ViT-B / 16 architecture, where: The input two-dimensional time-frequency image is first divided into a patch sequence, and a rotational position code (RoPE) is added to replace the absolute position code. The self-attention mechanism of multiple Transformer blocks is global self-attention; through the global self-attention mechanism of multiple Transformer blocks, global self-attention interaction is performed between each image patch.

6. The cross-domain bearing fault diagnosis method based on a visual fundamental model according to claim 1, characterized in that, The cosine contrast loss The calculation formula is: , in For batch size, This is the set of indices of positive samples of the same class as the i-th sample. For the sample and Cosine similarity between features Temperature coefficient; temperature coefficient The range is 0.05 to 0.1, to adjust the compactness of the feature distribution to 0.05 to 0.1; the range of the balancing weight λ is 0.1 to 0.

5.

7. A diagnostic system employing the aforementioned cross-domain bearing fault diagnosis method based on a vision-based fundamental model, characterized in that: include: Time-frequency image generation module: used to perform step 2 of the diagnostic method; Visual feature extraction module: used to perform step 3 of the diagnostic method; Layered fine-tuning and contrast alignment module: used to perform step 4 of the diagnostic method; Classification output module: Used to execute step 5 of the diagnostic method to complete the fault classification of the target domain.