Multi-source weighted domain self-adaptive guided mechanical cross-domain diagnosis method, system and equipment and medium

By assigning weights based on the similarity between the source and target domains, a multi-source weighted domain adaptive network is constructed to collaboratively optimize multiple objectives. This solves the problem of insufficient measurement of source domain contribution in existing methods and improves the robustness and accuracy of mechanical fault diagnosis.

CN121479519APending Publication Date: 2026-02-06BEIJING INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511663502.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-13
Publication Date
2026-02-06

AI Technical Summary

Technical Problem

Existing multi-source domain adaptive methods fail to effectively measure the contribution of different source domains, resulting in insufficient robustness and accuracy of mechanical fault diagnosis in complex cross-domain scenarios. Furthermore, existing methods fail to fully coordinate and optimize multiple key objectives, affecting diagnostic performance.

Method used

By measuring the similarity between each source domain and the target domain, weights are assigned and a multi-source weighted domain adaptive network is constructed. The dynamic weighted loss function is used to collaboratively optimize health status recognition, adversarial domain discrimination, joint distribution alignment, and inter-class separability, thereby enhancing domain-invariant feature representation.

Benefits of technology

It improves the robustness and accuracy of cross-domain mechanical diagnostics, enables efficient mechanical fault diagnosis, and provides technical support for the condition monitoring and health management of mechanical systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121479519A_ABST
    Figure CN121479519A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-source weighted domain self-adaptive guide mechanical cross-domain diagnosis method, system and device and a medium, and relates to the technical field of mechanical fault diagnos.The method comprises the steps that two-dimensional frequency domain samples obtained based on time sequence signals are divided into a source domain data set and a target domain data set, and the samples in the source domain data set are labeled; determining and measuring the similarity between each source domain and the target domain based on the source domain data set and the target domain data set, and obtaining the distribution weight of the source domain; constructing a multi-source weighted domain adaptive network; selecting a source domain participating in training based on the distribution weight, and dynamically weighting a loss function based on the distribution weight in the training process of the multi-source weighted domain adaptive network to obtain a trained multi-source weighted domain adaptive network; and obtaining a mechanical cross-domain diagnosis result based on a target domain test sample by adopting the trained network. According to the invention, the robustness and precision of the final diagnosis performance can be improved, and effective mechanical cross-domain diagnosis is realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of mechanical fault diagnosis, and in particular to a multi-source weighted domain self-adaptive guided mechanical cross-domain diagnosis method, system, device and medium. BACKGROUND

[0002] Mechanical fault diagnosis is an indispensable important link in modern industrial production. With the complexity of mechanical equipment and the diversification of operating environment, timely and accurate diagnosis of mechanical faults is of great significance to ensure production safety, reduce maintenance costs and improve equipment operation efficiency. In recent years, deep learning methods have been widely applied in mechanical fault diagnosis due to their strong feature extraction ability and automatic modeling ability. By learning the complex patterns in the data, deep learning models can significantly improve the accuracy and robustness of fault diagnosis.

[0003] However, in actual application scenarios, the distribution of training samples and test data is often inconsistent. For example, differences in operating conditions of different devices, sensor noise or data collection methods may cause significant shifts in data distribution. This inconsistency in distribution directly affects the generalization ability of deep learning models, leading to poor diagnosis results. To solve this problem, domain adaptation methods have emerged. The core idea of domain adaptation is to reduce the distribution difference between the source domain and the target domain to improve the performance of the model on the target domain.

[0004] Existing researches mainly focus on the single-source domain to single-target domain transfer scenario. In the case of small domain shift between source domain and target domain, single-source methods can effectively alleviate the performance degradation problem caused by domain difference. However, when the difference between the source domain and the target domain is too large, single-source methods often fail to achieve ideal diagnosis results. To further improve the adaptability of the model, multi-source domain adaptation methods are proposed. Multi-source domain adaptation integrates data from multiple source domains to enhance the adaptability of the target domain by utilizing the complementary information from different source domains.

[0005] Although existing multi-source domain methods have improved the diagnosis performance to some extent, they usually assume that all source domains contribute equally to the target domain, ignoring the actual contribution of different source domains. When there are some source domains with large differences from the target domain in the multi-source domain, these source domains may introduce noise, which may harm the performance of the model.

[0006] Existing domain adaptation methods mainly focus on classification tasks and edge distribution alignment tasks. Among them, the classification loss is used to ensure the accurate identification of the health status, and domain adversarial or maximum mean difference technology is used to realize the edge distribution alignment of the source domain and the target domain feature space. However, such methods often separate the optimization process, and fail to fully consider the collaborative optimization of multiple key objectives in the domain adaptation process. This single-target or fragmented optimization strategy limits the model's ability to extract strong discriminative and strong domain-invariant features in complex cross-domain scenarios, thereby affecting the robustness and accuracy of the final diagnosis performance.

[0007] Therefore, exploring a domain adaptation method that can measure the contribution of different source domains while systematically optimizing multiple key objectives is crucial for mechanical cross-domain diagnosis. SUMMARY

