A semi-supervised cross-device fault diagnosis method and system based on feature distribution alignment and decision boundary fine-tuning

A semi-supervised cross-device fault diagnosis method based on feature distribution alignment and decision boundary fine-tuning solves the problem of pseudo-label accumulation and propagation in cross-device fault diagnosis, and achieves high accuracy and stability diagnosis under the condition of scarce target domain labels.

CN123049342APending Publication Date: 2026-11-06XIAN UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611095167.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-22
Publication Date
2026-11-06

AI Technical Summary

Technical Problem

Under the condition of cross-device fault diagnosis where the target domain contains only a small number of labeled samples and a large number of unlabeled samples, existing technologies are unable to suppress the cumulative propagation of erroneous pseudo-labels in class conditional distribution alignment and contrastive learning, and to correct the classifier decision boundary using reserved target domain labels without destroying the aligned feature space.

Method used

A semi-supervised cross-device fault diagnosis method based on feature distribution alignment and decision boundary fine-tuning is adopted. A diagnostic model is constructed that includes a convolution-squeeze excitation feature extractor with shared parameters, a classifier, a pseudo-label reliability evaluation unit, and a coupled feature alignment unit. The model is trained in two stages by sharing a set of reliable samples using dynamic pseudo-label loss, local maximum mean difference loss, and category-aware time-frequency contrast loss, and updates the feature extractor and classifier respectively.

Benefits of technology

It effectively suppressed the cumulative propagation of erroneous pseudo-labels, ensuring the accuracy and stability of cross-device fault diagnosis, and improving the generalization ability of the diagnostic model, especially when target domain labels are scarce.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123049342A_ABST
    Figure CN123049342A_ABST
Patent Text Reader

Abstract

The application discloses a semi-supervised cross-device fault diagnosis method and system based on feature distribution alignment and decision boundary fine-tuning. Corresponding time domain and frequency domain views are constructed for source domain and target domain vibration signals, and target domain labeled samples are divided into non-overlapping feature alignment sets and parameter fine-tuning sets. The reliable pseudo label is generated according to the fusion confidence, the category center distance and the time-frequency prediction consistency, so that the dynamic pseudo label loss, the reliability weighted local maximum mean difference and the category perception time-frequency contrast loss share the same reliable sample set, and the first stage feature alignment is completed. Then, the convolution, squeeze excitation and batch normalization parameters and running statistics are frozen, and only the parameter fine-tuning set is used to update the classifier to correct the target domain decision boundary. The application breaks through the technical bottleneck that the traditional diagnosis model is difficult to fully utilize the unlabelled data and limited label information for collaborative optimization under the condition of label scarcity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to, but is not limited to, the field of mechanical equipment fault diagnosis technology, and particularly relates to a semi-supervised cross-equipment fault diagnosis method and system based on feature distribution alignment and decision boundary fine-tuning. Background Technology

[0002] In modern industrial systems, machinery and equipment, as core assets, are widely deployed in key sectors such as petrochemicals, wind power generation, and rail transportation. Their operational status directly affects production safety and economic efficiency. With the continuous improvement of industrial automation and intelligence, equipment is evolving towards larger scale, integration, and higher loads, leading to increasingly complex operating environments. Key components such as rolling bearings and gears operate under harsh conditions of variable speed, variable load, and high noise, making them highly susceptible to wear, cracks, and tooth breakage. However, due to significant differences in structural design, processing and assembly, sensor configuration, and operating environments among different equipment, fault diagnosis models trained from data collected from a specific device (source domain) often suffer from a sharp decline in diagnostic performance, or even complete failure, when directly applied to another device (target domain), due to severe domain shift in data feature distribution. This problem is particularly prominent in scenarios where the target equipment is newly installed, lacks historical fault records, or has only a very small number of labeled samples, severely restricting the cross-device generalization capability of intelligent diagnostic technology.

[0003] To address the aforementioned technical issues, existing technologies have proposed a class of fault diagnosis methods based on semi-supervised domain adaptation. The core idea of ​​these methods is to transfer source domain knowledge using techniques such as Maximum Mean Discrepancy (MMD), Local Maximum Mean Discrepancy (LMMD), pseudo-labels, self-training, or contrastive learning. However, when these techniques are used individually or in combination, there is a lack of unified sample selection criteria between the reliability of pseudo-labels and class-conditional distribution alignment and contrastive feature constraints: low-reliability pseudo-labels may simultaneously contaminate class subdomain estimation and positive / negative sample pair construction; after feature alignment, the classifier's decision boundary may still be biased towards the source domain. Especially in scenarios where the target device has only a few real labels, if the same batch of labels participates in feature alignment and subsequent fine-tuning simultaneously, information leakage or small-sample overfitting can easily occur. Therefore, a two-stage collaborative mechanism is needed, where a unified reliability evaluation drives pseudo-label learning, class-conditional distribution alignment, and time-frequency contrastive constraints, and the decision boundary is corrected using target domain labels that do not overlap with the first stage.

[0004] Based on the above analysis, the urgent technical problems that need to be solved in the existing technology are:

[0005] Under the condition of cross-device fault diagnosis with only a small number of labeled samples and a large number of unlabeled samples in the target domain, how to suppress the cumulative propagation of erroneous pseudo-labels in class conditional distribution alignment and contrastive learning, and how to use reserved target domain labels to correct the classifier decision boundary without destroying the aligned feature space. Summary of the Invention

[0006] To address the problems existing in the prior art, this invention provides a semi-supervised cross-device fault diagnosis method and system based on feature distribution alignment and decision boundary fine-tuning, which is suitable for cross-device deployment of industrial intelligent operation and maintenance systems in low-labeling cost scenarios.

[0007] This invention is implemented as follows: a semi-supervised cross-device fault diagnosis method based on feature distribution alignment and decision boundary fine-tuning, comprising the following steps:

[0008] S1. Collect mechanical vibration signals from source domain devices and target domain devices to construct a source domain dataset with complete fault category labels, a target domain labeled dataset with a small number of fault category labels, and a target domain unlabeled dataset. Divide the target domain labeled dataset into a feature alignment set and a parameter fine-tuning set according to the fault category. The sample indices of the two sets do not overlap. The parameter fine-tuning set does not participate in the first stage of training.

[0009] S2, the source domain and target domain vibration signals are sliced ​​by overlapping sliding window and standardized, the standardized time domain segments are retained, and the same time domain segment is subjected to fast Fourier transform to obtain the frequency domain view corresponding to the time domain segment.

[0010] S3, construct a diagnostic model including a convolution-squeeze excitation feature extractor with shared parameters, a classifier, a pseudo-label reliability evaluation unit, and a coupled feature alignment unit, extract the temporal and frequency domain features of the same sample respectively and form a fused feature, and the classifier outputs the temporal class probability, frequency domain class probability and fused class probability respectively;

[0011] S4, in the first stage, the sample reliability is calculated based on the fusion prediction confidence of unlabeled samples in the target domain, the distance similarity between the fusion features and the predicted category center, and the consistency of the time domain prediction, frequency domain prediction, and fusion prediction. A reliable sample set is generated by using a dynamic threshold that changes with the training process. The dynamic pseudo-label loss, local maximum mean difference loss, and category-aware time-frequency contrast loss share the reliable sample set. The distribution alignment weight of the corresponding category is adjusted according to the reliability of the reliable samples of each fault category. The feature extractor and classifier are updated with the total loss of the first stage.

