A periodic asynchronous modeling method, device and equipment of a UAV group and a medium

By employing a periodic asynchronous modeling method, regularization error correction, and sparsity processing, the local model of the UAV swarm is trained asynchronously and parameter exchange is optimized. This solves the problems of frequent model exchange and resource scarcity in UAV swarms and achieves efficient federated learning.

CN120151860BActive Publication Date: 2025-11-18CHINESE PEOPLES LIBERATION ARMY UNIT 63891
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510381902.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-27
Publication Date
2025-11-18
Estimated Expiration
2045-03-27

AI Technical Summary

Technical Problem

Existing synchronous and fully asynchronous federated learning mechanisms are difficult to effectively utilize scarce wireless spectrum resources for frequent model parameter exchanges in drone swarms, and cannot guarantee real-time model updates and good performance.

Method used

A periodic asynchronous modeling method is adopted. By constructing a global network model and an ensemble of drones, regularization error correction and sparsification are used to asynchronously train the local model and upload some important parameters after sparsification. An accumulator is used to store the parameters that have not been uploaded, thereby optimizing the performance of the global network model.

Benefits of technology

It effectively reconciles the contradiction between frequent model parameter exchanges in UAV swarms and scarce wireless spectrum resources, ensuring good performance and real-time update capability of the target global network model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120151860B_ABST
    Figure CN120151860B_ABST
Patent Text Reader

Abstract

The application discloses a periodic asynchronous modeling method, device and equipment of a UAV group and a medium, and the method comprises the following steps: first, a first global network model and a UAV set are constructed; second, the first global network model is broadcast to each UAV in the UAV set; third, each local model of each UAV is trained respectively to obtain each local model update parameter; fourth, each local model update parameter is sparsified and aggregated to obtain a second global network model; fifth, the second global network model is used to replace the first global network model, and the second step is returned to, and the second step to the fourth step are executed repeatedly for the first time, and the second step to the fourth step are executed repeatedly for the mth time, m=2, 3,..., K-1, corresponding to using the (m+1)th global network model to replace the mth global network model to return to the second step, until a target global network model is obtained. The method can construct a target global network model which is suitable for a UAV group and has good performance.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of mobile communication, and in particular to a periodic asynchronous modeling method, device and equipment of a UAV group and a medium. BACKGROUND

[0002] As a new emerging machine learning paradigm, federated learning can support multiple distributed data holders to collaboratively train a specific neural network model. Compared with the traditional centralized model training method, in federated learning, the local raw data does not need to leave the local storage of each distributed participant, so the risk of data leakage can be greatly reduced, and the interests of each participant can be better protected. In addition, in the traditional centralized model training method, uploading the corresponding raw data of each distributed participant to the central server will occupy a large amount of wireless spectrum resources and cause serious network delay, but this problem does not exist in federated learning. Furthermore, in federated learning, the training of the network model is carried out in parallel at each participant, and no longer relies too much on the computing and storage capacity of the central server, so the computing efficiency is also greatly improved.

[0003] Even if a large amount of raw data does not need to be centrally processed, the scarce wireless spectrum resources are difficult to effectively support the exchange of model parameters between each distributed participant and the parameter server in the federated learning process. Based on this, how to implement communication-efficient federated learning has always been a hot issue in the industry. Essentially, communication-efficient federated learning aims to reduce the amount of data transmitted while still ensuring the good performance of the trained model. From this perspective, current research on communication-efficient federated learning mainly falls into two categories. The first category is federated learning based on compression technology, which uses effective compression and decompression methods to transmit low-precision model parameters to achieve the purpose of reducing the amount of data transmitted. The second category is federated learning based on sparsification, which selects a certain number of network model parameters through novel sparsification methods to reduce the number of transmitted parameters to achieve the purpose of reducing the amount of data transmitted. As for the current research, in federated learning based on compression technology, how to fully utilize the inherent statistical characteristics of federated learning to construct an efficient compression mechanism has always been a key factor affecting the performance of the trained model. Unlike this, in federated learning based on sparsification, uploading only part of the network model parameters will inevitably cause a certain error loss to the accuracy of the trained model, so the determining variable that restricts the performance of existing methods is how to effectively exploit the value of the non-uploaded network model parameters to make up for the error loss caused by sparsification.

[0004] In addition, the existing synchronous federated learning and fully asynchronous federated learning mechanisms are not applicable to the specific neural network model for distributed multi-unmanned aerial vehicle cooperative training in the unmanned aerial vehicle group. Specifically, in synchronous federated learning, the global model aggregation needs to wait for all unmanned aerial vehicles to complete local model training and upload corresponding local model updates. However, due to the differences in computing and storage capabilities and the number of local data set samples of each unmanned aerial vehicle, the time required to complete one local model training is not the same. If synchronous federated learning is applied, the longest time-consuming unmanned aerial vehicle needs to complete local model training and upload the corresponding local model update. In this way, the real-time updating ability of the trained model will be seriously affected. Moreover, considering the complex flight environment and wireless transmission characteristics, it may not be possible to collect all local model updates from all unmanned aerial vehicles for a long time in reality. Unlike synchronous federated learning, in fully asynchronous federated learning, as long as any unmanned aerial vehicle completes local model training and uploads the corresponding local model update, the parameter server will perform global model aggregation. Obviously, the scarce wireless spectrum resources are difficult to effectively support the frequent model parameter exchange in fully asynchronous federated learning. SUMMARY