[0008] To solve the above problems existing in the prior art, the present application provides a multi-source weighted domain adaptation guided mechanical cross-domain diagnosis method, system, device and medium.

[0009] To achieve the above purpose, the present application provides the following solutions: In a first aspect, the present application provides a multi-source weighted domain adaptation guided mechanical cross-domain diagnosis method, comprising: obtaining vibration data of a mechanical to be diagnosed under multiple working conditions and different health states to obtain time series signals; randomly selecting k one working condition as a source domain and one working condition as a target domain; dividing the time series signals into multiple samples according to a set length, and performing Fourier transform on each sample and reshaping it into a two-dimensional frequency domain sample; dividing the two-dimensional frequency domain sample into a source domain data set and a target domain data set, and labeling the samples in the source domain data set; the target domain data set includes target domain training samples and target domain test samples; determining the similarity between each source domain and the target domain based on the source domain data set and the target domain data set, and determining the allocation weight of the source domain based on the similarity; constructing a multi-source weighted domain adaptation network; selecting the source domain participating in training based on the allocation weight, using the target domain training samples and the labeled samples corresponding to the selected source domain as training data, training the multi-source weighted domain adaptation network, and dynamically weighting the loss function of the multi-source weighted domain adaptation network based on the allocation weight during the training process, until a set condition is reached, to obtain a trained multi-source weighted domain adaptation network; using the trained multi-source weighted domain adaptation network, based on the target domain test samples, to obtain a mechanical cross-domain diagnosis result.

[0010] In a second aspect, the present application provides a multi-source weighted domain adaptive guided mechanical cross-domain diagnosis system, comprising: a signal acquisition module, configured to acquire vibration data of a mechanical device to be diagnosed under multiple working conditions and different health states, to obtain time series signals; and randomly select k one working condition as a source domain and one working condition as a target domain; a sample remodeling module, configured to divide the time series signals into multiple samples according to a set length, and perform Fourier transform on each sample and remodel the sample into a two-dimensional frequency domain sample; a sample division module, configured to divide the two-dimensional frequency domain sample into a source domain data set and a target domain data set, and label the samples in the source domain data set; the target domain data set includes target domain training samples and target domain test samples; a weight distribution module, configured to determine the similarity between each source domain and the target domain based on the source domain data set and the target domain data set, and determine the distribution weight of the source domain based on the similarity; a network construction module, configured to construct a multi-source weighted domain adaptive network; a network training module, configured to select a source domain participating in training based on the distribution weight, use the target domain training samples and the labeled samples corresponding to the selected source domain as training data, train the multi-source weighted domain adaptive network, and dynamically weight the loss function of the multi-source weighted domain adaptive network based on the distribution weight during the training process, until a set condition is reached, to obtain a trained multi-source weighted domain adaptive network; a cross-domain diagnosis module, configured to use the trained multi-source weighted domain adaptive network to obtain a mechanical cross-domain diagnosis result based on the target domain test samples.

[0011] In a third aspect, the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the multi-source weighted domain adaptive guided mechanical cross-domain diagnosis method provided above.

[0012] In a fourth aspect, the present application provides a computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the steps of the multi-source weighted domain adaptive guided mechanical cross-domain diagnosis method provided above.

[0013] According to the embodiments provided by the present application, the following technical effects are achieved: The application provides a multi-source weighted domain self-adaptive guided mechanical cross-domain diagnosis method, system, device and medium, which determines the distribution weight of a source domain by measuring the similarity between each source domain and a target domain, selects a source domain participating in training based on the distribution weight, dynamically weights the loss function based on the distribution weight in the process of training the constructed multi-source weighted domain self-adaptive network, guides the domain self-adaptive process, enhances the domain-invariant feature representation, improves the robustness and precision of the final diagnosis performance, and thus realizes effective mechanical cross-domain diagnosis, thereby providing technical support for state monitoring, fault diagnosis and health management of numerous mechanical systems. BRIEF DESCRIPTION OF DRAWINGS

[0014] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0015] Figure 1 The flowchart of the multi-source weighted domain self-adaptive guided mechanical cross-domain diagnosis method provided by an embodiment of the present application is shown in the figure. Figure 2 The implementation architecture diagram of the multi-source weighted domain self-adaptive guided mechanical cross-domain diagnosis method provided by an embodiment of the present application is shown in the figure. Figure 3 The result diagram corresponding to S1 in the embodiment is shown in the figure. Figure 2 The result diagram corresponding to S2 in the embodiment is shown in the figure. Figure 4 The result diagram corresponding to S3 in the embodiment is shown in the figure. Figure 2 The result diagram corresponding to S2 in the embodiment is shown in the figure. Figure 5 The result diagram corresponding to S3 in the embodiment is shown in the figure. Figure 2 The result diagram corresponding to S3 in the embodiment is shown in the figure. Figure 6 The detailed implementation flowchart of the multi-source weighted domain self-adaptive guided mechanical cross-domain diagnosis method provided by an embodiment of the present application is shown in the figure. Figure 7 The structure diagram of the cross-layer hybrid attention network provided by an embodiment of the present application is shown in the figure. Figure 8 The three time-varying rotating speed working condition diagrams provided by an embodiment of the present application are shown in the figure. Figure 9 The multi-source domain weight visualization result diagram provided by an embodiment of the present application is shown in the figure. Figure 10 The function module diagram of the multi-source weighted domain self-adaptive guided mechanical cross-domain diagnosis system provided by an embodiment of the present application is shown in the figure. Figure 11 The structure diagram of a computer device provided by an embodiment of the present application is shown in the figure. Detailed Implementation

