Mechanical Fault Diagnosis Method and System Based on Federated General Multi-Source Domain Adaptation

Through the federal universal multi-source deep adversarial network, combined with local training and cloud parameter aggregation methods, the adaptability problem of the mechanical fault diagnosis model under different data distributions is solved, and high-precision and low-latency fault diagnosis are achieved.

CN119782893BActive Publication Date: 2025-06-03XIAN UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510271875.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-10
Publication Date
2025-06-03
Estimated Expiration
2045-03-10

AI Technical Summary

Technical Problem

In the prior art, mechanical fault diagnosis models are difficult to effectively adapt when facing source and target domains with different data distributions, especially when the fault mode of the target domain is unknown, it is difficult for the model to achieve high-precision diagnosis.

Method used

A mechanical fault diagnosis method based on federal general multi-source domain adaptation is proposed. The federal general multi-source deep adversarial network is adopted to protect data privacy through joint communication methods of local training and cloud parameter aggregation, and domain alignment is carried out through source class weighting and target sample weighting methods to achieve high-precision fault diagnosis.

Benefits of technology

While protecting data privacy, high-precision and low-latency mechanical fault diagnosis are achieved, which can effectively adapt to the source and target domains of different data distributions, and improve the real-time diagnostic capabilities of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119782893B_ABST
    Figure CN119782893B_ABST
Patent Text Reader

Abstract

The present application discloses a mechanical fault diagnosis method and system based on federated general multi-source domain adaptation, which relates to the technical field of fault diagnosis. The method includes: extracting target sample features; determining the source class weights and target sample weights of the target domain; initializing local models in the source domain and the target domain with initial parameters; training the local model in the source domain using source samples and source class weights, and training the local model in the target domain using target samples and target sample weights; aggregating the updated source domain parameters and target domain parameters after each training to obtain aggregated parameters; repeating the operations of local model training and parameter aggregation to obtain a global model; and using the global model to perform fault detection on the data to be diagnosed. The present application adopts a joint communication method of local training and cloud parameter aggregation to protect data privacy. At the same time, the source class and target sample weighting method based on the margin theory promotes domain alignment, improving the diagnosis accuracy and speed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of fault diagnosis, and particularly to a mechanical fault diagnosis method and system based on federated general multi-source domain adaptation. Background Art

[0002] The rapid development of deep learning has greatly promoted the research on mechanical fault diagnosis. Existing research has achieved great success when the training data and test data have similar distributions and there is sufficient training data. However, due to factors such as working conditions and types of machinery, there are usually significant distribution differences between the training data (i.e., the source domain) and the test data (i.e., the target domain). To make the fault diagnosis model more adaptable to different data distributions, domain adaptation (DA) technology has received increasing attention, and the unsupervised DA setting (i.e., the data in the target domain is completely unlabeled) is the most challenging.

[0003] According to whether the categories of the target domain are known, unsupervised DA can be divided into non-general DA and general DA. According to the category relationship between the source domain and the target domain, non-general DA methods are divided into closed-set DA, partial DA, and open-set DA, but they all assume that the fault modes of each domain are known. Closed-set DA assumes that the two domains share the same fault modes. Partial DA assumes that the fault modes of the source domain contain those of the target domain. Open-set DA assumes that the target domain has invisible fault modes. In recent years, some research has attempted to address the challenges of non-general DA problems and achieved good results.

[0004] However, in most fault diagnosis cases, it is relatively difficult to pre-understand the relationship between the fault modes of the source domain and the target domain. Therefore, in recent years, general DA has received more attention. General DA means that when the fault modes of the target domain are unknown, the labeled source domain knowledge should be transferred to the target domain. If the fault modes of the target domain are included in the fault mode space of the source domain, the model needs to output the correct fault modes; if the fault modes of the target domain do not appear in the source domain, the model needs to label them as unknown modes.

[0005] Since the source domain may contain various machine faults, the target domain usually contains a limited number of fault modes. In reality, however, due to high costs, it is usually difficult to obtain sufficient high-performance raw data and fault modes for a single source domain. To expand the dataset at a lower cost, the individual data of multiple source domains sharing similar mechanisms can be directly integrated. However, industrial users usually have potential conflicts of interest, and others are generally reluctant to share their data. Therefore, direct data aggregation is not feasible. Summary of the Invention

[0006] The embodiments of the present application provide a mechanical fault diagnosis method and system based on federated general multi-source domain adaptation to solve the problem of difficult source domain data sharing in the prior art. The federated general multi-source deep adversarial network proposed in the present application is a model based on federated general multi-source domain adaptation for real-time mechanical fault diagnosis. While protecting the privacy of industrial user data, it provides high-precision and low-latency diagnosis services.

[0007] On the one hand, the embodiments of the present application provide a mechanical fault diagnosis method based on federated general multi-source domain adaptation, including:

[0008] Extract the target sample features of the target samples in the target domain;