[0005] The purpose of the present application is to provide a periodic asynchronous modeling method, device, equipment and medium for an unmanned aerial vehicle group, to solve the problem that the scarce wireless spectrum resources are difficult to effectively support the frequent model parameter exchange in fully asynchronous federated learning, mainly including how to construct a federated learning model suitable for the characteristics of the unmanned aerial vehicle group in view of the differences in computing and storage capabilities and the number of local data set samples of each unmanned aerial vehicle in the unmanned aerial vehicle group and the complex flight environment, how to reconcile the real contradiction between the frequent model parameter exchange in the federated learning process and the scarce wireless spectrum resources, and how to solve the communication bottleneck problem while ensuring the good performance of the obtained federated learning model.

[0006] To address the aforementioned technical problems, one technical solution adopted by this invention is to provide a periodic asynchronous modeling method for unmanned aerial vehicle (UAV) swarms. The method includes the following steps: First, constructing a first global network model and a UAV ensemble; the first global network model includes multiple first global network sub-models, and the UAV ensemble includes multiple UAVs, with each UAV corresponding one-to-one with one of the multiple first global network sub-models; Second, broadcasting the first global network model to each UAV in the UAV ensemble; Third, using the multiple first global network sub-models, analyzing each local model of each UAV. The process involves several steps: 1) Training is performed to obtain update parameters for each local model; 2) These update parameters are then sparsified and aggregated to obtain a second global network model; 3) The second global network model replaces the first global network model, and the process returns to the second step. This process is repeated for the first time, from the second to the fourth step, and so on. For the m-th repetition (m = 2, 3, ..., K-1), the (m+1)-th global network model is used to replace the m-th global network model, and the process returns to the second step. This process is then broadcast to each drone in the drone set until the target global network model is obtained.

[0007] In some embodiments, the third step includes: performing local model training on each local model using regularized error correction; determining whether each local model has completed local model training within a time period; if each local model has completed local model training within a time period, obtaining the update parameters of each local model; if each local model has not completed local model training within a time period, returning to the step of performing local model training on each local model using regularized error correction.

[0008] In some embodiments, the step of training the local models using regularized error correction includes: performing multiple local iterative trainings on the local models corresponding to each UAV using a local target loss function; wherein, in the k-th global iteration, the local target loss function used during the U-th local iterative training of UAV n is:

[0009]

[0010] Where k = 1, 2, 3, ..., K; L represents the local model corresponding to UAV n in the k-th global iteration; U represents the U-th local iteration training; L n This represents the local iteration threshold of the local model corresponding to the drone n; This represents the first local loss function; This indicates that the first local loss function is optimized using a regularization term. The second local loss function is then obtained, and the second local loss function It can be represented as:

[0011]

[0012] Among them, Z kn (1-γ) represents the regularization term; (1-γ) represents the first local loss function. The weighting coefficient; γ represents the regularization term Z. kn The weighting coefficients.

[0013] In some embodiments, the regularization term Z kn It can be represented as:

[0014]

[0015] Where Ma represents the mask function, and w represents the local model of drone n in the k-th global iteration. n k The j-th element; w k,j This represents the j-th element of the k-th global network model during the k-th global iteration broadcast; k = 1, 2, 3, ...; A n,j This represents the j-th element stored in the accumulator of drone n; r n,j Let r represent a hyperparameter, and the hyperparameter r n,j for:

[0016]

[0017] in, This represents the set of drones that uploaded the j-th (1≤j≤d) local model update parameters in the k-th global iteration; |D n' | represents the number of samples in the local dataset of drone n'; |D n | represents the number of samples in the local dataset of drone n.

[0018] In some embodiments, the sparsification of the local model update parameters includes: determining the sub-communication resources available to each UAV based on the total communication resources and a set of UAVs that have completed local model training within a time period; calculating the number of parameters that each UAV can upload as a parameter threshold based on the sub-communication resources; and selecting parameters from the local model update parameters whose number is equal to the parameter threshold as the local model update sparse parameters.

[0019] In some embodiments, the method further includes: setting up accumulators for storing model parameters of each local model according to each UAV; and using the accumulators to store update parameters of each local model.

[0020] In some embodiments, while aggregating the sparse parameters of each local model update, the method further includes: setting all the sparse parameters of each local model update stored in each accumulator to 0, and saving the remaining parameters in each local model update parameter in each accumulator.

[0021] This invention also provides a periodic asynchronous modeling device for a drone swarm, the device comprising: a model building unit for building a first global network model and a drone ensemble; the first global network model includes multiple first global network sub-models, and the drone ensemble includes multiple drones, with each drone corresponding one-to-one with one of the multiple first global network sub-models; a distribution unit for broadcasting the first global network model to each drone in the drone ensemble; a model training unit for training each local model of each drone using the multiple first global network sub-models to obtain update parameters for each local model; and a model update unit for sparsifying and aggregating the update parameters of each local model to obtain a second global network model. The model update unit is further configured to replace the first global network model in the distribution unit with the second global network model, and the distribution unit, the model training unit, and the model update unit are further configured to repeatedly perform the corresponding operation for the first time based on the second global network model, and so on. When the distribution unit, the model training unit, and the model update unit repeatedly perform the corresponding operation for the mth time, m = 2, 3, ..., the model update unit is further configured to replace the mth global network model in the distribution unit with the (m+1)th global network model, and the distribution unit broadcasts the (m+1)th global network model to each UAV in the UAV set until the target global network model is obtained.

[0022] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the steps of the method described above.

[0023] The present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described method.