[0016] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0017] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0018] In one exemplary embodiment, this application provides a mechanical cross-domain diagnostic method with multi-source weighted domain adaptive guidance. This method is executed by a computer device, specifically by a terminal or server, or by both. In this embodiment, the method is described using a server as an example. Figure 1 As shown, the method includes: Step 100: Acquire vibration data of the machine under various operating conditions and health states to obtain a time-series signal. Randomly select from multiple operating conditions. k One operating condition is used as the source domain, and another as the target domain. For example, vibration samples of eight health states are acquired using an accelerometer mounted on a planetary gearbox. Each sample is set to a length of 2025, and each health state contains 200 samples. The acquired data covers six operating conditions, and three of these conditions are randomly selected as the source domain and one as the target domain.

[0019] Step 101: Divide the time series signal into multiple samples according to the set length, perform Fourier transform on each sample and reshape it into a two-dimensional frequency domain sample.

[0020] For example, after performing a frequency domain transformation on the obtained vibration samples using a Fast Fourier Transform, the one-dimensional signal is reconstructed into a 45×45 pixel two-dimensional time-frequency spectrum. Based on this, the samples corresponding to the above three source domains are denoted as... , i =1, 2, 3. The samples corresponding to the target domain are denoted as... .

[0021] Step 102: Divide the two-dimensional frequency domain samples into a source domain dataset and a target domain dataset, and label the samples in the source domain dataset. The target domain dataset includes target domain training samples and target domain test samples.

[0022] Step 103: Determine the similarity between each source domain and the target domain based on the source domain dataset and the target domain dataset, and determine the assignment weight of the source domain based on the similarity.

[0023] Step 104: Construct a multi-source weighted domain adaptation network. The English abbreviation of the multi-source weighted domain adaptation network can be MSWDA.

[0024] Step 105: Select the source domain participating in training based on the assignment weight, train the multi-source weighted domain adaptation network based on the target domain training sample and the labeled sample corresponding to the selected source domain as training data, and dynamically weight the loss function of the multi-source weighted domain adaptation network based on the assignment weight during the training process until a set condition (for example, reaching the set training times) is reached, thereby obtaining the trained multi-source weighted domain adaptation network.

[0025] Step 106: Obtain the mechanical cross-domain diagnosis result based on the target domain test sample by using the trained multi-source weighted domain adaptation network.

[0026] By implementing the above steps 100-106, the present application can improve the robustness and accuracy of the final diagnosis performance by guiding the domain adaptation process through measuring the similarity between different source domains and the target domain, thereby realizing effective mechanical cross-domain diagnosis.

[0027] In another exemplary embodiment of the present application, in order to guide the domain adaptation process, the present application designs a multi-source domain weighting strategy, which gives each source domain a weight by measuring the similarity between each source domain and the target domain. Based on this, the implementation process of the above step 103 can be replaced by the following steps 200-203.

[0028] Step 200: Based on the source domain dataset and the target domain dataset, extract the principal component basis vector of the source domain and the principal component basis vector of the target domain by principal component analysis, and obtain the source domain subspace and the target domain subspace. For example: the data sets of the source domain and the target domain D s 、 D t extract the principal component basis vector of each domain by principal component analysis (PCA), and the subspace of each domain is represented as: .

[0029] .

[0030] In the formula, and are the principal component matrices of the source domain S i and the target domain t . represents the projection matrixU Belongs to a D OK K A real matrix of columns, K It also represents the number of subspaces. K =20. This represents the square of the Frobenius norm. T This represents the transpose of a matrix.

[0031] Step 201: Determine the singular values ​​of the matrix based on the source subspace and the target subspace.

[0032] Step 202: Determine the geometric similarity between the source and target domains based on the singular values ​​of the matrices, thus obtaining the inter-domain similarity. The inter-domain similarity is expressed as: .

[0033] In the formula, sim i The similarity between domains is essentially the mean of the squared cosines of the source and target subspaces on a unit sphere. s j It is a matrix The singular values ​​of .

[0034] Step 203: Perform exponential transformation and normalization on the inter-domain similarity to obtain the assigned weights of the source domain. The assigned weights of the source domain are expressed as: .

[0035] In the formula, For the first i The weights are assigned to each source domain. For temperature parameters, The larger the weight, the steeper the distribution; conversely, the smaller the weight, the flatter the distribution. exp() is an exponential function.

[0036] In another exemplary embodiment of this application, in order to achieve high-precision cross-domain diagnosis by coordinating the optimization of multiple objectives, the implementation process of step 104 above can be replaced by the following steps 300-306.

