Rolling bearing fault diagnosis method based on dynamic clustering federated learning

Through the dynamic clustering federated learning method, the data island and data privacy issues in rolling bearing fault diagnosis are solved. Especially under Non-IID conditions, high-precision fault diagnosis is achieved, which significantly improves the performance of rolling bearings under extremely uneven data distribution conditions. Troubleshooting performance.

CN118362309BActive Publication Date: 2024-09-03SHIJIAZHUANG TIEDAO UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410788245.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-19
Publication Date
2024-09-03
Estimated Expiration
2044-06-19

AI Technical Summary

Technical Problem

In the absence of a large amount of supervision data, the existing rolling bearing fault diagnosis methods based on deep learning have low diagnostic accuracy and are difficult to effectively solve the problems of data islands and data privacy. Especially under the condition of Non-IID data distribution, the performance drops significantly.

Method used

A federated learning method based on dynamic clustering is used to initialize the fault diagnosis model through the server and randomly select clients for model parameter training in each round of training. Cosine similarity is used to perform K-means clustering to form client clusters with similar data distribution. , and perform weighted aggregation to reduce the impact of data heterogeneity and improve the local model convergence rate.

Benefits of technology

Under the condition of extremely uneven data distribution, the accurate diagnosis of rolling bearing faults is achieved, the diagnosis accuracy and model convergence speed are improved, and the performance on the Non-IID data set is significantly improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118362309B
    Figure CN118362309B
Patent Text Reader

Abstract

The present invention discloses a rolling bearing fault diagnosis method based on dynamic clustering federated learning, which belongs to the technical field of bearing fault diagnosis methods. The method comprises the following steps: a server in a federated learning system initializes a global deep neural network model and parameters and distributes them to each client in the federated learning system; the server randomly selects a number of clients, each client dynamically selects the model parameters of the optimal cluster and uses its own private data to train the model; the server receives the model parameters of each model and uses the reasoning similarity method to form a client cluster with similar data distribution; the server performs weighted aggregation on the client model parameters in each cluster, and completes the training of the fault diagnosis model when the maximum round of training is reached; the method can effectively reduce the impact of data heterogeneity on federated learning, speed up the convergence rate of the local model of each node, and the diagnosis result is more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of bearing fault diagnosis methods, and in particular to a rolling bearing fault diagnosis method based on dynamic clustering federated learning. Background Art

[0002] As one of the core components of mechanical equipment, the health status of rolling bearings determines whether the entire mechanical equipment can operate normally. Failure of rolling bearings in mechanical equipment will cause huge economic losses and even personal injury. Therefore, research on rolling bearing fault diagnosis is of great significance to ensure the efficient and healthy operation of rotating mechanical equipment.

[0003] In recent years, as more and more scholars have devoted themselves to the research of fault diagnosis, deep learning methods have been widely used. Deep learning methods rely on powerful feature extraction capabilities to improve the accuracy of fault diagnosis to a new level. The premise of high diagnostic accuracy based on data-driven methods is that massive supervised data must be provided to train the model. However, due to economic cost issues and relevant data privacy laws and regulations, the "data island" problem has been formed. Faced with this problem, due to the lack of a large number of training data sets, the limitations of rolling bearing intelligent diagnosis methods based on deep learning have gradually emerged.

[0004] Federated learning (FL) is a distributed training framework that enables distributed users to collaboratively train shared models under the orchestration of a central server without infringing on user data privacy. Applying the federated learning framework to the field of rolling bearing fault diagnosis can effectively solve the data silos and data privacy issues of bearings. However, when each client data is Non-IID, the diagnostic performance of the federated learning method will drop significantly. In the field of fault diagnosis, transfer learning is mostly used to solve the Non-IID problem, but transfer learning requires source and target domain data information, which is contrary to the original intention of federated learning. Summary of the invention