[0024] The beneficial effects of this invention are as follows: This invention discloses a periodic asynchronous modeling method, apparatus, device, and medium for UAV swarms. The method includes the following steps: First, constructing a first global network model and a UAV set; Second, broadcasting the first global network model to each UAV in the UAV set; Third, training each UAV's local model to obtain update parameters for each local model; Fourth, sparsifying and aggregating the update parameters of each local model to obtain a second global network model; Fifth, replacing the first global network model with the second global network model, returning to step two, and repeating steps two through four for the first time, and so on. When repeating steps two through four for the mth time, m = 2, 3, ..., the (m+1)th global network model is used to replace the mth global network model, returning to step two, until the target global network model is obtained. This periodic asynchronous modeling method can construct a target global network model adapted to the characteristics of UAV swarms and reconcile the practical contradiction between frequent model parameter exchanges and scarce wireless spectrum resources in federated learning. While solving the communication bottleneck problem, it can ensure the good performance of the obtained target global network model. Attached Figure Description

[0025] Figure 1 This is an overall flowchart of a periodic asynchronous modeling method for unmanned aerial vehicle (UAV) swarms according to the present invention;

[0026] Figure 2 This is an iterative diagram of the global network model corresponding to the periodic asynchronous modeling method for UAV swarms in this invention;

[0027] Figure 3 This is a data flow diagram of a periodic asynchronous modeling method for unmanned aerial vehicle (UAV) swarms according to the present invention;

[0028] Figure 4 This is a flowchart of step S3 in the periodic asynchronous modeling method for unmanned aerial vehicle swarms of the present invention.

[0029] Figure 5 This is a schematic diagram illustrating the solution of the target loss function in a periodic asynchronous modeling method for UAV swarms according to the present invention;

[0030] Figure 6 This is a block diagram of the periodic asynchronous modeling device for a drone swarm according to the present invention;

[0031] Figure 7 This is a schematic diagram of the architecture of an embodiment of an electronic device according to the present invention;

[0032] Figure 8 This is a schematic block diagram of an embodiment of a computer-readable storage medium according to the present invention. Detailed Implementation

[0033] To facilitate understanding of the present invention, a more detailed description is provided below with reference to the accompanying drawings and specific embodiments. Preferred embodiments of the invention are shown in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to provide a thorough and complete understanding of the disclosure of the invention.

[0034] It should be noted that, unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. The term "and / or" as used in this specification includes any and all combinations of one or more of the associated listed items.

[0035] like Figure 1 The figure shows a periodic asynchronous modeling method for unmanned aerial vehicle (UAV) swarms according to the present invention, which includes the following steps:

[0036] Step S1: Construct the first global network model and the drone ensemble.

[0037] Step S2: Broadcast the first global network model to each drone in the drone ensemble.

[0038] Step S3: Train each local model of each UAV separately to obtain the updated parameters of each local model.

[0039] Step S4: Sparsify and aggregate the update parameters of each local model to obtain the second global network model.

[0040] Step S5: Replace the first global network model with the second global network model, return to step S2, and repeat steps S2 to S4 for the first time. In this way, when repeating steps S2 to S4 for the mth time, m = 2, 3, ..., K-1, replace the m-th global network model with the (m+1)-th global network model and return to step S2. This is used to broadcast to each drone in the drone set until the target global network model is obtained.

[0041] This application, by constructing a first global network model and an ensemble of drones, effectively adapts to the diverse yet interconnected characteristics of each drone. Furthermore, after each drone in the ensemble obtains the relevant parameters of the first global network model, each drone asynchronously trains its corresponding local model, obtaining updated local model parameters. After sparsification processing of these local model updates, only a subset of important sparse parameters are uploaded to a parameter server for aggregation, while the remainder remain locally. This reduces the data transmission volume of each drone, thus reconciling the conflict between frequent model parameter exchanges during federated learning and the scarcity of wireless spectrum resources. This periodic asynchronous modeling method can construct a target global network model suitable for the characteristics of drone swarms and reconcile the practical conflict between frequent model parameter exchanges during federated learning and the scarcity of wireless spectrum resources. It solves the communication bottleneck problem while ensuring the good performance of the obtained target global network model.

[0042] For ease of description, the 1st global network model, the mth global network model, and the (m+1)th global network model will be uniformly referred to as the kth global network model. Where k = 1, 2, 3, ..., K.

[0043] It should be noted that each execution of steps S2 to S4 is a global iteration of the k-th global network model to obtain the (k+1)-th global network model, until the last (K-th) global iteration, at which point the target global network model is obtained.

[0044] The following is combined Figures 1 to 8 The present application will be further described in detail with reference to specific embodiments.

[0045] Figure 1 A flowchart illustrating the periodic asynchronous modeling method for UAV swarms provided in an embodiment of this application is shown below in detail:

[0046] Step S1: Construct the first global network model and the drone ensemble.

[0047] It should be noted that the first global network model includes multiple first global network sub-models, the drone set includes multiple drones, and each drone corresponds one-to-one with multiple first global network sub-models. Each drone also has a corresponding local model.

[0048] In this application, the first global network model is a d-dimensional parameter vector. Once the neural network model is determined, the subsequent steps mainly focus on training this model to obtain the desired global network model for the target application. The drone set includes N drones, and the corresponding drone set can be represented as... at the same time, Indicates drone The local dataset on, where |D n | represents the local dataset D n The number of samples in X i Let Y represent the i-th data sample. i For the i-th data sample X i The corresponding label is output.