[0037] Step 300: By fusing channel attention (CA), spatial attention (SA), and cross-layer attention (CLA), a multi-dimensional collaborative domain-invariant feature enhancement mechanism is constructed, resulting in a cross-layer hybrid attention network (CLHAN). The cross-layer hybrid attention network is used as a feature extractor.

[0038] Among them, the architecture of the cross-layer hybrid attention network (CLHAN) is as follows: Figure 7 As shown, it includes a hybrid attention module (corresponding to...) Figure 7Conv1 & BN & HA & MP & ReLu in FIG. 1), a cross-layer attention fusion module (corresponding to Figure 7 Cross layerattention 1 in FIG. 1), and a global attention pooling layer (corresponding to Figure 7 GAP in FIG. 1). The CLHAN realizes hierarchical extraction of fault features through multi-stage feature conversion, and its mathematical expression is as follows: .

[0039] .

[0040] .

[0041] .

[0042] wherein, is the input vibration signal image, B is the batch size. , , respectively represent the hybrid attention (i.e., the fusion channel attention), the cross-layer attention, and the global attention (i.e., the spatial attention) pooling layer. Conv is the convolution processing. F1, F2, and F3 are respectively the features extracted by the corresponding modules.

[0043] Step 301: A supervised mechanism is constructed by using a cross-entropy loss function to obtain a classifier.

[0044] Step 302: A cross-domain feature distribution alignment is realized by an adversarial training mechanism to obtain a domain discriminator.

[0045] Step 303: A joint distribution alignment module is constructed by using a multi-kernel learning strategy based on a joint maximum mean difference.

[0046] Step 304: A cross-domain contrast learning module is obtained by constructing a class-aware feature space. The feature extractor is connected with the classifier, the domain discriminator, the joint distribution alignment module, and the cross-domain contrast learning module to form a multi-source weighted domain adaptive network.

[0047] Step 305: Determine the classifier cross-entropy loss, domain adversarial loss, JMMD loss, and contrastive learning loss using the classifier, domain discriminator, joint distribution alignment module, and cross-domain contrastive learning module, respectively. The domain adversarial loss includes the source domain adversarial loss and the target domain adversarial loss. In this step, a multi-objective optimization strategy is designed. After the original data is deep feature extracted by the feature extractor designed in step 300, four key objectives are jointly optimized to achieve efficient cross-domain fault diagnosis. Among them: (1) Healthy state recognition.

[0048] The classifier realizes accurate recognition of device state through domain-invariant feature mapping. Its core adopts a cross-entropy loss function to construct a supervision mechanism. Based on this, the determination expression of the classifier cross-entropy loss is: .

[0049] In the formula, n is the number of samples, y m is the actual label of the sample x m , and C is the classifier, F is the feature extractor.

[0050] (2) Adversarial domain discrimination.

[0051] The domain discriminator realizes cross-domain feature distribution alignment through an adversarial training mechanism. Its essence is a binary classification discrimination model. Based on this, the domain adversarial loss is expressed as: .

[0052] In the formula, d m represents the domain label of the mth sample, 0 represents the source domain, and 1 represents the target domain, D is the domain discriminator.

[0053] (3) Joint distribution alignment based on joint maximum mean difference (JMMD).

[0054] Joint maximum mean difference is a distribution difference measurement method based on reproducing kernel Hilbert space (RKHS), which is used to align the joint feature-label distribution of the source domain and the target domain. Given the source domain feature and the target domain feature , their corresponding classification probabilities are and , and the JMMD distance is defined as: .

[0055] In the formula,N s and N t These represent the number of samples in the source domain and the target domain, respectively. For the feature mapping function in RKHS, For the regenerated nucleus Hilbert space.

[0056] This application employs a multi-kernel learning strategy to enhance the robustness of distribution alignment. A Gaussian kernel set is defined. ,in The joint kernel function is: .

[0057] In the formula, This represents the feature vectors of the source and target domains, respectively. To control the smoothness of the kernel function, For set The elements in Represents a set The number of elements in the middle. This is a joint kernel function.

[0058] Based on the above description, the JMMD loss calculation process includes: Step 1: In the joint distribution alignment module, construct joint features by concatenating the domain features (i.e., deep features f) extracted by the feature extractor with the classification probability p along the channel dimension to obtain the source domain joint features and the target domain joint features. The source domain joint features and the target domain joint features are represented as follows: .

[0059] .

[0060] In the formula, , Representing the joint features of the source and target domains respectively. , Representing source domain features and target domain features respectively. , These represent the source domain classification probability and the target domain classification probability, respectively.

[0061] Step 2: Using a joint kernel function, obtain the kernel matrices for the source domain, target domain, and cross-domain based on the joint features of the source domain and the target domain, respectively. The kernel matrices for the source domain, target domain, and cross-domain are expressed as follows: .

[0062] .

[0063] .

[0064] wherein, , , are the kernel matrices of the source domain, the target domain and the cross-domain respectively.

[0065] Step 3, determining the JMMD loss based on the kernel matrices of the source domain, the target domain and the cross-domain. Wherein, the JMMD loss is represented as: wherein, is the JMMD loss, B’ is the size of the local block of the kernel matrix. By iteratively updating to minimize the value of , the joint distribution alignment of the source domain and the target domain can be achieved, and then the feature extractor obtains more universal and discriminative domain-invariant features, and finally the accuracy of cross-domain diagnosis is improved.

