Unmanned aerial vehicle assisted federated learning optimization method and device based on BCD

By constructing a system utility function and decomposing it into multiple optimization sub-problems, and solving them using a specific algorithm, UAV-assisted federated learning is optimized. This solves the problem of unreasonable resource allocation in UAV-assisted federated learning and achieves efficient, low-cost, and safe maximization of system utility.

CN122160799APending Publication Date: 2026-06-05NANJING UNIV OF POSTS & TELECOMM

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NANJING UNIV OF POSTS & TELECOMM
Filing Date
2026-03-03
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing drone-assisted federated learning solutions fail to effectively consider the impact of eavesdroppers on communication security, the impact of the number of users on model generalization performance, and fail to optimize local accuracy and resource allocation, resulting in unreasonable bandwidth allocation and making it difficult to achieve the requirements of high efficiency, low power consumption, and security.

Method used

The system utility function maximization problem is constructed and decomposed into subproblems of local accuracy optimization, user computing and communication resource optimization, and UAV position optimization. The Brent method, convex optimization tools, and continuous convex approximation methods are used alternately to solve the problem and optimize UAV-assisted federated learning.

Benefits of technology

While ensuring the accuracy and efficiency of federated learning, we aim to maximize system utility, reduce total latency and energy consumption, and improve system security and resource utilization efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122160799A_ABST
    Figure CN122160799A_ABST
Patent Text Reader

Abstract

The application discloses a BCD-based unmanned aerial vehicle auxiliary federated learning optimization method and device, and belongs to the technical field of wireless communication; the method comprises the following steps: constructing a system utility function maximization problem, and decomposing the system utility function maximization problem into a local precision optimization sub-problem, a user calculation and communication resource optimization sub-problem and an unmanned aerial vehicle position optimization sub-problem; the Brent method is used to solve the local precision optimization sub-problem, the convex optimization solving tool is used to solve the user calculation and communication resource optimization sub-problem, and the continuous convex approximation method is used to solve the unmanned aerial vehicle position optimization sub-problem; and the three optimization sub-problems are solved alternately to obtain the optimal solution of the local precision, the user calculation and communication resource and the unmanned aerial vehicle position. Therefore, the total time delay and the total energy consumption can be effectively reduced, and the system utility can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of wireless communication technology, specifically relating to a method and apparatus for optimizing unmanned aerial vehicle-assisted federated learning based on BCD. Background Technology

[0002] Federated learning is widely used in multi-user scenarios due to its advantage of "data not leaving the local area". It solves the problems of data privacy and data silos by training users locally, uploading and aggregating models, and distributing and iterating global models.

[0003] Due to their flexible deployment, drones are often used as aerial aggregation nodes in this scenario. However, existing optimization solutions have many bottlenecks. For example, they do not consider the existence of eavesdroppers, and the presence of multiple ground eavesdroppers can exacerbate the security risks of user communication within the coverage area. They do not consider the impact of the number of users participating in training on the generalization performance of federated learning models. When the number of users is insufficient, the model's generalization performance is poor. They do not consider the optimization of local accuracy. In existing technologies, the optimization of total bandwidth allocation and user training CPU frequency is mostly done independently, without being combined with local accuracy adjustment. Furthermore, they do not consider the cumulative effect of latency and energy consumption under global iteration, resulting in unreasonable bandwidth allocation and excessively high or low CPU frequency settings that fail to achieve a balance between efficiency and energy consumption, making it difficult to meet the requirements of high efficiency, low power consumption, and security. Summary of the Invention

[0004] To address the shortcomings of existing technologies, the present invention aims to provide a method and apparatus for optimizing unmanned aerial vehicles (UAVs) assisted federated learning based on BCD, thereby solving the problems in existing technologies.

[0005] The objective of this invention can be achieved through the following technical solutions: The BCD-based UAV-assisted federated learning optimization method includes the following steps: The system utility function maximization problem is constructed and decomposed into local accuracy optimization subproblems, user computing and communication resource optimization subproblems, and UAV position optimization subproblems. The Brent method is used to solve the local accuracy optimization subproblem, the convex optimization tool is used to solve the user computing and communication resource optimization subproblem, and the continuous convex approximation method is used to solve the UAV position optimization subproblem. By alternately solving the three optimization subproblems, the optimal solutions for local accuracy, user computing and communication resources, and UAV position are obtained.

[0006] Furthermore, the systems to which this optimization method is applied include: a drone, ground users and One eavesdropper; ground users possess training data and are capable of local training for federated learning, while drones are used to aggregate models; the drone first initializes a global model, then distributes the global model to the ground users it covers. After receiving the model, the ground users perform local training. Once training is complete, they transmit the local model to the drone using frequency division multiple access. After waiting for all ground users to transmit their models, the drone performs weighted aggregation of the collected local models. Through multiple rounds of local training and model aggregation, the training of the federated learning model is completed.