[0009] Determine the pseudo-marginal vectors of the target samples according to the target sample features, and determine the source class weights and target sample weights of the target domain based on the pseudo-marginal vectors;

[0010] Generate initial parameters, and send the initial parameters, source class weights, and target sample weights to each source domain and the target domain, where the initial parameters include source domain parameters and target domain parameters, the source domain parameters include the parameters of the feature extractor, discriminator, and classifier in each source domain, and the target domain parameters include the parameters of the feature extractor, discriminator, and classifier in the target domain;

[0011] Use the initial parameters to initialize the feature extractor, discriminator, and classifier in the source domain, and the feature extractor, discriminator, and classifier in the target domain respectively;

[0012] Use the source samples in the source domain and the source class weights to train the local models in the source domain. The local models in the source domain include the feature extractor, discriminator, and classifier in the source domain; use the target samples and the target sample weights to train the local models in the target domain. The local models in the target domain include the feature extractor and discriminator in the target domain;

[0013] After each training ends, update the source domain parameters, target domain parameters, source class weights, and target sample weights, and aggregate the updated source domain parameters and target domain parameters to obtain aggregated parameters;

[0014] Use the aggregated parameters to update the local models in the source domain and the local models in the target domain, use the source samples and the updated source class weights to train the updated local models in the source domain, and use the target samples and the updated target sample weights to train the updated local models in the target domain;

[0015] Repeat the operations of local model training and parameter aggregation until the stop condition is reached to obtain a global model;

[0016] Use the global model to perform fault detection on the data to be diagnosed.

[0017] On the other hand, the embodiment of the present application also provides a mechanical fault diagnosis system based on federated general multi-source domain adaptation, including:

[0018] A cloud server, which is used to extract the target sample features of the target samples in the target domain, determine the pseudo-marginal vectors of the target samples according to the target sample features, and determine the source class weights and target sample weights of the target domain based on the pseudo-marginal vectors; the cloud server also generates initial parameters and sends the initial parameters, source class weights and target sample weights to each source domain and the target domain, where the initial parameters include source domain parameters and target domain parameters, the source domain parameters include the parameters of the feature extractor, discriminator and classifier in each source domain, and the target domain parameters include the parameters of the feature extractor, discriminator and classifier in the target domain;

[0019] A client is used to initialize the feature extractor, discriminator and classifier in the source domain, and the feature extractor, discriminator and classifier in the target domain respectively with the initial parameters; use the source samples and source class weights in the source domain to train the local model in the source domain, and the local model in the source domain includes the feature extractor, discriminator and classifier in the source domain; use the target samples and target sample weights to train the local model in the target domain, and the local model in the target domain includes the feature extractor and discriminator in the target domain;

[0020] After each training ends, the client updates the source domain parameters, target domain parameters, source class weights and target sample weights, and the cloud server aggregates the updated source domain parameters and target domain parameters to obtain aggregated parameters; the client uses the aggregated parameters to update the local model in the source domain and the local model in the target domain, and uses the source samples and the updated source class weights to train the updated local model in the source domain, and uses the target samples and the updated target sample weights to train the updated local model in the target domain;

[0021] The client and the cloud server repeatedly perform the operations of local model training and parameter aggregation until the stop condition is reached to obtain a global model; the client uses the global model to perform fault detection on the data to be diagnosed.

[0022] The mechanical fault diagnosis method and system based on federated general multi-source domain adaptation in the present application have the following advantages:

[0023] 1. A more practical federated general multi-source domain adaptation model is proposed, that is, the original data of all domains (including the source domain and the target domain) cannot be exported from the local client, the fault modes of the target domain are completely unknown, and different source domains have different fault modes. Therefore, knowledge must be transferred from different source domains in an unsupervised manner while protecting data privacy.

[0024] 2. A federated general multi-source deep adversarial network is proposed to address the challenges in data privacy, diagnostic accuracy, and diagnostic speed faced by the federated general multi-source domain adaptation model. First, a new joint communication method of local training and cloud parameter aggregation is proposed to protect data privacy. Second, the source class weighting method and the target sample weighting method based on the margin theory are very helpful for domain alignment. Of course, all domains share the same model to make the federated general multi-source deep adversarial network independent of the number of source domains and speed up the diagnostic speed.

[0025] 3. A large number of experimental results on two rotating machinery datasets show that the performance of the proposed federated general multi-source deep adversarial network is better than the state-of-the-art solutions. Brief Description of the Drawings

[0026] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0027] Figure 1 It is a flowchart of the mechanical fault diagnosis method based on federated general multi-source domain adaptation provided by the embodiments of the present application.

[0028] Figure 2 It is a schematic diagram of the visualization result in task T13 on the CWRU dataset provided by the embodiments of the present application. Detailed Embodiments

[0029] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.

[0030] Figure 1 It is a flowchart of the mechanical fault diagnosis method based on federated general multi-source domain adaptation provided by the embodiments of the present application. The method proposed in the present application has the following assumptions:

[0031] 1. Multiple domains (including source domains and target domains) with similar machinery but different working conditions are used to train local models together. There are labeled data in the source domains and unlabeled data in the target domains.

[0032] 2. The fault modes in the target domain are completely unknown. The fault modes in each source domain are known, but the fault modes of any two source domains are different.

[0033] 3. The raw data of all domains cannot be exported from the client.

[0034] The embodiment of the present application provides a mechanical fault diagnosis method based on federated general multi-source domain adaptation, including:

[0035] S100. Extract the target sample features of the target samples in the target domain.

[0036] Exemplarily, like a general federated learning framework, the method of the present application is deployed on multiple clients and a cloud server. Each client represents a domain and has local data, where the local data of the source domain is called source samples, and the local data of the target domain is called target samples. Specifically, the set of source samples from the i th source domain is defined as , i = 1, 2, ···, M , where i and j are the labels of the source domain and the source sample respectively, and are the i th source sample and the corresponding fault mode in the j th source domain, M is the number of source domains, is the number of source samples from the i th source domain. Similarly, the set of target samples from a target domain is defined as , where is the k th target sample in the target domain, k is the label of the target sample, is the number of target samples.

[0037] Let and represent the fault modes of the i th source domain and the target domain respectively, represents the common fault mode of the i th source domain and the target domain, and are the specific fault modes of the i th source domain and the target domain respectively, is the fault mode composed of all source domains, is the common fault mode of the source domain and the target domain, is the specific fault mode composed of the source domain.

[0038] The goal of this application is to establish a real-time fault diagnosis model for a target domain with unknown fault modes, i.e., a global model, on the premise that the original data of all domains cannot be exported from the client. This global model is expected to identify the fault modes already included in the source domain and distinguish the invisible fault modes that only exist in the target domain.

[0039] Inspired by the generative adversarial network (GAN), the local model deployed in the client in this application is based on a domain adversarial network, which is generally divided into three parts: a feature extractor G F , a discriminator G D and a classifier G C . The feature extractor G F aims to confuse the discriminator by learning domain-invariant features G D , and the discriminator G D attempts to distinguish the features of source samples and target samples without being confused by the feature extractor G F . The classifier G C aims to accurately predict the fault modes of samples. Domain adversarial training reduces the distribution difference between the source domain and the target domain by performing the GAN min-max game.

[0040] In the embodiment of this application, the feature extractor G F includes three sequentially connected convolutional modules, and two sequentially connected fully connected layers are also connected after the last convolutional module. Each convolutional module includes a convolutional layer, a batch normalization layer, an activation function, and a pooling layer connected in sequence. The discriminator G D includes three sequentially connected fully connected layers. The classifier G C includes one fully connected layer.

[0041] Specifically, given an input sample x and its true label y , first, the feature extractor G F extracts features from the sample x , and the parameters of the feature extractor G F are . Then, the extracted features are respectively input into the classifier G C and the discriminator G D , where the classifier GC Output the predicted labels of samples with parameters, and the discriminator G D uses the parameters to determine whether the sample belongs to the source domain or the target domain. This process will be executed in the target domain first. After the client that deploys the target samples and the local model in the target domain extracts the features of the target samples, it will enter the next step for further processing.

[0042] S110. Determine the pseudo-marginal vector of the target sample according to the target sample features, and determine the source class weights and target sample weights of the target domain based on the pseudo-marginal vector.

[0043] Exemplarily, this application calculates the pseudo-marginal vector of the target sample set , where the number of failure modes is the number of failure modes in . To further understand the information of each iteration, this application also calculates the cumulative average, that is:

[0044]

[0045]

[0046] where and are the cumulative averages after the t +1-th and the t -th iterations respectively, the r -th dimensional data in r represents the confidence of the -th failure mode composed of the source domain belonging to the target domain. The initial value of the cumulative average is all 0, where the number of 0s is T the number of failure modes in

[0047]

[0048] where E represents calculating the expectation, x is the abbreviation of the target sample , represents the pseudo-marginal of the target sample x . The pseudo-marginal is the distance between the maximum probability and the second-largest probability. In the case of misjudgment and the occurrence of unknown failure modes, the pseudo-marginal will be very small. represents the best label predicted by the classifier G C , represents the number of failure modes in the failure mode .

[0049]

[0050]

[0051] Among them, and respectively represent the probabilities that the target sample x belongs to the fault mode and y The max represents taking the maximum value.

[0052] The th r element of the pseudo-marginal vector r represents the weight of the th

[0053]

[0054] Among them, represents the source class weight of the fault mode , represents calculating the pseudo-marginal of the fault mode .

[0055] Therefore, the pseudo-marginal vector can also be directly used for weighting the target samples. In order to make full use of the target samples, the present application further calculates the target sample weights based on the pseudo-marginal vector and the pseudo-marginal theory, that is:

[0056]

[0057] Among them, represents the target sample weight of the target sample , represents the classifier G C calculates the pseudo-marginal of the target sample , represents calculating the pseudo-marginal of the optimal label .