[0066] (4) Cross-domain contrast learning.

[0067] The application designs a cross-domain contrast learning mechanism, which effectively enhances the intra-class compactness and inter-class separability of fault features by constructing a class perception feature space. Based on this, the process of determining the contrast learning loss by using the cross-domain contrast learning module includes: Step 1: In the cross-domain contrast learning module, a double-domain feature projection network with shared parameters is constructed. Wherein, the double-domain feature projection network with shared parameters is .

[0068] Step 2: The double-domain feature projection network with shared parameters is used to project the source domain features and the target domain features extracted by the feature extractor to a unified contrast space to obtain the source domain projection features and the target domain projection features. For example, the source domain features and the target domain features are projected to a unified contrast space, and there is: .

[0069] wherein, is a ReLu activation function, W 1 and W 2 are feature weights, b 1 and b 2 are bias terms of two fully connected layers. f is the source domain feature or the target domain feature, z is the source domain projection feature or the target domain projection feature.

[0070] Step 3: For the target domain training sample, a pseudo label is generated by using a temperature scaling strategy to obtain a pseudo-labeled sample of the target domain. Wherein, for the target domain sample, the pseudo label generated by using the temperature scaling strategy is represented as: .

[0071] In the formula, The pseudo-labels representing the target domain samples. j Indicates the target domain sample index. k For category indexing, , Target domain features with target domain sample indexes. Temperature coefficient. Confidence threshold used to smooth probability distributions As training progresses, , E Indicates the current number of training iterations. N E This indicates the total number of training iterations.

[0072] Step 4: Merge the labeled samples from the source domain with the pseudo-labeled samples from the target domain to generate a hybrid comparison sample pool. The constructed hybrid comparison sample pool is represented as follows: : .

[0073] In the formula, , These are the source domain projection features or the target domain projection features, respectively. The labels for the source domain samples. This represents the number of valid samples in the target domain that have been filtered by confidence level.

[0074] Step 5: Construct a positive sample set and a negative sample set based on the mixed contrast sample pool.

[0075] Step 6: Based on the positive and negative sample sets, determine the contrastive learning loss using source domain projection features and target domain projection features, combined with a temperature scaling factor. The contrastive learning loss is expressed as: .

[0076] In the formula, To compare the learning loss, the set of positive samples Includes cross-domain sample pairs of the same type, and a set of negative samples. It includes all outlier samples. This is the temperature scaling factor.

[0077] Step 306: Determine the loss function of the multi-source weighted domain adaptive network based on the classifier cross-entropy loss, domain adversarial loss, JMMD loss, and contrastive learning loss. Based on this, the loss function of the dynamically weighted multi-source weighted domain adaptive network is expressed as: .

[0078] In the formula, is a loss function, is the number of source domains, represents a weighted source domain loss, is a classifier cross-entropy loss of the source domain, is a domain adaptation coefficient, is an adversarial loss of the source domain. and is a loss weight of the JMMD loss and the contrastive learning loss, used to adjust the relative importance of the two, , .

[0079] Based on the above description, in the above step 106, during the training of the MSWDA using the multi-source domain data and the target domain training data, the parameter optimization process of the MSWDA is as follows: .

[0080] .

[0081] .

[0082] In the formula, , , respectively represent the parameters of the feature extractor, the classifier and the domain discriminator, , , is the optimal solution of , , .

[0083] Based on the gradient back propagation algorithm, the parameter updating process of each part in the MSWDA is as follows: .

[0084] .

[0085] .

[0086] In the formula, is the learning rate.

[0087] Based on the above description, the application first designs a multi-source domain weighting strategy, assigns a weight to each source domain by calculating the similarity of different source domains and target domains. Then, a cross-layer hybrid attention network is constructed to enhance domain-invariant features. Secondly, a multi-objective optimization strategy is designed to optimize the four objectives of health state recognition, adversarial domain discrimination, joint distribution alignment and class separability and intra-class compactness improvement. Finally, the multi-source weighted domain adaptive network is realized to realize mechanical cross-domain diagnosis. Based on this, the specific implementation process of the multi-source weighted domain adaptive guided mechanical cross-domain diagnosis method provided by the application is as shown in Figure 2 and Figure 6 As shown in the application, the influence of different source-target domain similarity on domain adaptation is fully considered, and based on the multi-source domain weighting strategy, the cross-layer hybrid attention network and the multi-objective optimization strategy, a new method is provided for the state monitoring and fault diagnosis of mechanical systems, which provides important technical support for the safe and reliable operation of mechanical systems. Among them, Figure 2 The results corresponding to S1, S2 and S3 in Figures 3-5 are shown.

[0088] In another exemplary embodiment of the application, the superiority of the method provided by the application is further illustrated based on the experimental results. Figure 8 The solid line, dotted line and dashed line in represent different variable speed conditions, corresponding to the speed in Table 1. In addition, Table 1 also illustrates that the diagnostic data used in the application contains 8 fault types.