[0007] Furthermore, the system utility function maximization problem is defined as P1: , In the formula, C1 restricts the location of the drone, which must not exceed the area studied in this invention; C2 is the total bandwidth limit; and C3 restricts the ground user... The training CPU frequency, C4 limits the accuracy of the local model, C5 is the limit for the total latency of federated learning, and C6 limits the ground user's latency. Maximum transmission distance with drones; The horizontal position of the drone. For users bandwidth, For users Training CPU frequency, For local model accuracy, For the number of effective users, The effective user set is defined as the number of users with a security capacity greater than 0 who are within the drone's coverage area. For ground user IDs, the value range is 1- , Number the drone. This represents the global iteration count. For users in a round of global iteration Total latency, For users in a round of global iteration Local training energy consumption, For users in a round of global iteration Transmission energy consumption, and These represent the degree of importance the system model places on latency and energy consumption, respectively. and These represent the maximum x-coordinate and maximum y-coordinate of the drone, respectively. Indicates the total system bandwidth. and Representing users respectively The minimum and maximum training CPU frequencies, For users in a round of global iteration Local training latency, For users in a round of global iteration Transmission delay, This represents the maximum total system delay. For users To drones The straight-line distance This represents the maximum communication distance for the drone.

[0008] Furthermore, the local precision optimization subproblem is defined as P3: The user computing and communication resource optimization subproblem is defined as P4: The UAV position optimization subproblem is defined as P5: .

[0009] Furthermore, the steps for solving the local precision optimization subproblem P3 using the Brent method include: S211, Calculate constant coefficients , , , Golden ratio Enter S212; S212, Variable Substitution Enter S213; S213, Initialization Step size step=0.1, enter S214; S214, if and If all conditions are met, proceed to S215; otherwise, proceed to S2111. S215, order ,judge If the condition is met, proceed to S214; otherwise, proceed to S216. S216, Initialize 3 points , , , , When the iteration count num=0, proceed to S217; S217, if ,but ,otherwise Enter S218; S218, Calculation ,like If the condition is met, proceed to S218; otherwise, proceed to S2110. S219, , Enter S2110; S2110, if ,but ,otherwise Enter S214; S2111, Calculation , ; in, , and These represent loss functions that are L-Lipschitz continuous and... Strongly convex functions , This indicates the energy consumption coefficient of the CPU. , For global training accuracy, For deep learning hyperparameters, satisfy , For users The number of CPU cycles required to calculate each bit of data. For users The amount of training data, For users The CPU frequency during training Indicates the size of the transmission model. Indicates the safe capacity for ground users. For ground users To drones transmission rate, For ground users To the eavesdropper transmission rate , .

[0010] Furthermore, the process of solving the user computation and communication resource optimization subproblem P4 using convex optimization tools includes: Optimization is performed only for users with positive security capacity. The optimal bandwidth allocation is obtained by using the MOSEK or SCS solver of Python's cvxpy algorithm. and training CPU frequency .

[0011] Furthermore, the process of solving the UAV position optimization subproblem P5 using the continuous convex approximation method includes the following steps: S231, Introducing auxiliary variables ,but It is about Convex functions, and add constraints. ; S232, write constraint C9 in second-order cone form ; S233, Proof It is about convex functions; S234, order By using the first-order Taylor expansion method, we obtain The approximate linear expression, ; S235, approximating the objective function as... The problem P5 is transformed into a convex optimization subproblem, which is solved using the second-order cone programming solver ECOS in Python. The optimal UAV position is obtained through continuous convex approximation iterative solving. ; in, For ground users coordinates For drones Horizontal coordinates The hovering altitude of the drone. , For ground users The transmission power.

[0012] Furthermore, the alternating solution process includes: Step 1, Initialization: , , Number of iterations Accuracy ; Step 2, Fix , , Calculate the optimal solution for P5. and ; Step 3, if and If all conditions are met, proceed to step 4; otherwise, proceed to step 8. Step 4, Fix , , Calculate the optimal solution for P4. , ; Step 5, Fix , , Calculate the optimal solution for P3. , ; Step 6, Fix , , Calculate the optimal solution for P5. and , ; Step 7, Proceed to step 3; Step 8, Output , , , .