[0012] S5, in the second stage, the feature extractor trained in the first stage is switched to a frozen state, the trainable parameters of the convolutional layer, the squeeze activation layer and the batch normalization layer and the batch normalization running statistics are fixed, and the classifier is updated with the target domain classification cross-entropy loss using only the parameter fine-tuning set that did not participate in the first stage training.

[0013] S6. Perform the same processing as step S2 on the vibration signal of the target device to be diagnosed, input the obtained time domain view and frequency domain view into the diagnostic model that has completed the second stage of training, and output the fault category.

[0014] Furthermore, in step S1, for samples of each fault category in the labeled dataset of the target domain, the samples are randomly sorted according to the recorded random seed, and the number of samples in the feature alignment set is determined according to the preset partitioning ratio. When the number of samples obtained according to the preset partitioning ratio is less than one or not less than the total number of samples in that category, it is adjusted to one or one less than the total number of samples in that category, so as to ensure that the feature alignment set and the parameter fine-tuning set contain at least one sample in each fault category. The two sets are prohibited from being used interchangeably by removing duplicates through sample indexing.

[0015] Furthermore, in step S3, the time-domain view and the frequency-domain view are processed by a feature extractor with the same shared parameters; the feature extractor outputs time-domain features and frequency-domain features respectively, and the time-domain features and frequency-domain features are fused to obtain fused features; the classifier receives time-domain features, frequency-domain features and fused features respectively, the fused category probability is used to determine the pseudo-label, and the three category probabilities are used to determine the consistency of time-frequency prediction.

[0016] Furthermore, in step S4, the maximum class probability in the fused class probability is used as the fused prediction confidence; the distance similarity is determined based on the distance between the fused features of the unlabeled sample in the target domain and its predicted class center; when the time domain predicted class, the frequency domain predicted class, and the fused predicted class are the same, the prediction consistency is determined to be consistent, otherwise it is determined to be inconsistent; the fused prediction confidence, distance similarity, and prediction consistency are weighted and combined to obtain the sample reliability; the dynamic threshold gradually increases from the initial threshold to the termination threshold as the first stage of training progresses, and only unlabeled samples in the target domain whose sample reliability reaches the current dynamic threshold and whose prediction is consistent are accepted.

[0017] Furthermore, the local maximum mean difference loss estimates the target domain category sub-distribution using only the real labeled samples in the target domain feature alignment set and the unlabeled samples in the trusted sample set. The real labeled samples in the target domain feature alignment set are included according to a preset maximum reliability, and the trusted unlabeled samples in the target domain are included according to their respective sample reliability, and weight normalization is performed within the corresponding fault category. The category reliability is determined based on the average reliability of the trusted unlabeled samples in each fault category, and the local maximum mean difference weight of the corresponding category is adjusted according to the reliability of each category. When there are no trusted unlabeled samples in a certain fault category, the target domain category sub-distribution is determined using only the real labeled samples of that category.

[0018] Furthermore, the category-aware time-frequency contrast loss constructs positive and negative sample pairs using source domain true labels, target domain feature alignment set true labels, and credible pseudo labels. Samples with the same fault category are constructed as positive sample pairs, and samples with different fault categories are constructed as negative sample pairs. The category-aware contrast loss within time-domain features, the category-aware contrast loss within frequency-domain features, and the cross-view category-aware contrast loss between time-domain features and frequency-domain features are calculated respectively, and the three contrast losses are weighted and combined.

[0019] Furthermore, the total loss in the first stage includes the source domain classification cross-entropy loss, the local maximum mean difference loss adjusted by class reliability, the dynamic pseudo-label cross-entropy loss calculated only for the set of reliable samples, and the class-aware time-frequency contrast loss. The first stage updates the feature extractor and the classifier. The second stage only calculates the classification cross-entropy loss of the target domain parameter fine-tuning set and only updates the classifier. The first stage and the second stage end the training according to their respective stopping conditions.

[0020] Furthermore, the feature extractor sequentially includes an input convolutional layer, a batch normalization layer, an activation layer, a max pooling layer, four cascaded convolution-squeeze activation blocks, an adaptive average pooling layer, and a flattening layer; the output channels of the four convolution-squeeze activation blocks are 64, 128, 256, and 512 respectively, and output a 512-dimensional feature vector.

[0021] This invention also provides a semi-supervised cross-device fault diagnosis system based on feature distribution alignment and decision boundary fine-tuning, comprising:

[0022] The data acquisition and mutually exclusive partitioning module is used to construct source domain labeled datasets, target domain labeled datasets, and target domain unlabeled datasets, and to hierarchically partition the target domain labeled samples into feature alignment sets and parameter fine-tuning sets with non-overlapping sample indices according to fault categories.

[0023] The dual-view data preprocessing module is used to perform overlapping sliding window slicing and standardization on mechanical vibration signals, and generate time-domain and frequency-domain views corresponding to the same vibration signal segment.

[0024] The shared feature extraction and classification module is used to extract temporal and frequency domain features through a convolution-squeeze-excited feature extractor with shared parameters, form fused features, and output temporal class probability, frequency domain class probability, and fused class probability.

[0025] The credible sample evaluation module is used to calculate the reliability of samples based on the confidence of fusion prediction, the similarity of class center distance, and the consistency of time domain prediction, frequency domain prediction, and fusion prediction, and to generate a set of credible samples through dynamic thresholds.

[0026] The coupled feature alignment module is used to enable the dynamic pseudo-label loss, local maximum mean difference loss, and category-aware time-frequency contrast loss to share the trusted sample set, and to adjust the category weight of the local maximum mean difference according to the category reliability.

[0027] The selective parameter fine-tuning module is used to freeze the trainable parameters and batch-normalized running statistics of the feature extractor, and update the classifier using only the parameter fine-tuning set.

[0028] The phased model training module is used to update the feature extractor and classifier in the first phase, and only update the classifier in the second phase, and execute the corresponding loss function and stopping condition respectively.

[0029] The fault diagnosis module is used to perform dual-view preprocessing on the mechanical vibration signal under test in the target domain, and input the obtained time-domain view and frequency-domain view into the diagnostic model that completes the second stage of training, and output the fault category.

[0030] This invention also provides a semi-supervised cross-device fault diagnosis method based on feature distribution alignment and decision boundary fine-tuning, comprising the following steps:

[0031] S1, Data Acquisition and Mutually Exclusive Partitioning: Collect mechanical vibration signals from source domain devices and target domain devices to construct a source domain dataset with complete fault category labels, a target domain labeled dataset with a small number of fault category labels, and a target domain unlabeled dataset; perform stratified equal sampling of the target domain labeled data according to fault category, and divide it into a feature alignment set and a parameter fine-tuning set according to a preset ratio. The sample indices of the two sets do not overlap, and the parameter fine-tuning set does not participate in the first stage of training.