[0089] Table 1 Health state and operating condition

[0090] As shown in Table 2, 6 operating conditions T1, T2, T3, T4, T5 and T6 are set according to different variable speed conditions and different load loads, and each operating condition is set with 8 fault types. In addition, 6 multi-source migration scenarios MT1, MT2, MT3, MT4, MT5 and MT6 and 6 single-source migration scenarios ST1, ST2, ST3, ST4, ST5 and ST6 are set.

[0091] Table 2 Migration diagnosis task setting

[0092] As shown in the embodiments of Table 3, it should be noted that the MSWDA provided by the present application comprises three parts of multi-source domain weighting (MSWD), cross-layer attention network (CLHAN) and multi-objective optimization (MOO). Method 1 represents the ablation of MSWD from MSWDA, method 2 represents the ablation of CLHAN from MSWDA, and method 3 represents the ablation of MOO from MSWDA. In the examples of the present application, MSWDA exhibits optimal performance in six cross-domain migration scenarios, with an average accuracy of 98.48%. After ablation of MSWD, CLHAN and MOO, the average accuracy decreases by 3.38%, 2.02% and 2.91% respectively. The experimental results fully verify the outstanding contribution of the designed MSWD, CLHAN and MOO methods in improving the cross-domain diagnosis performance of the model.

[0093] Table 3 Ablation experiment results

[0094] As shown in the embodiments of Table 4, it should be noted that MSD-DANN represents a multi-source domain migration diagnosis method based on domain adversarial neural network. MSD-MMD represents a multi-source domain migration diagnosis method based on maximum mean difference. MSSA represents a multi-source sub-domain adaptive migration diagnosis method using multi-branch network and local maximum mean difference distance to realize domain adaptation. KDMUMDAN represents a knowledge dynamic matching unit guided multi-source domain adaptive network with attention mechanism. SSD-DANN represents a single-source domain migration diagnosis method based on domain adversarial neural network. DCORAL represents a migration diagnosis method that reduces the difference between domains by aligning the second-order statistics of the source domain and the target domain. CNN represents a parameter migration diagnosis method based on convolutional neural network.

[0095] Table 4 Cross-domain diagnosis results

[0096] Figure 9 The six subgraphs corresponding to the parts (a) to (f) respectively show the normalized weight distribution of each source domain in different migration tasks MT1-MT6. Figure 9 The results of Table 4 and Table 4 show that the multi-source domain weighting strategy provided by the present application can effectively quantify the correlation between the source domain and the target domain. In task MT1, the source domain T2 obtains the highest weight of 0.51, which is significantly higher than other source domains, indicating that this source domain has the strongest feature similarity with the target domain. Task MT5 presents a more extreme weight distribution, with the source domain T6 having a weight of 0.68, while the weights of other source domains are all less than 0.2, verifying the recognition ability of the method provided by the present application for significantly related source domains.

[0097] In summary, the multi-source weighted domain adaptive guided mechanical cross-domain diagnosis method provided by the application can assign weights to each source domain according to similarity, guide the domain adaptive process, enhance the domain-invariant feature representation, and cooperatively optimize multiple targets, so as to realize high-precision cross-domain diagnosis. The application can provide technical support for state monitoring, fault diagnosis and health management of numerous mechanical systems.

[0098] Based on the same inventive concept, the embodiments of the application also provide a multi-source weighted domain adaptive guided mechanical cross-domain diagnosis system for implementing the multi-source weighted domain adaptive guided mechanical cross-domain diagnosis method described above. The implementation scheme for solving the problem provided by the system is similar to the implementation scheme described in the above method, so the specific limitations in one or more multi-source weighted domain adaptive guided mechanical cross-domain diagnosis system embodiments provided below can be referred to the limitations of the multi-source weighted domain adaptive guided mechanical cross-domain diagnosis method in the above, which will not be repeated here.

[0099] In one exemplary embodiment, as shown in Figure 10 a multi-source weighted domain adaptive guided mechanical cross-domain diagnosis system is provided, which includes a signal acquisition module, a sample remodeling module, a sample division module, a weight allocation module, a network construction module, a network training module and a cross-domain diagnosis module.

[0100] The signal acquisition module is configured to acquire vibration data of a mechanical device to be diagnosed under multiple working conditions and different health states, and obtain time series signals. A working condition is randomly selected from the multiple working conditions as a source domain, and another working condition is selected as a target domain. k

[0101] The sample remodeling module is configured to divide the time series signals into multiple samples according to a set length, and perform Fourier transform on each sample and remodel the sample into a two-dimensional frequency domain sample.

[0102] The sample division module is configured to divide the two-dimensional frequency domain sample into a source domain data set and a target domain data set, and label the samples in the source domain data set. The target domain data set includes target domain training samples and target domain test samples.

[0103] The weight allocation module is configured to determine the similarity between each source domain and the target domain based on the source domain data set and the target domain data set, and determine the allocation weight of the source domain based on the similarity.

[0104] The network construction module is configured to construct a multi-source weighted domain adaptive network.