[0013] The BCD-based UAV-assisted federated learning optimization device executes the above method, including: Problem building module: Constructs the system utility function maximization problem and decomposes it into local accuracy optimization sub-problems, user computing and communication resource optimization sub-problems, and UAV position optimization sub-problems; Problem-solving module: The Brent method is used to solve the local accuracy optimization subproblem, the convex optimization tool is used to solve the user computing and communication resource optimization subproblem, and the continuous convex approximation method is used to solve the UAV position optimization subproblem; and by alternately solving the three optimization subproblems, the optimal solutions for local accuracy, user computing and communication resources, and UAV position are obtained.

[0014] A computer storage medium storing a readable program that, when executed, instructs a computing device to perform the BCD-based UAV-assisted federated learning optimization method described above.

[0015] The beneficial effects of this invention are: 1. This invention constructs a model of a drone-assisted federated learning system. The system consists of a drone, ground users and The system consists of several eavesdroppers. Users possess training data and can perform local training for federated learning, while drones are used to aggregate the model. Due to the limited coverage of drones, they cannot simultaneously cover all users. Under the constraints of global model accuracy and total training latency, an optimization problem is established to maximize the system utility function. This system can maximize system utility while ensuring the accuracy and efficiency of federated learning.

[0016] 2. This invention proposes a joint optimization method for local accuracy, user computing and communication resources, and UAV position. Since the original problem is a non-convex optimization problem, this invention decomposes it into three optimization subproblems based on the BCD method. The local accuracy optimization subproblem is solved using the Brent method. The user computing and communication resource subproblem is a convex optimization problem and is solved directly using the cvxpy solver in Python. The UAV position optimization subproblem is solved using a continuous convex approximation method. Thus, the original non-convex optimization problem is transformed into a convex optimization problem, which is easier to solve.

[0017] 3. The present invention ultimately obtains the optimal solution for local accuracy, user computing and communication resources, and UAV position through global iteration, thereby effectively reducing total latency and total energy consumption and improving system efficiency. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a flowchart illustrating the unmanned aerial vehicle-assisted federated learning optimization method based on BCD of the present invention. Figure 2 This is a schematic diagram of the system model corresponding to the BCD-based UAV-assisted federated learning optimization method of the present invention; Figure 3 This is a schematic diagram of the total latency simulation of the BCD-based UAV-assisted federated learning optimization method of the present invention under different comparison methods; Figure 4 This is a schematic diagram of the total energy consumption simulation of the BCD-based UAV-assisted federated learning optimization method of the present invention under different comparison methods; Figure 5 This is a schematic diagram simulating the system utility of the BCD-based UAV-assisted federated learning optimization method of the present invention under different comparison methods; Figure 6 This is a schematic diagram simulating the total latency of the UAV-assisted federated learning optimization method based on BCD in this invention under different numbers of eavesdroppers. Figure 7 This is a schematic diagram simulating the total energy consumption of the drone-assisted federated learning optimization method based on BCD of the present invention under different numbers of eavesdroppers. Figure 8 This is a schematic diagram simulating the system utility of the UAV-assisted federated learning optimization method based on BCD of the present invention under different numbers of eavesdroppers. Figure 9This is a schematic diagram simulating the total latency of the UAV-assisted federated learning optimization method based on BCD at different UAV altitudes according to the present invention. Figure 10 This is a schematic diagram simulating the total energy consumption of the UAV-assisted federated learning optimization method based on BCD at different UAV altitudes according to the present invention. Figure 11 This is a schematic diagram simulating the system utility of the UAV-assisted federated learning optimization method based on BCD of the present invention at different UAV altitudes. Figure 12 The diagram shown illustrates the total latency simulation of the UAV-assisted federated learning optimization method based on BCD under different weight parameters. Figure 13 This is a schematic diagram simulating the total energy consumption of the UAV-assisted federated learning optimization method based on BCD under different weight parameters according to the present invention. Figure 14 This is a schematic diagram simulating the system utility of the UAV-assisted federated learning optimization method based on BCD under different weight parameters. Detailed Implementation

[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0021] Example 1 like Figure 2 As shown, the system applied to the BCD-based UAV-assisted federated learning optimization method includes: a UAV, ground users and An eavesdropper, a ground user Horizontal position The eavesdropper's coordinates are indicated as follows: drones Horizontal position It indicates that they are all distributed in the region. Drones at a fixed safe altitude Hover over the target area to aggregate local models uploaded by ground users.

[0022] The various model mechanisms and specific formulas involved in this embodiment are as follows: 1. Federated Learning: Ground users possess training data and are capable of local training for federated learning, while drones are used to aggregate models. The drone first initializes a global model and then distributes the global model to the ground users it covers. After receiving the model, the ground users use their data for local training. After training is complete, the local model is transmitted to the drone using frequency division multiple access. After waiting for all users to transmit their models, the drone performs weighted aggregation of the collected local models. Through multiple rounds of local training and model aggregation, the training of the federated learning model is completed.