[0032] S2, Dual-view data preprocessing: A fixed-length overlapping sliding window is used to slice and standardize each vibration signal, retain the standardized time domain segments, and perform a fast Fourier transform on the same segment to obtain the corresponding frequency domain view, forming a source domain sample set, a target domain feature alignment set, a target domain parameter fine-tuning set, and a target domain unlabeled set.

[0033] S3, Model Construction: Construct a diagnostic model including a convolution-squeeze excitation feature extractor with shared parameters, a classifier, a pseudo-label reliability evaluation unit, and a coupled feature alignment unit; the feature extractor extracts the temporal and frequency domain features of the same sample and forms a fused feature; the classifier outputs the class probability for the temporal, frequency, and fused features.

[0034] S4, First-stage multi-strategy coupling alignment: The reliability of unlabeled samples in the target domain is calculated based on the fusion prediction confidence, the distance from the sample to the predicted class center, and the consistency between the temporal and frequency domain predictions. A set of reliable samples is generated using a threshold that changes with the training rounds. The same set of reliable samples is used simultaneously for pseudo-label cross-entropy loss, local maximum mean difference loss of target domain class weights, and class-aware contrast loss in temporal, frequency, and time-frequency cross-views. The alignment weights of each class are further adjusted based on the reliability.

[0035] S5, Second stage selective parameter fine-tuning: After the first stage, the shared feature extractor is switched to the frozen state, the trainable parameters of the convolutional layer, squeeze activation layer and batch normalization layer and the batch normalization running statistics are fixed, and the cross-entropy loss of the classifier is optimized only with the target domain parameter fine-tuning set that did not participate in the first stage training.

[0036] S6, phased optimization and convergence: The total loss in the first phase includes source domain classification loss, reliability-weighted local maximum mean difference loss, dynamic pseudo-label loss and category-aware time-frequency contrast loss, updating the feature extractor and classifier parameters; The total loss in the second phase is only the classification cross-entropy loss of the target domain parameter fine-tuning set, only updating the classifier parameters, and stopping when the preset maximum number of rounds is reached or the loss meets the preset convergence condition.

[0037] S7, Model Testing and Fault Diagnosis: Perform the same preprocessing as step S2 on the vibration signal of the target equipment to be diagnosed, input it into the diagnostic model that has completed the second stage of training, and the classifier outputs the fault category.

[0038] Furthermore, the functions of each module in the model in step S3 are as follows:

[0039] A shared feature extractor is used to process the temporal and frequency domain views of the source and target domains with the same network parameters to extract transferable features; the feature extractor adopts an architecture of a one-dimensional convolutional neural network and a squeeze-excitation attention mechanism in series.

[0040] A classifier is used to receive time-domain features, frequency-domain features, and fused features respectively and output class probabilities; the class probabilities of the fused features are used to determine pseudo-labels, and the three class probabilities are used to judge the consistency of time-frequency predictions. The second stage only updates the classifier.

[0041] The pseudo-label reliability evaluation unit and the coupled feature alignment unit are used to link the dynamic pseudo-label loss, local maximum mean difference loss and category-aware contrast loss with the same reliability gating result, so that rejected unlabeled samples in the target domain do not enter the category subdomain estimation and positive and negative sample pair construction.

[0042] Furthermore, the shared feature extractor in step S3 sequentially includes: an input convolutional layer with 64 output channels, a kernel size of 7, and a stride of 2; a batch normalization layer; a ReLU activation layer; a max pooling layer with a kernel size of 3 and a stride of 2; and four cascaded convolution-squeeze activation blocks; the output channels of the four convolution-squeeze activation blocks are 64, 128, 256, and 512, respectively, with a squeezing activation reduction rate of 16; and finally, an adaptive average pooling and flattening are applied to output a 512-dimensional feature vector.

[0043] Furthermore, the losses and their coupling relationships in step S4 are as follows:

[0044] Source domain classification loss Cross-entropy loss based on the true source domain labels is used to maintain the ability to distinguish fault categories;

[0045] Local maximum mean difference loss The target domain category sub-distribution is estimated using only the real labeled samples in the target domain feature alignment set and the unlabeled samples of the target domain that are gated by reliability, and the reliability normalized value of each reliable sample is used as the target domain category weight.

[0046] Dynamic pseudo-label loss Cross-entropy loss with a reliability mask is used; the same mask is also used for local maximum mean difference loss and category-aware contrast loss to block the propagation of low-reliability pseudo-labels among the three loss components.

[0047] Category-aware time-frequency contrast loss Positive and negative sample pairs are constructed based on the source domain true labels, the target domain feature alignment set true labels, and the credible pseudo labels, and the intra-temporal contrast loss is calculated for each pair. Frequency domain intra-contrast loss Loss compared with time-frequency cross-view And sum them according to preset weights.

[0048] Furthermore, let the set of samples with true labels of class c in the target domain feature alignment set be denoted as . The set of unlabeled target domain samples that are received by reliability gating and predicted as class c in the k-th round of training is: The formula is as follows:

[0049]

[0050] right The samples in the data are taken with a reliability of 1. The reliability of the sample in Let the two be denoted as and in The formula obtained by inner normalization is shown below:

[0051]

[0052] The source domain category weights are:

[0053]

[0054] The local maximum mean difference of category c is:

[0055]

[0056] in This represents the regenerated kernel Hilbert space mapping.

[0057] Furthermore, for unlabeled sample j in the target domain, the fusion prediction confidence is:

[0058]

[0059] Distance similarity is:

[0060]

[0061] in As a feature of fusion, and These represent the feature centers and intra-class scales for predicted class c, respectively; when the temporal, frequency, and fused predicted classes are the same... Select 1 if the value is 1, otherwise select 0. The reliability is:

[0062]

[0063] in And all coefficients are non-negative; the dynamic threshold is:

[0064]

[0065] Only and The sample is received at the time; wherein and These are the initial threshold and the termination threshold, respectively, and K is the maximum number of training rounds in the first stage.

[0066] Furthermore, the target domain predicts the category center. Align the true label features of category c in the target domain feature set with the current round The reliability of the category is obtained by weighting the credible pseudo-label features. for The average internal reliability is used to adjust the weight of the local maximum mean difference for the corresponding category.

[0067] Furthermore, the total loss in the first phase is:

[0068]

[0069] in Reliability based on category Normalization is determined, In this embodiment, the base weights for LMMD, dynamic pseudo-labels, and time-frequency contrast loss are 1, 0.1, and 0.5, respectively. .

[0070] The total loss in the second phase is:

[0071]

[0072] The calculation is performed using only the target domain parameter fine-tuning set; the first stage updates the shared feature extractor and classifier, and the second stage updates only the classifier.

[0073] Another objective of this invention is to provide a semi-supervised cross-device fault diagnosis system based on feature distribution alignment and decision boundary fine-tuning, the system comprising:

[0074] The data acquisition and mutually exclusive partitioning module is used to construct source domain labeled datasets, target domain labeled datasets, and target domain unlabeled datasets, and to hierarchically partition the target domain labeled samples into index mutually exclusive feature alignment sets and parameter fine-tuning sets according to fault categories;