[0049] It should be noted that, in practical applications, to obtain the target global network model, the corresponding loss function during the training of the first global network model can be expressed as:

[0050]

[0051] Where w represents the global network model used in one global iteration; l(w,X) i ) represents the data based on the i-th data sample X i The calculated loss function value; This represents the total amount of sample data from N drones, with a corresponding size of |D|.

[0052] Combination Figure 3 Uploading local raw data from each drone to parameter server 1 consumes significant communication resources and causes severe network latency. Furthermore, if global network model training is conducted in a centralized manner, the uploading of local raw data from each drone to parameter server 1 via wireless link poses a privacy risk. Meanwhile, in the existing federated learning paradigm, the multiple distributed participants collaboratively training the network model do not need to upload local privacy data to parameter server 1. Instead, they utilize their own computing and storage capabilities to train their local models, and then upload the updated parameters of their trained local models to parameter server 1 for aggregation. Therefore, for drones... In this regard, the first local loss function that can be used can be expressed as:

[0053]

[0054] in, This represents the local model corresponding to drone n in the k-th global iteration.

[0055] In this application, when iteratively training the local model, the first local loss function needs to be improved and a more accurate second local loss function is adopted. The details will be introduced in step S3, and will not be repeated here.

[0056] Step S2: Broadcast the first global network model to each drone in the drone ensemble.

[0057] Combination Figure 2and Figure 3 Before the first global iteration begins, parameter server 1 broadcasts the global network parameters (represented by each of the first global network sub-models) in the first global network model w1 to the drone ensemble via the downlink. The various drones in the system.

[0058] It should be noted that, due to the sufficient channel bandwidth of the downlink, the transmission rate is usually high. Therefore, the time delay of parameter server 1 broadcasting can be ignored.

[0059] Step S3: Train each local model of each UAV separately to obtain the updated parameters of each local model.

[0060] It should be noted that due to differences in computing power and the number of local dataset samples, the time required for each drone to complete a local model training varies.

[0061] In this embodiment, a drone is set up. The time required to complete one local model training is t. n ∈[t min ,t max ], where t min and t max These represent the shortest and longest time required to complete a local model training session across all drones, respectively.

[0062] Combination Figure 2 and Figure 3 Within each time period T, the parameter server 1 performs a global network model aggregation (i.e., a global iteration, which is the specific operation of steps S3 to S4 to obtain a new global network model), and all UAVs need to perform L local iterations to complete a local model training.

[0063] In this embodiment, when the drones are assembled After each UAV receives the first global network model w1, it performs the first global iteration. Meanwhile, each UAV's corresponding local model begins training to obtain updated parameters.

[0064] In this embodiment, a total of K global iterations are set, based on the local dataset D. n With its own computing and storage resources, drones Train the local model locally, and update the parameters of the local model after training is complete. After sparsification, the data is uploaded to parameter server 1; where, Indicates drone The local model update parameters corresponding to the k-th global iteration are calculated as follows:

[0065]

[0066] in, For drones In the k-th global iteration, based on the local dataset D n The updated local model is trained using its own computing and storage resources, and K is the total number of global iterations.

[0067] It should be noted that, in practice, available wireless spectrum resources are extremely scarce. Based on this, the following settings are made: Figure 3 The available wireless transmission channel bandwidth for the uplink is S. Without loss of generality, we set... This represents the set of drones that have completed local model training in the k-th global iteration. The uplink transmission uses Orthogonal Frequency Division Multiple Access (OFDMA). Each UAV in the system has equal access to the system's available wireless spectrum resources. In other words, the process of multiple UAVs uploading their corresponding local model update parameters to parameter server 1 via wireless links is independent of each other. Each drone in the system has a wireless transmission channel bandwidth available to it. in, for The number of drones in the country.

[0068] Furthermore, let the transmission power of the drone n be p. n The wireless transmission channel noise satisfies CN(0,σ) 2 The distribution is such that the uplink transmission gain is... Transmission delay constraint is In this way, in the k-th global iteration, for the drone In other words, the maximum number of bits it can upload is:

[0069]

[0070] As mentioned above, in the federated learning process, the distributed multi-UAVs need to frequently exchange model parameters with parameter server 1. However, the scarce wireless spectrum resources in reality cannot support each UAV uploading all its local model update parameters. Referring to existing federated learning work, we set it to require 32 bits to upload one local model update parameter. Therefore, in the k-th global iteration, for each UAV... In terms of the number of local model update parameters that can be uploaded. That is, it can be calculated as follows:

[0071]

[0072] As mentioned above, in the k-th global iteration, the drone The corresponding local model update parameters are It contains d parameters. However, due to limitations in available communication resources, it can currently only transmit... There are parameters, among which To address this issue, previous work on federated learning has mostly used absolute values ​​or squares as selection criteria to update parameters from the local model. Select from One parameter is uploaded to parameter server 1, and the rest... The parameters are then discarded. This sparsity treatment can indeed meet the limitations of communication resources; however, the parameters not uploaded... The parameters contain the drone Discarding the update information of the local model corresponding to the k-th global iteration will inevitably affect the performance of the newly obtained global network model.

[0073] Based on this, this invention proposes a model pruning strategy based on sparsity and error correction. Specifically, for unmanned aerial vehicles (UAVs)... Design a corresponding accumulator. To store the local model update parameters that have not been uploaded. In the k-th global iteration, when the drone... Complete local model training and obtain the corresponding local model update parameters. Then, the parameters are updated based on the determined local model. Update accumulator A n The elements in can be represented as:

[0074]

