UAV-ASSISTED FEDERATED LEARNING RESOURCE ALLOCATION METHOD

20240288876 ยท 2024-08-29

    Inventors

    Cpc classification

    International classification

    Abstract

    The present application provides an unmanned aerial vehicle (UAV)-assisted federated learning resource allocation method for an UAV-assisted federated learning wireless network scenario, which takes into account the effect of altitude of the UAV on the coverage range in order to achieve an equilibrium between the total energy consumption of the user and federated learning performance. The method simultaneously considers the total energy consumption of the user and the federated learning performance, defines the total cost function of the system. The total cost function consists of weighting of the total energy consumption of the user and the inverse of the number of users participating in federated learning, and forms the optimization problem with a minimization of the total cost function.

    Claims

    1. An UAV-assisted federated learning resource allocation method, comprising: S1. determining a total cost function and constraints of a system based on total energy consumption of users that participate in the federated learning and an inverse of a number of the users, and constructing an optimization problem P with a minimization of the total cost function; S2. solving by the optimization problem P to obtain an optimal horizontal position of the unmanned aerial vehicle(UAV) m, an optimal local accuracy, an optimal user resource allocation decision, and an optimal altitude of the UAV m; and S3. the UAV m flying to the optimal horizontal position and the optimal altitude of the UAV m, and the users determining to participate in the federated learning within a coverage range of the UAV m based on the optimal user resource allocation decision and the optimal local accuracy.

    2. The UAV-assisted federated learning resource allocation method according to claim 1, wherein the S1, constructing the optimization problem P for minimizing the total cost function, comprises: S11. a set of users is denoted as N={1,2 . . . N}, a set of the users within the coverage range of the UAV m is denoted as N.sub.m; a distance between the user i and the UAV m is: d im = h 2 + .Math. q m - q i .Math. 2 2 ; where h denotes the altitude of the UAV m, q.sub.m={x.sub.m, y.sub.m} denotes a horizontal position of the UAV m, q.sub.i={x.sub.i, y.sub.i} denotes a position of the user i, and a channel gain of the user i is: g i = g 0 ( d im d 0 ) - ? ; where g.sub.0 is a channel interference power at time d.sub.0=1m and ? is a path loss exponent; S12. energy consumption of the user's terminal during the federated learning comprises training energy and communication energy; S13. D.sub.i denotes an amount of data of the user, f.sub.i denotes a number of revolutions per second of a CPU of the user i, C.sub.i denotes a number of revolutions of the CPU of the user i to process a sample data, and I.sub.i denotes a number of rounds of local training when a local accuracy is achieved ?; I l = 2 ( 2 - L ? ) ? ? log ( 1 ? ) ; wherein L, ? are relevant parameters about a neural network loss function, ? is a training learning step of the federated learning; training energy consumption E.sub.i.sup.comp of the user i in one iteration of the federated learning is denoted as: E i comp = ? I l C i D i f i 2 ; S14. after the user completes the local training, a trained model is uploaded to the UAV m by a frequency division multiple access (FDMA); b.sub.i denotes a bandwidth allocated to the user i, p.sub.i denotes a transmission power of the user i, N.sub.0 denotes a noise power spectral density, and according to a Shannon's formula, an achievable transmission rate R.sub.i of the user i is: R i = b i log 2 ( 1 + g i p i N 0 b i ) ; assuming that a size of data of the neural network model w is s and communication energy consumption E.sub.i.sup.comm of the user i is: E i comm = p i t i = p i s b i log 2 ( 1 + g i p i N 0 b i ) ; S15. when a global model accuracy is required to be achieved ?.sub.0, a number of communication rounds I.sub.g is: I g = 2 L 2 ? 2 ? log 1 ? 0 1 1 - ? ; where ? denotes relevant parameters in a local neural network training, a total energy consumption E.sup.total of a whole federated learning process is: E total = I g .Math. i ? N m .Math. "\[LeftBracketingBar]" N m .Math. "\[RightBracketingBar]" ( E i comm + E i comp ) ; S16. the total cost function C is defined as: C = E total + ? 1 N m ; a target function is: min q m , h , f , t , p , b , ? C = min q m , h , f , t , p , b , ? a ( 1 - ? ) ( .Math. i ? N m .Math. "\[LeftBracketingBar]" N m .Math. "\[RightBracketingBar]" log ( 1 ? ) v C i D i f i 2 + t i p i ) + ? N m ; wherein a = 2 L 2 ? 2 ? log 1 ? 0 and v = 2 ( 2 - L ? ) ? ? denote fixed values and ? denotes a weighting factor; S17. considering the total energy consumption of the users and a performance of federated learning, the optimization problem P of the system is: min q m , h , f , t , p , b , ? a ( 1 - ? ) ( .Math. i ? N m .Math. "\[LeftBracketingBar]" N m .Math. "\[RightBracketingBar]" log ( 1 ? ) vC i D i f i 2 + t i p i ) + ? N m ; the constraints are: C 1 : 0 ? f i ? f i max C 2 : 0 ? p i ? p i max C 3 : I g ( t i + I l C i D i f i ) ? T C 4 : t i ? s R i C 5 : .Math. q m - q i .Math. 2 2 ? r 2 C 6 : h min ? h ? h max C 7 : .Math. i ? N m .Math. "\[LeftBracketingBar]" N m .Math. "\[RightBracketingBar]" b i ? B , b i > 0 C 8 : 0 ? ? ? 1 ; where T is a total pre-estimated completion time of the federated learning, B denotes a total bandwidth owned by the UAV m, f.sub.i.sup.max denotes a maximum computation frequency of the user i, p.sub.i.sup.max denotes a maximum transmission power of the user i, and, h.sup.min and h.sup.max denote a minimum altitude and a maximum altitude of the UAV m for flying, respectively; under a constraint of a maximum delay allowed by the federated learning, a position of the UAV m (the horizontal position q.sub.m={x, y} and the altitude h), the transmission power p=[p.sub.1, . . . p.sub.N.sub.m] and a computation frequency f=[f.sub.1, . . . f.sub.N.sub.m] of the user i, a transmission bandwidth b=[b.sub.1, . . . , b.sub.N.sub.m], transmission time t=[t.sub.1, . . . t.sub.N.sub.m] and the local accuracy ? are optimized jointly to minimize the target function; constraints C1 and C2 limit the computation frequency and the transmission power of the user i; a constraint C3 denotes that a total delay of the users that participate in the federated learning is not greater than a preset maximum value; a constraint C4 limits the transmission delay, i.e., a transmission of the model must be completed within specified transmission time, and R.sub.i is the achievable transmission rate of the user i; a constraint C5 limits the position of the UAV m and the distance between the user and the UAV m not greater than the coverage range of the UAV m; a constraint C6 limits a flight altitude range of the UAV m; the constraint C7 indicates that a sum of the bandwidth allocated to all users within the coverage range of the UAV m is not greater than a total bandwidth B; and the constraint C8 specifies a range of constraints on the local training accuracy.

    3. The UAV-assisted federated learning resource allocation method according to claim 1, wherein the S2. solving the optimization problem P comprises: S2.1. setting an initial horizontal flight position q.sub.m and a minimum flight altitude h of the UAV m; S2.2. setting an initial user resource allocation decision and an initial local accuracy ? within the coverage range of the UAV m, wherein the user resource allocation decision comprises the computation frequency f, the transmission time t, the transmission power p and the transmission bandwidth b; S2.3. solving by the optimization problem P based on h, f, t, p, b, ?, to obtain the optimal horizontal position of the UAV m; S2.4. solving by the optimization problem P based on h, f, t, p, b and the optimal horizontal position q.sub.m of the UAV m obtained in the S2.3, to obtain the optimal local accuracy ?; S2.5. solving by the optimization problem P based on h, the optimal horizontal position q.sub.m of the UAV m obtained in the S2.3 and the optimal local accuracy ?obtained in the S2.4; S2.6. repeating the S2.3 to S2.5 until a target total cost function reaches convergence; S2.7. changing the altitude h of the UAV m based on a minimum change value ?h.sub.min of the altitude h; S2.8. in response to the altitude of the UAV m not greater than a preset maximum altitude, repeating the S2.2 to S2.7 until the altitude of the UAV m is greater than the maximum altitude, obtaining the optimal horizontal position q.sub.m of the UAV m, the optimal local accuracy ?, the optimal user resource allocation decision, and the optimal altitude h of the UAV m when the total cost function is minimized.

    4. The UAV-assisted federated learning resource allocation method according to claim 3, wherein the S2.3, solving by the optimization problem P to obtain the optimal horizontal position of the UAV m, comprises: the altitude of the UAV m is h, an angle of entrapment is ?, and a radius of coverage of the UAV m is r: r = h tan ( ? ) ; when h, f, t, p, b, ? are determined, optimizing the horizontal position q.sub.m of the UAV m; since optimizing the horizontal position of the UAV m only affects the communication energy consumption of the user i; the optimization problem P is equivalent to an optimization problem P1: min q m .Math. i ? N m .Math. "\[LeftBracketingBar]" N m .Math. "\[RightBracketingBar]" p i s R i ; the constraints are: C 4 : t i ? s R i C 5 : .Math. q m - q i .Math. 2 2 ? r 2 ; introducing slack variables ?, the optimization problem P1 is equivalent to an optimization problem P2: min q m , ? .Math. i ? N m .Math. "\[LeftBracketingBar]" N m .Math. "\[RightBracketingBar]" p i s ? i ; the constraints are: C 5 : .Math. q m - q i .Math. 2 2 ? r 2 C 9 : s ? i ? t i C 10 : b i log 2 ( 1 + p i g 0 b i N 0 ( .Math. q m - q i .Math. 2 2 + h 2 ) ) ? 1 ? i ; introducing slack variables S.sub.m,i=?q.sub.m?q.sub.i?.sub.2.sup.2, the constraint C10 is expanded at a feasible solution S.sub.m,i.sup.0=?q.sub.m.sup.0?q.sub.i?.sub.2.sup.2 using a first-order Taylor expansion: b i log 2 ( 1 + p i g 0 b i N 0 ( S m , i + h 2 ) ) ? ? ( S m , i - S m , i 0 ) + ? ? = - b i g 0 p i log 2 ( e ) N 0 b i ( S m , i 0 + h 2 ) ( S m , i 0 + h 2 + g 0 p i N 0 b i ) ? = b i log 2 ( 1 + g 0 p i N 0 b i ( S m , i 0 + h 2 ) ) ; where, ?, ? denote intermediate variables; the optimization problem P2 is further transformed into an optimization problem P3: min q m , ? .Math. i ? N m .Math. "\[LeftBracketingBar]" N m .Math. "\[RightBracketingBar]" p i s ? i the constraints are: C 5 : .Math. q m - q i .Math. 2 2 ? r 2 C 9 : s ? i ? t i C 11 : ? ( S m , i - S m , i 0 ) + ? ? 1 ? i ; the optimization problem P3 is transformed into a convex problem, which is solved using a successive convex approximation (SCA) method to obtain the optimal horizontal position of the UAV m.

    5. The UAV-assisted federated learning resource allocation method according to claim 3, wherein the S2.4 solving by the optimization problem P to obtain the optimal local accuracy ?, comprises: when h, q.sub.m, f, t, p, b is determined, the optimization problem P is transformed into an optimization problem P4: the constraints are: min ? ? 1 log 2 ( 1 ? ) + ? 2 ( 1 - ? ) ; C 3 : I g ( t i + I l C i D i f i ) ? T C 8 : 0 ? ? ? 1 ; wherein ? 1 = a .Math. i ? N m .Math. "\[LeftBracketingBar]" N m .Math. "\[RightBracketingBar]" ? C i D i f i 2 , ? 2 = a .Math. i ? N m .Math. "\[LeftBracketingBar]" N m .Math. "\[RightBracketingBar]" t i p i ; the constraint C3 is equivalent to t.sub.i??(?.sub.i), where ? ( ? ) = 1 - ? a T + C i D i log ( ? ) v f i , since ?(?) is a convex function, the constraint C3 is transformed into ?.sup.min????.sup.max, where ? max = min i ? N m ? i max , ? min = max i ? N m ? i min ; the optimization problem P4 is transformed into an optimization problem P5: min ? ? 1 log ( 1 ? ) + ? 2 ( 1 - ? ) ; the constraints are: ? min ? ? ? ? max ; C12 solving the optimization problem P5 is equivalent to finding roots of a nonlinear function H ( ? ) = min ? min ? ? ? ? max ? 1 log ( 1 / ? ) + ? 2 - ? ( 1 - ? ) , which is solved by using a Dinkelbach Method method.

    6. The UAV-assisted federated learning resource allocation method according to claim 3, wherein the S2.5 solving by the optimization problem P to obtain the optimal user resource allocation decision, comprises: when q.sub.m, h and ? are determined, optimizing f, t, P and b, and the optimization problem P is transformed into an optimization problem P6: min f , t , p , b a ( 1 - ? ) .Math. i ? N m .Math. "\[LeftBracketingBar]" N m .Math. "\[RightBracketingBar]" ( v log ( 1 ? ) C i D i f i 2 + p i t i ) ; the constraints are: 0 ? f i ? f i max C1 0 ? p i ? p i max C2 I g ( t i + I l C i D i f i ) ? T C3 t i ? s R i C4 .Math. i ? N m .Math. "\[LeftBracketingBar]" N m .Math. "\[RightBracketingBar]" b i ? B , b i > 0 ; C7 the optimization problem P6 is split into two optimization subproblems; a first subproblem, denoted as subproblem P6-1, is to solve remaining variables f, t and p of the optimization problem P6 under the transmission bandwidth b given: min f , t , p a ( 1 - ? ) .Math. i ? N m .Math. "\[LeftBracketingBar]" N m .Math. "\[RightBracketingBar]" ( v log ( 1 ? ) C i D i f i 2 + p i t i ) ; the constraints are: 0 ? f i ? f i max C1 0 ? p i ? p i max C2 I g ( t i + I l C i D i f i ) ? T C3 t i ? s R i ; C4 f i = I l C i D i T I g - t i and p i = N 0 b i g i ( 2 s t i b i - 1 ) are obtained according to the constraints C3, C4, and then are brought into the constraints C1, C2, and subproblem P6-1 is transformed into an optimization problem P7: min f t p a ( 1 - ? ) .Math. i ? N m .Math. "\[LeftBracketingBar]" N m .Math. "\[RightBracketingBar]" [ v log ( 1 ? ) C i D i ( I l C i D i T I g - t i * ) 2 + N 0 b i g i ( 2 s t i * b i - 1 ) t i * ) ; the constraints are: 0 ? I l C i D i T I g - t i ? f i max C13 0 ? N 0 b i g i ( 2 s t i b i - 1 ) ? p i max ; C14 a maximum value and a minimum value of t.sub.i are obtained from constraints C13 and C14; the optimization problem P7 is further transformed into an optimization problem P8: min t a ( 1 - ? ) .Math. i ? N m .Math. "\[LeftBracketingBar]" N m .Math. "\[RightBracketingBar]" [ v log ( 1 ? ) C i D i ( I l C i D i T I g - t i ) 2 + N 0 b i g i ( 2 s t i b i - 1 ) t i ) ; the constraints are: t i min ? t i ? t i max ; C15 according to the optimization problem P8, when t.sub.i is satisfied .Math. "\[LeftBracketingBar]" ? E i c o m m ? t i .Math. "\[RightBracketingBar]" = .Math. "\[LeftBracketingBar]" ? E i c o m p ? t i .Math. "\[RightBracketingBar]" , it is an optimal solution t*.sub.i, which is obtained using a bisection method, and f*.sub.i and p*.sub.i are further obtained; the second subproblem, denoted as subproblem P6-2, is to solve the transmission bandwidth b of the optimization problem under variables f, t, p given: min b .Math. i ? N m .Math. "\[LeftBracketingBar]" N m .Math. "\[RightBracketingBar]" b i t i N 0 g i ( 2 s t i b i - 1 ) ; the constraints are: .Math. i ? N m .Math. "\[LeftBracketingBar]" N m .Math. "\[RightBracketingBar]" b i ? B , b i > 0 ; C7 since the optimization problem P8 is convex, an optimal expression of b is obtained by solving using the KKT condition; optimizing the subproblem P6-2 leads to a change in bandwidth b, which in turn affects f, t, p, in the subproblem P6-1, and iteratively solves the subproblem P6-1 and subproblem P6-2 are solved by iteration to obtain the optimal f, t, p and b.

    7. An UAV-assisted federated learning resource allocation device, comprising a processor and a storage medium; wherein the storage medium is configured to store instructions; the processor for operating in accordance with the instructions to perform the method according to claim 1.

    8. A storage medium having a computer program stored thereon, wherein the computer program is executed by the processor to implement the method according to claim 1.

    9. A computing device, comprising: one or more processors, one or more memories, and one or more programs, wherein the one or more programs are stored in the one or more memories and configured to be executed by the one or more processors, wherein the one or more programs comprises instructions for executing the method according to claim 1.

    Description

    BRIEF DESCRIPTION OF THE DRAWINGS

    [0081] FIG. 1 is a flowchart according to embodiments of the present application;

    [0082] FIG. 2 is a schematic diagram of a system model according to embodiments of the present application.

    DETAILED DESCRIPTION OF THE EMBODIMENTS

    [0083] The present application is further described below in conjunction with the accompanying drawings. The following embodiments are only used to illustrate the technical solution of the present application more clearly, and cannot be used to limit the scope of the present application.

    [0084] In the description of the present application, reference is made to the terms an embodiment, some embodiments, schematic embodiment, example, specific example and some examples, means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, schematic expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable way.

    First Embodiment

    [0085] As shown in FIG. 1, a UAV-assisted federated learning resource allocation method includes: [0086] S1. determining a total cost function q.sub.m and constraints of a system based on total energy consumption of users that participate in the federated learning and an inverse of a number of the users, and constructing an optimization problem P with a minimization of the total cost function; [0087] S2. solving by the optimization problem P to obtain an optimal horizontal position q.sub.m of the UAV m, an optimal local accuracy ?, an optimal user resource allocation decision, and an optimal altitude h of the UAV m.

    [0088] In some embodiment, the S2. solving the optimization problem P includes: [0089] S2.1. setting an initial horizontal flight position q.sub.m and a minimum flight altitude h of the UAV m; [0090] S2.2. setting an initial user resource allocation decision and an initial local accuracy ? within the coverage range of the UAV m, wherein the user resource allocation decision comprises the computation frequency f, the transmission time t, the transmission power P and the transmission bandwidth b; [0091] S2.3. solving by the optimization problem P based on h, f, t, p, b, ?, to obtain the optimal horizontal position of the UAV m; [0092] S2.4. solving by the optimization problem P based on h, f, t, p, b and the optimal horizontal position q.sub.m of the UAV m obtained in the S2.3, to obtain the optimal local accuracy ?; [0093] S2.5. solving by the optimization problem P based on h, the optimal horizontal position q.sub.m of the UAV m obtained in the S2.3 and the optimal local accuracy ? obtained in the S2.4; [0094] S2.6. repeating the S2.3 to S2.5 until a target total cost function reaches convergence; [0095] S2.7. changing the altitude h of the UAV m based on a minimum change value ?h.sub.min of the altitude h; [0096] S2.8. in response to the altitude of the UAV m not greater than a preset maximum altitude, repeating the S2.2 to S2.7 until the altitude of the UAV m is greater than the maximum altitude, obtaining the optimal horizontal position q.sub.m of the UAV m, the optimal local accuracy ?, the optimal user resource allocation decision, and the optimal altitude h of the UAV m when the total cost function is minimized. [0097] S3. the UAV m flying to the optimal horizontal position q.sub.m, and the optimal altitude h of the UAV m, and the users determine to participate in the federated learning within a coverage range of the UAV m based on the optimal user resource allocation decision and the optimal local accuracy ?.

    [0098] In some embodiment, the S1, constructing the optimization problem P for minimizing the total cost function, includes: [0099] S11. a set of users is denoted as N={1, 2 . . . N}, a set of the users within the coverage range of the UAV m is denoted as N.sub.m; a distance between the user i and the UAV m is:

    [00040] d im = h 2 + .Math. q m - q i .Math. 2 2 ; [0100] where h denotes the altitude of the UAV m, q.sub.m={x.sub.m, y.sub.m} denotes a horizontal position of the UAV m, q.sub.i={x.sub.i, y.sub.i} denotes a position of the user i, and a channel gain of the user i is:

    [00041] g i = g 0 ( d im d 0 ) - ? ; [0101] where g.sub.0 is a channel interference power at time d.sub.0=1 m and ? is a path loss exponent; [0102] S12. energy consumption of the user's terminal during the federated learning comprises training energy and communication energy; [0103] S13. D.sub.i denotes an amount of data of the user, f.sub.i denotes a number of revolutions per second of a CPU of the user i, C.sub.i denotes a number of revolutions of the CPU of the user i to process a sample data, and I.sub.i denotes a number of rounds of local training when a local accuracy is achieved ?;

    [00042] I l = 2 ( 2 - L ? ) ? ? log ( 1 ? ) ; [0104] wherein L, ? are relevant parameters about a neural network loss function, ? is a training learning step of the federated learning; [0105] training energy consumption comp of the user E.sub.i.sup.comp of the user i in one iteration of the federated learning is denoted as:

    [00043] E i comp = ? I l C i D i f i 2 ; [0106] S14. after the user i completes the local training, a trained model is uploaded to the UAV m by a frequency division multiple access (FDMA); b.sub.i denotes a bandwidth allocated to the user i, p.sub.i denotes a transmission power of the user i, N.sub.0 denotes a noise power spectral density, and according to a Shannon's formula, an achievable transmission rate R.sub.i of the user i is:

    [00044] R i = b i log 2 ( 1 + g i p i N 0 b i ) ; [0107] assuming that a size of data of the neural network model w is s and communication energy consumption E.sub.i.sup.comm of the user i is:

    [00045] E i c o m m = p i t i = p i s b i log 2 ( 1 + g i p i N 0 b i ) ;

    [0108] S15. when a global model accuracy is required to be achieved ?.sub.0, a number of communication rounds I.sub.g is:

    [00046] I g = 2 L 2 ? 2 ? log 1 ? 0 1 1 - ? ; [0109] where ? denotes relevant parameters in a local neural network training, a total energy consumption E.sup.total of a whole federated learning process is:

    [00047] E total = I g .Math. i ? N m .Math. "\[LeftBracketingBar]" N m .Math. "\[RightBracketingBar]" ( E i c o m m + E i c o m p ) ;

    [0110] S16. Considering that the user's battery capacity is limited and the energy consumption of the terminal device directly affects the user's experience, the total energy consumption of the user is defined as part of the cost function. Since the performance of federated learning is related to the number of participating users, the more the number of participating users, the faster the learning convergence will be, and the more the data diversity of the participating users, the better the generalisation ability of the model obtained, so the inverse of the number of participating users is defined as the other part of the cost function, which indicates the performance of federated learning. In order to achieve a balance between the energy consumption of users and the performance of federated learning, the total cost function C is defined as:

    [00048] C = E t o t a l + ? 1 N m ; [0111] a target function is:

    [00049] min q m , h , f , t , p , b , ? C = min q m , h , f , t , p , b , ? a ( 1 - ? ) ( .Math. i ? N m | N m | log ( 1 ? ) v C i D i f i 2 + t i p i ) + ? N m ; [0112] wherein

    [00050] a = 2 L 2 ? 2 ? log 1 ? 0 and v = 2 ( 2 - L ? ) ??

    denote fixed values and ? denotes a weighting factor;

    [0113] S17. considering the total energy consumption of the users and a performance of federated learning, the optimization problem P of the system is:

    [00051] min q m , h , f , t , p , b , ? a ( 1 - ? ) ( .Math. i ? N m | N m | log ( 1 ? ) v C i D i f i 2 + t i p i ) + ? N m ; [0114] the constraints are:

    [00052] C 1 : 0 ? f i ? f i max C 2 : 0 ? p i ? p i max C 3 : I g ( t i + I l C i D i f i ) ? T C 4 : t i ? s R i C 5 : .Math. q m - q i .Math. 2 2 ? r 2 C 6 : h min ? h ? h max C 7 : .Math. i ? N m | N m | b i ? B , b i > 0 C 8 : 0 ? ? ? 1 ; [0115] where T is a total pre-estimated completion time of the federated learning, B denotes a total bandwidth owned by the UAV m, f.sub.i.sup.max denotes a maximum computation frequency of the user i, p.sub.i.sup.max denotes a maximum transmission power of the user i, and, h.sup.min and h.sup.max denote a minimum altitude and a maximum altitude of the UAV m for flying, respectively; under a constraint of a maximum delay allowed by the federated learning, a position of the UAV m (the horizontal position q.sub.m={x, y} and the altitude h), the transmission power p=[p.sub.1, . . . p.sub.N.sub.m] and a computation frequency f=[f.sub.1, . . . f.sub.N.sub.m] of the user i, a transmission bandwidth b=[b.sub.1, . . . b.sub.N.sub.m], transmission time t=[t.sub.1. . . t.sub.N.sub.m] and the local accuracy ? are optimized jointly to minimize the target function; constraints C1 and C2 limit the computation frequency and the transmission power of the user i; a constraint C3 denotes that a total delay of the users that participate in the federated learning is not greater than a preset maximum value; a constraint C4 limits the transmission delay, i.e., a transmission of the model must be completed within specified transmission time, and R.sub.i is the achievable transmission rate of the user i; a constraint C5 limits the position of the UAV m and the distance between the user and the UAV m not greater than the coverage range of the UAV m; a constraint C6 limits a flight altitude range of the UAV m, too low the altitude results in too few participating users, and too high the altitude results in a shortage of wireless resources, leading to a rise in delay when learning energy, both of which will slow down the convergence of federated learning; the constraint C7 indicates that a sum of the bandwidth allocated to all users within the coverage range of the UAV m is not greater than a total bandwidth B; and the constraint C8 specifies a range of constraints on the local training accuracy ?.

    [0116] An embodiment of the present application provides an UAV-assisted federated learning resource allocation method, in which the optimal resource allocation decision is obtained sequentially by successive convex approximation, Dinkelbach Method method, dichotomy method with KKT condition, so as to motivate more users to join the federated learning.

    [0117] In some embodiment, the S2.3, solving by the optimization problem P to obtain the optimal horizontal position q.sub.m of the UAV m, includes: [0118] the altitude of the UAV m is h, an angle of entrapment is ?, and a radius of coverage of the UAV m is r:

    [00053] r = h tan ( ? ) ; [0119] when h, f, t, p, b, ? are determined, optimizing the horizontal position q.sub.m of the UAV m; since optimizing the horizontal position of the UAV m only affects the communication energy consumption of the user i; the optimization problem P is equivalent to an optimization problem P1:

    [00054] min q m .Math. i ? N m | N m | p i s R i ; [0120] the constraints are:

    [00055] C 4 : t i ? s R i C 5 : .Math. q m - q i .Math. 2 2 ? r 2 ; [0121] introducing slack variables ?, the optimization problem P1 is equivalent to an optimization problem P2:

    [00056] min q m , ? .Math. i ? N m | N m | p i s ? i ; [0122] the constraints are:

    [00057] C 5 : .Math. q m - q i .Math. 2 2 ? r 2 C 9 : s ? i ? t i C 10 : b i log 2 ( 1 + p i g 0 b i N 0 ( .Math. q m - q i .Math. 2 2 + h 2 ) ) ? 1 ? i ; [0123] introducing slack variables S.sub.m,i=?q.sub.m?q.sub.i?.sub.2.sup.2, the constraint C10 is expanded at a feasible solution s.sub.m,i.sup.0=?q.sub.m.sup.0?q.sub.i?.sub.2.sup.2 using a first-order Taylor expansion:

    [00058] b i log 2 ( 1 + p i g 0 b i N 0 ( S m , i + h 2 ) ) ? ? ( S m , i - S m , i 0 ) + ? ? = - b i g 0 p i log 2 ( e ) N 0 b i ( S m , i 0 + h 2 ) ( S m , i 0 + h 2 + g 0 p i N 0 b i ) ? = b i log 2 ( 1 + g 0 p i N 0 b i ( S m , i 0 + h 2 ) ) ; [0124] where, ?, ?denote intermediate variables; the optimization problem P2 is further transformed into an optimization problem P3:

    [00059] min q m , ? .Math. i ? N m | N m | p i s ? i [0125] the constraints are:

    [00060] .Math. q m - q i .Math. 2 2 ? r 2 C5 s ? i ? t i C9 ? ( S m , i - S m , i 0 ) + ? ? 1 ? i ; C11 [0126] the optimization problem P3 is transformed into a convex problem, which is solved using a successive convex approximation (SCA) method to obtain the optimal horizontal position of the UAV m.

    [0127] When the UAV m arrives at the new position, the coverage position of the UAV changes, and due to the constraint C5, the original user is still within the range of the UAV m, but a new user may join, at this time, the values of the variables are re-initialised and the algorithm is re-iterated.

    [0128] In some embodiment, the S2.4 solving by the optimization problem P to obtain the optimal local accuracy ?, includes: [0129] when h, q.sub.m, f, t, p, b is determined, the optimization problem P is transformed into an optimization problem P4:

    [00061] min ? ? 1 log 2 ( 1 ? ) + ? 2 ( 1 - ? ) ; [0130] the constraints are:

    [00062] I g ( t i + I l C i D i f i ) ? T C3 0 ? ? ? 1 ; C8 [0131] wherein

    [00063] ? 1 = a .Math. i ? N m .Math. "\[LeftBracketingBar]" N m .Math. "\[RightBracketingBar]" ?C i D i f i 2 , ? 2 = a .Math. i ? N m .Math. "\[LeftBracketingBar]" N m .Math. "\[RightBracketingBar]" t i p i ; [0132] the constraint C3 is equivalent to t.sub.i??(?.sub.i), where

    [00064] ? ( ? ) = 1 - ? a T + C i D i log ( ? ) v f i ,

    since ?(?) is a convex function, the constraint C3 is transformed into ?.sup.min????.sup.max, where

    [00065] ? max = min i ? N m ? i max , ? min = max i ? N m ? i min ;

    the optimization problem P4 is transformed into an optimization problem P5:

    [00066] min ? ? 1 log ( 1 ? ) + ? 2 ( 1 - ? ) ; [0133] the constraints are:

    [00067] ? min ? ? ? ? max ; C12 [0134] solving the optimization problem P5 is equivalent to finding roots of a nonlinear function

    [00068] H ( ? ) = min ? min ? ? ? ? max ? 1 log ( 1 / ? ) + ? 2 - ? ( 1 - ? ) ,

    which is solved by using a Dinkelbach Method method.

    [0135] In some embodiment, the S2.5 solving by the optimization problem P to obtain the optimal user resource allocation decision, includes: [0136] when q.sub.m, h and ? are determined, optimizing f, t, p and b, and the optimization problem P is transformed into an optimization problem P6:

    [00069] min f , t , p , b a ( 1 - ? ) .Math. i ? N m .Math. "\[LeftBracketingBar]" N m .Math. "\[RightBracketingBar]" ( v log ( 1 ? ) C i D i f i 2 + p i t i ) ; [0137] the constraints are:

    [00070] 0 ? f i ? f i max C1 0 ? p i ? p i max C2 I g ( t i + I l C i D i f i ) ? T C3 t i ? s R i C4 .Math. i ? N m .Math. "\[LeftBracketingBar]" N m .Math. "\[RightBracketingBar]" b i ? B , b i > 0 ; C7 [0138] the optimization problem P6 is split into two optimization subproblems; [0139] a first subproblem, denoted as subproblem P6-1, is to solve remaining variables f, t and p of the optimization problem P6 under the transmission bandwidth b given:

    [00071] min f , t , p a ( 1 - ? ) .Math. i ? N m .Math. "\[LeftBracketingBar]" N m .Math. "\[RightBracketingBar]" ( v log ( 1 ? ) C i D i f i 2 + p i t i ) ; [0140] the constraints are:

    [00072] 0 ? f i ? f i max C1 0 ? p i ? p i max C2 I g ( t i + I l C i D i f i ) ? T C3 t i ? s R i C4 f i = I l C i D i T I g - t i and p i = N 0 b i g i ( 2 s t i b i - 1 )

    are obtained according to the constraints C3, C4, and then are brought into the constraints C1, C2, and subproblem P6-1 is transformed into an optimization problem P7:

    [00073] min f , t . p a ( 1 - ? ) .Math. i ? N m .Math. "\[LeftBracketingBar]" N m .Math. "\[RightBracketingBar]" ( v log ( 1 ? ) C i D i ( I l C i D i T I g - t i * ) 2 + N 0 b i g i ( 2 s t i b i - 1 ) t i * ) ; [0141] the constraints are:

    [00074] 0 ? I l C i D i T I g - t i ? f i max C13 0 ? N 0 b i g i ( 2 s t i b i - 1 ) ? p i max ; C14 [0142] a maximum value and a minimum value of t.sub.i are obtained from constraints C13 and C14; the optimization problem P7 is further transformed into an optimization problem P8:

    [00075] min t a ( 1 - ? ) .Math. i ? N m .Math. "\[LeftBracketingBar]" N m .Math. "\[RightBracketingBar]" ( v log ( 1 ? ) C i D i ( I l C i D i T I g - t i ) 2 + N 0 b i g i ( 2 s t i b i - 1 ) t i ) ; [0143] the constraints are:

    [00076] t i min ? t i ? t i max ; C15 [0144] according to the optimization problem P8, when t.sub.i is satisfied

    [00077] .Math. "\[LeftBracketingBar]" ? E i comm ? t i .Math. "\[RightBracketingBar]" = .Math. "\[LeftBracketingBar]" ? E i comp ? t i .Math. "\[RightBracketingBar]" ,

    it is an optimal solution t*.sub.i, which is obtained using a bisection method, and f*.sub.i and p*.sub.i are further obtained; [0145] the second subproblem, denoted as subproblem P6-2, is to solve the transmission bandwidth b of the optimization problem under variables f, t, p given:

    [00078] min b .Math. i ? N m .Math. "\[LeftBracketingBar]" N m .Math. "\[RightBracketingBar]" b i t i N 0 g i ( 2 s t i b i - 1 ) ; [0146] the constraints are:

    [00079] .Math. i ? N m .Math. "\[LeftBracketingBar]" N m .Math. "\[RightBracketingBar]" b i ? B , C7 b i > 0 ; [0147] since the optimization problem P8 is convex, an optimal expression of b is obtained by solving using the KKT condition; [0148] optimizing the subproblem P6-2 leads to a change in bandwidth b, which in turn affects f, t, p, in the subproblem P6-1, and iteratively solves the subproblem P6-1 and subproblem P6-2 are solved by iteration to obtain the optimal f, t, p and b.

    Second Embodiment

    [0149] In a second aspect, the present application provides an UAV-assisted federated learning resource allocation device, including a processor and a storage medium; [0150] wherein the storage medium is configured to store instructions; [0151] the processor for operating in accordance with the instructions to perform the method according to the first embodiment.

    Third Embodiment

    [0152] In a third aspect, the present application provides a storage medium having a computer program stored thereon, wherein the computer program is executed by the processor to implement the method according to the first embodiment.

    Fourth Embodiment

    [0153] In a fourth aspect, the present application provides a computing device, including: [0154] one or more processors, one or more memories, and one or more programs, wherein the one or more programs are stored in the one or more memories and configured to be executed by the one or more processors, wherein the one or more programs includes instructions for executing the method according to the method of the first embodiment.

    [0155] It should be appreciated by those skilled in the art that embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application may take the form of a fully hardware embodiment, a fully software embodiment, or an embodiment that combines software and hardware aspects. Further, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk memory, CD-ROM, optical memory, and the like) that contain computer-usable program code therein.

    [0156] The present application is described with reference to flowcharts and/or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present application. It should be understood that each of the processes and/or boxes in the flowchart and/or block diagram, and the combination of processes and/or boxes in the flowchart and/or block diagram, may be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data-processing device to produce a machine, such that the instructions executed by the processor of the computer or other programmable data-processing device produce a device for carrying out the functions specified in the one process or multiple processes of the flowchart and/or the one box or multiple boxes of the box diagram.

    [0157] These computer program instructions may also be stored in computer-readable memory capable of directing the computer or other programmable data processing device to operate in a particular manner such that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device that implements the function specified in the flowchart one process or a plurality of processes and/or one box or a plurality of boxes.

    [0158] These computer program instructions may also be loaded onto a computer or other programmable data processing device, such that a series of operational steps are performed on the computer or other programmable device to produce computer-implemented processing, such that the instructions executed on the computer or other programmable device provide steps for implementing the functionality specified one process or a plurality of processes in the flowchart and/or the box diagram one box or a plurality of boxes in the box diag.

    [0159] The above embodiments of the present application are described in detail in connection with the accompanying drawings, but the present application is not limited to the above embodiments, and various variations may be made within the scope of knowledge possessed by those skilled in the art without departing from the purposes of the present application.