[0075] The dual-view data preprocessing module is used to perform overlapping sliding window slicing and standardization on vibration signals, and generate time-domain and frequency-domain views corresponding to the same sample.

[0076] The trusted sample coupling alignment module is used to calculate the reliability of unlabeled samples in the target domain. It uses the same reliability gating result to link pseudo-label learning, local maximum mean difference alignment, and category-aware time-frequency contrast learning, and adjusts the category alignment weight according to the category reliability.

[0077] The selective parameter fine-tuning module is used to freeze the shared feature extractor and its batch normalized running statistics, and update the classifier using only the target domain parameter fine-tuning set;

[0078] The phased model training module is used to update the shared feature extractor and classifier in the first phase and only update the classifier in the second phase, respectively, and execute the corresponding stopping conditions.

[0079] The fault diagnosis module is used to convert the target domain signal under test into a time domain view and a frequency domain view and input them into the trained model, and output the fault category.

[0080] Another object of the present invention is to provide a computer device including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the semi-supervised cross-device fault diagnosis method based on feature distribution alignment and decision boundary fine-tuning.

[0081] Another object of the present invention is to provide a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the semi-supervised cross-device fault diagnosis method based on feature distribution alignment and decision boundary fine-tuning.

[0082] Another objective of this invention is to provide an information data processing terminal, which includes the aforementioned semi-supervised cross-device fault diagnosis system based on feature distribution alignment and decision boundary fine-tuning.

[0083] Based on the above technical solutions and the technical problems solved, the advantages and positive effects of the technical solution to be protected by this invention are as follows:

[0084] First, this invention is not a simple parallel combination of pseudo-labels, LMMD, contrastive learning, and classifier fine-tuning, but rather establishes a progressive relationship of "reliability evaluation—gating of the same reliable sample—weighted alignment of class reliability—mutually exclusive label fine-tuning." The dynamic pseudo-label results simultaneously determine whether unlabeled samples in the target domain participate in pseudo-label cross-entropy, LMMD class subdomain estimation, and the construction of contrastive positive and negative sample pairs, thus blocking the simultaneous contamination of multiple optimization objectives by low-reliability labels at the data entry point.

[0085] The consistency of time-domain, frequency-domain, and fused predictions, as well as the class center distance, jointly contribute to reliability evaluation. The class-aware time-frequency contrast constraint aggregates similar time-domain and frequency-domain features and separates dissimilar features, thus providing a more stable feature structure for class center distance evaluation. The reliability-weighted LMMD further reduces the differences in features across devices of the same class. The above feedback relationship enables the three first-stage modules to update collaboratively around the same set of reliable samples.

[0086] After the first stage, the target domain parameter fine-tuning set is activated, and its sample index does not overlap with the feature alignment set. During fine-tuning, the parameters and running statistics of the convolutional layer, squeeze activation layer, and batch normalization layer are fixed, and only the classifier is adjusted. Therefore, it is possible to correct the target device decision boundary using real labels that did not participate in the alignment training while maintaining the cross-domain feature structure of the first stage.

[0087] Through the above two-stage data and parameter isolation mechanism, the first stage is responsible for forming a feature space that is classifiable and consistent across devices, and the second stage is responsible for adapting to the target domain classification boundary. The two stages respectively limit the data source, loss function and trainable parameters, so that the frozen feature extractor is no longer updated by the backpropagation of the second stage.

[0088] Second, the cross-device experiments and ablation experiments conducted on two public datasets can serve as verification of the two-stage TSCFD framework and the contributions of its three first-stage modules; multi-index reliability gating and category reliability weighting are preferred implementation methods, as existing ablation experiments do not break down each sub-index item by item. The specific existing experimental data are as follows:

[0089] (1) The experiment uniformly set three states: normal, tooth surface wear and missing tooth on the Xi’an Jiaotong University gearbox dataset and the WT-planetary gearbox dataset. 400 samples were extracted for each state and 16 cross-device migration tasks were constructed, including A→B1~B8 and B1~B8→A. The target domain label rate was set to 5% and 10%.

[0090] (2) At a target domain labeling rate of 5%, the average accuracy of the complete two-stage semi-supervised cross-device fault diagnosis method (TSCFD) is 91.82% in the A→B direction and 92.17% in the B→A direction; the corresponding average accuracy of the basic convolutional neural network (CNN) is 76.53% and 78.69%, respectively, and the average accuracy of DSAN is 87.27% and 88.10%, respectively.

[0091] (3) With a target domain label rate of 10%, the average accuracy of the complete TSCFD in the A→B direction is 93.60%, and the average accuracy in the B→A direction is 93.91%; the average accuracy of DSAN is 90.82% and 91.59%, respectively, and the average accuracy of the basic CNN is 80.83% and 81.49%, respectively.

[0092] (4) Ablation experiments were conducted to remove category-aware contrastive learning, dynamic pseudo-labels, or LMMD, and a base model was set up to remove all three at the same time. The experimental results showed that the complete model outperformed the corresponding ablation model in all transfer tasks. At a 5% label rate, the complete model had an average accuracy of 15.29 percentage points higher in the A→B direction and 13.48 percentage points higher in the B→A direction compared to the base model with all three removed.

[0093] The above results show that, under conditions where both equipment structure and rotational speed change and target domain labels are scarce, the complete two-stage framework maintains a stable improvement compared to models that only use basic feature extraction and classifiers; it also maintains a higher average accuracy compared to the Deep Subdomain Adaptation Network (DSAN) that only uses Local Maximum Mean Discrepancy (LMMD).

[0094] This invention limits the category-aware contrast loss to intra-temporal, intra-frequency, and time-frequency cross-view. Figure 3 Each component is independent of random clipping or rotation operations that could alter the transient structure of the vibration; the time-domain and frequency-domain views of the same original segment maintain a one-to-one correspondence, used to form cross-view... Figure 1 Consistency constraints.

[0095] The dynamic threshold increases from the initial threshold to the termination threshold with each training round, and together with the class center distance and time-frequency prediction consistency, it constitutes the acceptance condition, so that the participation range of unlabeled samples changes with the model's discriminative ability; rejected samples do not enter the LMMD class statistics and comparison sample pair set.

[0096] For each fault category, this invention dynamically configures the LMMD weight based on the average reliability of the trusted pseudo-labels for that category, avoiding forced alignment of different categories with the same intensity due to differences in the number and quality of trusted samples, and reducing the risk of a few sample categories being pulled by erroneous pseudo-labels.

[0097] The target domain labeled data adopts a hierarchical classification method with mutually exclusive sets to ensure that each category retains samples in the feature alignment set and parameter fine-tuning set. The sample index is used to remove duplicates and prevent cross-use, so that the decision boundary correction in the second stage has an independent basis for real labels.

[0098] Freezing the affine parameters, running mean, and running variance of the batch normalization layer can prevent a very small number of target domain fine-tuning samples from changing the feature scale formed in the first stage; using a learning rate smaller than that of the first stage to update only the classifier can reduce feature drift caused by small sample fine-tuning.