[0075] in, and A n,j These represent the local model update parameters. and accumulator A n The j-th element in the array. Then, using the absolute value as the selection criterion, only A is selected. n middle The parameters with the largest absolute values ​​(i.e., the sparse parameters updated in the local model) are uploaded to parameter server 1 to participate in the aggregation of the (k+1)th global network model; the rest... The parameters remain unchanged in the accumulator. It is worth noting that once A... n,j To upload, it is necessary to use accumulator A. n Reset A n,j For A n,j =0.

[0076] Furthermore, although the above-mentioned sparsity-based model pruning strategy can effectively solve the communication bottleneck problem, further improvements are still needed to obtain a high-performance target global network model.

[0077] Specifically, on the one hand, the data in the accumulator is updated in each global iteration, but the data in the accumulator only plays a role after reaching a certain threshold and only in that one global iteration. In previous global iterations, the data in the accumulator only accumulates the local model update parameters that have not been uploaded, and does not play any beneficial role in the training of the target global network model.

[0078] On the other hand, as mentioned above, in this invention, the drone swarm is based on a federated learning framework for periodic aggregation to collaboratively train specific network models. Due to differences in the computing power and the number of local dataset samples of each drone, the time required to complete a local model training is not the same. This may result in some drones not being able to participate in a global model aggregation for a long time. When the data in the accumulator reaches the threshold, it becomes too outdated. Uploading the accumulated values ​​of these outdated local model update parameters to parameter server 1 to participate in the aggregation of the current global network model will inevitably have a negative impact on the performance of the model.

[0079] Based on this, this application proposes a sparse learning method based on regularized sparse correction. By constructing a new regularization term specific to each UAV in each global iteration, the untransmitted local model update parameters are constrained to the local model training process in each global iteration, thereby continuously optimizing the performance of the trained global network model.

[0080] like Figure 5 As shown, in the k-th global iteration, the UAV is further optimized. The corresponding second local loss function is:

[0081]

[0082] Among them, Z kn This indicates the addition of a drone-specific feature in the k-th global iteration. The regularization term; (1-γ) represents the first local loss function. The weight coefficient; γ represents its corresponding weight coefficient in the second local loss function.

[0083] As mentioned above, the regularization term Z kn The introduction of this approach aims to enable the proposed federated learning method to overcome the obsolescence effect while addressing the communication bottleneck problem. Based on this, Z is designed... kn for:

[0084]

[0085] in, In the k-th global iteration, the drone... local model The j-th element; w k,j The global network model w represents the global broadcast in the k-th global iteration. k The j-th element; A n,j Indicates accumulator A n The j-th element; r n,j Let Z represent the hyperparameters of the design. Clearly, for any k-th global iteration, since Z... kn With the increase of drones When training a local model The update is not only affected by the global network model parameters w k,j The effect is also affected by accumulator A. n Element A in n,j The effect, i.e., accumulator A n The data in the local model is continuously optimized and updated in each global iteration.

[0086] It is worth noting that this application designs the regularization term Z. kn The initial intention was to utilize the valuable information contained in the update parameters of local models that have not been uploaded to optimize the training of local models. However, the current Z... kn However, it acts on accumulator A n All elements in A. As mentioned above, once A n,j To upload, it is necessary to use accumulator A. n Reset A n,j For A n,j =0, while when A n,j When = 0, the regularization term Z kn Just for:

[0087]

[0088] It is obvious that adding such a regularization term would only bring additional computational burden without producing any beneficial effect. Therefore, to ensure that the designed regularization term only applies to the accumulator A... n Further optimize the regularization term Z for parameters not uploaded in the data. kn for:

[0089]

[0090] Where Ma is the designed mask function, specifically defined as:

[0091]

[0092] In this way, the added regularization term Z kn It only applies to accumulator A. n The cumulative values ​​of update parameters for those local models that were not uploaded.

[0093] As mentioned above, due to communication resource limitations, only a portion of the parameters in the accumulator are uploaded to parameter server 1 to participate in the aggregation of the current global network model; the rest remain locally. In other words, the aggregation of the global network model actually only considers the updated parameters of the locally uploaded model. Therefore, the added regularization term Z... kn This can also be understood as compensating for the sparsity by using the accumulated values ​​of the local model update parameters that have not been uploaded in the accumulator. Based on this, we set... Let r represent the set of drones that uploaded the j-th (1≤j≤d) local model update parameters in the k-th global iteration. n,j It can be designed as:

[0094]

[0095] Furthermore, The complete expression is:

[0096]

[0097] In this way, the untransmitted local model update parameters can constrain the local model training process in each global iteration, thereby continuously optimizing the performance of the trained global network model.

[0098] It's worth noting that each drone's accumulator is updated only once in a single global iteration, meaning the added regularization term remains constant across all global iterations. In this way, if a drone... Local model training requires L local iterations, and the initial L iterations... n The local iteration training may have already compensated for the parameters of the local model that were not uploaded. If subsequent LL training... n The next iteration of training is still based on Training will limit The value is always close to w k,j +r n,j A n,j This leads to incorrect local model updates. Therefore, in the k-th global iteration, for the drone... In this regard, the local target loss function used during its U-th local iteration training is set. for:

[0099]

[0100] Where U represents the U-th local iteration training; L n This represents the local iteration threshold of the local model corresponding to drone n; This represents the first local loss function; This indicates that the first local loss function is optimized using a regularization term. The second local loss function is then obtained.

[0101] Furthermore, in the first global iteration, k=1, the updated parameters of each local model are closely related to the second global network model.