[0058] S120, generate initial parameters, and send the initial parameters, source class weights, and target sample weights to each source domain and target domain, where the initial parameters include source domain parameters and target domain parameters, the source domain parameters include the parameters of the feature extractor, discriminator, and classifier in each source domain, and the target domain parameters include the parameters of the feature extractor, discriminator, and classifier in the target domain.

[0059] Exemplarily, the parameters of the feature extractor, discriminator, and classifier in the initial parameters can be determined randomly. After the client belonging to the target domain calculates the source class weights and target sample weights, they will be sent to the cloud server, and the cloud server will send the generated initial parameters together with the source class weights and target sample weights to all clients.

[0060] S130, initialize the feature extractor, discriminator, and classifier in the source domain, and the feature extractor, discriminator, and classifier in the target domain, respectively, using the initial parameters.

[0061] Exemplarily, initializing the feature extractor, discriminator, and classifier means setting the parameters of these feature extractor, discriminator, and classifier to the initial parameters sent by the cloud server. At this time, all clients have established their respective local models.

[0062] S140, train the local model in the source domain using the source samples and source class weights in the source domain. The local model in the source domain includes the feature extractor, discriminator, and classifier in the source domain; train the local model in the target domain using the target samples and target sample weights. The local model in the target domain includes the feature extractor and discriminator in the target domain.

[0063] Exemplarily, the client belonging to the source domain will train the local model therein using the source samples stored therein and the source class weights received from the cloud server, while the client belonging to the target domain will train the local model therein using the target samples stored therein and the target sample weights received from the cloud server. Further, the local model in the source domain includes a feature extractor, a discriminator, and a classifier, and these three modules will be trained separately during the training process. The local model in the target domain also includes a feature extractor and a discriminator, and only the feature extractor and discriminator will be trained during the training process, while the classifier will not be trained.

[0064] During the process of training the local models in the source domain and the target domain, calculate the classification loss of the classifier and the discrimination loss of the discriminator in the source domain and the target domain. The sum of the classification loss and the discrimination loss is the total loss, and update the source domain parameters and target domain parameters according to the total loss.

[0065] Total loss L Is expressed as:

[0066]

[0067] Where L C Represents the classification loss, L D Represents the discrimination loss.

[0068] To fully consider the domain differences between any two different source domains, the joint cross-entropy loss of the source domain data is calculated in this application:

[0069]

[0070]

[0071] where, represents the classification loss of the classifier of the local model in the source domain.

[0072] To perform domain adversarial network transfer on the common failure modes of the source domain and the target domain and fully understand the characteristics of the target domain, the discrimination loss is calculated in this application based on source class weighting and target sample weighting:

[0073]

[0074] where, represents the discrimination loss of the discriminator of the local model in the source domain, represents the discrimination loss of the discriminator of the local model in the target domain.

[0075]

[0076]

[0077] S150. After each training, update the source domain parameters, target domain parameters, source class weights, and target sample weights, and aggregate the updated source domain parameters and target domain parameters to obtain the aggregated parameters.

[0078] Exemplarily, when updating the source domain parameters and target domain parameters, determine the adjustment value according to the loss of the classifier in the source domain and the loss of the discriminator in the source domain, and take the difference between the current parameters of the feature extractor in the source domain and the adjustment value as the updated parameters of the feature extractor in the source domain;

[0079] Determine the adjustment value according to the loss of the discriminator in the source domain, and take the difference between the current parameters of the discriminator in the source domain and the adjustment value as the updated parameters of the discriminator in the source domain;

[0080] Determine the adjustment value according to the loss of the classifier in the source domain, and take the difference between the current parameters of the classifier in the source domain and the adjustment value as the updated parameters of the classifier in the source domain;

[0081] Determine the adjustment value according to the loss of the discriminator in the target domain, and take the sum of the current parameters of the feature extractor in the target domain and the adjustment value as the updated parameters of the feature extractor in the target domain;

[0082] Determine the adjustment value according to the loss of the discriminator in the target domain, and use the difference between the current parameters of the discriminator in the target domain and the adjustment value as the updated parameters of the discriminator in the target domain.

[0083] Specifically, since local data cannot be exported from the client, the present application proposes a model optimization scheme of local model training and cloud aggregation by introducing a gradient reversal layer (GRL) in the backpropagation process.

[0084] In each local training iteration, the update process of the gradient reversal layer for each parameter is as follows.

[0085] The updated parameters of the feature extractor in the source domain are:

[0086]

[0087] The updated parameters of the discriminator in the source domain are:

[0088]

[0089] The updated parameters of the classifier in the source domain are:

[0090]

[0091] The updated parameters of the feature extractor in the target domain are:

[0092]

[0093] The updated parameters of the discriminator in the target domain are:

[0094]