[0099] The technical effect of this invention comes from the constraints between the modules in sample selection, class weights and training phases, rather than from the increase in the number of loss terms: the first phase shares a trusted sample gating, and the second phase uses a non-overlapping set of labels and limits the trainable parameters, forming a complete diagnostic process that can be executed repeatedly.

[0100] In this embodiment of the invention, the first stage uses the Adam optimizer, a learning rate of 0.001, and a batch size of 64; the second stage has a learning rate of 0.0001 and is trained for a maximum of 50 epochs. The first and second stages are determined to be convergent, and the feature extractor is not updated in the second stage.

[0101] The experimental data above provide verifiable evidence for the two-stage TSCFD framework under specific public datasets, transfer tasks, and label rates. This invention uses the measured classification accuracy and ablation results to illustrate the technical effectiveness, and does not use unmeasured indicators as the basis for the effectiveness. Attached Figure Description

[0102] Figure 1 This is a flowchart of a semi-supervised cross-device fault diagnosis method based on feature distribution alignment and decision boundary fine-tuning provided in an embodiment of the present invention.

[0103] Figure 2 This is a structural diagram of a semi-supervised cross-device fault diagnosis system based on feature distribution alignment and decision boundary fine-tuning provided in an embodiment of the present invention;

[0104] Figure 3 This invention provides a comparison of the accuracy of various models from source domain A to target domain B under a 5% labeling rate.

[0105] Figure 4 This invention provides a comparison of the accuracy of various models from source domain B to target domain A under a 5% labeling rate.

[0106] Figure 5 This invention provides a comparison of the accuracy of various models from source domain A to target domain B at a 10% labeling rate, as provided in this embodiment.

[0107] Figure 6 This invention provides a comparison of the accuracy of various models from source domain B to target domain A at a 10% labeling rate, as provided in this embodiment.

[0108] Figure 7 This is a comparison of the accuracy of each experimental group from source domain A to target domain B under a 5% labeling rate provided in the embodiments of the present invention;

[0109] Figure 8 This is a comparison of the accuracy of each experimental group from source domain B to target domain A under a 5% labeling rate provided in the embodiments of the present invention;

[0110] Figure 9This is a comparison of the accuracy of each experimental group from source domain A to target domain B under a 10% labeling rate provided in the embodiments of the present invention;

[0111] Figure 10 This is a comparison of the accuracy of each experimental group from source domain B to target domain A under a 10% labeling rate provided in the embodiments of the present invention. Detailed Implementation

[0112] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0113] This invention employs a two-stage training mechanism—feature distribution alignment, reliable pseudo-label screening, category-aware representation learning, and target domain decision boundary fine-tuning—to achieve transfer recognition of mechanical fault features under different equipment and operating conditions. First, mechanical vibration signals from source and target domain equipment are collected to construct a labeled dataset for the source domain, a small number of labeled datasets for the target domain, and an unlabeled dataset for the target domain. The labeled samples in the target domain are then hierarchically divided into a feature alignment set and a parameter fine-tuning set according to fault categories. The sample indices of the two sets are independent. The feature alignment set is used for target domain category distribution estimation in the first stage, while the parameter fine-tuning set is reserved for use in the second stage. This avoids information leakage caused by repeated participation of labeled samples from the same target domain in feature learning and classifier calibration.

[0114] Subsequently, overlapping sliding window slicing and standardization were performed on each mechanical vibration signal. The standardized signal segments were used as time-domain views, and fast Fourier transforms were performed on the same segments to obtain frequency-domain views. The time-domain view can characterize impact, amplitude fluctuations, and local transient features, while the frequency-domain view can characterize fault frequencies and harmonic distribution features. Both views were input into a convolution-squeeze excitation feature extractor with shared parameters. After multi-level convolution, channel attention, adaptive pooling, and flattening, time-domain and frequency-domain features were obtained, and further fused features were formed. The classifier predicted the three types of features respectively, outputting time-domain, frequency-domain, and fused class probabilities.

[0115] In the first phase of training, the maximum value of the fused class probability represents the prediction confidence, and the distance between the fused features of the unlabeled sample and the predicted class center represents the class similarity. The reliability of each unlabeled sample in the target domain is calculated by combining the consistency of temporal prediction, frequency domain prediction, and fused prediction. The dynamic threshold gradually increases as training progresses, and only samples whose reliability reaches the current threshold and whose three prediction results are consistent are added to the reliable sample set. The dynamic pseudo-label loss, local maximum mean difference loss, and class-aware time-frequency contrast loss all use this reliable sample set, ensuring that different optimization objectives are trained based on consistent reliable samples. The local maximum mean difference loss uses source domain real-label samples, target domain feature alignment set samples, and reliable pseudo-label samples to align the feature sub-distributions of the same fault category across different devices, and adaptively adjusts the class weights based on the average reliability of reliable samples in each category. The class-aware time-frequency contrast loss narrows the feature distance between samples of the same type and different views of the same sample, while increasing the feature interval between different fault categories.

[0116] After the first stage is completed, the parameters of the convolutional layer, squeeze excitation layer, and batch normalization layer in the feature extractor are frozen, and the batch normalization runtime statistics are fixed. The classifier is updated only using the parameter fine-tuning set that did not participate in the first stage training, so that the classification decision boundary further adapts to the real fault distribution of the target device. During diagnosis, the same slicing, standardization, and frequency domain transformation processing are performed on the target device's test signal. After dual-view feature extraction, feature fusion, and classification prediction, the corresponding fault category is output.

[0117] This invention provides a semi-supervised cross-device fault diagnosis method based on feature distribution alignment and decision boundary fine-tuning. For example... Figure 1 As shown, this method first utilizes a unified reliability gating mechanism to ensure that dynamic pseudo-labels, category subdomain alignment, and time-frequency comparison constraints share the same set of reliable target samples; then, it uses labeled samples from the target domain that did not participate in the first stage to fine-tune the classifier's decision boundary. Specifically, it includes:

[0118] Step 1, Data Acquisition: Gearbox operating signals from both the source and target domain devices are acquired using vibration sensors. Source domain samples have complete fault category labels, while target domain samples consist of a small number of labeled samples and a large number of unlabeled samples. This embodiment uses the Xi'an Jiaotong University gearbox dataset and the WT-planetary gearbox dataset for validation.

[0119] Step 2, Data Preprocessing and Mutually Exclusive Partitioning: Overlapping sliding window slices with a window length of 2048 sampling points and a step size of 512 are used, and the samples are standardized. Standardized time-domain segments are retained, and a Fast Fourier Transform is performed to generate a one-to-one frequency-domain view. Labeled samples in the target domain are shuffled according to fault category; for category c... Each labeled sample will be the first The number of samples rounded down constitutes the feature alignment subset, and the rest constitute the parameter fine-tuning subset. The two subsets must each contain at least one sample in each category. By using a fixed random seed to record sample indices, the two subsets are guaranteed to be non-overlapping, and the parameter-fine-tuned subset is not read in the first stage.

[0120] Step 3, Model Building: The diagnostic model includes a shared feature extractor. Classifier Reliability evaluation unit and coupling feature alignment unit. A 1D-CNN architecture with SE channel attention is employed; the same parameters are used to extract features for both the temporal and frequency domain views of the same sample. and And form a fusion feature z. Output respectively , and ,in Used to generate pseudo tags.