[0005] The technical problem to be solved by the present invention is how to provide a rolling bearing fault diagnosis method based on dynamic clustering federated learning with high diagnostic accuracy.

[0006] In order to solve the above technical problems, the technical solution adopted by the present invention is: a rolling bearing fault diagnosis method based on dynamic clustering federated learning, comprising the following steps:

[0007] S1: The server in the federated learning system initializes the fault diagnosis model and parameters, and distributes them to each client in the federated learning system;

[0008] S2: In each round of training, the server randomly selects several clients. Each client dynamically selects the model parameters of the optimal cluster and uses its own private data to train the fault diagnosis model, and uploads the parameters of the trained fault diagnosis model to the server.

[0009] S3: The server receives the model parameters of each fault diagnosis model and uses the inference similarity method to form a client cluster with similar data distribution;

[0010] S4: The server performs weighted aggregation of the client model parameters in each cluster and sends the aggregated parameters of all clusters to each client in the next round of training;

[0011] S5: When the maximum number of rounds of training is reached, the training of the fault diagnosis model is completed, otherwise, return to step S2;

[0012] S6: Use the trained fault diagnosis model to process the original vibration data, obtain the state of the rolling bearing, and complete the diagnosis of the rolling bearing.

[0013] The beneficial effect of adopting the above technical solution is that: the method uses cosine similarity to perform K-means clustering to infer the cluster to which each client belongs, and in each round of iteration, the selected client is trained by dynamically selecting the optimal model parameters, thereby effectively reducing the impact of data heterogeneity on federated learning and accelerating the local model convergence rate of each node. The verification results on the CWRU data set show that this method can obtain accurate diagnostic results under conditions of extremely uneven data distribution. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0015] Figure 1 is an overall flow chart of the method described in the embodiment of the present invention;

[0016] Figure 2 It is a basic framework diagram of traditional federated learning in the method described in the embodiment of the present invention;

[0017] Figure 3 is a CNN network structure diagram in the method described in an embodiment of the present invention;

[0018] Figure 4 is a flow chart of federated learning based on dynamic clustering in the method described in an embodiment of the present invention;

[0019] Figure 5 is a curve diagram showing the relationship between the average accuracy rate of the client and the number of communications in the method according to the embodiment of the present invention;

[0020] Figure 6is a curve diagram showing the relationship between the accuracy of the global model and the number of communications in the method according to an embodiment of the present invention;

[0021] Figure 7 The global model accuracy and parameter in the method described in the embodiment of the present invention Relationship graph;

[0022] Figure 8 The average accuracy and parameter of the client in the method of the embodiment of the present invention Relationship graph;

[0023] Fig. 9 is a parameter in the method described in the embodiment of the present invention Impact graph on the model. DETAILED DESCRIPTION

[0024] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0025] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0026] Overall, such as Figure 1 As shown, the embodiment of the present invention discloses a rolling bearing fault diagnosis method based on dynamic clustering federated learning, comprising the following steps:

[0027] S1: The server in the federated learning system initializes the fault diagnosis model and parameters, and distributes them to each client in the federated learning system;

[0028] S2: In each round of training, the server randomly selects several clients, and the clients execute the optimal model parameter selection scheme, then use their own private data to train the model, and upload the parameters of the trained fault diagnosis model to the server;

[0029] S3: The server receives the model parameters of each fault diagnosis model and uses the inference similarity method to form a client cluster with similar data distribution;

[0030] S4: The server performs weighted aggregation of the client model parameters in each cluster and sends the aggregated parameters of all clusters to each client in the next round of training;

[0031] S5: When the maximum number of rounds of training is reached, the training of the fault diagnosis model is completed, otherwise, return to step S2;

[0032] S6: Use the trained fault diagnosis model to process the original vibration data, obtain the state of the rolling bearing, and complete the diagnosis of the rolling bearing.

[0033] The following is a detailed description of the above method in combination with specific content:

[0034] The application of federated learning in bearing fault diagnosis is based on the following assumptions:

[0035] 1) The federated learning system includes multiple clients and one server. Each client has insufficient training data and cannot independently build its fault diagnosis model.

[0036] 2) The fault diagnosis tasks of all clients are different, that is, the data distribution form is Non-IID distribution.

[0037] 3) The server and different clients share the same fault diagnosis model.

[0038] 4) Local data sets of different clients cannot be accessed by other clients, ensuring data privacy.

[0039] Federated Learning:

[0040] In federated learning, n clients are selected from N clients to participate in each round of training. The data in each client cannot be explicitly accessed by the server and other clients. Only the fault diagnosis models trained locally by different clients can be transmitted to the server. The server uses the global parameters of the model to update the selected client. The data does not leave the local area during the entire training process, which effectively avoids data leakage. The basic framework of federated learning in the prior art is as follows: Figure 2 shown.

[0041] In each round of federated learning, the client first downloads the latest global model parameters θ. Then, each client performs multiple iterations of stochastic gradient descent using local private data to train the model, resulting in a weight update vector:

[0042] (1)

[0043] in is the client i data. Finally, the central server aggregates these local models into a new global model as follows.

[0044] (2)

[0045] Client clustering algorithm

[0046] 1) Cosine similarity

[0047] Cosine similarity is a method for calculating the similarity between two vectors. This method uses the cosine value of the angle between the two vectors to measure the similarity between them. For any vector and , the cosine similarity calculation formula is:

[0048] (3)

[0049] Since cosine similarity can handle nonlinear relationships, which is very important for clustering complex data, using cosine similarity as a clustering criterion can improve clustering performance and make clustering results more accurate.

[0050] 2) K-means clustering

[0051] The K-means clustering algorithm is an unsupervised learning algorithm that divides data objects into K clusters based on the centroid. Each cluster has at least one object, and calculates the mean of the objects in each cluster as the cluster center point. The basic idea of ​​the K-means algorithm is to assign each sample point in the data set to a cluster closest to it, and then calculate the centroid of each cluster. First, select an initial centroid, and according to this centroid, assign all sample points to the corresponding cluster. Then, for each cluster, calculate their centroid and update the distance from each sample point to the cluster centroid. According to the distance, assign the sample points to the new cluster again and update the centroid. Repeat this process until the center of the cluster no longer changes, at which point the algorithm converges.

[0052] Federated learning method based on dynamic clustering

[0053] 1) Network architecture and optimization

[0054] In each round of training, the fault diagnosis model is locally updated in each client. This model uses a basic convolutional neural network (CNN) for fault diagnosis. Compared with other networks, CNN has the advantages of small parameters and high diagnostic accuracy.

[0055] The architecture of the deep neural network model shared by different clients and servers is as follows Figure 3As shown in the figure, it includes two modules, namely the feature extraction module and the output module. The feature extraction module includes five convolution units. Except for the first convolution unit, each convolution unit consists of a one-dimensional convolution layer, a BN layer, a ReLU activation layer and a maximum pooling layer. Finally, the result of local feature extraction is flattened and used as the input of the classification module. The original vibration data is input into the feature extraction module, and after a series of calculations such as convolution and pooling, the feature information of the input data is obtained, and then the extracted feature information is output to complete the work of the neural network.

[0056] The following describes the model optimization in a single client. First, each client uses local data The training is performed and the cross entropy loss function is adopted as follows.

[0057] (4)

[0058] in, is the number of samples of client c, M is the number of fault categories, is a sign function, which is 1 if sample i is a true category, otherwise it is 0. It represents the feature vector extracted by the previous feature extraction module.

[0059] In order to make the model pay more attention to the local model weights that are close to the global model weights when updating, a gradient penalty term is added after the loss calculated by the cross entropy loss function. The local update of the model is controlled by the degree to which the client model parameters deviate from the global model parameters.

[0060] (5)

