A device fault diagnosis method based on federal hierarchical optimization learning
By employing a federated hierarchical optimization learning method, the problems of data quality and heterogeneity of computing resources in industrial equipment fault diagnosis in multi-factory environments are solved, improving the efficiency and accuracy of joint diagnosis while maintaining good robustness.
Patent Information
- Application Number
- CN202211319431.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-26
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2042-10-26
AI Technical Summary
In multi-factory environments, there are differences in data quality and local training efficiency in industrial equipment fault diagnosis, resulting in low accuracy and efficiency of joint diagnosis using traditional federated learning methods.
A federated hierarchical optimization learning approach is adopted. Through hierarchical initialization, data processing, client-side local personalized training, local aggregation, and central model parameter aggregation, device weights and iteration threshold control are dynamically adjusted to select high-quality clients to participate in local aggregation, thereby reducing the impact of data quality differences and computing resource heterogeneity.
It improves the training efficiency and accuracy of multi-factory joint diagnosis, reduces latency issues caused by data quality differences and heterogeneity of computing resources, and maintains good robustness and diagnostic accuracy.
Smart Images

Figure CN115525038B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of industrial equipment fault diagnosis and federated learning, and particularly relates to an equipment fault diagnosis method based on federated hierarchical optimization learning. BACKGROUND
[0002] With the industrial equipment becoming larger and more complex, its fault diagnosis is becoming more and more important. At the same time, the development of industrial Internet of Things technology makes the data-driven equipment fault diagnosis method widely researched, such as neural network, support vector machine, Bayesian and decision tree. Although the above methods have achieved good research results, their training performance depends on the quality and quantity of data. In the industrial field, the data quantity of a single factory is small, and it is difficult to cover all fault types, so the fault data is limited. In order to further improve the fault diagnosis accuracy, it is necessary to fuse the multi-source data of different factories, but the data cannot be shared between enterprises due to data privacy and security requirements, so it is very important to solve the fault diagnosis of multi-factory mode under the premise of protecting data privacy.
[0003] Federated learning was first proposed by Google, which uses local data collection and minimization principles to reduce the systematic privacy risks and costs brought by traditional centralized machine learning methods, effectively solves the privacy problem of distributed training data, and is applied in many fields. In the financial field, for example, the article [Zheng et al. Federated Meta-Learning for Fraudulent Credit Card Detection. [C], IJCAI 2020. 2020: 4654-4660] proposes a fraud credit card detection method based on federated meta-learning improved triplet-like metric learning, which realizes efficient multi-source data interaction between different banks. In the industrial field, for example, the article [Li et al. Deep Learning-Based Partial Domain Adaptation Method on Intelligent Machinery Fault Diagnostics. [J]. IEEE Trans. Ind. Electron., 2021, 68(5): 4351-4361] proposes a device deep anomaly detection method to optimize the diagnosis performance of federated learning for industrial time series data and has good generalization; For example, the article [Geng et al. Bearing fault diagnosis based on improved federated learning algorithm [J]. Computing, 2022, 104(1): 1-19] proposes a federated learning algorithm FA-FedAvg for bearing fault diagnosis to improve the quality of local model training and accelerate model convergence, which has good robustness under different categories and data volumes.
[0004] The above studies have achieved good results, but in actual industrial applications, different factory equipment resources and data exist heterogeneity, which affects the training efficiency and accuracy of joint fault diagnosis. Currently, the research on the heterogeneity problem of federated learning mainly includes two aspects: device resource heterogeneity and data heterogeneity. For device resource heterogeneity, for example, the article[Nishio et al. Client selection for federated learning with heterogeneous resources in mobile edge. [C]. In ICC 2019 - 2019 IEEE International Conference on Communications (ICC), pages 1-7, 2019] proposes a FedCS protocol based on edge computing, which selects clients based on device resources, with good communication efficiency and convergence speed; for example, the article[Liu et al. No One Left Behind: Inclusive Federated Learning over Heterogeneous Devices. [C]. KDD ’22: The 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, Washington, DC, USA, August 14 - 18, 2022. 2022: 3398-3406] proposes an InclusiveFL framework that assigns different complexity models to clients with different computing capabilities, and uses knowledge distillation strategy to share knowledge between heterogeneous clients, which can effectively improve the performance of federated learning training. For data heterogeneity, for example, the article[He Wenchen et al. Federated learning node selection method based on DRL [J]. Journal of Communications, 2021, 42(06): 62-71] proposes a federated learning node selection method based on deep reinforcement learning, which efficiently schedules terminal devices to complete model aggregation, optimizing model accuracy and training latency; for example, the article[Yoshida et al. Hybrid-FL for Wireless Networks: Cooperative Learning Mechanism Using Non-IID Data [C]. ICC 2020 - 2020 IEEE International Conference on Communications. IEEE, 2020, 1-7] proposes a hybrid federated learning mechanism for non-independent and identically distributed data, which increases the amount of aggregated data through heuristic algorithms to improve the accuracy of federated learning models.The above method effectively improves the training performance of traditional federated learning in a heterogeneous environment. However, in the field of device fault diagnosis, the above method ignores the differences in data quality and local training efficiency of different factories. First, in actual industrial production, fault data labeling is difficult, and fault features are difficult to extract, resulting in more differences in data quality of different factories, affecting the accuracy of joint fault diagnosis. Second, due to the large differences in working conditions and computing resources of different factories, the local training efficiency is different, causing aggregation delay problems in joint diagnosis. SUMMARY
[0005] To solve the above problems, a device fault diagnosis method based on federated hierarchical optimization learning is proposed, which can efficiently diagnose device faults in a multi-factory mode, improve the training efficiency and accuracy of multi-factory joint diagnosis, and has good robustness.
[0006] To solve the above technical problems, the technical solution adopted by the present application is:
[0007] A device fault diagnosis method based on federated hierarchical optimization learning, comprising the following steps:
[0008] S1: Hierarchical initialization: all factory clients are initialized in layers, and are divided into different factory client layers according to training speed;
[0009] S2: Data processing: all factory clients collect, denoise, and normalize the device data for preprocessing, and divide the training set and the test set;
[0010] S3: Client local personalized training: a convolutional neural network fault diagnosis model is established in the factory client, which is composed of a convolutional layer, a max pooling layer, a relu activation function, a fully connected layer, and a softmax classification function output layer. The preprocessed data is locally personalized and updated using the fault diagnosis model, and the weight of each layer of the factory client is calculated;
[0011] S4: Local aggregation of each layer: the center server uses an iterative threshold local aggregation model to dynamically control the number of training times in each layer. When the iteration threshold is reached, the current iteration stops, and the local parameters of each layer are uploaded to the center server, and a local weighted aggregation is performed to generate a layer local model according to the weight;
[0012] S5: Center model parameter aggregation: the center server calculates the weight of the layer local model to complete the center aggregation, and generates a new round of parameters to be sent to the factory client;
[0013] Further, in step S1, all clients are initialized in layers: all clients are divided into layers according to training speed , denotes the number of layers, where the layer with a larger subscript has a slower training speed;
[0014] Further, in the step S3, the factory client performs local fault diagnosis by using a local individuality update selection algorithm, including the following steps:
[0015] 1-3) Set a convolutional neural network as a fault diagnosis training model, which is composed of a 1x3 convolutional layer, a 1x3 max pooling layer, a relu activation function, a full connection layer, and a softmax classification function output layer.
[0016] 1-4) In the multi-factory joint training process, the training target of the fault diagnosis model is: where the total number of factory clients participating in training is denotes the local optimization target of the client , denotes the local data set of the client after data processing, denotes each piece of data in the client , denotes the data set size, is its loss function, denotes its local model parameters, denotes the total number of data sets in this round.
[0017] 1-3) In the local update process of the factory client, the local individuality update selection algorithm corrects the local model update direction by adding an offset degree constraint function, so that it is closer to the center model. The corrected local optimization target is: where is a hyperparameter, is the global model parameter of the last round, denotes the data set size of the client , is its loss function, denotes the local model parameter of this round, denotes the total number of data sets in this round.
[0018] 1-4) In the client parameter uploading process, the local training result is taken as an index to calculate the factory client weight of this iteration, and the factory client with good diagnostic accuracy and offset distance is selected to participate in local model aggregation, so as to improve the participation of high-quality clients and the joint diagnostic accuracy. The local aggregation weight of the factory client is: where denotes the training accuracy of the factory client in the first global iteration, denotes the global model parameter and the factory local parameter Cosine similarity is used to measure the degree of deviation of the local model, as shown in the following formula: Further, in the step S4, a local aggregation model based on an iterative threshold is adopted to reduce the central aggregation delay waiting problem under different factory conditions, computing resources, and data volume difference environments, and to improve the efficiency of joint fault diagnosis, including the following steps:
[0019] 2-1) The local aggregation model based on the iterative threshold is divided into two parts: a threshold-based dynamic iterative algorithm and a local model weighted aggregation algorithm.
[0020] 2-2) In the execution process of the threshold-based dynamic iterative algorithm, first assume that the number of iterations of the central model is N, and the factory clients processed by the hierarchical processing are divided into layers , , where the larger the subscript, the slower the training speed.
[0021] 2-3) The slowest layer is set to the minimum number of iterations , the maximum number of iterations , and the diagnostic accuracy difference threshold . When the number of iterations of the layer is equal to the maximum number of iterations or the accuracy difference reaches the threshold, the central server is notified to stop this round of iteration, and the iteration stop threshold satisfies the condition: where represents the unified stop iteration time of this round, represents the number of iterations of the layer in the round, represents the diagnostic accuracy of the layer in the round.
[0022] 2-4) In the execution process of the local model weighted aggregation algorithm, first perform local aggregation of each layer according to the local parameters of the factory client, then calculate the layer local model aggregation weight, and finally complete the central model aggregation. The layer local aggregation is represented as: where represents the different layers divided, a total of layers, and the local model of each layer is represented as , is the number of factory clients selected to participate in aggregation for each layer, is the total number of sample quantities of all factory clients participating in aggregation for the layer, is the local parameter of the model client selected by the local individual update method, is the number of local samples of the factory.
[0023] 2-5) Finally, the center aggregation is performed, and the center model aggregation is represented as: wherein, represents the total number of client layers, represents the number of one layer, represents the layer local model weight determined according to the iteration round . , controls the layer model weight balance iteration number difference, and reduces the influence of the difference in the iteration round of the layer model on the center aggregation deviation. represents the average accuracy determined according to the training of each layer model . layer aggregation weight, improves the weight of the layer local model parameter with high training quality, and further improves the diagnosis accuracy of the center model. and after normalization are respectively represented as: wherein, represents the total number of client layers, and represents the number of one layer, represents the iteration number of the layer, represents the average diagnosis accuracy of the layer.
[0024] 2-6) After the center server completes the center aggregation, the global model parameters of this round are obtained, and are issued to the factory clients of each layer to perform the next round of iteration training.
[0025] The beneficial effects produced by the above technical scheme are as follows:
[0026] The Equipment Fault Diagnosis Method Based On Federated Hierarchical Optimization Learning (FD-FHOL) proposed by the application aims at the problem that the joint diagnosis aggregation is delayed due to the difference in industrial equipment data quality and the difference in local training efficiency of different factories. The application performs local update based on the local personalized update selection method, and controls the joint fault diagnosis iteration process through local aggregation and dynamic iteration. The application improves the two aspects. The application can effectively screen malicious data, reduce the influence of the difference in data quality, and improve the accuracy and robustness of joint fault diagnosis by correcting the deviation degree of the local model of the factory through personalized update and dynamically adjusting the equipment weight. The application reduces the center aggregation frequency and delay time through the local aggregation model based on the iteration threshold and dynamic iteration, reduces the model deviation by using the local model weighted aggregation, reduces the center aggregation delay problem, and further improves the joint training efficiency.
[0027] Compared with the traditional federated learning and hierarchical method in the data difference environment, the present application has the following advantages: (1) The local individual update algorithm in the present application further improves the diagnostic accuracy by reducing the local offset and increasing the local training effect of the factory client as the aggregation weight, because the average aggregation algorithm of the traditional federated learning ignores the local update offset of the factory client, resulting in a decrease in diagnostic accuracy; (2) The local aggregation model based on threshold iteration in the present application reduces the overall training time and effectively improves the training efficiency by dynamically allocating the number of iterations through local aggregation and dynamic iteration, which further aggravates the aggregation delay problem caused by the random selection of clients in the traditional federated learning; (3) The ordinary hierarchical algorithm can reduce the aggregation delay problem through the hierarchical method of the factory client, but it does not select the factory client with large data quality difference, which increases the probability of malicious data nodes participating in the central aggregation, resulting in low diagnostic accuracy. The local update selection algorithm in the present application further selects high-quality clients to participate in local aggregation by calculating the weight, which can reduce the influence of data quality difference and malicious data, and maintain good training accuracy and robustness when the data quality difference is large.
[0028] The method proposed in the present application is applied to the fault bearing data set of the University of Western Reserve in the United States. Through experimental analysis, it is verified that the equipment fault diagnosis method based on federated hierarchical optimization learning proposed in the present application has high accuracy, training efficiency and robustness. By comparing the performance of the algorithm with FedAvg and TiFL under different data volume, different computing resources and different data quality, the joint fault diagnosis accuracy and training efficiency of the method proposed in the present application are obviously improved compared with the other two methods under different client sampling ratios. In addition, the present application can reduce the influence of data quality difference and malicious data, and maintain good training accuracy and robustness when the data quality difference is large. It is further verified that the method proposed in the present application has good training efficiency and accuracy, and can still perform efficient and robust fault diagnosis under the condition of data quality difference. BRIEF DESCRIPTION OF DRAWINGS
[0029] Figure 1 is the architecture diagram of the equipment fault diagnosis method based on federated hierarchical optimization learning;
[0030] Figure 2 Local aggregation model based on iteration threshold. DETAILED DESCRIPTION
[0031] The present application will be further described in detail below in combination with the drawings and specific embodiments.
[0032] The present application takes industrial equipment fault diagnosis and federated learning architecture as the carrier, and takes local individual update algorithm and local aggregation model based on threshold iteration as the main algorithm framework. The model is as followsFigure 1 As shown, comprising the following steps:
[0033] S1: hierarchical initialization: all factory clients are initialized hierarchically, and all clients are divided into layers according to the training speed , Indicates the number of layers, where the larger the subscript, the slower the training speed;
[0034] S2: data processing: all factory clients collect, denoise, and normalize the device data for preprocessing, and divide the training set and the test set;
[0035] S3: client local individual training: a convolutional neural network fault diagnosis model is established in the factory client, which is composed of a convolutional layer, a max pooling layer, a relu activation function, a fully connected layer, and a softmax classification function output layer. The preprocessed data is locally personalized and updated using the fault diagnosis model, and the weight of each layer of the factory client is calculated, including the following steps:
[0036] 1-1) Set the convolutional neural network as the fault diagnosis training model, which is composed of a 1x3 convolutional layer, a 1x3 max pooling layer, a relu activation function, a fully connected layer, and a softmax classification function output layer.
[0037] 1-2) In the multi-factory joint training process, the training target of the fault diagnosis model is: Where the total number of factory clients participating in training is , Indicates the local optimization target of client , Indicates the local data set of client after data processing, Indicates each data in client , Indicates the size of the data set, is its loss function, Indicates its local model parameters, Indicates the total number of data sets in this round.
[0038] 1-3) In the local update process of the factory client, the local individual update selection algorithm is modified by adding an offset degree constraint function to make the local model update direction closer to the center model. The modified local optimization target is: Where is a hyperparameter, is the global model parameter of the last round, Indicates the data set size of client , is its loss function, denotes the local model parameters of this round, denotes the total amount of data sets of this round.
[0039] 1-4) During the process of uploading client parameters, the local training results are used as indicators to calculate the factory client weight of this iteration, and the factory client with better diagnostic accuracy and offset distance is selected to participate in the local model aggregation of the layer, so as to improve the participation of high-quality clients and the joint diagnostic accuracy. The local aggregation weight of the factory client is: wherein denotes the factory client In the first round of global iteration, the training accuracy is denotes the global model parameters and the factory local parameters Cosine similarity is used to measure the offset degree of the local model, as shown in the following formula: S4: Local aggregation of each layer: the central server uses the local aggregation model of the iteration threshold to dynamically control the training times of each layer. When the iteration threshold is reached, the current iteration stops, the local parameters of each layer are uploaded to the central server, and the layer local model is generated by local weighted aggregation according to the weight, including the following steps:
[0040] 2-1) The local aggregation model based on the iteration threshold is divided into two parts: the threshold-based dynamic iteration algorithm and the local model weighted aggregation algorithm.
[0041] 2-2) During the execution process of the threshold-based dynamic iteration algorithm, first assume that the iteration times of the central model is N, and the factory clients after hierarchical processing are divided into layers , denotes the number of divided layers, wherein the larger the subscript, the slower the training speed.
[0042] 2-3) The slowest layer is set to the minimum iteration times of this round of training, the maximum iteration times and the diagnostic accuracy difference threshold . When the iteration times of the layer is equal to the maximum iteration times or the accuracy difference reaches the threshold, the central server is notified that the current iteration stops. The iteration stop threshold satisfies the condition: wherein, denotes the unified stop iteration time of this round, denotes the iteration times of the layer in the round, denotes the diagnostic accuracy of the layer in the round.
[0043] 2-4) During the execution of the local model weighted aggregation algorithm, first, the local aggregation of each layer is performed according to the local parameters of the factory client, then the layer local model aggregation weight is calculated, and finally the center model aggregation is completed. The layer local aggregation is represented as: wherein the local model of each layer is represented as , is the number of factory clients selected by each layer to participate in aggregation, is the total number of all factory client samples participating in aggregation of the layer, is the local parameter of the model client selected by the local individual update selection method, is the number of local samples of the factory.
[0044] 2-5) Finally, the center aggregation is performed, and the center model aggregation is represented as: wherein represents the total number of client layers, represents the number of one layer, represents the layer local model weight determined according to the iteration round , controls the balance of layer model weight iteration difference, and reduces the influence of different iteration rounds of layer model on the deviation of center aggregation. represents the layer aggregation weight determined according to the average accuracy of each layer model training , improves the weight of the layer local model parameter with higher training quality, and further improves the diagnosis accuracy of the center model. and are respectively represented as: wherein represents the total number of client layers, and represent the number of one layer, represents the iteration number of the layer , represents the average diagnosis accuracy of the layer .
[0045] S5: Center model parameter aggregation: the center server generates a new round of parameters and issues them to the factory client;
[0046] Based on the above steps, the application effectively solves the problems of industrial equipment data quality difference and joint diagnosis aggregation delay caused by different local training efficiency of different factories, and proposes a device fault diagnosis method based on federal hierarchical optimization learning. First, aiming at the problem of industrial equipment data quality difference, a local personalized update selection algorithm is proposed, which can effectively filter malicious data, improve the accuracy and robustness of joint fault diagnosis by dynamically adjusting the equipment weight and correcting the degree of local model deviation. Second, aiming at the problem of joint diagnosis aggregation delay caused by different local training efficiency of different factories, a local aggregation model based on iterative threshold is proposed, which can reduce the center aggregation frequency and delay time by dynamic iteration, and reduce the model deviation by using local model weighted aggregation, thereby improving the joint training efficiency.
[0047] Test verification of the device fault diagnosis method based on federal hierarchical optimization learning of the application:
[0048] 1. Test environment
[0049] The test platform built by the application is mainly carried out on the MacOS operating system, and the configuration information of the equipment is: CPU 1.4GHZ, running memory 16.0GB, using programming language Python 3.6, and using TensorFlow and Keras framework for test.
[0050] 2. Test verification
[0051] (1) Data set description
[0052] The experimental data is derived from the bearing fault diagnosis data set of the electrical engineering laboratory of Case Western Reserve University (CWRU) in the United States. The bearing is arranged with single-point faults of three fault levels on the inner ring, outer ring and rolling body by electric spark machining technology, and the fault diameters are 0.007, 0.014 and 0.021 inches respectively.
[0053] The experimental data set is shown in Table 1, and the data of the drive end under the condition of load of 0HP, 1HP, 2HP and 3HP at a sampling frequency of 12kHZ are selected for simulation experiment, which is divided into 10 fault types, each type contains 20000 data, and each data sample length is 2048 data points. After shuffling the data set, the data set and test set are divided according to the proportion of 7:3, and the experimental data set is randomly sampled according to the preset data amount to simulate the local data set of the client.
[0054] The total number of experimental settings client is 50, and the client is divided into 5 layers according to the training speed, each layer has 10 clients, the layer number is , and the training duration increases layer by layer.
[0055] In the experiment, a convolutional neural network is used as the training model, which is composed of a 1x3 convolutional layer, a 1x3 max pooling layer, a relu activation function, a full connection layer, and a softmax classification function output layer.
[0056] Table 1 Description of experimental data set
[0057]
[0058] (2) Comparative experiment result analysis
[0059] In order to verify the training performance of the FD-FHOL, comparative experiments are carried out by simulating different data amounts of each factory and different computing resource environments, FedAvg and TiFL algorithms are selected as comparative algorithms, Epoch is set to 40, training accuracy and training time under different client sampling ratios are compared, and the experimental results are shown in Tables 2 and 3. Table 2 shows the comparative experimental results of simulating the difference of data amount of each layer, and the data amount of different layers of the factory is set to increase from 1000 to 6000 layer by layer. The experimental results are shown in Table 2.
[0060] Table 2 Comparative influence analysis table of training performance of different data amounts
[0061]
[0062] From Table 2, it can be seen that under different client sampling ratios, the training accuracy of the FD-FHOL method and the TiFL method is higher than that of the FedAvg method, and the improvement is more significant under low sampling ratios of 2% and 4%. In addition, the accuracy of the FD-FHOL method is higher than that of the other two methods under most sampling ratios. Since the average aggregation algorithm of the traditional federated learning ignores the local update offset of the factory client, the diagnostic accuracy is reduced. The algorithm reduces the local offset and increases the local training effect of the factory client as the aggregation weight, thereby further improving the diagnostic accuracy. At the same time, the training time of the FD-FHOL method and the TiFL algorithm is obviously reduced compared with the FedAvg algorithm, especially under large sampling ratios such as 15% and 20%. This indicates that when the sampling ratio increases, the probability of the factory client with large data amount participating in joint training increases, and the aggregation delay problem caused by random selection of the client in the FedAvg algorithm is more serious. The TiFL algorithm can reduce the aggregation delay problem through the hierarchical method of the factory client, but the fixed increase of the iteration number of the factory client in each training increases the overall training time. The FD-FHOL method reduces the overall training time through local aggregation and dynamic iteration, dynamically allocates the iteration number, and effectively improves the training efficiency.
[0063] Table 3 represents the comparative experiment results in the simulated computing resource difference environment. The factory client data volume of each layer is about 2000, and the training time of each layer is set to increase by 10s layer by layer, such as layer increased by 0s, layer increased by 10s… layer increased by 40s, to simulate the factory client training environment of different computing resources.
[0064] Table 3. Training performance comparison and influence analysis table under different computing resource environments
[0065]
[0066] As can be seen from Table 3, under different client sampling ratios, the training accuracy of the FD-FHOL method of the present application is significantly improved compared with the FedAvg method, and always maintains the highest fault diagnosis accuracy and shorter training time among the three methods, which shows that under the condition of similar data volume, the traditional federated learning is more difficult to extract fault features due to the small number of overall samples, resulting in a significantly lower diagnosis accuracy than the other two methods. At the same time, due to the unstable proportion of high-quality clients selected by the random selection method, especially in the low sampling ratio, the accuracy is significantly lower than the other two methods, while the method of the present application and the TiFL method can take into account the participation of different factory clients in training, so as to maintain a high accuracy. In addition, the dynamic iteration method of the present application can dynamically coordinate different factory clients with different training times to perform different rounds of iteration, further improving the joint training efficiency under different computing resource conditions.
[0067] To verify the training performance of the method of the present application under the condition of data quality difference, comparative experiments of three methods under different data quality of test factory clients are designed. Under the condition of sampling ratio of 10%, 10%, 30%, and 50% malicious data nodes with fault feature and fault type error matching are randomly added to all clients, and the training accuracy of the three methods is shown in Table 4.
[0068] Table 3.5 Training accuracy comparison table of factory clients with different data quality
[0069] Malicious node ratio FedAvg TiFL FD-FHOL 10% 0.8975 0.9790 0.9810 30% 0.8775 0.8960 0.9665 50% 0.7935 0.8685 0.9660
[0070] As can be seen from Table 4, the accuracy of the FD-FHOL method of the application is higher than that of the other two algorithms under different data quality conditions, and the highest accuracy can be maintained when more malicious data is encountered. Different proportions of malicious nodes represent different degrees of data quality difference and the quality of data in the overall data sample. As the data quality difference increases and the data quality in the overall data sample decreases, the diagnostic accuracy of the FedAvg method and the TiFL method also decreases significantly. This is because the two methods do not screen the factory clients in the case of large data quality difference, thereby increasing the probability of malicious data nodes participating in central aggregation, resulting in low diagnostic accuracy. However, the FD-FHOL method further screens high-quality clients to participate in local aggregation by calculating the weight during the local update selection algorithm process, which can reduce the influence of data quality difference and malicious data, proving that the method can maintain good training accuracy and robustness when the data quality difference is large.
[0071] In summary, the FD-FHOL method proposed in the application has good training efficiency and accuracy in the environment of data quantity and computing resource difference, and can still perform efficient and robust fault diagnosis in the case of data quality difference.
[0072] 3. Conclusion
[0073] In view of the problem that the local training efficiency difference is large due to the heterogeneity of computing resources and data quality of different factories in multi-factory joint fault diagnosis modeling, affecting the joint diagnosis efficiency and accuracy of traditional federated learning, a device fault diagnosis method based on federated hierarchical optimization learning is proposed. First, to solve the problem of training efficiency difference caused by the heterogeneity of computing resources of different factories, a hierarchical architecture optimization joint diagnosis efficiency is established for device fault diagnosis. Second, to solve the problem of local update deviation caused by industrial data quality difference, a local individual update selection algorithm is proposed for factory local model training and device selection to further improve the fault diagnosis accuracy. Finally, to solve the problem of center aggregation delay caused by training efficiency difference, a local aggregation model based on iterative threshold is proposed for dynamic iteration and local aggregation to reduce the center iteration times and delay time and improve the joint training efficiency. Experiments show that the device fault diagnosis method based on federated hierarchical optimization learning can further improve the training efficiency and accuracy of multi-factory joint diagnosis in industrial equipment data set, and has good robustness, providing an effective solution for multi-factory device fault diagnosis.
[0074] The above examples of the application are described in detail, but the content is only the preferred embodiment of the application and cannot be considered as limiting the scope of the application. Any equivalent changes and improvements made within the scope of the application should still be within the scope of the patent coverage of the application.
Claims
1. A device fault diagnosis method based on federated hierarchical optimization learning, characterized in that... Utilizing federated learning for safe and efficient multi-factory distributed fault diagnosis includes the following steps: S1: Layered initialization: All factory clients are initialized in a layered manner, and divided into different factory client layers according to the training speed; S2: Data processing: All factory clients collect, denoise, and normalize the equipment data, and divide it into training and test sets; S3: Local Personalized Training on the Client: A convolutional neural network fault diagnosis model is built in the factory client, consisting of convolutional layers, max pooling layers, ReLU activation functions, fully connected layers, and softmax classification function output layers; the fault diagnosis model is used to perform local personalized update training on the preprocessed data, and the weights of the factory client in each layer are calculated; S4: Local aggregation of each layer: The central server uses the local aggregation model with an iteration threshold to dynamically control the number of training iterations for each layer. When the iteration threshold is reached, the current iteration stops, and each layer uploads its local parameters to the central server and performs local weighted aggregation based on the weights to generate a local model for the layer. S5: Central Model Parameter Aggregation: The central server calculates the local model weights of the calculation layer, completes the central aggregation, and generates a new round of parameters which are then sent to the factory clients; in step S1, all clients are initialized hierarchically: all clients are divided into layers according to the training speed. , This indicates the number of layers, where layers with larger indices train more slowly. In step S3, the factory client uses a local personalized update selection algorithm to perform local fault diagnosis, including the following steps: 1-1) Set up a convolutional neural network as the fault diagnosis training model, consisting of a 1×3 convolutional layer, a 1×3 max pooling layer, a ReLU activation function, a fully connected layer, and a softmax classification function output layer; 1-2) During multi-factory joint training, the training objective of the fault diagnosis model is: The total number of factory clients participating in the training is N. Indicates the client The local optimization goal, Indicates the client Local dataset after data processing Indicates the client Each piece of data, Indicates the size of the dataset. Its loss function, This indicates its local model parameters. This indicates the total amount of data in this round; 1-3) During the local update process on the factory client, the local personalized update selection algorithm corrects the local model update direction by adding an offset constraint function, making it closer to the central model. The corrected local optimization objective is: in, For hyperparameters, These are the parameters of the previous global model. Indicates the client Dataset size, Its loss function, This indicates the parameters of the local model in this round. This indicates the total amount of data in this round; 1-4) During the client parameter upload process, the local training results are used as indicators to calculate the factory client weights for this iteration. Factories with better diagnostic accuracy and offset distance are selected for local model aggregation at the participation layer to improve the participation of high-quality clients and the joint diagnostic accuracy. The local aggregation weights for factory clients are: in Indicates factory client In the Training accuracy during global iterations Represents global model parameters and factory local parameters Cosine similarity, used to measure the degree of deviation of the local model, is shown in the following formula: In step S4, a local aggregation model based on iterative thresholds is adopted to reduce the central aggregation delay problem under different factory operating conditions, computing resources, and data volume differences, thereby improving the efficiency of joint fault diagnosis. This includes the following steps: 2-1) The local aggregation model based on iterative threshold is divided into two parts: a threshold-based dynamic iterative algorithm and a local model weighted aggregation algorithm; 2-2) During the execution of the threshold-based dynamic iterative algorithm, it is first assumed that the central model iterates N times, and the factory client, after hierarchical processing, is divided into layers. , This indicates the number of layers, where layers with larger indices train more slowly. 2-3) is the slowest layer Set the minimum number of iterations for this training round. Maximum number of iterations Difference threshold between diagnostic accuracy and threshold ;when If the number of iterations in a layer equals the maximum number of iterations or the precision difference reaches a threshold, the central server is notified to stop this iteration. The conditions for stopping the iteration are as follows: in, This represents the time when this round of unified iterations will stop. express Layer The number of iterations in the round, express Layer The diagnostic accuracy of the wheel; 2-4) During the execution of the local model weighted aggregation algorithm, firstly, local aggregation of each layer is performed based on the local parameters of the factory client; then, the aggregation weight of the local model at each layer is calculated; finally, the central model aggregation is completed. The local aggregation at each layer is represented as follows: in, Representing different levels of division, there are a total of Layers, and the local model of each layer is represented as , The number of factory clients selected to participate in the aggregation at each layer. This layer represents the total number of samples from all factory clients involved in the aggregation. To select local parameters for the model through local customization update, This refers to the number of local samples at the factory. 2-5) Finally, perform central aggregation. The central model aggregation is represented as: in, Indicates the total number of client-side layers. This indicates the layer number. Indicates based on iteration rounds Definite The local model weights of the layers are adjusted to control the difference in the number of iterations for balancing the weights of the layer models, thereby reducing the impact of different iteration rounds of the layer models on the center aggregation offset. This represents the average accuracy trained based on each layer of the model. Definite Layer aggregation weights increase the weight of local model parameters in layers with higher training quality, further improving the diagnostic accuracy of the central model; and After normalization, they are represented as follows: in, Indicates the total number of client-side layers. and This indicates the layer number. express Number of layer iterations express Layer-average diagnostic accuracy; 2-6) After the central server completes the central aggregation, it obtains the global model parameters for this round and sends them to the factory clients at each layer for the next round of iterative training.
Citation Information
Patent Citations
Mechanical intelligent fault diagnosis method based on federated learning
CN111678696A
Federated learning and deep learning fusion driven equipment fault diagnosis method
CN112101489A
Federal learning method, hierarchical network system, storage medium and electronic equipment
CN113762526A