[0023] 2. Security User Selection: Ground users With drones The distance can be expressed as: Ground users With eavesdroppers The distance can be expressed as: Only ground users within the drone's coverage area can communicate with the drone and participate in federated learning. The distance between the user and the drone must meet the following conditions: in, This represents the maximum transmission distance between ground users and drones. Ground users To drones The channel gain is: in, For reference distance of 1 meter, ground users To drones The magnitude of channel gain, This is the path loss index.

[0024] Ground users To the eavesdropper The channel gain is: in, For reference distance of 1 meter, ground users To the eavesdropper The magnitude of channel gain, This is the path loss index.

[0025] Ground users To drones The transmission rate (in bits per second) is: in, For users bandwidth, For users The transmission power, For users To drones Gaussian white noise power.

[0026] Ground users To the eavesdropper The transmission rate (in bits per second) is: in, For ground users To the eavesdropper Gaussian white noise power.

[0027] Since there are multiple ground-based eavesdroppers, and each eavesdropper will affect ground users, this embodiment only considers the distance from the user for ease of calculation. The impact of recent eavesdropping incidents, and the security capacity of ground users: in, If the safety capacity of a ground user is not zero, then the user is a valid user and can participate in federated learning training; if the safety capacity of a ground user is zero, then the user is an invalid user and will not participate in federated learning training. Let the number of valid users within the drone's coverage area be denoted as . The user set is .

[0028] 3. Computation and Transmission Model: loss function The function is L-Lipschitz continuous and Strongly convex functions achieve local precision. The minimum number of local iterations required is: Where L is the Lipschitz constant. .

[0029] Achieve global precision The minimum number of global model iterations required is: in, For deep learning hyperparameters, satisfy .

[0030] (1) Delay user The local training latency in a single global iteration is: in, For ground users The number of CPU cycles required to calculate each bit of data. For ground users The amount of training data, For ground users The CPU frequency used for training.

[0031] user The model upload latency in one round of global iteration is: in, Indicates the size of the transmission model.

[0032] Ground users The total latency in a single global iteration consists of its local training latency and its transmission latency, and can be expressed as: Employing synchronous federated learning, in each global iteration, the drone needs to wait for all users under its coverage to complete model transmission before performing unified aggregation. Due to the high-performance computing capabilities of the central server and the strong transmission capabilities of the drone, the time required for global aggregation and broadcasting is negligible. Therefore, the latency of each round is the maximum total latency for ground users. The total delay for completing federated learning is: (2) Energy consumption user The energy consumption of local training in one round of global iteration is: in, This indicates the energy consumption coefficient of the CPU.

[0033] user The energy consumption for model uploading in one round of global iteration is: The total energy consumption for all users under drone coverage to complete federated learning consists of the training energy consumption of ground users and the transmission energy consumption, which can be expressed as: Example 2 Based on the above system, this embodiment proposes a UAV-assisted federated learning optimization method based on BCD (Block Coordinate Descent, an optimization algorithm mainly used to solve convex optimization problems. Its basic idea is to decompose a complex optimization problem into several relatively simple subproblems, solve these subproblems one by one, and finally combine the solutions of the subproblems to obtain the solution of the original problem). Figure 1 As shown, it includes the following steps: S1. Construct the system utility function maximization problem and decompose it into local accuracy optimization sub-problem, user computing and communication resource optimization sub-problem, and UAV position optimization sub-problem; The optimization problem of the system utility function is defined as P1, the optimization problem of the simplified system utility function is defined as P2, the local accuracy optimization subproblem is defined as P2, the user computing and communication resource optimization subproblem is defined as P3, and the UAV position optimization subproblem is defined as P4. The expression for P1 is as follows: , In the formula, C1 restricts the location of the drone, which must not exceed the area studied in this invention; C2 is the total bandwidth limit; and C3 restricts the ground user... The training CPU frequency, C4 limits the accuracy of the local model, C5 is the limit for the total latency of federated learning, and C6 limits the ground user's latency. Maximum transmission distance with drones; in, The horizontal position of the drone. For users bandwidth, For users Training CPU frequency, For local model accuracy, For the number of effective users, The effective user set is defined as the number of users with a security capacity greater than 0 who are within the drone's coverage area. For ground user IDs, the value range is 1- , Number the drone. This represents the global iteration count. For users in a round of global iteration Total latency, For users in a round of global iteration Local training energy consumption, For users in a round of global iteration Transmission energy consumption, and These represent the degree of importance the system model places on latency and energy consumption, respectively. and These represent the maximum x-coordinate and maximum y-coordinate of the drone, respectively. Indicates the total system bandwidth. and Representing users respectively The minimum and maximum training CPU frequencies, For users in a round of global iteration Local training latency, For users in a round of global iteration Transmission delay, This represents the maximum total system delay. For users To drones The straight-line distance This represents the maximum communication range for the drone. Because the objective function in P1 contains Therefore, auxiliary variables are introduced. And add constraint C7 Therefore, problem P1 can be simplified to P2, and the expression for P2 is as follows: , The P3 expression is as follows: , The P4 expression is as follows: , The P5 expression is as follows: S2, the Brent method is used to solve the local accuracy optimization subproblem, the convex optimization tool is used to solve the user computing and communication resource optimization subproblem, and the continuous convex approximation method is used to solve the UAV position optimization subproblem; and by alternately solving the three optimization subproblems, the optimal solutions for local accuracy, user computing and communication resources, and UAV position are obtained; The solution process is as follows: S21, the steps for solving the local precision optimization subproblem P3 using the Brent method include: S211, Calculate constant coefficients , , , Golden ratio Enter S212; S212, Variable Substitution Enter S213; S213, Initialization Step size step=0.1, enter S214; S214, if and If all conditions are met, proceed to S215; otherwise, proceed to S2111. S215, order ,judge If the condition is met, proceed to S214; otherwise, proceed to S216. S216, Initialize 3 points , , , , When the iteration count num=0, proceed to S217; S217, if ,but ,otherwise Enter S218; S218, Calculation ,like If the condition is met, proceed to S218; otherwise, proceed to S2110. S219, , Enter S2110; S2110, if ,but ,otherwise Enter S214; S2111, Calculation , .

