CN-116346817-B - Low-latency computing task unloading method and system based on artificial fish swarm algorithm
Abstract
The invention discloses a low-latency computing task unloading method and a system based on an artificial fish swarm algorithm, comprising the steps of establishing a MEC system for unloading computing tasks to an MEC server by multi-user equipment; the MEC system comprises K MEC servers and N user equipment, and the user equipment computing tasks are completed through the optimized MEC system in advance, wherein the process comprises the steps of dividing the computing tasks of each user equipment into K+1 subtasks, compressing partial data of the subtasks by adopting a data compression method to obtain compressed data, dividing the subtasks into compressed data and non-compressed data, transmitting the K subtasks of the user equipment to each MEC server in a non-orthogonal multiple access mode, computing the K+1 subtasks by the user equipment and each MEC server respectively, and returning the computing results of the MEC servers to the user equipment, so that the maximum user computing task completion time delay is remarkably reduced, and the user experience is improved.
Inventors
- LIU RUI
- HUANG HONGBING
- YU JIA
- LI YANG
- Qiu lanxin
- DING ZHONGLIN
- LI ZHONGPING
- CAO WEI
Assignees
- 国网电力科学研究院有限公司
- 南京南瑞信息通信科技有限公司
- 国网浙江省电力有限公司信息通信分公司
Dates
- Publication Date
- 20260508
- Application Date
- 20221227
Claims (9)
- 1. A low-latency calculation task unloading method based on an artificial fish swarm algorithm is characterized by comprising the following steps of Establishing an MEC system for unloading calculation tasks from multi-user equipment to MEC servers, wherein the MEC system comprises K MEC servers and N user equipment; taking the longest time required by the completion of the calculation tasks of the user equipment as an optimization target, establishing an optimization problem model, wherein the expression formula is as follows: ; constraints to optimize the problem model include: constraint C1: ; Constraint C2: ; Constraint C3: ; constraint C4: ; constraint C5: ; constraint C6: ; Constraint C7: ; constraint C8: ; constraint C9: ; Constraint C10: ; Constraint C11: ; Constraint C12: ; In the formula (i), Representing the longest time required for the completion of the computing task for each user device; subtasks representing nth user equipment The amount of data in (a) is proportional to the computational task of the user, Representing the proportion of the data volume of the compressed part in the kth subtask of the nth user equipment to the subtask, Indicating that the kth sub-task of the nth user equipment offloads transmit power to the MEC server, Representing the transmit power representing the calculation of the sub-task returned by the kth MEC server to the nth user equipment, Indicating that the kth MEC server allocates computing resources for the nth user equipment, Representing the time required for the nth user device to upload the uncompressed task, Indicating the time required for the nth user equipment to upload the compression task, Representing the time required for the MEC server to return the calculation result to the nth user equipment; a data size represented as an nth user equipment computing task; a rate denoted as the nth user equipment upload subtask to the kth MEC server; the rate represented as the rate at which the kth MEC server transmits the calculation result of the calculation task back to the nth user equipment; The energy required by the non-compressed part of the sub-tasks from the nth user equipment uploading to the kth sub-task is represented; the energy required by the compressed part in the sub-tasks from the uploading to the kth sub-task of the nth user equipment is represented; Representing the energy required for locally calculating the subtask for the nth user equipment; representing the energy required by the nth user equipment to complete the compression task; expressed as the maximum energy consumption of the nth user equipment; expressed as the maximum transmit power of the nth user equipment; Denoted as the kth MEC server maximum transmit power; indicating the maximum transmitting power of the user equipment; indicating the maximum transmit power of the MEC server; Maximum computing resources denoted MEC servers; the compression coefficient of the kth subtask of the nth user equipment; returning the number of calculation results to the nth user equipment; The calculation method of the longest time required by the completion of the calculation task of each user device comprises the following steps: ; ; ; ; The formula is given by the formula, Representing the time required to compress the data at the nth user device, Representing the time required by the nth user equipment to calculate the subtask; representing the time required for the kth MEC server to process uncompressed data of the nth user equipment, Representing the time required for the kth MEC server to process the compressed data of the nth user equipment; representing the time required for the nth user device to upload the uncompressed task, Indicating the time required for the nth user equipment to upload the compression task, Representing the time required for the MEC server to return the calculation result to the nth user equipment; solving the optimization problem model by using an artificial fish swarm algorithm to obtain optimal MEC system parameters, wherein the method specifically comprises the following steps: Setting the initial position of the artificial fish as Initializing artificial fish swarm parameters and initializing population scale Visual field of artificial fish Step size Factor of congestion And number of attempts ; Updating the self-adaptive step length in the artificial fish swarm algorithm, and updating the positions of the artificial fish through a foraging behavior function, a clustering behavior function, a rear-end collision behavior function and a random behavior function to obtain a new generation of artificial fish swarm; Screening out artificial fish with an optimal evaluation function value by using an evaluation function, and comparing the optimal evaluation function value in the new-generation artificial fish swarm with the evaluation function value on the bulletin board, wherein the bulletin board records the optimal evaluation function value in the traditional artificial fish swarm; Repeating the optimization process until reaching a preset reproduction algebra to obtain a final artificial fish swarm, and taking the artificial fish state with the optimal evaluation function value in the final artificial fish swarm as the optimal MEC system parameter; Dividing the calculation task of each user equipment into K+1 subtasks by the optimized MEC system, compressing partial data of the subtasks by adopting a data compression method to obtain compressed data, dividing the subtasks into compressed data and non-compressed data, transmitting the K subtasks of the user equipment to each MEC server in a non-orthogonal multiple access mode, calculating the K+1 subtasks by the user equipment and each MEC server respectively, and returning the calculation result of the MEC server to the user equipment.
- 2. The method for unloading a low-latency computing task based on an artificial fish swarm algorithm according to claim 1, wherein the method for updating the adaptive step size in the artificial fish swarm algorithm comprises the following steps: ; In the formula (i), For the maximum iteration step size, For the minimum iteration step size, For the current number of iterations, B is an algorithm control coefficient for controlling the speed of step size reduction.
- 3. The method for offloading low-latency computing tasks based on artificial fish swarm algorithm according to claim 2, wherein the method for updating the artificial fish position by a random behavior function comprises: the artificial fish moves randomly by one step length, and the expression is: ; In the formula (i), For randomly generated values at Is a matrix of (a); represents a decimal fraction of 0 to 1; Representing the initial position of the artificial fish before random behavior update; Representing the new location of the artificial fish.
- 4. A method of offloading low-latency computing tasks based on artificial fish swarm algorithm according to claim 3, wherein the method of updating the artificial fish's position by a foraging behavior function comprises: Artificial fish will randomly swim in the field of view to find food, the expression of the random position of food is as follows: ; In the formula (i), Representing randomly generated values at A kind of electronic device A matrix; Expressed as random food positions; representing the initial position of the artificial fish before the foraging behavior is updated; Comparing the objective function value of the initial position of the artificial fish with the objective function value of the random position of the food, and recording the objective function value of the initial position of the artificial fish as The objective function value of the random position of the food is recorded as If (if) Updating the position of the artificial fish as follows: If try After a second time, the artificial fish position is not updated yet The position of the individual fish is updated by means of a random behavior function.
- 5. The method for offloading tasks based on artificial fish swarm algorithm according to claim 4, wherein the method for updating the position of the artificial fish by using the rear-end collision function comprises: Number of other artificial fish in the field of view of artificial fish search Simultaneously evaluating the objective function values of other artificial fish in the visual field to obtain the position of the artificial fish with the minimum objective function value; judging whether the water area where the artificial fish with the minimum objective function value is located is crowded or not, if so Indicating that the water area is not crowded, wherein, The objective function values of the initial positions of the artificial fish before the update of the rear-end collision behavior are respectively represented, Representing the minimum objective function value of other surrounding artificial fish; the artificial fish may advance toward the artificial fish having the optimal objective function value, and the position of the artificial fish is updated as follows: , wherein, Representing the artificial fish position with the smallest objective function value, Indicating the initial position of the artificial fish before updating the rear-end collision behavior, if Indicating that the water area is crowded, and updating the position of the artificial fish through a foraging behavior function.
- 6. The method for offloading tasks based on low-latency calculation of artificial fish swarm algorithm of claim 4, wherein updating the artificial fish position by means of a swarm behavior function comprises: number of artificial fish in the range of the individual search field of artificial fish Finding the center position of the artificial fish school in the visual field , Wherein Representing the position coordinates of all artificial fish in the visual field, and calculating the center position of the artificial fish school in the visual field Is recorded as the objective function value of (2) If (1) Indicating that the water area is not crowded, wherein, The objective function values respectively representing the initial positions of the artificial fish before the crowd behavior is updated, the artificial fish can advance towards the center position of the artificial fish shoal in the visual field range, and the position is updated as follows Wherein Indicating the initial position of artificial fish before the update of the grouping behavior, if Indicating that the water area is crowded, and updating the position of the artificial fish through a foraging behavior function.
- 7. A low-latency computing task offloading system based on an artificial fish swarm algorithm, comprising: The system establishment module is used for establishing an MEC system for unloading calculation tasks from multi-user equipment to MEC servers, wherein the MEC system comprises K MEC servers and N user equipment; The optimization module is used for establishing an optimization problem model by taking the longest time required by completion of the calculation tasks of the user equipment as an optimization target, solving the optimization problem model by utilizing an artificial fish swarm algorithm to obtain the optimal MEC system parameters; The processing analysis module divides the calculation task of each user equipment into K+1 subtasks through the optimized MEC system, compresses partial data of the subtasks by adopting a data compression method to obtain compressed data, divides the subtasks into compressed data and non-compressed data, transmits the K subtasks of the user equipment to each MEC server in a non-orthogonal multiple access mode, calculates the K+1 subtasks by the user equipment and each MEC server respectively, and transmits calculation results of the MEC servers back to the user equipment; The optimization module takes the longest time required by the completion of the calculation tasks of the user equipment as an optimization target, establishes an optimization problem model, and has the expression formula as follows: ; constraints to optimize the problem model include: constraint C1: ; Constraint C2: ; Constraint C3: ; constraint C4: ; constraint C5: ; constraint C6: ; Constraint C7: ; constraint C8: ; constraint C9: ; Constraint C10: ; Constraint C11: ; Constraint C12: ; In the formula (i), Representing the longest time required for the completion of the computing task for each user device; subtasks representing nth user equipment The amount of data in (a) is proportional to the computational task of the user, Representing the proportion of the data volume of the compressed part in the kth subtask of the nth user equipment to the subtask, Indicating that the kth sub-task of the nth user equipment offloads transmit power to the MEC server, Representing the transmit power representing the calculation of the sub-task returned by the kth MEC server to the nth user equipment, Indicating that the kth MEC server allocates computing resources for the nth user equipment, Representing the time required for the nth user device to upload the uncompressed task, Indicating the time required for the nth user equipment to upload the compression task, Representing the time required for the MEC server to return the calculation result to the nth user equipment; a data size represented as an nth user equipment computing task; a rate denoted as the nth user equipment upload subtask to the kth MEC server; the rate represented as the rate at which the kth MEC server transmits the calculation result of the calculation task back to the nth user equipment; The energy required by the non-compressed part of the sub-tasks from the nth user equipment uploading to the kth sub-task is represented; the energy required by the compressed part in the sub-tasks from the uploading to the kth sub-task of the nth user equipment is represented; Representing the energy required for locally calculating the subtask for the nth user equipment; representing the energy required by the nth user equipment to complete the compression task; expressed as the maximum energy consumption of the nth user equipment; expressed as the maximum transmit power of the nth user equipment; Denoted as the kth MEC server maximum transmit power; indicating the maximum transmitting power of the user equipment; indicating the maximum transmit power of the MEC server; Maximum computing resources denoted MEC servers; the compression coefficient of the kth subtask of the nth user equipment; returning the number of calculation results to the nth user equipment; The calculation method of the longest time required by the completion of the calculation task of each user device comprises the following steps: ; ; ; ; The formula is given by the formula, Representing the time required to compress the data at the nth user device, Representing the time required by the nth user equipment to calculate the subtask; representing the time required for the kth MEC server to process uncompressed data of the nth user equipment, Representing the time required for the kth MEC server to process the compressed data of the nth user equipment; representing the time required for the nth user device to upload the uncompressed task, Indicating the time required for the nth user equipment to upload the compression task, Representing the time required for the MEC server to return the calculation result to the nth user equipment; The optimization module utilizes an artificial fish swarm algorithm to solve an optimization problem model to obtain optimal MEC system parameters, and the process comprises the following steps: Setting the initial position of the artificial fish as Initializing artificial fish swarm parameters and initializing population scale Visual field of artificial fish Step size Factor of congestion And number of attempts ; Updating the self-adaptive step length in the artificial fish swarm algorithm, and updating the positions of the artificial fish through a foraging behavior function, a clustering behavior function, a rear-end collision behavior function and a random behavior function to obtain a new generation of artificial fish swarm; Screening out artificial fish with an optimal evaluation function value by using an evaluation function, and comparing the optimal evaluation function value in the new-generation artificial fish swarm with the evaluation function value on the bulletin board, wherein the bulletin board records the optimal evaluation function value in the traditional artificial fish swarm; Repeating the optimization process until reaching the preset reproduction algebra to obtain the final artificial fish swarm, taking the artificial fish state with the optimal evaluation function value in the final artificial fish swarm as the optimal MEC system parameter, and outputting the optimal evaluation function value of the bulletin board as the time delay for unloading the user and completing the calculation task.
- 8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor performs the steps of the low-latency computing task offloading method of any one of claims 1 to 6.
- 9. A computer-readable storage medium, characterized in that it has stored thereon a computer program which, when executed by a processor, implements the method steps of detecting a motor failure according to any one of claims 1 to 6.
Description
Low-latency computing task unloading method and system based on artificial fish swarm algorithm Technical Field The invention belongs to the technical field of mobile edge calculation, and particularly relates to a low-time-delay calculation task unloading method and system based on an artificial fish swarm algorithm. Background With the rapid development of the internet of things technology, the scale of the internet of things will be larger and larger. It is estimated by Cisco, morganelli and Huacheng et al that there are about 400 hundred million IoE connections worldwide in 2019, the connection scale in 2020 reaches 750 hundred million, and 2025 will reach 1000 hundred million. To address this problem, mobile edge computing is currently considered an emerging paradigm that has found widespread use, supporting both delay-critical and computation-intensive applications that can provide computing resources at the network edge to resource-starved user devices near the edge. Because of the huge amount of raw data collected by the nodes and high redundancy, the computing power of the MEC server is greatly improved, but still cannot be compared with a data center, which causes high delay in the calculation and unloading of the user equipment. Disclosure of Invention The invention aims to provide a low-time-delay calculation task unloading method and system based on an artificial fish swarm algorithm, which combine a data compression technology and a non-orthogonal multiple access technology, remarkably reduce the time delay of the completion of the maximum user calculation task and improve the user experience. In order to achieve the above purpose, the technical scheme adopted by the invention is as follows: the first aspect of the invention provides a low-latency computing task unloading method based on an artificial fish swarm algorithm, which comprises the following steps: establishing an MEC system for unloading calculation tasks from multi-user equipment to MEC servers, wherein the MEC system comprises K MEC servers and N user equipment; establishing an optimization problem model by taking the longest time required by the completion of the calculation tasks of the user equipment as an optimization target, solving the optimization problem model by utilizing an artificial fish swarm algorithm to obtain optimal MEC system parameters; Dividing the calculation task of each user equipment into K+1 subtasks through an optimized MEC system, compressing partial data of the subtasks by adopting a data compression method to obtain compressed data, dividing the subtasks into compressed data and non-compressed data, transmitting the K subtasks of the user equipment to each MEC server in a non-orthogonal multiple access mode, respectively calculating the K+1 subtasks by the user equipment and each MEC server, and transmitting the calculation result of the MEC server back to the user equipment. Preferably, N orthogonal channel resources with the bandwidth of B are configured in the MEC system, wherein N is more than or equal to K, and the computing tasks among all users are transmitted to all MEC servers in an orthogonal multiple access mode. Preferably, the method for establishing the optimization problem model by taking the longest time required by the completion of the computing task of each user device as an optimization target comprises the following steps: the expression formula of the optimization problem model is as follows: constraints to optimize the problem model include: constraint C1: Constraint C2: Constraint C3: constraint C4: constraint C5: constraint C6: Constraint C7: constraint C8: constraint C9: Constraint C10: Constraint C11: Constraint C12: In the formula, f represents the longest time required for completing the calculation task of each user equipment, lambda n,k represents the proportion of the data volume of the subtask k of the nth user equipment to the calculation task of the user, gamma n,k represents the proportion of the data volume of the compressed part in the kth subtask of the nth user equipment to the subtask, p n,k represents the transmitting power of the kth subtask of the nth user equipment to be offloaded to the MEC server, q n,k represents the transmitting power of the kth MEC server for returning the calculation result of the subtask to the nth user equipment, Indicating that the kth MEC server allocates computing resources for the nth user equipment,Representing the time required for the nth user device to upload the uncompressed task,Representing the time required for the nth user device to upload the uncompressed task,Representing the time required for the MEC server to return the calculation result to the nth user equipment; D n represents the data size of the calculation task for the nth user equipment; the rate at which the nth user device uploads the computing task to the kth MEC server; the rate represented as the rate at which the kth MEC server transmits the calculatio