[0061] in, is the weight of the tth round, is the global model parameter of round t-1, is a hyperparameter, Different values ​​of can determine the degree of alleviating model drift.

[0062] In summary, the model optimization goal proposed in this application is As shown below:

[0063] (6)

[0064] 2) DCFed basic framework

[0065] The federated learning system generally consists of several client groups and servers. Each client holds certain local private data and is trained by downloading the central server model; the job of the federated learning server is to collect the model parameters trained from each client and return the new parameter information after aggregation operations in the server.

[0066] Before training begins, it is assumed that the server itself has some auxiliary real or synthetic data. Specifically, the data is composed of a small part of the private data set shared by each client. , used by the server to infer each client model. The first round of training uses random initial model parameters represents the initial parameters of the global model, Represents the model parameter information of client i after updating in the tth communication, where Represents the number of communications between the server and the client. In the tth iteration of DCFed (t>1), the central server randomly selects clients, and aggregate the model parameter list of each cluster in the t-1 iterations ( Indicates that in the t-1th round of communication, the model parameters of the i-th cluster are broadcast to each selected client. Each selected client dynamically selects its cluster. The process is tested on the test data set to obtain its accuracy in each cluster and set a threshold To determine whether it belongs to the cluster, if it does, then download the model parameters of the cluster, otherwise download the global model parameters. Finally, use its private data to train the model. Then, each client executes stochastic gradient descent (SGD) to update the new local model parameters. , and sends it to the central server. After collecting the model parameters of all participating clients, the central server then uses the inference similarity method to form client clusters with similar data distribution. Finally, the server collects all parameters from clients in the same cluster and performs weighted aggregation on the model parameters of each cluster. In the next round, each new client selects its cluster from the clusters formed in the previous round. The above method is dynamically iterated until the maximum communication round is reached.

[0067] 3) Clients clustered based on cosine similarity

[0068] The goal of this module is to find clients with similar data distribution without any prior knowledge about the data distribution. In the tth round of training, the server performs inference on each client model by utilizing the shared dataset, and the inference result is:

[0069] (7)

[0070] Use the inference results of each client , the server constructs the adjacency matrix as:

[0071] (8)

[0072] in The server uses the adjacency matrix Perform hierarchical clustering to form disjoint clusters.

[0073] 4) Method execution process

[0074] The overall process of the proposed federated learning method based on dynamic clustering (fault diagnosis model training) is as follows: Figure 4 shown.

[0075] 4-1) The server initializes the fault diagnosis model structure and parameters and distributes them to each client.

[0076] 4-2) In each round of training, the server randomly selects ten clients. The clients execute the optimal model parameter selection scheme, then use their own private data to train the model and upload the trained model parameters to the server.

[0077] 4-3) The server receives the model parameters of each model and uses the inference similarity method to form a cluster of clients with similar data distribution.

[0078] 4-4) The server performs weighted aggregation of the client model parameters in each cluster and sends the aggregated parameters of all clusters to each client in the next round of training.

[0079] 4-5) If the training ends when the maximum number of rounds is reached, otherwise return to step 4-2).

[0080] Experimental verification

[0081] 1) Fault diagnosis dataset

[0082] This application uses the Case Western Reserve University bearing data set for testing. The data set includes a normal state (N) and 9 fault states as shown in Table 1.

[0083] Table 1: Fault Status

[0084] Failure degree Rolling element failure Inner race fault Outer ring failure 0.1778 IR07 B07 OR07 0.3556 IR14 B14 OR14 0.5334 IR21 B21 OR21

[0085] The bearing vibration signals are collected under four speed conditions, namely 1730 r / min, 1750 r / min, 1772 r / min and 1797 r / min, and the sample dimension is 1024 in each condition.

[0086] In order to prove the effectiveness of the experiment under non-independent and identically distributed conditions, this application uses the Dirichlet distribution probability density function to divide the overall data set into non-independent and identically distributed (Non-IID) data and distribute it to each client.

