Federal dynamic aggregation optimization method and system for unmanned inspection equipment
By dynamically calculating the model consistency coefficient on unmanned inspection equipment and assigning aggregation weights, combined with the historical model integration on the cloud server side, the problem of the federated learning model forgetting old data features during the update process is solved, and the convergence speed and accuracy of the global model are improved.
Patent Information
- Application Number
- CN202411675418.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2044-11-21
AI Technical Summary
On unmanned inspection equipment, due to limited storage and computing power, new data constantly covers old data, resulting in dynamic changes in data distribution. The federated learning model is prone to forget the characteristics of old data during the update process, resulting in slower convergence of the global model and reduced accuracy.
By dynamically compute the model consistency coefficients on the device, different global aggregation weights are assigned, and multiple historical global model parameters are integrated on the cloud server side as global integration parameters for the next round of training to prevent the global model from forgetting old data features.
Effectively prevent the global model from forgetting old data features, improve the convergence speed and accuracy of the global model, and ensure the availability of the global model.
Smart Images

Figure CN119580213A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a federated dynamic aggregation optimization method and system for unmanned inspection equipment, belonging to the technical field of federated learning of unmanned inspection equipment. Background Art
[0002] In recent years, the rapid growth of dam area data has led to the widespread application of machine learning in the field of dam safety. Traditional machine learning requires the collection of a large amount of data (such as images, voice, text, etc.) from devices such as mobile phones, vehicles, and surveillance cameras for centralized training. However, a large amount of data is scattered on devices in different geographical locations or different entities. If a large amount of data is centrally transmitted to a cloud server for processing, there will be a large risk of privacy leakage and communication burden. With the improvement of the storage capacity and computing power of inspection equipment, it has become possible to train deep learning models locally on the device using the data collected by the inspection equipment. Federated learning, as a distributed learning paradigm, allows devices to independently train local models using their local data and aggregate local models through global models. It can collaborate with a large number of devices to jointly train a deep learning model without sharing device privacy data. The specific steps of federated learning are: the device first uses the received global model and its local data to train the local model, then the device uploads the local model to the cloud server for full set aggregation, and finally the cloud server distributes the aggregated global model to each device participating in the federated training, and repeats the above steps until the global model converges and meets the expected performance requirements.
[0003] Since the storage and computing power of inspection equipment is limited, the new data collected by the equipment will continuously overwrite the old data, and the data distribution on the equipment changes dynamically over time. However, federated learning tends to use new data for training, which causes the update direction of the local model of the device to be significantly different from the update direction of the historical rounds. The global model after aggregating the local model may forget the old data features, which in turn causes the global model to converge more slowly, the accuracy rate to drop sharply, and even the global model to lose its usability. Therefore, on inspection equipment with limited storage and computing power, how to effectively alleviate the global model forgetting caused by the local model update deviation during the global aggregation process and improve the convergence speed and accuracy of the global model has important application value. Summary of the invention
[0004] Purpose of the invention: Since the storage capacity and computing power of the inspection equipment are limited, the new data collected by the equipment will continuously overwrite the old data, and the data distribution on the equipment changes dynamically over time. In this case, using federated learning to train the deep learning model will cause the aggregated global model to forget the old data features, which in turn causes the global model to converge more slowly and the accuracy to drop sharply. In order to alleviate the forgetting of the global model caused by the local model update deviation during the global aggregation process, the present invention is based on the federated learning dynamic aggregation optimization method, dynamically calculates the global aggregation weight of the device according to the consistency of the model on the device, and integrates multiple latest historical global models on the cloud server side, effectively preventing the global model from forgetting the old data features, while accelerating the convergence of the global model, and improving the accuracy and availability of the global model training.
[0005] Technical solution: A federated dynamic aggregation optimization method for unmanned inspection equipment. The K unmanned inspection equipment participating in the federated training calculate and upload their own model consistency coefficients and updated local model parameters locally. The cloud server calculates the aggregation weight of the uploaded local model and performs global aggregation based on the weight. The cloud server averages and integrates multiple latest historical global model parameters as the new round of global integration parameters and sends them to the K equipment participating in the federated training for the next round of training. The following steps are included:
[0006] Step 1) In the tth round of federated training, the cloud server randomly selects K devices from all inspection devices to participate in the current round of federated training. The cloud server integrates the global parameters The K selected devices receive the global integration parameters sent by the cloud server. Then, start to execute steps 2) to 4);
[0007] Step 2) Construct a consistent dynamic calculation method based on model output: The kth device uses the local dataset D k Iterate e times to update the local model parameters After that, the model consistency coefficient is dynamically calculated based on the Logits output by the model on the kth device. The kth device will calculate the model consistency coefficient and the updated local model parameters Upload to the cloud server;
[0008] Step 3) Construct a federated weighted aggregation method based on model consistency: The cloud server is based on the model consistency coefficient uploaded by the kth device Calculate the aggregate weight of the kth device And according to the weight, the local model parameters uploaded by all devices are aggregated to obtain the global model parameters w of the tth round of federated training t ;
[0009] Step 4) Construct a global model correction method based on historical model integration: The cloud server sets a sliding window to average and integrate M latest historical global model parameters w t , w t-1 , w t-2 , ..., w t-M+1 Get the global integration parameters after integration Cloud servers will It is sent to the randomly selected K devices as the global integrated parameters of the t+1th round of federated training; steps 1) to 4) are executed sequentially in each round of model training until the global model converges and meets the expected performance requirements.
[0010] In step 1), at the beginning of each round of federated training, the cloud server randomly selects K devices from all inspection devices to participate in this round of training. The selected K devices receive the global integration parameters sent by the cloud server. Then, start executing steps 2) to 4).
[0011] In the step 2) of constructing a consistent dynamic calculation method based on model output, it is assumed that there are a total of T rounds of federated training, the number of inspection devices participating in the training is K, and each device c k With local dataset D k , the dataset contains C types of samples, where the samples are represented as The corresponding label of the sample is y, then in the tth round of federated training, device c k The local model update target is as follows:
[0012]
[0013] in, is the composite loss function. The local model parameters of device ck in the tth round of federated training In the local dataset D k A mini-batch stochastic gradient descent (SGD) step is performed on device c k The local model update looks like this:
[0014]
[0015] Among them, η represents the learning rate, represents the bth mini-batch data randomly extracted from the dataset Dk, B represents the total number of mini-batch data, r represents the total number of local update iterations, f(·) represents the stochastic gradient descent function, represents the local model parameters obtained by device ck after r local update iterations. Indicates the local model parameters of the device ck The vector output of sample x is: The calculation of is as follows:
[0016]
[0017] Among them, z i,k Represents the Logits output of device ck on the i-th class sample. The classification probability vector p is obtained through the softmax function as follows:
[0018] p=[p 1,k ,p 2,k ,...,p i,k ,…,p C,k ]
[0019] Among them, p i,k Indicates device c k The classification probability of the i-th class sample. Let F k (w) is the device local training loss function, then F k The calculation of (w) is as follows:
[0020]
[0021] Where w represents the global model parameter, h k Represents the knowledge learned by the local model. In order to prevent the local model update of the device from deviating from the optimal direction, the local training loss function F k A constraint term μ is added to (w) as follows:
[0022]
[0023] Output the Logits vector of the local model on the device ck Variance The consistency of the local model is measured as the consistency coefficient as follows:
[0024]
[0025] Where Var(·) represents the variance of the local model output Logits vector of sample x in the C classification task. Device c k The updated local model parameters and model consistency coefficient Upload to the cloud server for global aggregation.
[0026] In the step 3) of constructing a federated weighted aggregation method based on model consistency, the kth device updates the local model parameters and model consistency coefficient After uploading to the cloud server, the cloud server Calculate the aggregate weight of the local model parameters uploaded by the kth device The first t Aggregate weight of the kth device in the federated training round The calculation method of is as follows:
[0027]
[0028] The cloud server calculates the aggregate weight The local model parameters for uploading the aggregated device are as follows:
[0029]
[0030] Among them, w t Represents the global model parameters obtained by global aggregation of cloud servers in the tth round of federated training.
[0031] In step 4), a global model correction method based on historical model integration is constructed. In the tth round of federated training, the cloud server averagely integrates M latest historical global model parameters w through a sliding window. t , w t-1 , w t-2 , ..., w t-M+1 , to guide the global model to update in the optimal direction, is the global integration parameter after integration, then The calculation of is as follows:
[0032]
[0033] The cloud server will integrate the obtained The global integration parameters of the t+1th round of federated training are sent to randomly selected K inspection devices for a new round of federated training. During the model training process, steps 1) to 4) are iterated until the global model converges and meets the expected performance requirements.
[0034] In a federated dynamic aggregation optimization method for unmanned inspection equipment, K inspection devices participating in federated training locally calculate and upload their respective model consistency coefficients and updated local model parameters. The cloud server calculates the aggregation weight of each local model and performs global aggregation based on the weight. The cloud server integrates the M latest historical global model parameters on average as the new round of global integration parameters and sends them to the K devices participating in federated training for the next round of training until the global model converges and meets the expected performance requirements.
[0035] A federated dynamic aggregation optimization system for unmanned inspection equipment, including the following modules:
[0036] The first module, in t In the round of federated training, the cloud server randomly selects K The devices participate in the current round of federated training, and the server will globally integrate the parameters Distribute to the equipment participating in the training;
[0037] The second module builds a dynamic calculation method based on the consistency of the model output: the kth device uses the local data set D k Iterate e times to update the local model parameters After that, the model consistency coefficient is dynamically calculated based on the Logits output by the model on the kth device. The kth device will calculate the model consistency coefficient and the updated local model parameters Upload to the cloud server;
[0038] The third module is to build a federated weighted aggregation method based on model consistency: the cloud server is based on the data uploaded by the kth device. Calculate the aggregate weight of the kth device And according to the weight, the local model parameters uploaded by all devices are aggregated to obtain the global model parameters w of the tth round of federated training t ;
[0039] The fourth module is to build a global model correction method based on historical model integration: the cloud server sets a sliding window to average and integrate M latest historical global model parameters w t , w t-1 , w t-2 , ..., w t-M+1 Get the global integration parameters after integration Cloud servers will It is sent to K randomly selected devices under the global integration parameters of the t+1th round of federated training; the first to fourth modules are executed sequentially in each round of model training until the global model converges and meets the expected performance requirements.
[0040] The specific implementation process and method of the system are the same and will not be repeated here.
[0041] An unmanned inspection device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the above-mentioned federated dynamic aggregation optimization method for unmanned inspection devices is implemented.
[0042] A storage medium readable by an unmanned inspection device stores a computer program for executing the above-mentioned federated dynamic aggregation optimization method for unmanned inspection devices.
[0043] Beneficial effect: Compared with the prior art, the federal dynamic aggregation optimization method and system for unmanned inspection equipment provided by the present invention dynamically calculates the consistency coefficient of the model on the inspection equipment, allocates different global aggregation weights to each device, and accelerates the convergence speed of the global model; the cloud server integrates the M latest historical global model parameters as the global model parameters for the next round of federal training through a sliding window, guides the global model to update in the optimal direction, and improves the accuracy of the global model.
[0044] Since most inspection devices have small storage capacity, limited energy and high heterogeneity of collected data, the new data received by the device will continuously overwrite the old data. The local data distribution of the device changes dynamically over time, resulting in the update direction of the local model being significantly different from the update direction of the historical rounds. The global model after aggregating the local model forgets the characteristics of the old data, and the convergence speed and accuracy of the global model are greatly reduced, and even the global model loses its availability. Therefore, calculating the model consistency of the inspection device and assigning different aggregation weights to it can effectively prevent the local model update deviation from causing the global model update to deviate from the optimal direction, and improve the accuracy of the global model while accelerating the convergence speed of the global model. In each round of federated training, the model consistency coefficient is first calculated locally on the inspection device and the local model is updated. Then, the cloud server calculates the aggregation weight of the device based on the consistency coefficient uploaded by the device and aggregates all the uploaded local models according to the weight. Finally, the cloud server averagely integrates the M latest historical global model parameters as the global integration parameters for the next round of federated training and sends them to the randomly selected K devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 The schematic diagram of the method of the present invention is an example. DETAILED DESCRIPTION
[0046] The present invention is further explained below in conjunction with specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention. After reading the present invention, various equivalent forms of modifications to the present invention by those skilled in the art all fall within the scope defined by the claims attached to this application.
[0047] The federated dynamic aggregation optimization method for unmanned inspection equipment, in each round of federated training, first calculates the model consistency coefficient locally on the inspection equipment and updates the local model, then the cloud server calculates the aggregation weight of the device according to the consistency coefficient uploaded by the device and aggregates all uploaded local models according to the weight, and finally the cloud server integrates M = 5 latest historical global model parameters on average as the global integration parameters for the next round of federated training, effectively preventing the local model update deviation from causing the global model update to deviate from the optimal direction, while accelerating the convergence speed of the global model, and improving the accuracy and availability of global model training. It was found through experiments that integrating 5 historical global models can obtain the best global model accuracy, so 5 are integrated in this embodiment.
[0048] like Figure 1 As shown in the figure, in the federated dynamic aggregation optimization method for unmanned inspection equipment, the K inspection equipment participating in the federated training calculate and upload their respective model consistency coefficients and updated local model parameters locally, and the cloud server calculates the aggregation weights of each local model and performs global aggregation based on the weights. The cloud server integrates M = 5 latest historical global model parameters as the global integration parameters of the new round and sends them to the K equipment participating in the federated training for the next round of training until the global model converges and meets the expected performance requirements. The following steps are included:
[0049] Step 1) In the tth round of federated training, the cloud server randomly selects K devices from all inspection devices to participate in the current round of federated training. The cloud server integrates the global parameters The K selected devices receive the global integration parameters sent by the cloud server. Then, start to execute steps 2) to 4);
[0050] Step 2) Construct a consistent dynamic calculation method based on model output: The kth device uses the local dataset D k Iterate e times to update the local model parameters After that, the model consistency coefficient is dynamically calculated based on the Logits output by the model on the kth device. The kth device will calculate the model consistency coefficient and the updated local model parameters Upload to the cloud server;
[0051] Step 3) Construct a federated weighted aggregation method based on model consistency: The cloud server is based on the data uploaded by the kth device. Calculate the aggregate weight of the kth device And according to the weight, the local model parameters uploaded by all devices are aggregated to obtain the global model parameters w of the tth round of federated training t ;
[0052] Step 4) Construct a global model correction method based on historical model integration: The cloud server sets a sliding window to average and integrate M = 5 latest historical global model parameters w t , w t-1 , w t-2 , ..., w t-4 Get the global integration parameters after integration Cloud servers will It is sent to the randomly selected K devices as the global integrated parameters of the t+1th round of federated training; steps 1) to 4) are executed sequentially in each round of model training until the global model converges and meets the expected performance requirements.
[0053] In step 1), at the beginning of each round of federated training, the cloud server randomly selects K devices from all inspection devices to participate in this round of training. The selected K devices receive the global integration parameters sent by the cloud server. Then, start executing steps 2) to 4).
[0054] In the step 2) of constructing a consistent dynamic calculation method based on model output, it is assumed that there are a total of T rounds of federated training, the number of inspection devices participating in the training is K, and each device c k With local dataset D k , the dataset contains C types of samples, where the samples are represented as The corresponding label of the sample is y, then in the tth round of federated training, device c k The local model update target is as follows:
[0055]
[0056] in, is the composite loss function. In the tth round of federated training, device c k Local model parameters In the local dataset D k A mini-batch stochastic gradient descent (SGD) step is performed on device c k The local model update looks like this:
[0057]
[0058] Among them, η represents the learning rate, represents the bth mini-batch data randomly extracted from the dataset Dk, B represents the total number of mini-batch data, r represents the total number of local update iterations, f(·) represents the stochastic gradient descent function, represents the local model parameters obtained by device ck after r local update iterations. Indicates device ck In local model parameters The vector output of sample x is: The calculation of is as follows:
[0059]
[0060] Among them, z i,k Indicates device c k Logits output on the i-th class sample. The classification probability vector p obtained by the softmax function is as follows:
[0061] p=[p 1,k ,p 2,k ,...,p i,k ,...,p C,k ]
[0062] Among them, p i,k represents the classification probability of device ck on the i-th class sample. Let F k (w) is the device local training loss function, then F k The calculation of (w) is as follows:
[0063]
[0064] Where w represents the global model parameter, h k Represents the knowledge learned by the local model. In order to prevent the local model update of the device from deviating from the optimal direction, the local training loss function F k A constraint term μ is added to (w) as follows:
[0065]
[0066] Output the Logits vector of the local model on the device ck Variance The consistency of the local model is measured as the consistency coefficient as follows:
[0067]
[0068] Where Var(·) represents the variance of the local model output Logits vector of sample x in the C classification task. Device c k The updated local model parameters and model consistency coefficient Upload to the cloud server for global aggregation.
[0069] In the step 3) of constructing a federated weighted aggregation method based on model consistency, the kth device updates the local model parameters and model consistency coefficient After uploading to the cloud server, the cloud server Calculate the aggregate weight of the local model parameters uploaded by the kth device Then the aggregate weight of the kth device in the tth round of federated training is The calculation method of is as follows:
[0070]
[0071] The cloud server calculates the aggregate weight The local model parameters for uploading the aggregated device are as follows:
[0072]
[0073] Among them, w t Represents the global model parameters obtained by global aggregation of cloud servers in the tth round of federated training.
[0074] In step 4), a global model correction method based on historical model integration is constructed. In the tth round of federated training, the cloud server averagely integrates M=5 latest historical global model parameters w through a sliding window. t , w t-1 , w t-2 , ..., w t-4 , to guide the global model to update in the optimal direction, is the global integration parameter after integration, then The calculation of is as follows:
[0075]
[0076] The cloud server will integrate the obtained The global integration parameters of the t+1th round of federated training are sent to K randomly selected inspection devices for a new round of federated training. During the model training process, steps 1) to 4) are iterated until the global model converges and meets the expected performance requirements.
[0077] Inspection equipment includes terminal devices such as cameras and sensors. Each inspection device has a local data set (not limited to a certain type) and uses a federated learning algorithm to collaboratively train the global model. In each round of federated training, the cloud server randomly selects K devices from the inspection device group to participate in the training. The selected K devices calculate the consistency coefficient locally, and then the cloud server calculates the corresponding aggregation weight and aggregates the uploaded local model according to the weight. Finally, the cloud server integrates M = 5 latest historical global model parameters on average as the global integration parameters for the next round of federated training and sends them to the randomly selected K devices.
[0078] The federated dynamic aggregation optimization system for unmanned inspection equipment includes the following modules:
[0079] In the first module, in the tth round of federated training, the cloud server randomly selects K devices from all inspection devices to participate in the current round of federated training, and the server integrates the global parameters Distribute to the equipment participating in the training;
[0080] The second module builds a dynamic calculation method based on the consistency of the model output: the kth device uses the local data set D k Iterate e times to update the local model parameters After that, the model consistency coefficient is dynamically calculated based on the Logits output by the model on the kth device. The kth device will calculate the model consistency coefficient and the updated local model parameters Upload to the cloud server;
[0081] The third module is to build a federated weighted aggregation method based on model consistency: the cloud server is based on the data uploaded by the kth device. Calculate the aggregate weight of the kth device And according to the weight, the local model parameters uploaded by all devices are aggregated to obtain the global model parameters w of the tth round of federated training t ;
[0082] The fourth module is to build a global model correction method based on historical model integration: the cloud server sets a sliding window to average the integration of M = 5 latest historical global model parameters w t , w t-1 , w t-2 , ..., w t-4 Get the global integration parameters after integration The cloud server will It is sent to K randomly selected devices as the global integrated parameters of the t+1th round of joint training; the first to fourth modules are executed sequentially in each round of model training until the global model converges and meets the expected performance requirements.
[0083] Obviously, those skilled in the art should understand that the various steps of the above-mentioned federal dynamic aggregation optimization method for unmanned inspection equipment or the various modules of the federal dynamic aggregation optimization system for unmanned inspection equipment of the embodiment of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed on a network composed of multiple computing devices. They can be implemented with program codes executable by the computing device, so that they can be stored in a storage device and executed by the computing device. And in some cases, the steps shown or described can be performed in a different order than here, or they can be made into individual integrated circuit modules separately, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Therefore, the embodiments of the present invention are not limited to any specific combination of hardware and software.
Claims
1. A federated dynamic aggregation optimization method for unmanned inspection equipment, characterized in that: The following steps are involved: Step 1) In the tth round of federated training, the cloud server randomly selects K devices from all inspection devices to participate in the current round of federated training. The cloud server integrates the global parameters The K selected devices receive the global integration parameters sent by the cloud server. Then, start to execute steps 2) to 4); Step 2) Construct a consistent dynamic calculation method based on model output: The kth device uses the local dataset D k Iterate e times to update the local model parameters After that, the model consistency coefficient is dynamically calculated based on the Logits output by the model on the kth device. The kth device will calculate the model consistency coefficient and the updated local model parameters Upload to the cloud server; Step 3) Construct a federated weighted aggregation method based on model consistency: The cloud server is based on the model consistency coefficient uploaded by the kth device Calculate the aggregate weight of the kth device And according to the weight, the local model parameters uploaded by all devices are aggregated to obtain the global model parameters w of the tth round of federated training t ; Step 4) Construct a global model correction method based on historical model integration: The cloud server sets a sliding window to average and integrate M latest historical global model parameters w t , w t-1 , w t-2 , ..., w t-M+1 Get the global integration parameters after integration The cloud server will It is sent to the randomly selected K devices as the global integrated parameters of the t+1th round of federated training; steps 1) to 4) are executed sequentially in each round of model training until the global model converges and meets the expected performance requirements.
2. The method for optimizing federated dynamic aggregation for unmanned inspection equipment according to claim 1 is characterized in that: In the step 2) of constructing a consistent dynamic calculation method based on model output, it is assumed that there are a total of T rounds of federated training, the number of inspection devices participating in the training is K, and each device c k With local dataset D k , the dataset contains C types of samples, where the samples are represented as The corresponding label of the sample is y, then the local model update target of device ck in the tth round of federated training is as follows: in, is the composite loss function, the local model parameters of device ck in the tth round of federated training In the local dataset D k Perform a mini-batch stochastic gradient descent step on device c k The local model update looks like this: Among them, η represents the learning rate, Represents the dataset D k The bth mini-batch data randomly selected from the above, R represents the total number of mini-batch data, r represents the total number of local update iterations, f(·) represents the stochastic gradient descent function, represents the local model parameters obtained by device ck after r local update iterations; let Indicates the local model parameters of the device ck The vector output of sample x is: The calculation of is as follows: Among them, z i,k Indicates device c k Logits output on the i-th class sample; The classification probability vector p is obtained through the softmax function as follows: p=[p 1,k ,p 2,k ,...,p i,k ,...,p C,k ] Among them, p i,k Indicates device c k The classification probability on the i-th class sample; let F k (w) is the device local training loss function, then F k The calculation of (w) is as follows: Where w represents the global model parameter, h k Represents the knowledge learned by the local model; in order to prevent the local model update of the device from deviating from the optimal direction, the loss function F is trained locally k A constraint term μ is added to (w) as follows: Output the Logits vector of the local model on the device ck Variance The consistency of the local model is measured as the consistency coefficient as follows: Where Var(·) represents the variance of the local model output Logits vector of sample x in the C classification task. Device c k The updated local model parameters and model consistency coefficient Upload to the cloud server for global aggregation.
3. The federated dynamic aggregation optimization method for unmanned inspection equipment according to claim 1 is characterized in that: In the step 3) of constructing a federated weighted aggregation method based on model consistency, the kth device updates the local model parameters and model consistency coefficient After uploading to the cloud server, the cloud server Calculate the aggregate weight of the local model parameters uploaded by the kth device Then the aggregate weight of the kth device in the tth round of federated training is The calculation method of is as follows: The cloud server calculates the aggregate weight The local model parameters for uploading the aggregated device are as follows: Among them, w t Represents the global model parameters obtained by global aggregation of cloud servers in the tth round of federated training.
4. The method for optimizing federated dynamic aggregation for unmanned inspection equipment according to claim 1 is characterized in that: In step 4), a global model correction method based on historical model integration is constructed. In the tth round of federated training, the cloud server averagely integrates M latest historical global model parameters w through a sliding window. t , w t-1 , w t-2 , ..., w t-M+1 , to guide the global model to update in the optimal direction, is the global integration parameter after integration, then The calculation of is as follows: The cloud server will integrate the obtained The global integration parameters of the t+1th round of federated training are sent to randomly selected K inspection devices for a new round of federated training. During the model training process, steps 1) to 4) are iterated until the global model converges and meets the expected performance requirements.
5. A federated dynamic aggregation optimization system for unmanned inspection equipment, characterized in that: Includes the following modules: In the first module, in the tth round of federated training, the cloud server randomly selects K devices from all inspection devices to participate in the current round of federated training, and the server integrates the global parameters Distribute to the equipment participating in the training; The second module builds a dynamic calculation method based on the consistency of the model output: the kth device uses the local data set D k Iterate e times to update the local model parameters After that, the model consistency coefficient is dynamically calculated based on the Logits output by the model on the kth device. The kth device will calculate the model consistency coefficient and the updated local model parameters Upload to the cloud server; The third module is to build a federated weighted aggregation method based on model consistency: the cloud server is based on the data uploaded by the kth device. Calculate the aggregate weight of the kth device And according to the weight, the local model parameters uploaded by all devices are aggregated to obtain the global model parameters w of the tth round of federated training t ; The fourth module is to build a global model correction method based on historical model integration: the cloud server sets a sliding window to average and integrate M latest historical global model parameters w t , w t-1 , w t-2 , ..., w t-M+1 Get the global integration parameters after integration The cloud server will It is sent to K randomly selected devices under the global integration parameters of the t+1th round of federated training; the first to fourth modules are executed sequentially in each round of model training until the global model converges and meets the expected performance requirements.
6. An unmanned inspection device, characterized in that: The unmanned inspection device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the federated dynamic aggregation optimization method for unmanned inspection devices as described in any one of claims 1 to 4 is implemented.
7. A storage medium readable by an unmanned inspection device, characterized in that: The unmanned inspection device readable storage medium stores a computer program for executing the federated dynamic aggregation optimization method for unmanned inspection devices as described in any one of claims 1-4.
Citation Information
Patent Citations
Sliding window sampling-based distributed machine learning training method and system thereof
CN106779093A
Optimization method for heterogeneous model fusion in federated learning
CN114912705A
Dam defect identification model rapid convergence method based on federated learning
CN115410103A
Image classification method based on federal knowledge distillation and ensemble learning
CN117523291A