[0095] Among them, 、 、 、 and are the parameters of the feature extractor, discriminator, classifier in the source domain, the parameters of the feature extractor and discriminator in the target domain respectively, λ 2 is the weight used to balance the classification loss and the discriminant loss, controlling the trade-off between domain alignment and classification performance. δ is the learning rate parameter, controlling the step size of the model parameter update, affecting the convergence speed and stability of the model.

[0096] When aggregating the updated source domain parameters and target domain parameters, the sum of the updated parameters of the feature extractor in the source domain and the updated parameters of the feature extractor in the target domain is used as the feature extractor parameters in the aggregated parameters, the sum of the updated parameters of the discriminator in the source domain and the updated parameters of the discriminator in the target domain is used as the discriminator parameters in the aggregated parameters, and the sum of the updated parameters of the classifier in the source domain is used as the classifier parameters in the aggregated parameters.

[0097] Specifically, the aggregated parameters can be expressed as:

[0098]

[0099]

[0100]

[0101] Among them, 、 and respectively represent the feature extractor parameters, discriminator parameters and classifier parameters in the aggregated parameters.

[0102] S160. Use the aggregated parameters to update the local models in the source domain and the target domain. Train the updated local model in the source domain using the source samples and the updated source class weights, and train the updated local model in the target domain using the target samples and the updated target sample weights.

[0103] Exemplarily, after the cloud server aggregates the parameters of the local models in each client, the aggregated parameters are obtained. These aggregated parameters include the parameters of each module in the local model. Therefore, when the cloud server sends the aggregated parameters to each client, the local models in these clients can replace the parameters of their own modules with the aggregated parameters, thereby achieving the purpose of updating the local model.

[0104] After updating the parameters of the local model, the updated local model can continue to be trained using the local data in the client. The updated source class weights and target sample weights will be used during the training process.

[0105] S170. Repeat the operations of local model training and parameter aggregation until the stop condition is reached to obtain the global model.

[0106] Exemplarily, after the end of one iteration, all clients will upload the parameters of each module in the local model to the cloud server, and the server will perform parameter aggregation, that is, new aggregated parameters will be obtained after each iteration. After obtaining the new aggregated parameters, the cloud server will determine whether the stop condition is reached. If the stop condition is reached, the cloud server will stop the iteration and establish a global model according to the current aggregated parameters. If the stop condition is not reached, the cloud server will send the current aggregated parameters to each client for the next iteration.

[0107] In the embodiments of the present application, the stop condition is reaching the maximum number of iterations or finding the optimal parameters. The optimal parameters include the optimal feature extraction parameters, the optimal discrimination parameters, and the optimal classification parameters.

[0108] Further, the optimal feature extraction parameters are the parameters of the feature extractor when the classification loss is minimized and the discrimination loss is maximized. The optimal discrimination parameters are the parameters of the discriminator when the discrimination loss is minimized. The optimal classification parameters are the parameters of the classifier when the classification loss is minimized.

[0109] The optimal feature extraction parameters are expressed as:

[0110]

[0111] The optimal discrimination parameters are expressed as:

[0112]

[0113] The optimal classification parameters are expressed as:

[0114]

[0115] Among them, 、 and respectively represent the optimal feature extraction parameters, the optimal discrimination parameters, and the optimal classification parameters.

[0116] After obtaining the optimal parameters, the cloud server will use these optimal parameters to establish a global model. The global model may have the same structure as the local model and also includes a feature extractor, a discriminator, and a classifier. After establishing the global model, the cloud server will send it to each client, and the client will store the global model for later fault detection.

[0117] S180, using the global model to perform fault detection on the data to be diagnosed.

[0118] Exemplarily, the source sample, the target sample, and the data to be diagnosed are all mechanical vibration signal data.

[0119] In the embodiments of the present application, the vibration signal data collected mechanically is a time-domain signal. The vibration signal data in the time domain is converted into a frequency-domain signal after a fast Fourier transform, and the frequency-domain signal is input into the global model to obtain the final fault detection result.

[0120] The embodiments of the present application also provide a mechanical fault diagnosis system based on federated general multi-source domain adaptation. The system includes:

[0121] A cloud server for extracting the target sample features of the target samples in the target domain, determining the pseudo-marginal vectors of the target samples according to the target sample features, and determining the source class weights and target sample weights of the target domain based on the pseudo-marginal vectors; the cloud server also generates initial parameters and sends the initial parameters, source class weights, and target sample weights to each source domain and target domain, where the initial parameters include source domain parameters and target domain parameters, the source domain parameters include the parameters of the feature extractor, discriminator, and classifier in each source domain, and the target domain parameters include the parameters of the feature extractor, discriminator, and classifier in the target domain;

[0122] A client for initializing the feature extractor, discriminator, and classifier in the source domain, and the feature extractor, discriminator, and classifier in the target domain respectively using the initial parameters; training the local model in the source domain using the source samples in the source domain and the source class weights, where the local model in the source domain includes the feature extractor, discriminator, and classifier in the source domain; training the local model in the target domain using the target samples and the target sample weights, where the local model in the target domain includes the feature extractor and discriminator in the target domain;