[0102] Combination Figure 2 and Figure 4 Specifically, step S3 includes the following sub-steps:

[0103] Step S31: Use regularization error correction to train local models for each local model.

[0104] Step S32: Determine whether each local model has completed local model training within one time period. If each local model has completed local model training within one time period, proceed to step S33; if each local model has not completed local model training within one time period, return to step S31.

[0105] Step S33: Obtain the update parameters for each local model.

[0106] In this application, considering the differences in computing and storage capabilities and the number of local dataset samples among the drones in the drone swarm, as well as the complex flight environment in reality and the real-time update requirements of the trained network model, each drone is trained asynchronously within one time period corresponding to a global iteration, which can adapt to the characteristics of drone swarms.

[0107] Step S4: Sparsify and aggregate the update parameters of each local model to obtain the second global network model.

[0108] It should be noted that in previous federated learning work, all local model update parameters could be uploaded to parameter server 1 to participate in the aggregation of the current global network model. However, this could not meet the constraints of communication resources in reality and reconcile the contradiction between frequent model parameter exchanges and scarce wireless spectrum resources during federated learning. Therefore, in this application, before uploading the local model update parameters obtained in step S3 to parameter server 1, the local model update parameters of each UAV were sparsified. After sparsification, only some important local model parameters were uploaded to parameter server 1, while the rest remained in the local accumulator.

[0109] Taking the k-th global iteration as an example, after the local model training is completed, Chinese drones The corresponding accumulator Update parameters of the obtained local model Update accordingly. Then, based on the total communication resources S of the entire federated learning system and the set of drones that completed local model training in the k-th global iteration... Determine the drone Available sub-communication resources (number of bits that can be uploaded)

[0110] Furthermore, based on the actual available sub-communication resources Calculations were made for each drone The number of parameters that can be uploaded (parameter threshold) Finally, based on the absolute value, the updated accumulator... Select from These parameters are uploaded to parameter server 1. Each parameter can be defined as a sparse parameter for local model updates.

[0111] In this application, before uploading the local model update parameters of each UAV to parameter server 1, they are sparsified to obtain sparse local model update parameters that can be uploaded to parameter server 1. Then, uploading the sparse local model update parameters to parameter server 1 can reduce the amount of data transmitted by each UAV, thereby reconciling the contradiction between frequent model parameter exchanges and scarce wireless spectrum resources in federated learning. At the same time, an accumulator is designed to store the untransmitted local model update parameters, which can make up for the error loss caused by sparsification.

[0112] In this embodiment, after receiving the local model update sparse parameters corresponding to each UAV, parameter server 1 aggregates and generates global network model update parameters:

[0113]

[0114] Where, α n Update sparse parameters for local model The corresponding weight size.

[0115] Furthermore, the parameter e is updated based on the determined global network model. k The global network model w can be obtained. k+1 for:

[0116] w k+1 =w k +e k .

[0117] Then, in step S5, parameter server 1 can generate the global network model w k+1 Broadcast to drones This will initiate the next round of global iteration.

[0118] Step S5: Replace the first global network model with the second global network model, return to step S2, and repeat steps S2 to S4 for the first time. In this way, when repeating steps S2 to S4 for the mth time, m = 2, 3, ..., K-1, replace the m-th global network model with the (m+1)-th global network model and return to step S2. This is used to broadcast to each drone in the drone set until the target global network model is obtained.

[0119] In this embodiment, after obtaining the second global network model, the second global iteration is performed, that is, the first global network model is replaced with the second global network model, and the specific operations of steps S2-S4 are performed to obtain the third global network model; and so on, until the Kth global iteration is performed, the target global network model can be obtained.

[0120] In this application, within a time period corresponding to one global iteration, each UAV asynchronously trains its local model. If UAV n completes the training of its corresponding local model within the time period [(k-1)T, kT], then in the k-th (1≤k≤K) global iteration, it uploads the corresponding local model to update the sparse parameters. If the training fails, the parameter is sent to parameter server 1; otherwise, training continues until the corresponding local model is trained. This periodic asynchronous modeling method can construct a target global network model suitable for the characteristics of UAV swarms and reconcile the practical contradiction between frequent model parameter exchanges in federated learning and scarce wireless spectrum resources. It can solve the communication bottleneck problem while ensuring good performance of the obtained target global network model.

[0121] Based on the same inventive concept, such as Figure 6 As shown, the present invention also provides a periodic asynchronous modeling device for unmanned aerial vehicle (UAV) swarms, the device comprising:

[0122] The model building unit 101 is used to build a first global network model and a drone set; the first global network model includes multiple first global network sub-models, and the drone set includes multiple drones, with each drone corresponding to one of the multiple first global network sub-models.

[0123] The distribution unit 102 is used to broadcast the first global network model to each drone in the drone set.

[0124] The model training unit 103 is used to train each local model of each UAV using the plurality of first global network sub-models to obtain update parameters for each local model.

[0125] The model update unit 104 is used to sparsify and aggregate the update parameters of each local model to obtain the second global network model.

[0126] Furthermore, the model update unit 104 is also used to replace the first global network model in the distribution unit 102 with the second global network model, so that the distribution unit 102, the model training unit 103, and the model update unit 104 are also used to repeatedly perform the corresponding operation for the first time based on the second global network model, and so on. When the distribution unit 102, the model training unit 103, and the model update unit 104 repeatedly perform the corresponding operation for the mth time, m = 2, 3, ..., K-1, the corresponding model update unit 104 is also used to replace the mth global network model in the distribution unit 102 with the (m+1)th global network model, and the distribution unit 102 broadcasts the (m+1)th global network model to each UAV in the UAV set until the target global network model is obtained.

