Research Article
“Fed-DRL”: A Timeliness Optimization Method for Dynamic Data Acquisition System Based on Mobile Edge Computing
(1) | Algorithm 1 Fed-DRL | (2) | Initialization: Initialize system parameters and hyperparameters for learning. | (3) | for = 1,2, …, 5000 do | (4) | Reset the environment for each agent, get local state ; | (5) | Randomly generate ; | (6) | for each agent n in 1,2, …, N do | (7) | if then | (8) | Randomly choose action ; | (9) | else | (10) | Generate actions ; | (11) | end if | (12) | end for | (13) | The resulting action interacts with environment, generate and ; | (14) | Add of each agent into | (15) | for each agent n in 1,2, …, N do | (16) | Sample from ; | (17) | Calculate using the critic network; | (18) | Predict using the target actor network; | (19) | Calculate using the target critic network; | (20) | Update the actor network according to equation (20); | (21) | Update the critic network according to equation (21); | (22) | end for | (23) | if mod = = 1 then | (24) | Update the target actor network and the target critic network with following method; | (25) | | (26) | | (27) | end if | (28) | if mod = = 1 then | (29) | Run edge-federated updating according to equations (23) and (24); | (30) | end if | (31) | end for |
|