|
Algorithm 1 A MAB-based fair scheduling algorithm for reducing energy consumption. |
-
Initialize:
global model ; M terrestrial devices indexed by m, each with a local data volume of in round t;
-
Output:
global model
-
1:
-
2:
Initialize global model
-
3:
for each round to T do
-
4:
← ClientSelection(t, N),
-
5:
Receive the trained local models from the terrestrial device in the set
-
6:
Aggregate the models uploaded according to Equation (2)
-
7:
Send to M terrestrial devices
-
8:
end for
-
9:
-
10:
Receive the global model from the UAV
-
11:
for each local round to T do
-
12:
Train the local model according to Equation (1)
-
13:
end for
-
14:
Send to the UAV
-
15:
-
16:
Initialize the relevant parameters to ensure that the reward distribution is unknown
-
17:
Update the reward function according to Equation (15) and also update the UCB score according to Equation (16)
-
18:
Sort the UCB scores of individual terrestrial devices in descending order
-
19:
Select the first N terrestrial devices to form , i.e.,
-
20:
Return to the UAV
|