[0105] ​The network training module is configured to select a source domain participating in training based on the assigned weight, train the multi-source weighted domain self-adaptive network based on the target domain training samples and the labeled samples corresponding to the selected source domain as training data, and dynamically weight the loss function of the multi-source weighted domain self-adaptive network based on the assigned weight during the training process until a set condition is reached, thereby obtaining the trained multi-source weighted domain self-adaptive network.

[0106] The cross-domain diagnosis module is configured to obtain a mechanical cross-domain diagnosis result based on the target domain test samples by using the trained multi-source weighted domain self-adaptive network.

[0107] In an exemplary embodiment, a computer device, which can be a server or a terminal, is provided, and an internal structure diagram of the computer device can be as shown in Figure 11 The computer device includes a processor, a memory, an input / output interface (I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The database of the computer device is configured to store mechanical cross-domain diagnosis data guided by multi-source weighted domain self-adaptation. The input / output interface of the computer device is configured to exchange information between the processor and external devices. The communication interface of the computer device is configured to communicate with external terminals through network connection. The computer program is executed by the processor to implement a method for mechanical cross-domain diagnosis guided by multi-source weighted domain self-adaptation.

[0108] Those skilled in the art can understand that Figure 11 The structure shown in the above description is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. Specifically, the computer device can include more or fewer components than those shown in the diagram, or combine certain components, or have a different arrangement of components.

[0109] In an exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0110] In an exemplary embodiment, a computer readable storage medium is provided, which stores a computer program. The computer program is executed by a processor to implement the steps in the above method embodiments.

[0111] In an example embodiment, a computer program product is provided, including a computer program which, when executed by a processor, implements the steps of any of the above method embodiments.

[0112] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant regulations.

[0113] It can be understood by those skilled in the art that all or part of the processes in the above-mentioned embodiments can be completed by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiments. Any reference to memory, database or other medium used in the embodiments provided by the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive random access memory (RRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0114] The database involved in the embodiments provided by the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a blockchain, etc., without being limited thereto. The processor involved in the embodiments provided by the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.

[0115] Any combination of the technical features in the above embodiments can be made, and for the sake of brevity, not all possible combinations are described above, however, as long as there is no conflict, any combination of the technical features should be considered within the scope of the present disclosure.

[0116] The principles and implementation manners of the present application are described herein by using specific examples, and the above embodiments are only used to help understand the method and core idea of the present application; meanwhile, according to the idea of the present application, the specific implementation manners and application range can be changed by those skilled in the art. In conclusion, the content of the present specification should not be understood as a limitation of the present application.

Claims

1. A mechanical cross-domain diagnostic method guided by multi-source weighted domain adaptive method, characterized in that, include: Vibration data of the machine under diagnosis under various working conditions and different health states are obtained to obtain time series signals; Randomly select from multiple working conditions k One operating condition is used as the source domain, and another operating condition is used as the target domain. The time series signal is divided into multiple samples according to a set length, and each sample is subjected to Fourier transform and reconstructed into a two-dimensional frequency domain sample. The two-dimensional frequency domain samples are divided into a source domain dataset and a target domain dataset, and the samples in the source domain dataset are labeled; the target domain dataset includes target domain training samples and target domain test samples. Based on the source domain dataset and the target domain dataset, a similarity metric is determined between each source domain and the target domain, and the assigned weight of the source domain is determined based on the similarity. Construct a multi-source weighted domain adaptive network; The source domains to be selected for training are based on the allocated weights. The target domain training samples and the labeled samples corresponding to the selected source domains are used as training data to train the multi-source weighted domain adaptive network. During the training process, the loss function of the multi-source weighted domain adaptive network is dynamically weighted based on the allocated weights until the set conditions are met, and then the trained multi-source weighted domain adaptive network is obtained. Using a trained multi-source weighted domain adaptive network, and based on the target domain test samples, mechanical cross-domain diagnostic results are obtained.

2. The mechanical cross-domain diagnostic method with multi-source weighted domain adaptive guidance according to claim 1, characterized in that, Based on the source domain dataset and the target domain dataset, a similarity metric is determined between each source domain and the target domain, and a weight is assigned to the source domain based on the similarity, including: Based on the source domain dataset and the target domain dataset, principal component analysis is used to extract the principal component basis vectors of the source domain and the target domain, thus obtaining the source domain subspace and the target domain subspace. Determine the singular values ​​of the matrix based on the source subspace and the target subspace; The geometric similarity between the source domain and the target domain is determined based on the singular values ​​of the matrix, and the inter-domain similarity is obtained. The inter-domain similarity is subjected to exponential transformation and normalization to obtain the assigned weights of the source domain.