[0087] 2) Experimental setup

[0088] This application divides the four working condition data of the CWRU data set into four groups, and each working condition is divided into ten clients. In each working condition, each client is given j random samples of class c based on the random samples of class c obtained from the Dirichlet distribution. In this case, the data of each client is non-independent and identically distributed, and its heterogeneity can be controlled by the parameter α of the Dirichlet distribution. Specifically, when α →∞, the data partitions of the client become IID, and when α→ 0, they become extremely non-IID. In this application, the parameter α is uniformly selected as 0.01 for various experiments.

[0089] In order to prove the effectiveness of the proposed method, the method proposed in this application is experimentally compared with the current methods that can handle non-IID (FedProx, FedNova) as well as the baseline (FedAvg) and the centralized method, as shown below:

[0090] Central: A centralized method that collects all clients’ private data for training together. Since this method uses a centralized approach, it does not consider the user’s data privacy, so this method can be considered the upper limit in this experiment.

[0091] FedAvg: Each client uses its private data to perform training locally, and then uploads the model information to the central server for direct aggregation and updates the parameters to obtain the global model. This method can be regarded as the baseline in this experiment.

[0092] FedProx (Federated Proximal): FedProx is an improved federated learning algorithm used to solve the problems of non-independent and identically distributed (non-IID) data and device heterogeneity in federated learning.

[0093] FedNova (Federated Learning via Normalized Averaging): The FedNova algorithm shows good performance in handling non-independent and identically distributed data and device heterogeneity.

[0094] All models in this experiment use the same network structure, and the hyperparameter settings involved are shown in Table 2.

[0095] Table 2 Related hyperparameter settings

[0096]

[0097] in, Represents the total number of clients in the entire federated system. In order to increase communication efficiency, it is randomly selected in each round of communication. Clients are trained. In this experiment, the number of training communications is The learning rate of each selected client model is set to 150 rounds. is 0.01, local training times The number is 5, and the experiment is carried out according to the parameter information in Table 2.

[0098] 3) Federated learning experiment based on dynamic clustering

[0099] In order to verify whether the method can efficiently handle the Non-IID problem, this application sets whether to cluster and whether to set independent and identically distributed, and finally uses the global model accuracy and the average accuracy of the client as the evaluation criteria.

[0100] Table 3 Comparison of test accuracy

[0101] algorithm Global model accuracy Average client accuracy Central 100% FedAvg(IID) 99.49% 97.31% FedAvg(Non-IID) 36.04% 81.83% DCFed 95.23% 94.93%

[0102] It is not difficult to see from Table 3 that the global model accuracy and client average accuracy of the traditional federated learning method (FedAvg) on ​​the IID data set are both above 97%, and are close to the centralized training method, which shows that the federated learning method can complete the function of jointly aggregating multiple users and protect the privacy of each user at the expense of a little accuracy. However, when the client data is in the form of Non-IID, the diagnostic accuracy of traditional federated learning drops sharply. It can be seen from Table 3 that in the Non-IID case, the accuracy of the global model is only 36.04%, which is a serious drop compared to the IID case. At the same time, each client in the federated system is also affected, and the average accuracy of the client is 10% lower than the former. This shows that the traditional federated learning method is difficult to apply to actual industry.

[0103] The global model accuracy and client average accuracy of the dynamic clustering federated learning method proposed in this application on the Non-IID dataset are 95.23% and 94.93% respectively, which alleviates the impact of Non-IID to a certain extent. At the same time, with the increase in the number of training times, the method proposed in this application can also obtain better diagnostic performance, which will be specifically explained in the comparative experiment with other models below.

[0104] 4) Performance comparison of non-independent and identically distributed rolling bearing fault diagnosis method (DCFed, i.e. the method described in this application) and other methods