[0123] After each training ends, the client updates the source domain parameters, target domain parameters, source class weights, and target sample weights. The cloud server aggregates the updated source domain parameters and target domain parameters to obtain aggregated parameters; the client uses the aggregated parameters to update the local model in the source domain and the local model in the target domain, and trains the updated local model in the source domain using the source samples and the updated source class weights, and trains the updated local model in the target domain using the target samples and the updated target sample weights;

[0124] The client and the cloud server repeat the operations of local model training and parameter aggregation until the stop condition is reached to obtain the global model; the client uses the global model to perform fault detection on the data to be diagnosed.

[0125] The following experiments are carried out on the CWRU (dataset of Case Western Reserve University) and KAT (dataset of the University of Paderborn, Germany) datasets.

[0126] For effectiveness verification, the performance of the federated general multi-source deep adversarial network is compared with the performance of six state-of-the-art methods in the experiment.

[0127] Implementation details

[0128] Set of fault modes All fault modes in are considered as the "unknown" class. The non - general method and the general method determine that the target sample belongs to the unknown class by the source class weight output by the classifier being less than w 0 and the target sample weight being less than w 1 ( w 0 = 0.5, w 1 = 0.5).

[0129] Evaluation details

[0130] Specifically, it is set that there are 200 samples for each fault mode in each source domain and 200 unlabeled samples in the target domain.

[0131] 1. Diagnostic accuracy: The average accuracy of |C| + 1 fault modes reflects the diagnostic accuracy.

[0132] 2. Diagnostic speed: The inference latency reflects the diagnostic speed, which represents the average running time from inputting the original data to obtaining the fault mode of each sample.

[0133] Experimental results of diagnostic accuracy

[0134] In the experiment, the proposed federated general multi - source deep adversarial network and the compared methods were compared for accuracy under four different settings, and a visualization analysis was carried out.

[0135] 1. Number of source domains: Repair the common fault modes of the multi - source domains and the target domain (i.e., |C| = 6) and their own private fault modes (i.e., = 2 and = 2). The number of source domains ranges from 1 to 3. The details of the tasks on the CWRU dataset are shown in Figure 2 .

[0136] As shown in Table 1, the federated general multi - source deep adversarial network is superior to all the compared methods and maintains high accuracy in all tasks. In addition, the accuracy of this method is improved as the number of source domains increases. This is because more source domains can learn more transfer knowledge.

[0137] Table 1 Influence of the number of source domains

[0138]

[0139]

[0140] In Table 2, FedSDA-Combined is a combined method that achieves domain adaptation through the federal communication mode and the majority voting mechanism of multi-source classifiers; FedMDA is a model based on federated multi-source domain adaptation; FedAVG is the federated average algorithm; FedPADA is a federated partial adversarial domain adaptation method; FedWATN is a weighted adversarial transfer network method for mechanical local domain fault diagnosis; FedUAN is a federated general domain adaptation method; FedNUMDA is a method for solving federated non-general closed-set multi-source domain adaptation.