[0127] In this application, the other technical features of the aforementioned periodic asynchronous modeling device for unmanned aerial vehicle swarms are the same as those disclosed in the above method embodiments, and will not be repeated here.

[0128] Based on the same inventive concept, this application also provides an electronic device, which includes a processor, a memory, and a communication circuit, wherein the processor is connected to the memory and the communication circuit respectively; wherein the communication circuit is used for communication connection, the memory is used to store a computer program, and the processor is used to execute the computer program to implement the above method.

[0129] Please see Figure 7 The electronic device described in this application embodiment may specifically include a processor 210 and a memory 220. The memory 220 is coupled to the processor 210.

[0130] Processor 210 is used to control the operation of electronic devices. Processor 210 can also be referred to as a CPU (Central Processing Unit). Processor 210 may be an integrated circuit chip with signal processing capabilities. Processor 210 can also be a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor, or processor 210 can be any conventional processor.

[0131] Memory 220 is used to store computer programs and may be RAM, ROM, or other types of storage terminals. Specifically, memory 220 may include one or more computer-readable storage media, which may be non-transitory or transient. Memory 220 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage terminals or flash memory terminals. In some embodiments, the non-transitory computer-readable storage media in memory 220 is used to store at least one line of program code.

[0132] The processor 210 is used to execute computer programs stored in the memory 220 to implement the methods described in the various method embodiments of this application.

[0133] In some embodiments, the electronic device may further include: a peripheral terminal interface 230 and at least one peripheral terminal. The processor 210, memory 220, and peripheral terminal interface 230 can be connected via a bus or signal line. Each peripheral terminal can be connected to the peripheral terminal interface 230 via a bus, signal line, or circuit board. Specifically, the peripheral terminal includes at least one of: a radio frequency circuit 240, a display screen 250, an audio circuit 260, and a power supply 270.

[0134] The peripheral terminal interface 230 can be used to connect at least one I / O (Input / Output) related peripheral terminal to the processor 210 and the memory 220. In some embodiments, the processor 210, memory 220 and peripheral terminal interface 230 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 210, memory 220 and peripheral terminal interface 230 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.

[0135] The radio frequency (RF) circuit 240 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 240 communicates with communication networks and other IoT devices via electromagnetic signals; it is the communication circuit of the electronic device. The RF circuit 240 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. Optionally, the RF circuit 240 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, an operator identification module card, etc. The RF circuit 240 can communicate with other terminals through at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 240 may also include circuitry related to NFC (Near Field Communication), which is not limited in this application.

[0136] Display screen 250 is used to display a UI (User Interface). This UI may include graphics, text, icons, videos, and any combination thereof. When display screen 250 is a touch display screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 210 for processing. In this case, display screen 250 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display screen 250, located on the front panel of the electronic device; in other embodiments, there may be at least two display screens, respectively located on different surfaces of the electronic device or in a folded design; in still other embodiments, display screen 250 may be a flexible display screen, located on a curved or folded surface of the electronic device. Furthermore, display screen 250 may be configured as a non-rectangular, irregular shape, i.e., a non-rectangular screen. Display screen 250 may be made of materials such as LCD (Liquid Crystal Display) or OLED (Organic Light-Emitting Diode).

[0137] The audio circuit 260 may include a microphone and a speaker. The microphone is used to collect sound waves from the operator and the environment, converting the sound waves into electrical signals that are input to the processor 210 for processing, or input to the radio frequency circuit 240 for voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each positioned in a different part of the electronic device. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert electrical signals from the processor 210 or the radio frequency circuit 240 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 260 may also include a headphone jack.

[0138] Power supply 270 is used to supply power to various components in an electronic device. Power supply 270 can be alternating current, direct current, a disposable battery, or a rechargeable battery. When power supply 270 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged via a wired line, while a wireless rechargeable battery is a battery that is charged via a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0139] For a detailed description of the functions and execution processes of each functional module or component in the electronic device embodiments of this application, please refer to the descriptions in the above-described method embodiments of this application, which will not be repeated here.

[0140] In the embodiments provided in this application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the embodiments of the electronic devices described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0141] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0142] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0143] Based on the same inventive concept, this application also provides a computer-readable storage medium storing a computer program that can be executed by a processor to implement the above-described method.

[0144] Please see Figure 8 If the integrated units described above are implemented as software functional units and sold or used as independent products, they can be stored in computer-readable storage medium 300. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions / computer programs to cause an Internet of Things device (which may be a personal computer, server, or network terminal, etc.) or processor to execute all or part of the steps of the methods of various embodiments of this application. The aforementioned storage medium includes various media such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, as well as electronic terminals such as computers, mobile phones, laptops, tablets, and cameras that have the aforementioned storage media.

[0145] The description of the execution process of program data in a computer-readable storage medium can be found in the descriptions in the various method embodiments of this application above, and will not be repeated here.