[0034] in, , and These represent loss functions that are L-Lipschitz continuous and... Strongly convex functions , This indicates the energy consumption coefficient of the CPU. , For global training accuracy, For deep learning hyperparameters, satisfy , For users The number of CPU cycles required to calculate each bit of data. For users The amount of training data, For users The CPU frequency during training Indicates the size of the transmission model. Indicates the safe capacity for ground users. For ground users To drones transmission rate For ground users To the eavesdropper transmission rate , .

[0035] S22, the process of solving the user computation and communication resource optimization subproblem P4 using convex optimization tools includes: S221 optimizes only users with positive security capacity (i.e., effective users); invalid users do not participate in federated learning. Therefore, when At that time, enter S222; S222 is solved using the MOSEK or SCS solver in Python's cvxpy library to obtain the current optimal bandwidth allocation. and training CPU frequency .

[0036] S23, the process of solving the UAV position optimization subproblem P5 using the continuous convex approximation method includes the following steps: S231, Introducing auxiliary variables ,but It is about Convex functions, and add constraints. Enter S232; S232, write constraint C9 in second-order cone form Enter S233; S233, Proof It is about The convex function, enter S234; S234, order By using the first-order Taylor expansion method, we obtain The approximate linear expression, Enter S235; S235, approximating the objective function as... This transforms P5 into a convex optimization subproblem, which is solved using the Python Second-Order Cone Programming (SOCP) solver ECOS. The optimal UAV position is then obtained through continuous convex approximation iterations. .

[0037] in, For ground users coordinates For drones Horizontal coordinates The hovering altitude of the drone. , For ground users The transmission power.

[0038] S24, obtaining the optimal solution for local accuracy, user computing and communication resources, and UAV position by alternately solving problems P3, P4, and P5, includes the following steps: Step 1, Initialization: , , Number of iterations Accuracy ; Step 2, Fix , , Calculate the optimal solution for P5. and ; Step 3, if and If all conditions are met, proceed to step 4; otherwise, proceed to step 8. Step 4, Fix , , Calculate the optimal solution for P4. , ; Step 5, Fix , , Calculate the optimal solution for P3. , ; Step 6, Fix , , Calculate the optimal solution for P5. and , ; Step 7, Proceed to step 3; Step 8, Output , , , .

[0039] Based on a similar inventive concept, embodiments of the present invention also provide a computer storage medium storing a readable program that, when run by a processor, can execute the aforementioned BCD-based UAV-assisted federated learning optimization method.

[0040] Based on a similar inventive concept, this invention provides an electronic device, including: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other through the communication bus; The memory is used to store at least one executable instruction, which causes the processor to perform the operation corresponding to the above-described BCD-based UAV-assisted federated learning optimization method.

[0041] Based on a similar inventive concept, embodiments of the present invention also provide a computer program product, including computer instructions, which instruct a computing device to perform the operations corresponding to the above-described BCD-based UAV-assisted federated learning optimization method.