[0121] Shared Feature Extractor The system consists of: an input convolutional layer with 64 output channels, a kernel size of 7, a stride of 2, and padding of 3; a max pooling layer with batch normalization, ReLU, a kernel size of 3, and a stride of 2; and four convolutional-SE blocks with output channels of 64, 128, 256, and 512, respectively, each SE block having a reduction rate of 16; finally, adaptive average pooling and flattening are used to output 512-dimensional features.

[0122] Classifier It includes fully connected layers and softmax layers to map features to fault category probabilities; the first stage is trained together with a shared feature extractor, and the second stage is the only trainable module.

[0123] Step 4, First Stage – Multi-strategy Feature Alignment under Trusted Sample Gating: Input the source domain fully labeled samples, the target domain feature alignment set, and the target domain unlabeled samples into the model; keep the target domain parameter fine-tuning set isolated. For each target domain unlabeled sample, calculate the fusion prediction confidence q, the distance similarity d to the predicted class center, and the consistency a between the time domain, frequency domain, and fusion prediction, and calculate the reliability. The formula is as follows:

[0124] .

[0125] The dynamic threshold formula is:

[0126]

[0127] Where k is the current training round, and K is the maximum training round in the first stage; only when Only when the time domain, frequency domain, and fused prediction categories are consistent will the fused prediction category be used as a pseudo-label, and the sample will be added to the trust set. The pseudo-label loss is applied only to... Masked cross-entropy calculated from the internal samples.

[0128] In step 4, LMMD is calculated using only the source domain true labels, the target domain feature alignment set true labels, and the reliable pseudo labels within S(k). For category c, the target domain pseudo label sample weights are normalized within that category according to their reliability, and the category alignment weights are then dynamically adjusted based on the average reliability of category c. Thus, reliability simultaneously controls whether a sample participates in alignment and its contribution to the alignment result.

[0129] The category-aware time-frequency contrastive learning in step 4 uses source domain ground truth labels, target domain feature alignment set ground truth labels, and... Internally reliable pseudo-labels are used to construct sample pairs: samples of the same class are positive sample pairs, and samples of different classes are negative sample pairs. The calculations are performed separately. , and ; The target domain has no labeled samples, only those that enter Only after this can they participate in the construction of sample pairs. The overall contrastive loss function is:

[0130]

[0131] The total loss function for the first stage is:

[0132]

[0133] in The cross-entropy of the source domain classification, The value is obtained by normalizing the class average reliability. The Adam optimizer is used with a learning rate of 0.001 and a batch size of 64; updates are performed in the first stage. and All trainable parameters are used until the maximum number of rounds is reached or the preset convergence condition is met.

[0134] Step 5, Second Stage – Selective Parameter Fine-Tuning: Load the optimal parameters from the first stage, and... Switch to evaluation mode and set its parameters to non-trainable; fix the parameters of the convolutional and SE layers, the scaling and offset parameters of the batch normalization layer, and the running mean and running variance. Only input the fine-tuned set of target domain parameters into the model and update it. .

[0135] The total loss function for the second stage is:

[0136]

[0137] The learning rate is 0.0001, and the maximum number of training epochs is 50. Training stops when the maximum number of training epochs is reached or the change in training loss is less than the convergence threshold for a consecutive preset number of epochs. In the second phase, LMMD, pseudo-label loss, and contrastive loss are not calculated, and no updates are performed. .

[0138] That is, step 6, model testing and fault diagnosis: Perform the same window slicing, standardization, and fast Fourier transform on the target domain test signal as in step 2, and input the corresponding time domain view and frequency domain view into the model, through... Obtain the fusion features, and then complete the fine-tuning. Output the fault category.

[0139] In the above process, the first stage uses a shared trusted set to complete feature space alignment, and the second stage uses independent target domain real labels to complete decision boundary correction; the data sets, loss functions and trainable parameters of the two stages are respectively limited.

[0140] In one implementation, category center The true label features of class c in the target domain feature alignment set and Weighted calculation of internally reliable pseudo-label features; when When empty, only the true label features are used to determine the category center and category alignment item, avoiding zero denominator or incorrect updates caused by empty categories.

[0141] In one implementation, to avoid weight imbalance caused by differences in the number of class samples, intra-class normalization is performed on the class weights of the source domain and the target domain respectively, and the reliability weights of each class are normalized again in the total LMMD loss.

[0142] In one implementation, the model parameters with the minimum loss in the first stage are saved for the second stage; after the second stage, the classifier parameters when the target domain parameter fine-tuning set loss satisfies the stopping condition are saved for target domain testing.

[0143] Therefore, the target domain samples to be diagnosed do not participate in any training set, and the model output is used for fault mode recognition and diagnostic accuracy calculation.

[0144] like Figure 2 As shown, this embodiment of the invention also provides a semi-supervised cross-device fault diagnosis system based on feature distribution alignment and decision boundary fine-tuning, the system comprising:

[0145] The data acquisition and mutually exclusive partitioning module is used to construct source domain labeled datasets, target domain labeled datasets, and target domain unlabeled datasets, and to hierarchically partition the target domain labeled samples into index-mutually exclusive feature alignment sets and parameter fine-tuning sets according to categories;

[0146] The dual-view data preprocessing module is used to perform sliding window slicing and standardization on the vibration signal, and generate a one-to-one time domain view and frequency domain view;

[0147] The trusted sample coupling alignment module is used to generate a trusted sample set based on confidence, class center distance and time-frequency prediction consistency, and to make the pseudo-label loss, LMMD and class-aware time-frequency contrast loss share the trusted sample set.

[0148] The selective parameter fine-tuning module is used to freeze the shared feature extractor, batch normalization parameters, and runtime statistics, and update the classifier using only the target domain parameter fine-tuning set.

[0149] The phased model training module is used to update the shared feature extractor and classifier in the first phase, and only update the classifier in the second phase, and execute the corresponding loss function and stopping condition respectively.

[0150] The fault diagnosis module is used to perform dual-view preprocessing on the target domain signal and input it into the model that has completed the second stage of training, and output the fault category.

[0151] The specific application of the method of this invention will be explained below in conjunction with the publicly available dataset and experimental setup used:

[0152] Step 1, Data Acquisition: Vibration signals of the gearbox under different operating conditions are collected using sensors to construct a semi-supervised cross-device migration task. This embodiment uses the Xi'an Jiaotong University gearbox dataset and the WT-planetary gearbox dataset.

[0153] (1) Xi’an Jiaotong University gearbox dataset: The test bench consists of a 3HP three-phase induction motor, a two-stage planetary gearbox and a parallel shaft gearbox, a magnetic powder brake and an X / Y accelerometer; the sampling frequency is 20.48kHz, including five states: normal, tooth surface wear, missing tooth, tooth root crack and broken tooth.

[0154] (2) WT-planetary gearbox dataset: Five states are set on the sun gear: normal, broken tooth, worn, cracked and missing tooth, with a sampling frequency of 48kHz; 8 speed gradient conditions are formed by motor frequencies from 20Hz to 55Hz.