[0105] This experiment considers the limited budget that allows federated communication in heterogeneous environments in practice. This experiment compares the performance of DCFed with other classic federated learning models under the Non-IID condition of Dirichlet (α=0.01) on the average accuracy of the client and the global model accuracy.

[0106] exist Figure 5 and Figure 6 The relationship curves between the average accuracy of the client and the accuracy of the global model and the number of communications are shown respectively. It can be seen that the method proposed in this application can converge in only 150 communication rounds, and its accuracy is higher than that of other methods. Figure 6 It is shown that FedAvg and FedProx have a problem: there are ups and down fluctuations with the increase in the number of communications, and lack of stability. The reason is that the traditional FedAvg method lacks the ability to process Non-IID data sets, which makes its convergence slow and unstable; FedProx adds proximal terms on the basis of FedAvg, which makes the accuracy of FedProx slightly higher than FedAvg, but its stability still has certain problems. Finally, it can be observed that no matter which test is performed, FedNova has the worst diagnostic performance. The reason may be that there may be great differences between different clients in FedNova, and faster clients will perform more local updates than slower clients. When a client executes more times, it converges faster, but it may not necessarily go in a better direction for the global model, because the difference between local models will be greater, which will lead to its model diagnostic performance being much lower than other models.

[0107] 5) Impact of hyperparameters on model performance

[0108] 5-1) The influence of Dirichlet distribution parameters

[0109] Different values ​​of the Dirichlet distribution parameter α determine the distribution of the data. This section focuses on exploring the impact of different parameters α on the performance of the model. The experimental results are as follows: Figure 7 and Figure 8 shown.

[0110] Figure 7 The relationship between the global model accuracy and the Dirichlet distribution parameter α is shown. Figure 7 It is not difficult to see that as the Dirichlet distribution parameter α All models can achieve good diagnostic results when the αWhen α approaches 0 (the minimum value of α in this experiment is 0.01), the dynamic clustering federated learning method proposed in this application is obviously better than other methods, but compared with α =1, the accuracy still decreases, which shows that the Dirichlet distribution parameter α determines the data distribution. It is worth noting that Figure 8 The stability of the method proposed in this paper is demonstrated: no matter how the Dirichlet distribution parameter α changes, the method always tends to an equilibrium state.

[0111] 5-2) Threshold Impact

[0112] This experiment defines a threshold It is used to determine whether the client in the tth communication belongs to the cluster formed in the t-1th communication. Different values ​​of determine different types of models. When the model does not consider whether there is a cluster corresponding to the client, The value of has a direct impact on the accuracy of the global model and the client model. Fig. 9 Shown

[0113] from Fig. 9 It is not difficult to see that if we do not consider the cluster to which the client belongs ( ) will cause a serious decrease in the accuracy of the global model. It can be noted that different The impact of the value on the accuracy of the global model and the client model changes dynamically. Selecting 80 can ensure a balance between the global model accuracy and the client accuracy.

[0114] In summary, the method described in this application uses cosine similarity to perform K-means clustering to infer the cluster to which each client belongs, and in each round of iteration, the selected client is trained by dynamically selecting the optimal model parameters. This can effectively reduce the impact of data heterogeneity on federated learning and accelerate the convergence rate of the local model of each node. The verification results on the CWRU dataset show that this method can achieve excellent diagnostic results under extremely uneven data distribution conditions.

Claims

1. A rolling bearing fault diagnosis method based on dynamic clustering federated learning, characterized in that The steps include: S1: The server in the federated learning system initializes the fault diagnosis model and parameters, and distributes them to each client in the federated learning system; S2: In each round of training, the server randomly selects several clients. Each client dynamically selects the model parameters of the optimal cluster and uses its own private data to train the fault diagnosis model, and uploads the parameters of the trained fault diagnosis model to the server. S3: The server receives the model parameters of each fault diagnosis model and uses the inference similarity method to form a client cluster with similar data distribution; S4: The server performs weighted aggregation of the client model parameters in each cluster and sends the aggregated parameters of all clusters to each client in the next round of training; S5: When the maximum number of rounds of training is reached, the training of the fault diagnosis model is completed, otherwise, return to step S2; S6: Use the trained fault diagnosis model to process the original vibration data, obtain the state of the rolling bearing, and complete the diagnosis of the rolling bearing.