[0042] Example 3 To verify the performance of the method proposed in this invention, this embodiment considers comparison with the following three comparative methods: Comparison Method 1: Bandwidth is allocated evenly to ground users, while other parameters are optimized using the method of this invention.

[0043] Comparison Method 2: The drone's position is fixed and no optimization is performed; other parameters are optimized using the method of this invention. Comparison Method 3: Local precision is fixed and not optimized, while other parameters are optimized using the method of this invention.

[0044] Figures 3-5 The paper presents a comparison of the total latency, total energy consumption, and system utility of the method of this invention with three other methods under different total bandwidth conditions. Figure 3 and Figure 4 It can be seen that the total latency and total energy consumption of the method of this invention, along with the other three methods, decrease as the total bandwidth increases. This is because a larger total bandwidth means more bandwidth is allocated to each ground user, resulting in greater security capacity and lower latency for transmitting the same model. Therefore, a lower total latency leads to lower energy consumption for each user's transmission, assuming the transmission power remains constant, thus resulting in lower total energy consumption. Figure 5 It can be seen that the system utility of the method of this invention, along with the other three methods, increases with the increase of total bandwidth. This is because, when covering the same number of users, the reduction in total latency and total energy consumption increases system utility.

[0045] from Figure 3 and Figure 4 It can be seen that method 2 has the lowest total latency and total energy consumption, while Figure 5The system utility of method 2 is lower than that of the method of the present invention. This is because the randomness of the drone's location prevents it from covering as many users as possible. Therefore, with fewer users covered and the total bandwidth remaining the same, the bandwidth allocated to each user is greater than that allocated to all users covered by the method of the present invention. Consequently, its security capacity is greater than that of the method of the present invention, and the latency for transmitting the same model is lower, resulting in a lower total latency. With the transmission power remaining the same, its transmission energy consumption is also lower, resulting in lower total energy consumption. However, because the method of the present invention can cover more users, the utility brought by the increased number of users makes the system utility of the method of the present invention higher than that of method 2. Furthermore, from... Figures 3-5 It can be seen that as bandwidth increases, the performance differences among all methods decrease. This is because when the total bandwidth is small, resources are limited, and the objective function is more sensitive to changes in bandwidth; when the total bandwidth is large, resources are relatively abundant, and the objective function is less sensitive to bandwidth.

[0046] Figures 6-8 The impact of different numbers of eavesdroppers on total latency, total energy consumption, and system utility is presented. Figure 6 and Figure 7 It can be seen that both total latency and total energy consumption decrease as the number of eavesdroppers decreases. This is because the fewer the number of eavesdroppers, the greater the distance between the ground user and the nearest eavesdropper, the higher the security capacity of the ground user, and the lower the time cost required to transmit the same model. Therefore, the total latency is smaller, and with the transmission power remaining constant, the energy consumption of each user's transmission is also smaller, thus the total energy consumption is lower. Figure 8 It can be seen that system utility increases as the number of eavesdroppers decreases. This is because, when covering the same number of users, the reduction in total latency and total energy consumption increases system utility.

[0047] Figures 9-11 The impact of different drone altitudes on total latency, total energy consumption, and system utility is presented. Figure 9 and Figure 10 It can be seen that both total latency and total energy consumption decrease as the drone's altitude decreases. This is because the lower the drone's altitude, the smaller the distance between the drone and ground users, resulting in increased channel gain and a larger channel width. Simultaneously, the lower drone altitude reduces the number of users covered by the drone. With the total bandwidth remaining constant, the bandwidth allocated to each user increases, thus increasing the security capacity. This reduces the time cost required to transmit the same model, and with the transmission power remaining constant, the energy consumption of each user is also lower, resulting in lower total energy consumption. Figure 11It can be seen that the system utility first increases and then decreases as the drone altitude decreases. This is because when the drone is too high, the distance between the ground users and the drone is too large, the safety capacity is small, and the time cost and energy consumption for transmitting the same model are high without affecting the number of users covered, resulting in low system utility. Therefore, appropriately reducing the drone altitude helps to improve system utility. However, if the drone altitude is too low, it will lead to a reduction in the number of users covered, thus reducing system utility.

