Research Article

Privacy-Preserving Efficient Data Retrieval in IoMT Based on Low-Cost Fog Computing

Algorithm 1

BA.
Input: matrix, processing speed, maximum number of iterations.
Output: the order assignment results for the (fog computing server group), the total cost .
(1)Initialize random order set: a random order assignment vector , velocity vector and frequency of each order , order signal strength , order signal pulse rate . In addition, I has a random variable ;
(2)Use formula (7) to calculate total energy cost ;
(3) is the optimal location for each order;
(4)Update the position and speed of the order according to steps (5), (6) and (7);
(5);
(6);
(7);
(8)ifthen
(9);
(10)end if
(11)if and then
(12);
(13);
(14);
(15)end if
(16)Repeat steps 4–15 for each order;
(17)Repeat steps 2–16 until a satisfactory convergence result or a maximum number of iterations is achieved.