[0146] Therefore, this invention discloses a periodic asynchronous modeling method, apparatus, device, and medium for UAV swarms. The method includes the following steps: First, constructing a first global network model and a UAV set; Second, broadcasting the first global network model to each UAV in the UAV set; Third, training each UAV's local model to obtain update parameters for each local model; Fourth, sparsifying and aggregating the update parameters of each local model to obtain a second global network model; Fifth, replacing the first global network model with the second global network model and returning to step two. This process is repeated for the first time, and so on. When repeating steps two to four for the mth time (m = 2, 3, ..., K-1), the (m+1)th global network model is used to replace the mth global network model, and the process returns to step two until the target global network model is obtained. This periodic asynchronous modeling method can construct a target global network model adapted to the characteristics of UAV swarms and reconcile the practical contradiction between frequent model parameter exchanges and scarce wireless spectrum resources in federated learning. It solves the communication bottleneck problem while ensuring the good performance of the obtained target global network model.

[0147] The above are merely embodiments of the present invention and do not limit the scope of protection of the present invention. Any equivalent structural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are included within the scope of protection of the present invention.

Claims

1. A periodic asynchronous modeling method for unmanned aerial vehicle (UAV) swarms, characterized in that, The method includes the following steps: The first step is to construct a first global network model and an ensemble of drones; the first global network model includes multiple first global network sub-models, and the ensemble of drones includes multiple drones, with each drone corresponding one-to-one with one of the multiple first global network sub-models; The second step is to broadcast the first global network model to each drone in the drone set; The third step involves training each local model of each UAV using the multiple first global network sub-models to obtain update parameters for each local model. This includes: training each local model using regularized error correction; determining whether each local model has completed local model training within a time period; if each local model has completed local model training within a time period, obtaining update parameters for each local model; if each local model has not completed local model training within a time period, returning to the step of training each local model using regularized error correction. The fourth step is to sparsify and aggregate the update parameters of each local model to obtain the second global network model. Fifth step: Replace the first global network model with the second global network model, return to the second step, and repeat steps two through four for the first time, and so on. When repeating for the mth time... , K For the total number of global iterations, the corresponding number of iterations is... The global network model replaces the m-th global network model and returns to the second step, which is used to broadcast to each drone in the drone set until the target global network model is obtained.

2. The periodic asynchronous modeling method according to claim 1, characterized in that, The step of training each local model using regularized error correction includes: Using the local target loss function, the local model corresponding to each UAV is trained multiple times in a local iteration; among which, in the first iteration... In the nth global iteration, the drone... During the local iteration training, the local target loss function used is: ; in, ; Indicated in the first The local model corresponding to the UAV n in the global iteration; U represents the U-th local iteration training; This represents the local iteration threshold of the local model corresponding to the drone n; This represents the first local loss function; This indicates that the first local loss function is optimized using a regularization term. The second local loss function is then obtained, and the second local loss function It can be represented as: ; in, This represents the regularization term; Represents the first local loss function Weighting coefficients; Represents the regularization term The weighting coefficients.

3. The periodic asynchronous modeling method according to claim 2, characterized in that, The regularization term It can be represented as: ; in, Represents the mask function, and ; Indicates the first In the next global iteration, the drone local model The One element; Indicates the first The 1st global iteration broadcast The first global network model One element; ; Indicates drone The accumulator stores the first One element; Denotes hyperparameters, and the hyperparameters for: ; in, Indicates the first The first global iteration uploaded A collection of drones whose local model updates parameters; Indicates drone The number of samples in the local dataset; Indicates drone The number of samples in the local dataset.

4. The periodic asynchronous modeling method according to claim 1, characterized in that, The step of sparsifying the update parameters of each local model includes: Based on the total communication resources and a set of UAVs that have completed local model training within a time period, the sub-communication resources available to each UAV are determined. Based on the sub-communication resources, the number of parameters that each UAV can upload is calculated as the parameter threshold; Select parameters from the local model update parameters whose number equals the parameter threshold as the local model update sparse parameters.

5. The periodic asynchronous modeling method according to claim 4, characterized in that, The method further includes: Based on each UAV, set up accumulators for storing model parameters of each local model; The accumulators are used to store the update parameters of each local model.

6. The periodic asynchronous modeling method according to claim 5, characterized in that, While aggregating the updated sparse parameters of the various local models, the process also includes: Set all local model update sparse parameters stored in each accumulator to 0, and save the remaining parameters in each local model update parameter in each accumulator.

7. A periodic asynchronous modeling device for unmanned aerial vehicle (UAV) swarms, characterized in that, The device includes: A model building unit is used to build a first global network model and a drone set; the first global network model includes multiple first global network sub-models, and the drone set includes multiple drones, with each drone corresponding to one of the multiple first global network sub-models. The distribution unit is used to broadcast the first global network model to each drone in the drone set; The model training unit is used to train the local models of each UAV using the plurality of first global network sub-models to obtain update parameters for each local model; including: training each local model using regularized error correction; determining whether each local model has completed local model training within a time period; if each local model has completed local model training within a time period, obtaining update parameters for each local model; if each local model has not completed local model training within a time period, returning to the step of training each local model using regularized error correction. The model update unit is used to sparsify and aggregate the update parameters of each local model to obtain a second global network model. The model update unit is also used to replace the first global network model in the distribution unit with the second global network model. This allows the distribution unit, the model training unit, and the model update unit to repeatedly perform the corresponding operations for the first time based on the second global network model, and so on. When the distribution unit, the model training unit, and the model update unit repeatedly perform the corresponding operations for the m-th time... , K The total number of global iterations corresponds to the model update unit, which is also used to use the first iteration. The global network model replaces the m-th global network model in the distribution unit, and the distribution unit then distributes the m-th global network model. The global network model is broadcast to each drone in the drone set until the target global network model is obtained.

8. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the method as claimed in any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Federal learning differential privacy protection method based on model difference sparsification

    CN115146313A