[0048] Figures 12-14 The impact of different weighting parameters on total latency, total energy consumption, and system utility is presented. Figures 12-14 It can be seen that the weight parameters of the time delay The weighting parameters of energy consumption remain unchanged. When the weighting parameter is appropriately increased, both total latency and total energy consumption increase, while system utility decreases. This is because when the weighting parameter for energy consumption increases, As the impact on the objective function increases, the system automatically adjusts to optimize the objective function. and The optimal solution, thus making The optimal solution is less than the optimal solution of the weight parameters in this invention, and the decrease in the value of this variable leads to an increase in the training latency for ground users in each round, thus increasing the total latency. Therefore, when the importance of energy consumption increases, the system will reduce... To reduce the increase in energy consumption, at the same time, Changes in latency will increase total latency to some extent and reduce system utility.

[0049] from Figures 12-14 It can be seen that when the weighting parameters for latency and energy consumption both increase, the total latency and total energy consumption decrease, and the system utility also decreases. This is because the system places too much emphasis on the impact of latency and energy consumption on the system. In order to maximize the objective function, it reduces the importance of model generalization, thus covering fewer users. Fewer users covered result in larger bandwidth allocated to each user, larger security capacity, larger model transmission rate, lower transmission latency, and lower transmission energy consumption. Therefore, the total latency and total energy consumption decrease, while the system utility decreases.

[0050] Example 4 Based on the BCD-based UAV-assisted federated learning optimization method proposed in Embodiment 2, this embodiment proposes a BCD-based UAV-assisted federated learning optimization device, including: Problem building module: Constructs the system utility function maximization problem and decomposes it into local accuracy optimization sub-problems, user computing and communication resource optimization sub-problems, and UAV position optimization sub-problems; Problem-solving module: The Brent method is used to solve the local accuracy optimization subproblem, the convex optimization tool is used to solve the user computing and communication resource optimization subproblem, and the continuous convex approximation method is used to solve the UAV position optimization subproblem; and by alternately solving the three optimization subproblems, the optimal solutions for local accuracy, user computing and communication resources, and UAV position are obtained.

[0051] The methods of the present invention can be implemented in hardware, firmware, or as software or computer code that can be stored in a recording medium (such as a CD-ROM, RAM, floppy disk, hard disk, or magneto-optical disk), or as computer code originally stored on a remote recording medium or a non-transitory machine-readable medium and subsequently stored on a local recording medium, downloaded via a network. Thus, the methods described herein can be processed by software stored on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an ASIC or FPGA). It is understood that the computer, processor, microprocessor controller, or programmable hardware includes storage components (e.g., RAM, ROM, flash memory, etc.) capable of storing or receiving software or computer code that, when accessed and executed by the computer, processor, or hardware, implements the methods described herein. Furthermore, when a general-purpose computer accesses the code used to implement the methods shown herein, the execution of the code transforms the general-purpose computer into a dedicated computer for performing the methods shown herein.

[0052] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention.

Claims

1. A BCD-based UAV-assisted federated learning optimization method, characterized in that, Includes the following steps: The system utility function maximization problem is constructed and decomposed into local accuracy optimization subproblems, user computing and communication resource optimization subproblems, and UAV position optimization subproblems. The Brent method is used to solve the local accuracy optimization subproblem, the convex optimization tool is used to solve the user computing and communication resource optimization subproblem, and the continuous convex approximation method is used to solve the UAV position optimization subproblem. By alternately solving the three optimization subproblems, the optimal solutions for local accuracy, user computing and communication resources, and UAV position are obtained.

2. The UAV-assisted federated learning optimization method based on BCD according to claim 1, characterized in that, The system to which this optimization method is applied includes: a drone, ground users and One eavesdropper; ground users possess training data and are capable of local training for federated learning, while drones are used to aggregate models; the drone first initializes a global model, then distributes the global model to the ground users it covers. After receiving the model, the ground users perform local training. Once training is complete, they transmit the local model to the drone using frequency division multiple access. After waiting for all ground users to transmit their models, the drone performs weighted aggregation of the collected local models. Through multiple rounds of local training and model aggregation, the training of the federated learning model is completed.

3. The UAV-assisted federated learning optimization method based on BCD according to claim 1, characterized in that, The system utility function maximization problem is defined as P1: , In the formula, C1 restricts the location of the drone, which must not exceed the area studied in this invention; C2 is the total bandwidth limit; and C3 restricts the ground user... The training CPU frequency, C4 limits the accuracy of the local model, C5 is the limit for the total latency of federated learning, and C6 limits the ground user's latency. Maximum transmission distance with drones; The horizontal position of the drone. For users bandwidth, For users Training CPU frequency, For local model accuracy, For the number of effective users, The effective user set is defined as the number of users with a security capacity greater than 0 who are within the drone's coverage area. For ground user IDs, the value range is 1- , Number the drone. This represents the global iteration count. For users in a round of global iteration Total latency, For users in a round of global iteration Local training energy consumption, For users in a round of global iteration Transmission energy consumption, and These represent the degree of importance the system model places on latency and energy consumption, respectively. and These represent the maximum x-coordinate and maximum y-coordinate of the drone, respectively. Indicates the total system bandwidth. and Representing users respectively The minimum and maximum training CPU frequencies, For users in a round of global iteration Local training latency, For users in a round of global iteration Transmission delay, This represents the maximum total system delay. For users To drones The straight-line distance This represents the maximum communication distance for the drone.