[0155] Step 2, Data Preprocessing and Task Construction: An overlapping sliding window with a window length of 2048 and a step size of 512 was used. The Xi'an Jiaotong University gearbox dataset with a speed of 1800 r / min and a 3HP operating condition was selected as A. The WT-planetary gearbox dataset with eight operating conditions from 20 Hz to 55 Hz was selected as B1 to B8. Three states were uniformly selected: normal, tooth surface wear, and missing teeth. 400 samples were extracted for each state and each class. Sixteen transfer tasks were constructed, from A to B1 to B8 and from B1 to B8 to A.

[0156] The target domain labeling rates are set to 5% and 10%, corresponding to 60 and 120 labeled samples respectively out of 1200 samples for each target condition, i.e., 20 and 40 samples per class respectively. Each class of labeled samples is further divided into a feature-aligned subset and a parameter fine-tuning subset according to the stratification rules described in step 2; the two subsets have no overlap. The remaining target domain training samples are used as unlabeled samples, and test samples are not used in training.

[0157] Step 3: Construct the TSCFD model according to the structure described in this invention; in the first stage, input the source domain fully labeled samples, the target domain feature alignment set, and the target domain unlabeled set, and use the same reliability gating result to calculate the dynamic pseudo-label loss, reliability-weighted LMMD, and category-aware time-frequency contrast loss.

[0158] The first stage uses the Adam optimizer, a batch size of 64, and an initial learning rate of 0.001 to update the shared feature extractor and classifier; the base loss weights are set to... The dynamic threshold is linearly increased from 0.5 to 0.9, and only unlabeled samples from the trusted target domain participate in the construction of LMMD and contrast sample pairs.

[0159] Step 4: In the second stage, the shared feature extractor and batch normalized running statistics are frozen. The classifier is updated by minimizing the classification cross-entropy using only the target domain parameter fine-tuning set. The learning rate is 0.0001, the maximum training time is 50 epochs, and the training is stopped early according to the preset convergence condition.

[0160] Step 5: Input the test samples from each target domain that were not involved in the training into the model that has completed the second stage of training, output the predicted fault category and calculate the classification accuracy.

[0161] Step 6, Performance Verification and Comparative Analysis:

[0162] The comparison methods include CNN without a transfer module, DAN with multi-core MMD, DANN with domain adversarial training, and DSAN with LMMD sub-domain alignment.

[0163] All methods used the same CNN-SE backbone network; the experimental batch size was 64, the optimizer was Adam, and the initial learning rate was 0.001. In this embodiment, the maximum number of training epochs was set to 1000, and an early stopping strategy was adopted, which stopped the experiment when the validation loss did not decrease for 10 consecutive epochs, and an L2 weight decay coefficient of 0.001 was used; each experiment was independently repeated 5 times and the average classification accuracy was taken.

[0164] With a target domain label rate of 5%, TSCFD achieved an average accuracy of 91.82% in the A→B direction and 92.17% in the B→A direction; DSAN achieved 87.27% and 88.10% respectively, and CNN achieved 76.53% and 78.69% respectively.

[0165] With a target domain label rate of 10%, TSCFD achieved an average accuracy of 93.60% in the A→B direction and 93.91% in the B→A direction; DSAN achieved 90.82% and 91.59% respectively, and CNN achieved 80.83% and 81.49% respectively.

[0166] In the B3→A task, TSCFD achieved accuracy rates of 93.24% and 94.37% at 5% and 10% labeling rates, respectively, indicating that it maintained high diagnostic accuracy even when the migration direction and target conditions changed.

[0167] Ablation experiments included complete TSCFD, removal of category-aware contrastive learning, removal of dynamic pseudo-labels, removal of LMMD, and simultaneous removal of the base models of all three.

[0168] At a 5% label rate, the full TSCFD achieved average accuracies of 91.82% and 92.17% in the A→B and B→A directions, respectively. Meanwhile, the base model with the three first-stage modules removed achieved accuracies of 76.53% and 78.69%, respectively. The difference between the two was more than 13 percentage points, with the A→B direction exceeding 15 percentage points.

[0169] At a 10% labeling rate, the average accuracy of the complete TSCFD in the A→B and B→A directions was 93.60% and 93.91%, respectively; the average accuracy of each single-module ablation group was concentrated in the range of 88% to 89%, which was still lower than that of the complete model.

[0170] The comparison results above show that, compared with DSAN which only uses LMMD sub-domain alignment, the complete TSCFD has a higher average accuracy in both migration directions and both label rates; compared with the base model that removes all three first-stage modules at the same time, the complete model has a more significant improvement at low label rates.

[0171] The above ablation results are used to verify the joint contributions of category-aware contrastive learning, dynamic pseudo-labels, and LMMD in the complete framework; the independent contributions of each sub-index in the reliability evaluation and the second-stage freezing strategy can be verified by further ablation experiments that disable the corresponding gating conditions or unfreeze them respectively.

[0172] In summary, this embodiment completes the comparison under the same data partitioning, the same backbone network, and the same main training parameters; the reported values ​​are all limited to the above-mentioned public dataset, transfer task, and label rate conditions.

[0173] This invention reduces the common interference of low-reliability pseudo-labels on category subdomain estimation and contrast sample pair construction by using shared reliable sample gating, and corrects the target domain classifier by fine-tuning the mutually exclusive parameter set under the condition of freezing the feature extractor, forming a two-stage technical closed loop from feature adaptation to decision adaptation.

[0174] In the description of this invention, unless otherwise stated, "a plurality of" means two or more; the terms "upper," "lower," "left," "right," "inner," "outer," "front end," "rear end," "head," "tail," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, the terms "first," "second," "third," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0175] It should be noted that embodiments of the present invention can be implemented in hardware, software, or a combination of both. The hardware portion can be implemented using dedicated logic; the software portion can be stored in memory and executed by a suitable instruction execution system, such as a microprocessor or dedicated-design hardware. Those skilled in the art will understand that the above-described devices and methods can be implemented using computer-executable instructions and / or included in processor control code, for example, such code provided on a carrier medium such as a disk, CD, or DVD-ROM, a programmable memory such as read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. The devices and modules of the present invention can be implemented by hardware circuitry such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, or programmable hardware devices such as field-programmable gate arrays, programmable logic devices, etc., or by software executed by various types of processors, or by a combination of the above-described hardware circuitry and software, such as firmware.