[0141] 2. Number of target domain-specific fault modes: Determine the number of source domains (i.e., M = 3), the common fault modes of the multi-source domains and the common fault modes of the target domain (i.e., |C| = 6). And there is no overlap in the source domains (i.e., (|C s1 ∩C s2 ∩C s3 | = 0). The number of target domain-specific fault modes (i.e., ) ranges from 0 to 4. The details of the relevant tasks on the CWRU dataset are listed in Table 2. It can be seen from Table 2 that there is negative transfer in all comparison methods, and the federated general multi-source deep adversarial network improves domain adaptation through all sizes of |C t |. This is because the federated general multi-source deep adversarial network gives higher weights to the common fault modes of the multi-source domains and the target domain, reducing its dependence on the number of target domain-specific fault modes.

[0142] Table 2 Influence of the number of target domain-specific fault modes

[0143]

[0144]

[0145] 2. Number of overlapping common fault modes in multi-source domains: Determine the source domains (i.e., M = 3), the common fault modes of the multi-source domains and the target domain (i.e., |C| = 6), and the specific fault modes of each source domain and the target domain ( = 1, = 1). The number of overlaps in the multi-source domains, that is, the range of common fault modes, is from 0 to 4. The detailed information of the tasks on the CWRU dataset is shown in Table 3.

[0146] Table 3 Influence of the number of overlapping common fault modes in multi-source domains

[0147]

[0148]

[0149] As shown in Table 3, as the overlap degree of common fault modes in the multi-source domain increases, the performance of the majority voting method shows an upward trend, but it is still lower than that of the federated general multi-source deep adversarial network. Since the majority voting method does not consider the relationship between any two source domains, their ability to diagnose the same fault mode in different source domains may vary, leading to negative transfer during the voting process. In contrast, the federated general multi-source deep adversarial network promotes the alignment of source common fault modes through the joint cross-entropy loss and obtains more stable results.

[0150] 3. Number of overlapping dedicated fault modes in the multi-source domain: Determine the number of source domains (i.e., M = 3), the common fault modes of the multi-source domain and the target domain (i.e., |C| = 4), and the dedicated fault modes of the target domain (i.e., = 2). The number of overlapping dedicated fault modes in the multi-source domain (i.e., |C s1 ∩C s2 ∩C s3 |) ranges from 0 to 4. The details of the tasks on the CWRU dataset are shown in Table 4.

[0151] Table 4 Influence of the number of overlapping dedicated fault modes in the multi-source domain

[0152]

[0153]

[0154] As shown in Table 4, as the number of overlapping dedicated fault modes in the multi-source domain increases, the comparison accuracy shows a downward trend, and the results of the federated general multi-source deep adversarial network are more stable and superior. Since the federated general multi-source deep adversarial network assigns a lower weight to the dedicated fault modes of the source domain, it is less sensitive to the number of overlapping dedicated fault modes in the multi-source domain.

[0155] Table 5 shows the experimental configuration and the experimental results of the DA task to verify the superiority of the federated general multi-source deep adversarial network method in this application on the KAT dataset.

[0156] Table 5 Experimental results on the KAT dataset

[0157]

[0158]

[0159] 4. Visual analysis: To more intuitively demonstrate the effectiveness of the federated general multi-source deep adversarial network, this application also uses the t-SNE (t-Distributed Stochastic Neighbor Embedding) algorithm to reduce the dimensionality of the features extracted by the feature extractor. The visualization results of FedNUMDA and the federated general multi-source deep adversarial network for the CWRU dataset in task T13 are shown in Table 1. It can be seen that the two methods can well distinguish the H, B, I, and O faults, and the features of the same fault mode can be clustered together, indicating the effectiveness of domain adaptation. However, the FedNUMDA method is poor in distinguishing different severities of type B faults (i.e., status labels 1, 2, and 3), and the features of these three fault modes are mixed together in the two-dimensional space. The federated general multi-source deep adversarial network can well distinguish these three faults, indicating that the federated general multi-source deep adversarial network can effectively reduce the influence of multi-source domain and target domain specific fault modes and extract more discriminative features.

[0160] Table 6 shows the average inference latency of the federated general multi-source deep adversarial network proposed in this application and the comparison methods on three source domains of two datasets with 64 CPU cores and 528G of memory. The inference latency of the federated general multi-source deep adversarial network and FedAVG using only one classifier is lower than that of most voting methods using three classifiers. As the number of source domains increases, the advantage of the federated general multi-source deep adversarial network in diagnostic speed becomes more and more obvious.

[0161] Table 6 Inference Latency of All Methods

[0162]

[0163] Although the preferred embodiments of this application have been described, those skilled in the art can make additional changes and modifications once they learn the basic creative concepts. Therefore, the appended claims are intended to be construed to include the preferred embodiments as well as all changes and modifications falling within the scope of this application.

[0164] Obviously, those skilled in the art can make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalent technologies, this application is also intended to include these changes and modifications.

Claims

1. A mechanical fault diagnosis method based on federated general multi-source domain adaptation, characterized in that: include: Extracting target sample features of target samples in the target domain; Determine a pseudo margin vector of the target sample according to the target sample feature, and determine a source class weight and a target sample weight of the target domain based on the pseudo margin vector; Generate initial parameters, and send the initial parameters, the source class weights, and the target sample weights to each source domain and the target domain, wherein the initial parameters include source domain parameters and target domain parameters, the source domain parameters include parameters of a feature extractor, a discriminator, and a classifier in each of the source domains, and the target domain parameters include parameters of a feature extractor, a discriminator, and a classifier in the target domain; Initializing the feature extractor, discriminator and classifier in the source domain, and the feature extractor, discriminator and classifier in the target domain respectively using the initial parameters; Using the source samples in the source domain and the source class weights to train a local model in the source domain, the local model in the source domain includes a feature extractor, a discriminator, and a classifier in the source domain; using the target samples and the target sample weights to train a local model in the target domain, the local model in the target domain includes a feature extractor and a discriminator in the target domain; After each training, the source domain parameters, the target domain parameters, the source class weights, and the target sample weights are updated, and the updated source domain parameters and target domain parameters are aggregated to obtain aggregated parameters; Using the aggregation parameters to update the local model in the source domain and the local model in the target domain, using the source samples and the updated source class weights to train the updated local model in the source domain, and using the target samples and the updated target sample weights to train the updated local model in the target domain; Repeat the local model training and parameter aggregation operations until the stopping condition is reached to obtain the global model; Using the global model to perform fault detection on the data to be diagnosed; Among them, the pseudo margin vector It is expressed as: in, E represents the computational expectation, x is the target sample, is the target sample set, G C is the classifier, Represents the target sample x The pseudo margin of Representation classifier G C The best label predicted, Indicates failure mode The number of failure modes in in, and Represent the target samples x Failure mode and y The probability of , max means taking the maximum value.

2. The mechanical fault diagnosis method based on federated general multi-source domain adaptation according to claim 1 is characterized in that: In the process of training the local model, the classification loss of the classifier and the identification loss of the discriminator in the source domain and the target domain are calculated, the sum of the classification loss and the identification loss is the total loss, and the source domain parameters and the target domain parameters are updated according to the total loss.

3. The mechanical fault diagnosis method based on federated general multi-source domain adaptation according to claim 2 is characterized in that: The stopping condition is that the maximum number of iterations is reached or the optimal parameters are found, and the optimal parameters include optimal feature extraction parameters, optimal identification parameters and optimal classification parameters.

4. The mechanical fault diagnosis method based on federated general multi-source domain adaptation according to claim 3 is characterized in that: The optimal feature extraction parameters are the parameters of the feature extractor when the classification loss is minimized and the identification loss is maximized, the optimal identification parameters are the parameters of the discriminator when the identification loss is minimized, and the optimal classification parameters are the parameters of the classifier when the classification loss is minimized.

5. The mechanical fault diagnosis method based on federated general multi-source domain adaptation according to claim 1 is characterized in that: When updating the source domain parameters and the target domain parameters, determining an adjustment value according to the loss of the classifier in the source domain and the loss of the discriminator in the source domain, and taking the difference between the current parameter of the feature extractor in the source domain and the adjustment value as the updated parameter of the feature extractor in the source domain; Determine an adjustment value according to the loss of the discriminator in the source domain, and use the difference between the current parameter of the discriminator in the source domain and the adjustment value as the updated parameter of the discriminator in the source domain; Determine an adjustment value according to the loss of the classifier in the source domain, and use the difference between the current parameter of the classifier in the source domain and the adjustment value as the updated parameter of the classifier in the source domain; Determine an adjustment value according to the loss of the discriminator in the target domain, and use the sum of the current parameter of the feature extractor in the target domain and the adjustment value as the updated parameter of the feature extractor in the target domain; An adjustment value is determined according to the loss of the discriminator in the target domain, and a difference between a current parameter of the discriminator in the target domain and the adjustment value is used as an updated parameter of the discriminator in the target domain.

6. The mechanical fault diagnosis method based on federated general multi-source domain adaptation according to claim 1 is characterized in that: When aggregating the updated source domain parameters and the target domain parameters, the sum of the updated parameters of the feature extractor in the source domain and the updated parameters of the feature extractor in the target domain is used as the feature extractor parameters in the aggregated parameters, the sum of the updated parameters of the discriminator in the source domain and the updated parameters of the discriminator in the target domain is used as the discriminator parameters in the aggregated parameters, and the sum of the updated parameters of the classifier in the source domain is used as the classifier parameters in the aggregated parameters.

7. The mechanical fault diagnosis method based on federated general multi-source domain adaptation according to claim 1 is characterized in that: The source samples, the target samples and the data to be diagnosed are all mechanical vibration signal data.

8. The mechanical fault diagnosis method based on federated general multi-source domain adaptation according to claim 7 is characterized in that: The vibration signal data in the time domain is converted into a frequency domain signal after fast Fourier transformation, and the frequency domain signal is input into the global model.

9. A system using the mechanical fault diagnosis method based on federated general multi-source domain adaptation according to any one of claims 1 to 8, characterized in that: include: A cloud server is used to extract target sample features of target samples in a target domain, determine a pseudo margin vector of the target sample according to the target sample features, and determine a source class weight and a target sample weight of the target domain based on the pseudo margin vector; the cloud server also generates initial parameters, and sends the initial parameters, the source class weight and the target sample weight to each source domain and the target domain, wherein the initial parameters include source domain parameters and target domain parameters, the source domain parameters include parameters of a feature extractor, a discriminator and a classifier in each of the source domains, and the target domain parameters include parameters of a feature extractor, a discriminator and a classifier in the target domain; The client is used to respectively initialize the feature extractor, discriminator and classifier in the source domain, and the feature extractor, discriminator and classifier in the target domain using the initial parameters; train the local model in the source domain using the source samples in the source domain and the source class weights, wherein the local model in the source domain includes the feature extractor, discriminator and classifier in the source domain; train the local model in the target domain using the target samples and the target sample weights, wherein the local model in the target domain includes the feature extractor and discriminator in the target domain; After each training, the client updates the source domain parameters, the target domain parameters, the source class weights, and the target sample weights, and the cloud server aggregates the updated source domain parameters and the target domain parameters to obtain aggregated parameters; the client uses the aggregated parameters to update the local model in the source domain and the local model in the target domain, uses the source samples and the updated source class weights to train the updated local model in the source domain, and uses the target samples and the updated target sample weights to train the updated local model in the target domain; The client and the cloud server repeatedly perform local model training and parameter aggregation operations until a stop condition is reached to obtain a global model; the client uses the global model to perform fault detection on the data to be diagnosed.