4. The UAV-assisted federated learning optimization method based on BCD according to claim 3, characterized in that, The local accuracy optimization subproblem is defined as P3: The user computing and communication resource optimization subproblem is defined as P4: The UAV position optimization subproblem is defined as P5: 。 5. The UAV-assisted federated learning optimization method based on BCD according to claim 4, characterized in that, The steps for solving the local precision optimization subproblem P3 using the Brent method include: S211, Calculate constant coefficients , , , Golden ratio Enter S212; S212, Variable Substitution Enter S213; S213, Initialization Step size step=0.1, enter S214; S214, if and If all conditions are met, proceed to S215; otherwise, proceed to S2111. S215, order ,judge If the condition is met, proceed to S214; otherwise, proceed to S216. S216, Initialize 3 points , , , , When the iteration count num=0, proceed to S217; S217, if ,but ,otherwise Enter S218; S218, Calculation ,like If the condition is met, proceed to S218; otherwise, proceed to S2110. S219, , Enter S2110; S2110, if ,but ,otherwise Enter S214; S2111, Calculation , ; in, , and These represent loss functions that are L-Lipschitz continuous and... Strongly convex functions , This indicates the energy consumption coefficient of the CPU. , For global training accuracy, For deep learning hyperparameters, satisfy , For users The number of CPU cycles required to calculate each bit of data. For users The amount of training data, For users The CPU frequency during training Indicates the size of the transmission model. Indicates the safe capacity for ground users. For ground users To drones transmission rate For ground users To the eavesdropper transmission rate , .

6. The UAV-assisted federated learning optimization method based on BCD according to claim 5, characterized in that, The process of solving the user computation and communication resource optimization subproblem P4 using convex optimization tools includes: Optimization is performed only for users with positive security capacity. The optimal bandwidth allocation is obtained by using the MOSEK or SCS solver of Python's cvxpy algorithm. and training CPU frequency .

7. The UAV-assisted federated learning optimization method based on BCD according to claim 6, characterized in that, The process of solving the UAV position optimization subproblem P5 using the continuous convex approximation method includes the following steps: S231, Introducing auxiliary variables ,but It is about Convex functions, and add constraints. ; S232, write constraint C9 in second-order cone form ; S233, Proof It is about convex functions; S234, order By using the first-order Taylor expansion method, we obtain The approximate linear expression, ; S235, approximate the objective function as follows: The problem P5 is transformed into a convex optimization subproblem, which is solved using the second-order cone programming solver ECOS in Python. The optimal UAV position is obtained through continuous convex approximation iterative solving. ; in, For ground users coordinates For drones Horizontal coordinates The hovering altitude of the drone. , For ground users The transmission power.

8. The UAV-assisted federated learning optimization method based on BCD according to claim 7, characterized in that, The alternating solution process includes: Step 1, Initialization: , , Number of iterations Accuracy ; Step 2, Fix , , Calculate the optimal solution for P5. and ; Step 3, if and If all conditions are met, proceed to step 4; otherwise, proceed to step 8. Step 4, Fix , , Calculate the optimal solution for P4. , ; Step 5, Fix , , Calculate the optimal solution for P3. , ; Step 6, Fix , , Calculate the optimal solution for P5. and , ; Step 7, Proceed to step 3; Step 8, Output , , , .

9. A BCD-based UAV-assisted federated learning optimization device, performing the method according to any one of claims 1-8, characterized in that, include: Problem building module: Constructs the system utility function maximization problem and decomposes it into local accuracy optimization sub-problems, user computing and communication resource optimization sub-problems, and UAV position optimization sub-problems; Problem-solving module: The Brent method is used to solve the local accuracy optimization subproblem, the convex optimization tool is used to solve the user computing and communication resource optimization subproblem, and the continuous convex approximation method is used to solve the UAV position optimization subproblem; and by alternately solving the three optimization subproblems, the optimal solutions for local accuracy, user computing and communication resources, and UAV position are obtained.

10. A computer storage medium storing a readable program, characterized in that, When the program runs, it can instruct the computing device to perform the BCD-based unmanned aerial vehicle-assisted federated learning optimization method as described in any one of claims 1-8.