[0176] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications, equivalent substitutions, and improvements made by those skilled in the art within the scope of the technology disclosed in the present invention, and within the spirit and principles of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A semi-supervised cross-device fault diagnosis method based on feature distribution alignment and decision boundary fine-tuning, characterized in that, Includes the following steps: S1. Collect mechanical vibration signals from source domain devices and target domain devices to construct a source domain dataset with complete fault category labels, a target domain labeled dataset with a small number of fault category labels, and a target domain unlabeled dataset. Divide the target domain labeled dataset into a feature alignment set and a parameter fine-tuning set according to the fault category. The sample indices of the two sets do not overlap. The parameter fine-tuning set does not participate in the first stage of training. S2, the source domain and target domain vibration signals are sliced ​​by overlapping sliding window and standardized, the standardized time domain segments are retained, and the same time domain segment is subjected to fast Fourier transform to obtain the frequency domain view corresponding to the time domain segment. S3, construct a diagnostic model including a convolution-squeeze excitation feature extractor with shared parameters, a classifier, a pseudo-label reliability evaluation unit, and a coupled feature alignment unit, extract the temporal and frequency domain features of the same sample respectively and form a fused feature, and the classifier outputs the temporal class probability, frequency domain class probability and fused class probability respectively; S4, in the first stage, the sample reliability is calculated based on the fusion prediction confidence of unlabeled samples in the target domain, the distance similarity between the fusion features and the predicted category center, and the consistency of the time domain prediction, frequency domain prediction, and fusion prediction. A reliable sample set is generated by using a dynamic threshold that changes with the training process. The dynamic pseudo-label loss, local maximum mean difference loss, and category-aware time-frequency contrast loss share the reliable sample set. The distribution alignment weight of the corresponding category is adjusted according to the reliability of the reliable samples of each fault category. The feature extractor and classifier are updated with the total loss of the first stage. S5, in the second stage, the feature extractor trained in the first stage is switched to a frozen state, the trainable parameters of the convolutional layer, the squeeze activation layer and the batch normalization layer and the batch normalization running statistics are fixed, and the classifier is updated with the target domain classification cross-entropy loss using only the parameter fine-tuning set that did not participate in the first stage training. S6. Perform the same processing as step S2 on the vibration signal of the target device to be diagnosed, input the obtained time domain view and frequency domain view into the diagnostic model that has completed the second stage of training, and output the fault category.

2. The method as described in claim 1, characterized in that, In step S1, for samples of each fault category in the labeled dataset of the target domain, the samples are randomly sorted according to the recorded random seed, and the number of samples in the feature alignment set is determined according to the preset partitioning ratio. When the number of samples obtained according to the preset partitioning ratio is less than one or not less than the total number of samples in that category, they are adjusted to one or one less than the total number of samples in that category, so as to ensure that the feature alignment set and the parameter fine-tuning set contain at least one sample in each fault category. The two sets are prohibited from being used interchangeably by deduplication through sample index.

3. The method as described in claim 1, characterized in that, In step S3, the time-domain view and the frequency-domain view are processed by a feature extractor with the same shared parameters; the feature extractor outputs time-domain features and frequency-domain features respectively, and the time-domain features and frequency-domain features are fused to obtain fused features; the classifier receives time-domain features, frequency-domain features and fused features respectively, the fused category probability is used to determine the pseudo-label, and the three category probabilities are used to determine the consistency of time-frequency prediction.

4. The method as described in claim 1, characterized in that, In step S4, the maximum class probability in the fusion class probability is used as the fusion prediction confidence; the distance similarity is determined based on the distance between the fusion features of the unlabeled sample in the target domain and its predicted class center; when the time domain predicted class, frequency domain predicted class, and fusion predicted class are the same, the prediction consistency is determined to be consistent, otherwise it is determined to be inconsistent; the fusion prediction confidence, distance similarity, and prediction consistency are weighted and combined to obtain the sample reliability; the dynamic threshold gradually increases from the initial threshold to the termination threshold as the first stage of training progresses, and only unlabeled samples in the target domain whose sample reliability reaches the current dynamic threshold and whose prediction is consistent are accepted.

5. The method as described in claim 4, characterized in that, The local maximum mean difference loss estimates the target domain category sub-distribution using only the true labeled samples in the target domain feature alignment set and the unlabeled samples in the trusted sample set. The real labeled samples in the target domain feature alignment set are counted according to the preset highest reliability, and the unlabeled samples in the trustworthy target domain are counted according to their respective sample reliability, and weight normalization is performed within the corresponding fault category; The category reliability is determined based on the average reliability of unlabeled samples in the trusted target domain in each fault category, and the local maximum mean difference weight of the corresponding category is adjusted according to the reliability of each category. When there are no credible unlabeled samples in the target domain for a certain fault category, the target domain category sub-distribution is determined using only the real labeled samples of that category.

6. The method as described in claim 5, characterized in that, The category-aware time-frequency contrast loss constructs positive and negative sample pairs using source domain true labels, target domain feature alignment set true labels, and credible pseudo labels. Samples with the same fault category are constructed as positive sample pairs, and samples with different fault categories are constructed as negative sample pairs. The category-aware contrast loss within time domain features, the category-aware contrast loss within frequency domain features, and the cross-view category-aware contrast loss between time domain features and frequency domain features are calculated separately, and the three contrast losses are weighted and combined.

7. The method as described in claim 1, characterized in that, The total loss in the first stage includes source domain classification cross-entropy loss, local maximum mean difference loss adjusted by class reliability, dynamic pseudo-label cross-entropy loss calculated only for the set of reliable samples, and class-aware time-frequency contrast loss. The first stage updates the feature extractor and classifier. The second stage only calculates the classification cross-entropy loss of the target domain parameter fine-tuning set and only updates the classifier. The first and second stages end the training according to their respective stopping conditions.

8. The method as described in claim 1, characterized in that, The feature extractor sequentially includes an input convolutional layer, a batch normalization layer, an activation layer, a max pooling layer, four cascaded convolution-squeeze activation blocks, an adaptive average pooling layer, and a flattening layer.

9. A semi-supervised cross-device fault diagnosis system based on feature distribution alignment and decision boundary fine-tuning, characterized in that, include: The data acquisition and mutually exclusive partitioning module is used to construct source domain labeled datasets, target domain labeled datasets, and target domain unlabeled datasets, and to hierarchically partition the target domain labeled samples into feature alignment sets and parameter fine-tuning sets with non-overlapping sample indices according to fault categories. The dual-view data preprocessing module is used to perform overlapping sliding window slicing and standardization on mechanical vibration signals, and generate time-domain and frequency-domain views corresponding to the same vibration signal segment. The shared feature extraction and classification module is used to extract temporal and frequency domain features through a convolution-squeeze-excited feature extractor with shared parameters, form fused features, and output temporal class probability, frequency domain class probability, and fused class probability. The credible sample evaluation module is used to calculate the reliability of samples based on the confidence of fusion prediction, the similarity of class center distance, and the consistency of time domain prediction, frequency domain prediction, and fusion prediction, and to generate a set of credible samples through dynamic thresholds. The coupled feature alignment module is used to enable the dynamic pseudo-label loss, local maximum mean difference loss, and category-aware time-frequency contrast loss to share the trusted sample set, and to adjust the category weight of the local maximum mean difference according to the category reliability. The selective parameter fine-tuning module is used to freeze the trainable parameters and batch-normalized running statistics of the feature extractor, and update the classifier using only the parameter fine-tuning set. The phased model training module is used to update the feature extractor and classifier in the first phase, and only update the classifier in the second phase, and execute the corresponding loss function and stopping condition respectively. The fault diagnosis module is used to perform dual-view preprocessing on the mechanical vibration signal under test in the target domain, and input the obtained time-domain view and frequency-domain view into the diagnostic model that completes the second stage of training, and output the fault category.