3. The mechanical cross-domain diagnostic method with multi-source weighted domain adaptive guidance according to claim 1, characterized in that, Constructing a multi-source weighted domain adaptive network includes: By fusing channel attention, spatial attention, and cross-layer attention, a multi-dimensional collaborative domain-invariant feature enhancement mechanism is constructed, resulting in a cross-layer hybrid attention network; this cross-layer hybrid attention network is then used as a feature extractor. A supervision mechanism is constructed using the cross-entropy loss function to obtain the classifier; Cross-domain feature distribution alignment is achieved through adversarial training mechanisms to obtain a domain discriminator; Based on the joint maximum mean difference, a multi-core learning strategy is used to construct a joint distribution alignment module; A cross-domain contrastive learning module is obtained by constructing a class-aware feature space; the feature extractor is connected to the classifier, the domain discriminator, the joint distribution alignment module and the cross-domain contrastive learning module respectively to form the multi-source weighted domain adaptive network; The classifier, the domain discriminator, the joint distribution alignment module, and the cross-domain contrastive learning module are used to determine the classifier cross-entropy loss, domain adversarial loss, JMMD loss, and contrastive learning loss, respectively; the domain adversarial loss includes source domain adversarial loss and target domain adversarial loss. The loss function of the multi-source weighted domain adaptive network is determined based on the classifier cross-entropy loss, the domain adversarial loss, the JMMD loss, and the contrastive learning loss.

4. The mechanical cross-domain diagnostic method with multi-source weighted domain adaptive guidance according to claim 3, characterized in that, The cross-layer hybrid attention network includes a hybrid attention module, a cross-layer attention fusion module, and a global attention pooling layer; the cross-layer hybrid attention network achieves hierarchical extraction of fault features through multi-stage feature transformation.

5. The mechanical cross-domain diagnostic method with multi-source weighted domain adaptive guidance according to claim 3, characterized in that, The process of determining the JMMD loss using the joint distribution alignment module includes: In the joint distribution alignment module, joint features are constructed by concatenating the domain features extracted by the feature extractor with the classification probabilities along the channel dimension to obtain source domain joint features and target domain joint features. The multi-kernel learning strategy is used to construct a joint kernel function, and the joint kernel function is used to obtain the kernel matrices of the source domain, target domain, and cross-domain based on the joint features of the source domain and the joint features of the target domain, respectively. The JMMD loss is determined based on the kernel matrix of the source domain, target domain, and cross-domain.

6. The mechanical cross-domain diagnostic method with multi-source weighted domain adaptive guidance according to claim 3, characterized in that, The process of determining the contrastive learning loss using the cross-domain contrastive learning module includes: In the cross-domain contrastive learning module, a dual-domain feature projection network with shared parameters is constructed; A dual-domain feature projection network with shared parameters is used to project the source domain features and target domain features extracted by the feature extractor into a unified contrast space to obtain source domain projection features and target domain projection features. For the training samples in the target domain, a temperature scaling strategy is used to generate pseudo-labels, resulting in pseudo-labeled samples in the target domain. The labeled samples from the source domain and the pseudo-labeled samples from the target domain are merged to generate a mixed comparison sample pool; Based on the aforementioned mixed contrast sample pool, construct a positive sample set and a negative sample set; Based on the positive sample set and the negative sample set, the contrastive learning loss is determined by using the source domain projection features and the target domain projection features, combined with the temperature scaling factor.

7. The multi-source weighted domain adaptive guided mechanical cross-domain diagnostic method according to claim 3, characterized in that, The loss function of the multi-source weighted domain adaptive network based on dynamically weighted allocation is expressed as: ; In the formula, For loss function, For the number of source domains, Indicates the weighted source domain loss. For the first i The weights assigned to each source domain. The cross-entropy loss of the classifier in the source domain. For the domain adaptive coefficients, For the source domain's combat losses, To mitigate losses in the target domain, For JMMD loss, To compare learning loss, The loss weights for JMMD loss, To compare learning loss The loss weight.

8. A multi-source weighted domain adaptive guided mechanical cross-domain diagnostic system, characterized in that, include: The signal acquisition module is used to acquire vibration data of the machine under various working conditions and different health states, and obtain time series signals; Randomly select from multiple working conditions k One operating condition is used as the source domain, and another operating condition is used as the target domain. The sample reshaping module is used to divide the time series signal into multiple samples according to a set length, perform Fourier transform on each sample and reshape it into a two-dimensional frequency domain sample. The sample partitioning module is used to partition the two-dimensional frequency domain samples into a source domain dataset and a target domain dataset, and to label the samples in the source domain dataset; the target domain dataset includes target domain training samples and target domain test samples. The weight allocation module is used to determine the similarity between each source domain and the target domain based on the source domain dataset and the target domain dataset, and to determine the allocation weight of the source domain based on the similarity. The network building module is used to construct multi-source weighted domain adaptive networks; The network training module is used to select the source domains to participate in the training based on the allocated weights, and to train the multi-source weighted domain adaptive network based on the target domain training samples and the labeled samples corresponding to the selected source domains as training data. During the training process, the loss function of the multi-source weighted domain adaptive network is dynamically weighted based on the allocated weights until the set conditions are met, and then the trained multi-source weighted domain adaptive network is obtained. The cross-domain diagnostic module is used to obtain mechanical cross-domain diagnostic results based on the target domain test samples using a trained multi-source weighted domain adaptive network.

9. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that the processor executes the computer program to implement the multi-source weighted domain adaptive guided mechanical cross-domain diagnostic method according to any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the mechanical cross-domain diagnostic method with multi-source weighted domain adaptive guidance as described in any one of claims 1-7.