2. The rolling bearing fault diagnosis method based on dynamic clustering federated learning according to claim 1, characterized in that: The federated learning system consists of several clients and a server. Each client does not have enough training data to independently build its fault diagnosis model. The troubleshooting tasks for all clients are different; The server and different clients share the same fault diagnosis model; Local data sets of different clients cannot be accessed by other clients.

3. The rolling bearing fault diagnosis method based on dynamic clustering federated learning according to claim 1, characterized in that: In step S1, the fault diagnosis model includes a feature extraction module and an output module. The feature extraction module includes five convolution units. The second to fifth convolution units include a one-dimensional convolution layer, a BN layer, a ReLU activation layer and a maximum pooling layer. Finally, the result of the local feature extraction is flattened and used as the input of the classification module. The original vibration data is input into the feature extraction module. After convolution and pooling calculations, the feature information of the input data is obtained, and then the extracted feature information is output to complete the work of the neural network.

4. The rolling bearing fault diagnosis method based on dynamic clustering federated learning according to claim 1, characterized in that: In step S2, each client dynamically selects the model parameters of the optimal cluster and uses its own private data to train the model: Each client uses local data The training is performed and the cross entropy loss function is used as follows: ; in, is the number of samples of client c, M is the number of fault categories, is a sign function, which is 1 if sample i is a true category, otherwise it is 0. To represent the feature vector extracted by the previous feature extraction module; The local update of the model is controlled by the degree to which the client model parameters deviate from the global model parameters, as follows: ; in, is the weight of the tth round, is a hyperparameter, Different values ​​of determine the degree of mitigation of model drift; Model optimization goal As shown below: 。 5. The rolling bearing fault diagnosis method based on dynamic clustering federated learning according to claim 1, characterized in that: The step S3 specifically includes the following steps: Before training begins, the server itself is assumed to have some datasets for verification. This dataset is a shared dataset composed of a small number of private datasets shared by each client. , used by the server to infer each client model; the first round of training uses random initial model parameters represents the initial parameters of the global model, Represents the model parameter information of client i after updating in the tth communication, where Represents the number of communications between the server and the client; in the tth iteration, t>1, the server randomly selects clients, and aggregate the model parameter list of each cluster in the t-1 iterations Broadcast to each selected client, represents the model parameters of the i-th cluster in the t-1th round of communication; Each selected client dynamically selects its cluster. The process is tested on the test data set to obtain its accuracy in each cluster and set a threshold. To determine whether it belongs to the cluster, if it does, download the model parameters of the cluster, otherwise download the global model parameters and use its private data to train the model; Then, each client performs stochastic gradient descent SGD to update the new local model parameters , and send it to the server; After collecting the model parameters of all participating clients, the server uses the inference similarity method to form client clusters with similar data distribution; finally, the server collects all parameters from clients in the same cluster and performs weighted aggregation on the model parameters of each cluster. In the next round, each new client selects its cluster from the clusters formed in the previous round. The above method is dynamically iterated until the maximum number of communication rounds is reached.

6. The rolling bearing fault diagnosis method based on dynamic clustering federated learning according to claim 5, characterized in that: The method for obtaining a client cluster with similar data distribution includes the following steps: In the tth round of training, the server uses the shared dataset to perform inference on each client model, and the inference results are: ; in, represents the empirical risk associated with the local data of the ith client, using the inference results of each client , the server constructs the adjacency matrix as: ; in, , the server uses the adjacency matrix Perform hierarchical clustering to form disjoint clusters.