A low-latency computing task offloading method and system based on an artificial fish swarm algorithm

By optimizing MEC system parameters through the artificial fish swarm algorithm, the computing tasks of user equipment are divided into compressed and uncompressed data. By utilizing data compression and non-orthogonal multiple access transmission technology, the problem of excessive latency in computing tasks in mobile edge computing is solved, and more efficient computing task offloading is achieved.

CN116346817BActive Publication Date: 2026-05-08STATE GRID ELECTRIC POWER RES INST +2
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
STATE GRID ELECTRIC POWER RES INST
Filing Date
2022-12-27
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

In mobile edge computing, user devices experience high computational offloading latency, and MEC servers lack sufficient computing power to effectively process large amounts of data, resulting in excessively long latency for computational tasks.

Method used

The artificial fish swarm algorithm is used to optimize the MEC system parameters. The computing tasks of user equipment are divided into compressed and uncompressed data, which are transmitted to the MEC server for computing through non-orthogonal multiple access. Data compression technology is used to reduce the amount of data transmitted, and the computing efficiency is improved by combining orthogonal multiple access.

Benefits of technology

It significantly reduced the latency of user computing tasks, improved the user experience, and optimized the overall performance of the MEC system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116346817B_ABST
    Figure CN116346817B_ABST
Patent Text Reader

Abstract

The application discloses a low-latency computing task unloading method and system based on an artificial fish school algorithm, and comprises the following steps: establishing a MEC system for unloading computing tasks of multiple user devices to MEC servers; the MEC system comprises K MEC servers and N user devices; the user device computing task is completed through the pre-optimized MEC system, and the process comprises the following steps: dividing the computing task of each user device into K+1 subtasks, compressing part of the data of the subtasks by using a data compression method to obtain compressed data, dividing the subtasks into compressed data and uncompressed data, transmitting the K subtasks of the user device to each MEC server in a non-orthogonal multiple access mode, and respectively calculating the K+1 subtasks of the user device and each MEC server, and returning the calculation results of the MEC servers to the user device; the maximum user computing task completion latency is significantly reduced, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of mobile edge computing technology, specifically relating to a method and system for offloading low-latency computing tasks based on the artificial fish swarm algorithm. Background Technology

[0002] With the rapid development of IoT technology, the scale of the interconnected world will continue to grow. According to estimates from companies such as Cisco, Morgan Stanley, and Huawei, there were approximately 40 billion IoE connections globally in 2019, reaching 75 billion in 2020, and projected to reach 100 billion by 2025. To address this issue, mobile edge computing (MEC) is currently considered an emerging paradigm and has been widely adopted. MEC supports latency-critical and compute-intensive applications, providing computing resources at the network edge to resource-constrained user devices located near the edge. However, due to the massive amount and high redundancy of raw data collected by nodes, while the computing power of MEC servers has greatly improved, it still cannot compare to that of data centers, resulting in high latency for user device compute offloading. Summary of the Invention

[0003] The purpose of this invention is to provide a low-latency computing task offloading method and system based on the artificial fish swarm algorithm, which combines data compression technology and non-orthogonal multiple access technology to significantly reduce the maximum user computing task completion latency and improve user experience.

[0004] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0005] The first aspect of this invention provides a low-latency computing task offloading method based on an artificial fish swarm algorithm, comprising:

[0006] A multi-user device offloads computing tasks to an MEC server. The MEC system comprises K MEC servers and N user devices.

[0007] An optimization problem model is established with the goal of maximizing the time required for each user device to complete its computing tasks. The optimal MEC system parameters are obtained by solving the optimization problem model using the artificial fish swarm algorithm. The MEC system is then optimized based on these optimal MEC system parameters.

[0008] The optimized MEC system divides the computing tasks of each user device into K+1 subtasks. A data compression method is used to compress part of the data of the subtasks to obtain compressed data. The subtasks are then divided into compressed data and uncompressed data. The K subtasks of the user device are transmitted to each MEC server in a non-orthogonal multiple access manner. The user device and each MEC server perform calculations on the K+1 subtasks respectively, and the calculation results of the MEC server are sent back to the user device.

[0009] Preferably, N orthogonal channel resources with a bandwidth of B are configured in the MEC system, where N≥K; the computing tasks between users are transmitted to each MEC server using orthogonal multiple access.

[0010] Preferred methods for establishing an optimization problem model, with the optimization objective being the longest time required for each user device to complete its computing task, include:

[0011] The formula for expressing the optimization problem model is as follows:

[0012]

[0013] The constraints of the optimization problem model include:

[0014] Constraint C1:

[0015] Constraint C2:

[0016] Constraint C3:

[0017] Constraint C4:

[0018] Constraint C5:

[0019] Constraint C6:

[0020] Constraint C7:

[0021] Constraint C8:

[0022] Constraint C9:

[0023] Constraint C10:

[0024] Constraint C11:

[0025] Constraint C12:

[0026] In the formula, f represents the maximum time required for each user device to complete its computing task; λ n,k γ represents the proportion of data volume in subtask k of the nth user device to the user's total computational tasks. n,k p represents the proportion of compressed data in the k-th subtask of the n-th user device to the total data volume of the subtask. n,k q represents the transmit power of the k-th subtask of the n-th user device offloaded to the MEC server. n,kLet represent the transmit power of the k-th MEC server sending the subtask calculation results back to the n-th user equipment. This indicates that the k-th MEC server allocates computing resources to the n-th user device. This represents the time required for the nth user device to upload an uncompressed task. This represents the time required for the nth user device to upload an uncompressed task. D represents the time required for the MEC server to send the calculation results back to the nth user device; n This represents the data size of the computation task for the nth user device; This represents the rate at which the nth user device uploads computing tasks to the kth MEC server; This represents the rate at which the k-th MEC server transmits the computation results of the computation task back to the n-th user device; This represents the energy required for the nth user device to upload a subtask to the uncompressed portion of the kth subtask; This represents the energy required for the nth user device to upload the compressed portion of the subtask to the kth subtask; This represents the energy required for the local computation subtask of the nth user device. This represents the energy required for the nth user device to complete the compression task; This represents the maximum energy consumption of the nth user device; This represents the maximum transmit power of the nth user equipment. p represents the maximum transmit power of the k-th MEC server. max q represents the maximum transmit power of the user equipment; max This indicates the maximum transmit power of the MEC server; This represents the maximum computing resources of the MEC server.

[0027] The preferred method for calculating the longest time required to complete the computing task of each user device is as follows:

[0028]

[0029] T n =max(t) 1n ,t 2n )

[0030]

[0031]

[0032] The formula is, This represents the time required to compress data on the nth user device. This represents the time required for the nth user device to compute the subtask; This indicates the time required for the user device to upload an uncompressed task. This represents the time required for the k-th MEC server to process the uncompressed data of the n-th user device. This represents the time required for the k-th MEC server to process the compressed data of the n-th user device.

[0033] Preferably, methods for solving optimization problem models using the artificial fish swarm algorithm to obtain optimal MEC system parameters include:

[0034] Set the initial position of the artificial fish as follows: Initialize the artificial fish swarm parameters; initialize the population size N, the artificial fish's visual field, step size, crowding factor δ, and number of attempts.

[0035] The adaptive step size in the artificial fish swarm algorithm is updated, and the position of the artificial fish is updated through foraging behavior function, swarming behavior function, tail chasing behavior function and random behavior function to obtain a new generation of artificial fish swarms;

[0036] Artificial fish with the best evaluation function value are selected using an evaluation function. The best evaluation function value in the new generation of artificial fish population is compared with the evaluation function value on the bulletin board, which records the best evaluation function value in all generations of artificial fish populations. If the new generation of artificial fish population is better than the best evaluation function value on the bulletin board, the best evaluation function value recorded on the bulletin board is updated; otherwise, the original best evaluation function value on the bulletin board remains unchanged.

[0037] The optimization process is repeated until the preset number of generations is reached to obtain the final artificial fish swarm. The state of the artificial fish with the optimal evaluation function value in the final artificial fish swarm is taken as the best MEC system parameters. The optimal evaluation function value of the output bulletin board is taken as the time delay for the user to unload and complete the calculation task.

[0038] The preferred method for calculating the adaptive step size in the updated artificial fish swarm algorithm is as follows:

[0039]

[0040] In the formula, max_step is the maximum iteration step size, min_step is the minimum iteration step size, i is the current iteration number, iteration is the maximum iteration number, and b is the algorithm control coefficient, which is used to control the speed at which the step size decreases.

[0041] Preferably, the method for updating the position of the artificial fish using a random behavior function includes:

[0042] The artificial fish moves randomly, taking a step, as expressed by:

[0043] Xnew =fish_pos1+Λ·Rand()·step

[0044] In the formula, Λ is a randomly generated matrix with values ​​ranging from -1 to 1; Rand() represents a decimal number between 0 and 1; fish_pos1 represents the initial position of the artificial fish before the random behavior update; X new This indicates the new location of the artificial fish.

[0045] Preferably, the method for updating the position of artificial fish using a foraging behavior function includes:

[0046] Artificial fish will swim randomly within their field of vision in search of food. The expression for the random location of food is as follows:

[0047] pos_temp=fish_pos2+Rand()·Θ·visual

[0048] In the formula, Θ represents an n×k matrix with randomly generated values ​​ranging from -0.1 to 0.1; pos_temp represents the random location of the food; and fish_pos2 represents the initial location of the artificial fish before the foraging behavior is updated.

[0049] Comparing the objective function value of the artificial fish at its initial position with the objective function value of the food at its random position, let the objective function value of the artificial fish at its initial position be denoted as X. i The objective function value of the food at a random location is denoted as Y. i If Y i >X i The location of the artificial fish has been updated as follows: If the artificial fish position or Y is still not updated after trying_number times, i ≤X i Then, the position of the individual fish is updated through a random behavior function.

[0050] Preferably, the method for updating the position of the artificial fish using a tail-chasing behavior function includes:

[0051] The artificial fish searches for the number of other artificial fish within its field of vision, n. f Simultaneously, the objective function values ​​of other artificial fish within the field of view are evaluated to obtain the location of the artificial fish with the minimum objective function value.

[0052] Determine whether the waters containing the artificial fish with the minimum objective function value are crowded; if This indicates that the water area is not crowded; where P represents the objective function value of the initial position of the artificial fish before the tail-chasing behavior update, and T represents the minimum objective function value of the surrounding artificial fish; the artificial fish will move towards the artificial fish with the optimal objective function value, and the position of the artificial fish is updated as follows: Where min_pos represents the position of the artificial fish with the minimum objective function value, and fihs_pos3 represents the initial position of the artificial fish before the tail-chasing behavior update; if This indicates that the water area is crowded, and the location of the artificial fish is updated using a foraging behavior function.

[0053] Preferably, the method for updating the position of artificial fish using a clustering behavior function includes:

[0054] The number of artificial fish within the search field of an individual artificial fish (n) f Find the center location X of the artificial fish school within the field of view. center , Where X j Represent the position coordinates of all artificial fish within the field of view, and calculate the center position X of the artificial fish swarm within the field of view. center The objective function value is denoted as Y. c ;like This indicates that the water area is not crowded, where X represents the objective function value of the initial position of the artificial fish before the update of the gregarious behavior;

[0055] The artificial fish will move towards the center of the artificial fish school within its field of vision, and its position will be updated to... Where fish_pos4 represents the initial position of the artificial fish before the swarming behavior update; if This indicates that the water area is crowded, and the location of the artificial fish is updated using a foraging behavior function.

[0056] A second aspect of the present invention provides a low-latency computing task offloading system based on an artificial fish swarm algorithm, comprising:

[0057] The system establishment module is used to establish an MEC system in which multiple user devices offload computing tasks to MEC servers; the MEC system includes K MEC servers and N user devices;

[0058] The optimization module establishes an optimization problem model with the goal of maximizing the time required for each user device to complete its computing tasks. It then uses the artificial fish swarm algorithm to solve the optimization problem model to obtain the optimal MEC system parameters. Finally, it optimizes the MEC system based on these optimal parameters.

[0059] The processing and analysis module divides the computing tasks of each user device into K+1 subtasks through the optimized MEC system. It uses data compression methods to compress part of the data of the subtasks to obtain compressed data. The subtasks are then divided into compressed data and uncompressed data. The K subtasks of the user device are transmitted to each MEC server in a non-orthogonal multiple access manner. The user device and each MEC server perform calculations on the K+1 subtasks respectively, and the calculation results of the MEC server are sent back to the user device.

[0060] Preferably, the formula for expressing the optimization problem model is:

[0061]

[0062] The constraints of the optimization problem model include:

[0063] Constraint C1:

[0064] Constraint C2:

[0065] Constraint C3:

[0066] Constraint C4:

[0067] Constraint C5:

[0068] Constraint C6:

[0069] Constraint C7:

[0070] Constraint C8:

[0071] Constraint C9:

[0072] Constraint C10:

[0073] Constraint C11:

[0074] Constraint C12:

[0075] In the formula, f represents the maximum time required for each user device to complete its computing task; λ n,k γ represents the proportion of data volume in subtask k of the nth user device to the user's total computational tasks. n,k p represents the proportion of compressed data in the k-th subtask of the n-th user device to the total data volume of the subtask. n,k q represents the transmit power of the k-th subtask of the n-th user device offloaded to the MEC server. n,k Let represent the transmit power of the k-th MEC server sending the subtask calculation results back to the n-th user equipment. This indicates that the k-th MEC server allocates computing resources to the n-th user device. This represents the time required for the nth user device to upload an uncompressed task. This represents the time required for the nth user device to upload an uncompressed task. D represents the time required for the MEC server to send the calculation results back to the nth user device; n This represents the data size of the computation task for the nth user device; This represents the rate at which the nth user device uploads a subtask to the kth MEC server; This represents the rate at which the k-th MEC server transmits the computation results of the computation task back to the n-th user device; This represents the energy required for the nth user device to upload a subtask to the uncompressed portion of the kth subtask; This represents the energy required for the nth user device to upload the compressed portion of the subtask to the kth subtask; This represents the energy required for the local computation subtask of the nth user device. This represents the energy required for the nth user device to complete the compression task; This represents the maximum energy consumption of the nth user device; This represents the maximum transmit power of the nth user equipment. p represents the maximum transmit power of the k-th MEC server. max q represents the maximum transmit power of the user equipment; max This indicates the maximum transmit power of the MEC server; This represents the maximum computing resources of the MEC server.

[0076] Preferably, the optimization module uses the artificial fish swarm algorithm to solve the optimization problem model to obtain the optimal MEC system parameters, the process of which includes:

[0077] Set the initial position of the artificial fish as follows: Initialize the artificial fish swarm parameters; initialize the population size N, the artificial fish's visual field, step size, crowding factor δ, and number of attempts.

[0078] The adaptive step size in the artificial fish swarm algorithm is updated, and the position of the artificial fish is updated through foraging behavior function, swarming behavior function, tail chasing behavior function and random behavior function to obtain a new generation of artificial fish swarms;

[0079] Artificial fish with the best evaluation function value are selected using an evaluation function. The best evaluation function value in the new generation of artificial fish population is compared with the evaluation function value on the bulletin board, which records the best evaluation function value in all generations of artificial fish populations. If the new generation of artificial fish population is better than the best evaluation function value on the bulletin board, the best evaluation function value recorded on the bulletin board is updated; otherwise, the original best evaluation function value on the bulletin board is retained.

[0080] The optimization process is repeated until the preset number of generations is reached to obtain the final artificial fish swarm. The state of the artificial fish with the optimal evaluation function value in the final artificial fish swarm is taken as the best MEC system parameters. The optimal evaluation function value of the output bulletin board is taken as the time delay for the user to unload and complete the calculation task.

[0081] A third aspect of the present invention provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor performs the steps of the low-latency computing task offloading method.

[0082] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for detecting motor faults.

[0083] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0084] This invention divides the computing task of each user device into K+1 subtasks, compresses a portion of the data in each subtask using a data compression method to obtain compressed data, and then divides the subtasks into compressed and uncompressed data. The K subtasks of the user device are transmitted to each MEC server using a non-orthogonal multiple access method. Both the user device and each MEC server perform calculations on the K+1 subtasks, and the calculation results from the MEC servers are returned to the user device. While meeting the maximum energy consumption of the user device, this invention minimizes the time required for users with the maximum computing latency, improving the overall system performance and enhancing the user experience.

[0085] This invention establishes an optimization problem model with the goal of maximizing the time required for each user device to complete its computing tasks. It then uses an artificial fish swarm algorithm to solve the optimization problem model to obtain the optimal MEC system parameters. Based on these optimal MEC system parameters, the MEC system is optimized, thus accelerating the training process. The optimized MEC system significantly reduces the time required for unloading. Attached Figure Description

[0086] Figure 1 This is a structural diagram of the MEC system provided in Embodiment 1 of the present invention;

[0087] Figure 2 This is a flowchart of a low-latency computing task offloading method based on an artificial fish swarm algorithm provided by the present invention;

[0088] Figure 3 The present invention provides the user equipment computing task completion latency and user computing task data volume D. n Relationship diagram;

[0089] Figure 4This invention provides user equipment computing task completion latency and MEC computing capability C. max The relationship. Detailed Implementation

[0090] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the scope of protection of the present invention.

[0091] Example 1

[0092] like Figure 1 and Figure 2 As shown, a low-latency computing task offloading method based on the artificial fish swarm algorithm includes:

[0093] Establish a MEC system where multiple user devices offload computing tasks to MEC servers; the MEC system includes K MEC servers and N user devices; the maximum computing power of the MEC servers is C. max The system has N orthogonal channel resources with bandwidth B, where N ≥ K. Each user equipment n has a computation task, n ∈ [1, N], and the deadline for user equipment n to complete the computation task is T. n The data size for the computation task is D. n The number of CPU cycles required to complete a 1-bit computation task is C. n The frequency of completing local user calculations is:

[0094] The user equipment computing tasks are completed through a pre-optimized MEC system, the process of which includes:

[0095] The computational task for each user equipment is divided into K+1 subtasks. Data compression is used to compress a portion of the data in each subtask to obtain compressed data. The subtasks are then divided into compressed and uncompressed data. The K subtasks from each user equipment are transmitted to the respective MEC servers using non-orthogonal multiple access (NOA). Both the user equipment and each MEC server perform computations on the K+1 subtasks. N orthogonal channel resources with bandwidth B are configured in the MEC system, where N ≥ K. The computational tasks between users are transmitted to the respective MEC servers using NOA, utilizing different channel resources to improve computational efficiency. The computational results from the MEC servers are then sent back to the user equipment.

[0096] The process of optimizing an MEC system includes:

[0097] Methods for establishing an optimization problem model that take the longest time required to complete the computing tasks of each user device as the optimization objective include:

[0098] The formula for expressing the optimization problem model is as follows:

[0099]

[0100] The constraints of the optimization problem model include:

[0101] Constraint C1:

[0102] Constraint C2:

[0103] Constraint C3:

[0104] Constraint C4:

[0105] Constraint C5:

[0106] Constraint C6:

[0107] Constraint C7:

[0108] Constraint C8:

[0109] Constraint C9:

[0110] Constraint C10:

[0111] Constraint C11:

[0112] Constraint C12:

[0113] In the formula, f represents the maximum time required for each user device to complete its computing task; λ n,k γ represents the proportion of data volume in subtask k of the nth user device to the user's total computational tasks. n,k p represents the proportion of compressed data in the k-th subtask of the n-th user device to the total data volume of the subtask. n,k q represents the transmit power of the k-th subtask of the n-th user device offloaded to the MEC server. n,k Let represent the transmit power of the k-th MEC server sending the subtask calculation results back to the n-th user equipment. This indicates that the k-th MEC server allocates computing resources to the n-th user device. This represents the time required for the nth user device to upload an uncompressed task. This represents the time required for the nth user device to upload an uncompressed task. D represents the time required for the MEC server to send the calculation results back to the nth user device; nThis represents the data size of the computation task for the nth user device; This represents the rate at which the nth user device uploads computing tasks to the kth MEC server; This represents the rate at which the k-th MEC server transmits the computation results of the computation task back to the n-th user device; This represents the energy required for the nth user device to upload a subtask to the uncompressed portion of the kth subtask; This represents the energy required for the nth user device to upload the compressed portion of the subtask to the kth subtask; This represents the energy required for the local computation subtask of the nth user device. This represents the energy required for the nth user device to complete the compression task; This represents the maximum energy consumption of the nth user device; This represents the maximum transmit power of the nth user equipment. p represents the maximum transmit power of the k-th MEC server. max q represents the maximum transmit power of the user equipment; max This indicates the maximum transmit power of the MEC server; This represents the maximum computing resources of the MEC server.

[0114] Constraint C4 states that the energy consumed by a user to complete a computation task cannot exceed the user's maximum energy consumption; constraint C7 states that the sum of the power required by a user to send all subtasks cannot exceed the user's maximum transmission power; constraint C8 states that the sum of the power required by the MEC server to send the computation results of all subtasks cannot exceed the MEC server's maximum transmission power; constraints C10, C11, and C12 state the rate at which a user uploads a computation task to the MEC server to ensure successful transmission of the computation task and its results. And the rate at which the MEC server sends the results of the computation task back to the user. The minimum requirements.

[0115] The calculation method for the longest time required to complete the computing task of each user device is as follows:

[0116]

[0117] T n =max(t) 1n ,t 2n )

[0118]

[0119]

[0120] The formula is, This represents the time required to compress data on the nth user device. This represents the time required for the nth user device to compute the subtask; This indicates the time required for the user device to upload an uncompressed task. This represents the time required for the k-th MEC server to process the uncompressed data of the n-th user device. This represents the time required for the k-th MEC server to process the compressed data of the n-th user device.

[0121] The artificial fish swarm algorithm is used to solve the optimization problem model to obtain the optimal MEC system parameters. Methods for optimizing the MEC system based on these optimal parameters include:

[0122] Set the initial position of the artificial fish as follows: Its variables are n×k matrices; initialize the artificial fish swarm parameters; initialize the population size N, the artificial fish's visual field, step size, crowding factor δ, and number of attempts;

[0123] The method for calculating the adaptive step size in the updated artificial fish swarm algorithm is as follows:

[0124]

[0125] In the formula, `max_step` is the maximum iteration step size, `min_step` is the minimum iteration step size, `i` is the current iteration number, `iteration` is the maximum number of iterations, and `k` is the algorithm control coefficient, which controls the rate at which the step size decreases. This method changes the traditional fixed-step-size search by employing an adaptive step size. When the optimal value is not readily apparent, a larger step size is used to increase the convergence speed. When the optimal value is readily apparent, a smaller step size is used to facilitate finding local optima.

[0126] The location of artificial fish is updated by using foraging behavior functions, gregarious behavior functions, tail-chasing behavior functions, and random behavior functions to obtain a new generation of artificial fish swarms.

[0127] (1) Methods for updating the position of artificial fish using random behavior functions include:

[0128] The artificial fish moves randomly, taking a step, as expressed by:

[0129] X new =fish_pos1+Λ·Rand()·step

[0130] In the formula, Λ is a randomly generated matrix with values ​​ranging from -1 to 1; Rand() represents a decimal number between 0 and 1; fish_pos1 represents the initial position of the artificial fish before the random behavior update; X newThe new position of the artificial fish is represented; the position of the artificial fish is updated by a random behavior function to obtain a new generation of artificial fish swarm.

[0131] (2) Methods for updating the position of artificial fish using foraging behavior functions include:

[0132] Artificial fish will swim randomly within their field of vision in search of food. The expression for the random location of food is as follows:

[0133] pos_temp=fish_pos2+Rand()·Θ·visual

[0134] In the formula, Θ represents an n×k matrix with randomly generated values ​​ranging from -0.1 to 0.1; pos_temp represents the random location of the food; and fish_pos2 represents the initial location of the artificial fish before the foraging behavior is updated.

[0135] Comparing the objective function value of the artificial fish at its initial position with the objective function value of the food at its random position, let the objective function value of the artificial fish at its initial position be denoted as X. i The objective function value of the food at a random location is denoted as Y. i If Y i >X i The location of the artificial fish has been updated as follows: The position of the artificial fish is updated using the foraging behavior function to obtain a new generation of artificial fish swarms; if the position of the artificial fish is not updated after try_number times or Y... i ≤X i Then, by updating the position of individual fish using a random behavior function, a new generation of artificial fish swarms can be obtained.

[0136] (3) Methods for updating the position of artificial fish using a tail-chasing behavior function include:

[0137] The artificial fish searches for the number of other artificial fish within its field of vision, n. f Simultaneously, the objective function values ​​of other artificial fish within the field of view are evaluated to obtain the location of the artificial fish with the minimum objective function value.

[0138] Determine whether the waters containing the artificial fish with the minimum objective function value are crowded; if This indicates that the water area is not crowded; where P represents the objective function value of the artificial fish's initial position before the tail-chasing behavior update, and T represents the minimum objective function value of other artificial fish in the vicinity; the artificial fish will move towards the artificial fish with the optimal objective function value.

[0139] The location of the artificial fish has been updated to: Where min_pos represents the position of the artificial fish with the minimum objective function value, and fihs_pos3 represents the initial position of the artificial fish before the tail-chasing behavior update; the position of the artificial fish is updated to the new generation of artificial fish swarm through the tail-chasing behavior function; if This indicates that the water area is crowded. By updating the location of the artificial fish using a foraging behavior function, a new generation of artificial fish swarms can be obtained.

[0140] (4) Methods for updating the position of artificial fish using the clustering behavior function include:

[0141] The number of artificial fish within the search field of an individual artificial fish (n) f Find the center location X of the artificial fish school within the field of view. center , Where X j Represent the position coordinates of all artificial fish within the field of view, and calculate the center position X of the artificial fish swarm within the field of view. center The objective function value is denoted as Y. c ;like This indicates that the water area is not crowded, where X represents the objective function value of the initial position of the artificial fish before the swarming behavior update. The artificial fish will move towards the center of the artificial fish swarm within the field of view, and the position is updated as follows. Where fish_pos4 represents the initial position of the artificial fish before the swarming behavior update, and the position of the artificial fish is updated by the swarming behavior function to obtain a new generation of artificial fish swarm; if This indicates that the water area is crowded. By updating the location of the artificial fish using a foraging behavior function, a new generation of artificial fish swarms can be obtained.

[0142] Artificial fish with the best evaluation function value are selected using an evaluation function. The best evaluation function value in the new generation of artificial fish population is compared with the evaluation function value on the bulletin board, which records the best evaluation function value in all generations of artificial fish populations. If the new generation of artificial fish population is better than the best evaluation function value on the bulletin board, the best evaluation function value recorded on the bulletin board is updated; otherwise, the original best evaluation function value on the bulletin board remains unchanged.

[0143] The optimization process is repeated until the preset number of generations is reached to obtain the final artificial fish swarm. The state of the artificial fish with the optimal evaluation function value in the final artificial fish swarm is taken as the optimal MEC system parameters. The optimal evaluation function value of the output bulletin board is taken as the latency for the user to unload and complete the calculation task. The MEC system is optimized according to the optimal MEC system parameters.

[0144] The specific plan is as follows: The MEC system is configured to include 4 user devices and 5 MEC servers. The initial population size N = 20; the step size calculation formula is:

[0145]

[0146] Where max_step = 0.5, min_step = 0.1, iteration = 600; crowding factor δ = 0.618, artificial fish visual = 6; number of attempts try_number = 50, b = 1;

[0147] Initial position of artificial fish in The matrix is ​​a randomly generated 4x5 matrix between (0,1). For randomly generated in A 4x5 matrix, For randomly generated positions in (0, C) max A 4x5 matrix between ) For randomly generated in A 4x5 matrix between them.

[0148] The initial fish swarm is fed into the algorithm, which executes functions of foraging behavior, random behavior, tail-chasing behavior, and swarming behavior to obtain a new generation of artificial fish swarms. This process continues until a preset number of generations is reached. The current state of the artificial fish is used as the optimal system parameters, and new parameters are then introduced. In this process, the optimized system is obtained.

[0149] Simulations were performed using the parameters described above, and the superiority of the system was demonstrated by comparison with other systems. The specific results are as follows:

[0150] like Figure 3 As shown, with D n As the amount of data increases, the latency for completing user computing tasks also increases. This is because the increased data volume of user computing tasks leads to an increase in both the time required for computation and the time required for unloading. Compared to algorithms that solely use data compression or NOMA techniques, this embodiment achieves a lower latency for completing user computing tasks. Especially when D... n When the value is relatively large, the user computation task completion latency in this embodiment differs increasingly from that of the other two algorithms. This is because the combined use of data compression and NOMA technologies significantly reduces the time required for unloading, a characteristic that becomes more pronounced when the data volume is large.

[0151] like Figure 4 As shown, with C max With the increase of C, the latency of user equipment computing tasks decreases at a relatively high rate, but when C max When the value of is very large, its decrease tends to saturate. This is because as the computing power of the MEC server increases, its speed in calculating user offloaded tasks increases, resulting in lower latency for user task completion. However, when C... maxWhen the value is high, the computing power of the MEC server will exceed the requirements of the computing tasks unloaded by the user. Therefore, a higher computing power of the MEC server will not be able to further reduce the latency of user computing task completion. Compared with the other two reference algorithms, this embodiment can achieve a smaller latency of user computing task completion.

[0152] Example 2

[0153] A low-latency computing task offloading system based on the artificial fish swarm algorithm is provided. This system can be applied to the low-latency computing task offloading method described in Embodiment 1. The low-latency computing task offloading system includes a system establishment module, an optimization module, and a processing and analysis module.

[0154] The system establishment module is used to establish an MEC system in which multiple user devices offload computing tasks to MEC servers; the MEC system includes K MEC servers and N user devices;

[0155] The optimization module establishes an optimization problem model with the goal of maximizing the time required for each user device to complete its computing tasks. It then uses the artificial fish swarm algorithm to solve the optimization problem model to obtain the optimal MEC system parameters. Finally, it optimizes the MEC system based on these optimal parameters.

[0156] The optimization problem model is expressed as follows:

[0157]

[0158] The constraints of the optimization problem model include:

[0159] Constraint C1:

[0160] Constraint C2:

[0161] Constraint C3:

[0162] Constraint C4:

[0163] Constraint C5:

[0164] Constraint C6:

[0165] Constraint C7:

[0166] Constraint C8:

[0167] Constraint C9:

[0168] Constraint C10:

[0169] Constraint C11:

[0170] Constraint C12:

[0171] In the formula, f represents the maximum time required for each user device to complete its computing task; λ n,k γ represents the proportion of data volume in subtask k of the nth user device to the user's total computational tasks. n,k p represents the proportion of compressed data in the k-th subtask of the n-th user device to the total data volume of the subtask. n,k q represents the transmit power of the k-th subtask of the n-th user device offloaded to the MEC server. n,k Let represent the transmit power of the k-th MEC server sending the subtask calculation results back to the n-th user equipment. This indicates that the k-th MEC server allocates computing resources to the n-th user device. This represents the time required for the nth user device to upload an uncompressed task. This represents the time required for the nth user device to upload an uncompressed task. D represents the time required for the MEC server to send the calculation results back to the nth user device; n This represents the data size of the computation task for the nth user device; This represents the rate at which the nth user device uploads a subtask to the kth MEC server; This represents the rate at which the k-th MEC server transmits the computation results of the computation task back to the n-th user device; This represents the energy required for the nth user device to upload a subtask to the uncompressed portion of the kth subtask; This represents the energy required for the nth user device to upload the compressed portion of the subtask to the kth subtask; This represents the energy required for the local computation subtask of the nth user device. This represents the energy required for the nth user device to complete the compression task; This represents the maximum energy consumption of the nth user device; This represents the maximum transmit power of the nth user equipment. p represents the maximum transmit power of the k-th MEC server. max q represents the maximum transmit power of the user equipment; max This indicates the maximum transmit power of the MEC server; This represents the maximum computing resources of the MEC server.

[0172] The optimization module uses the artificial fish swarm algorithm to solve the optimization problem model and obtain the optimal MEC system parameters. The specific process includes:

[0173] Set the initial position of the artificial fish as follows: Initialize the artificial fish swarm parameters; initialize the population size N, the artificial fish's visual field, step size, crowding factor δ, and number of attempts.

[0174] The adaptive step size in the artificial fish swarm algorithm is updated, and the position of the artificial fish is updated through foraging behavior function, swarming behavior function, tail chasing behavior function and random behavior function to obtain a new generation of artificial fish swarms;

[0175] Artificial fish with the best evaluation function value are selected using an evaluation function. The best evaluation function value in the new generation of artificial fish population is compared with the evaluation function value on the bulletin board, which records the best evaluation function value in all generations of artificial fish populations. If the new generation of artificial fish population is better than the best evaluation function value on the bulletin board, the best evaluation function value recorded on the bulletin board is updated; otherwise, the original best evaluation function value on the bulletin board is retained.

[0176] The optimization process is repeated until the preset number of generations is reached to obtain the final artificial fish swarm. The state of the artificial fish with the optimal evaluation function value in the final artificial fish swarm is taken as the best MEC system parameters. The optimal evaluation function value of the output bulletin board is taken as the time delay for the user to unload and complete the calculation task.

[0177] The processing and analysis module divides the computing tasks of each user device into K+1 subtasks through the optimized MEC system. It uses data compression methods to compress part of the data of the subtasks to obtain compressed data. The subtasks are then divided into compressed data and uncompressed data. The K subtasks of the user device are transmitted to each MEC server in a non-orthogonal multiple access manner. The user device and each MEC server perform calculations on the K+1 subtasks respectively, and the calculation results of the MEC server are sent back to the user device.

[0178] Example 3

[0179] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor performs the steps of the low-latency computing task offloading method described in Embodiment 1.

[0180] Example 4

[0181] A fourth aspect of the present invention provides a computer-readable storage medium, characterized in that it stores a computer program thereon, which, when executed by a processor, implements the steps of the motor fault detection method described in Embodiment 1.

[0182] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0183] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0184] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0185] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0186] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A low-latency computing task offloading method based on the artificial fish swarm algorithm, characterized in that, include A multi-user device offloads computing tasks to an MEC server. The MEC system comprises K MEC servers and N user devices. An optimization problem model is established with the optimization objective being the longest time required for each user device to complete its computing task; the formula is as follows: ; The constraints of the optimization 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, This represents the maximum time required for each user device to complete its computing task. Represents the subtask of the nth user device. The proportion of data volume in the user's computing tasks This represents the proportion of compressed data in the k-th subtask of the n-th user device. This represents the transmit power of the k-th subtask of the n-th user device that is offloaded to the MEC server. Let represent the transmit power of the k-th MEC server sending the subtask calculation results back to the n-th user equipment. This indicates that the k-th MEC server allocates computing resources to the n-th user device. This represents the time required for the nth user device to upload an uncompressed task. This represents the time required for the nth user device to upload the compression task. This indicates the time required for the MEC server to send the calculation results back to the nth user device; This represents the data size of the computation task for the nth user device; This represents the rate at which the nth user device uploads a subtask to the kth MEC server; This represents the rate at which the k-th MEC server sends the computation results of the computation task back to the n-th user device; This represents the energy required for the nth user device to upload a subtask to the uncompressed portion of the kth subtask; This represents the energy required for the nth user device to upload the subtask to the compression portion of the kth subtask; This represents the energy required for the local computation subtask of the nth user device. This represents the energy required for the nth user device to complete the compression task. This represents the maximum energy consumption of the nth user device; This represents the maximum transmit power of the nth user equipment. This represents the maximum transmit power of the k-th MEC server; This indicates the maximum transmit power of the user equipment; This indicates the maximum transmit power of the MEC server; This represents the maximum computing resources of the MEC server; The compression factor is the value of the k-th subtask of the n-th user device. The number of calculation results returned by the nth user equipment; The calculation method for the longest time required to complete the computing task of each user device is as follows: ; ; ; ; The formula is, This represents the time required to compress data on the nth user device. This represents the time required for the nth user device to compute the subtask; This represents the time required for the k-th MEC server to process the uncompressed data of the n-th user device. This represents the time required for the k-th MEC server to process the compressed data of the n-th user device; This represents the time required for the nth user device to upload an uncompressed task. This represents the time required for the nth user device to upload the compression task. This indicates the time required for the MEC server to send the calculation results back to the nth user device; The artificial fish swarm algorithm is used to solve the optimization problem model to obtain the optimal MEC system parameters; specifically, it includes: Set the initial position of the artificial fish as follows: Initialize artificial fish swarm parameters; initialize population size. Artificial fish vision Step length Crowding factor and number of attempts ; The adaptive step size in the artificial fish swarm algorithm is updated, and the position of the artificial fish is updated through foraging behavior function, swarming behavior function, tail chasing behavior function and random behavior function to obtain a new generation of artificial fish swarms; Artificial fish with the best evaluation function value are selected using an evaluation function. The best evaluation function value in the new generation of artificial fish population is compared with the evaluation function value on the bulletin board, which records the best evaluation function value in all generations of artificial fish populations. If the new generation of artificial fish population is better than the best evaluation function value on the bulletin board, the best evaluation function value recorded on the bulletin board is updated; otherwise, the original best evaluation function value on the bulletin board remains unchanged. The optimization process is repeated until the preset number of breeding generations is reached to obtain the final artificial fish swarm. The state of the artificial fish with the optimal evaluation function value in the final artificial fish swarm is taken as the optimal MEC system parameters. The optimal evaluation function value of the output bulletin board is taken as the latency for the user to unload and complete the calculation task. The MEC system is optimized based on the best MEC system parameters. The computing tasks of each user device are divided into K+1 subtasks using the optimized MEC system. Data compression methods are used to compress part of the data in the subtasks to obtain compressed data. The subtasks are then divided into compressed data and uncompressed data. The K subtasks of the user device are transmitted to each MEC server using a non-orthogonal multiple access method. The user device and each MEC server perform calculations on the K+1 subtasks respectively, and the calculation results of the MEC server are sent back to the user device.

2. The low-latency computing task offloading method based on the artificial fish swarm algorithm according to claim 1, characterized in that, The method for calculating the adaptive step size in the updated artificial fish swarm algorithm is as follows: ; In the formula, For the maximum iteration step size, To be the minimum iteration step size, This represents the current iteration number. is the maximum number of iterations, and b is the algorithm control coefficient, which is used to control the rate at which the step size decreases.

3. The low-latency computing task offloading method based on the artificial fish swarm algorithm according to claim 2, characterized in that, Methods for updating the position of artificial fish using random behavior functions include: The artificial fish moves randomly, taking a step, as expressed by: ; In the formula, For randomly generated values ​​in Matrix; Represent a decimal number between 0 and 1; This indicates the initial position of the artificial fish before the random behavior update; This indicates the new location of the artificial fish.

4. The low-latency computing task offloading method based on the artificial fish swarm algorithm according to claim 3, characterized in that, Methods for updating the position of artificial fish using foraging behavior functions include: Artificial fish will swim randomly within their field of vision in search of food. The expression for the random location of food is as follows: ; In the formula, Indicates that the randomly generated value is in of matrix; Represented as random positions of food; This indicates the initial position of the artificial fish before the foraging behavior update; Comparing the objective function values ​​of the artificial fish at its initial position and the food at its random position, the objective function value of the artificial fish at its initial position is denoted as... The objective function value of the food at a random location is denoted as... ,like The location of the artificial fish has been updated as follows: If you try The location of the artificial fish was still not updated after that. Then, the position of the individual fish is updated through a random behavior function.

5. A low-latency computing task offloading method based on the artificial fish swarm algorithm according to claim 4, characterized in that, Methods for updating the position of artificial fish using a tail-chasing behavior function include: Artificial fish search for the number of other artificial fish within their field of vision. Simultaneously, the objective function values ​​of other artificial fish within the field of view are evaluated to obtain the location of the artificial fish with the minimum objective function value; Determine whether the waters containing the artificial fish with the minimum objective function value are crowded; if This indicates that the waterway is not crowded; among them, Let represent the objective function values ​​of the initial position of the artificial fish before the tail-chasing behavior update. This represents the minimum objective function value of the surrounding artificial fish; The artificial fish will move in the direction of the artificial fish with the optimal objective function value, and the position of the artificial fish will be updated as follows: ,in, This represents the location of the artificial fish that has the minimum objective function value. This indicates the initial position of the artificial fish before the tail-chasing behavior update; if This indicates that the water area is crowded, and the location of the artificial fish is updated using a foraging behavior function.

6. The low-latency computing task offloading method based on the artificial fish swarm algorithm according to claim 4, characterized in that, Methods for updating the position of artificial fish using clustering behavior functions include: The number of artificial fish within the search field of vision of an individual artificial fish Locate the center of the artificial fish school within the field of view. , ,in Represent the position coordinates of all artificial fish within the field of view, and calculate the center position of the artificial fish swarm within the field of view. The objective function value is denoted as . ;like This indicates that the waterway is not crowded, among which, Let represent the objective function values ​​of the initial positions of the artificial fish before the swarming behavior update. The artificial fish will move towards the center of the artificial fish swarm within the field of view, and the position will be updated as follows: ,in This indicates the initial position of the artificial fish before the update of the gregarious behavior; if This indicates that the water area is crowded, and the location of the artificial fish is updated using a foraging behavior function.

7. A low-latency computing task offloading system based on an artificial fish swarm algorithm, characterized in that, include: The system establishment module is used to establish an MEC system in which multiple user devices offload computing tasks to MEC servers; the MEC system includes K MEC servers and N user devices; The optimization module establishes an optimization problem model with the goal of maximizing the time required for each user device to complete its computing tasks. It then uses the artificial fish swarm algorithm to solve the optimization problem model to obtain the optimal MEC system parameters. Finally, it optimizes the MEC system based on these optimal parameters. The processing and analysis module divides the computing tasks of each user device into K+1 subtasks through the optimized MEC system. It uses a data compression method to compress part of the data of the subtasks to obtain compressed data. The subtasks are then divided into compressed data and uncompressed data. The K subtasks of the user device are transmitted to each MEC server in a non-orthogonal multiple access manner. The user device and each MEC server perform calculations on the K+1 subtasks respectively, and the calculation results of the MEC server are sent back to the user device. The optimization module takes the longest time required for each user device to complete its computing task as the optimization objective, and establishes an optimization problem model, expressed by the following formula: ; The constraints of the optimization 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, This represents the maximum time required for each user device to complete its computing task. Represents the subtask of the nth user device. The proportion of data volume in the user's computing tasks This represents the proportion of compressed data in the k-th subtask of the n-th user device. This represents the transmit power of the k-th subtask of the n-th user device that is offloaded to the MEC server. Let represent the transmit power of the k-th MEC server sending the subtask calculation results back to the n-th user equipment. This indicates that the k-th MEC server allocates computing resources to the n-th user device. This represents the time required for the nth user device to upload an uncompressed task. This represents the time required for the nth user device to upload the compression task. This indicates the time required for the MEC server to send the calculation results back to the nth user device; This represents the data size of the computation task for the nth user device; This represents the rate at which the nth user device uploads a subtask to the kth MEC server; This represents the rate at which the k-th MEC server sends the computation results of the computation task back to the n-th user device; This represents the energy required for the nth user device to upload a subtask to the uncompressed portion of the kth subtask; This represents the energy required for the nth user device to upload the subtask to the compression portion of the kth subtask; This represents the energy required for the local computation subtask of the nth user device. This represents the energy required for the nth user device to complete the compression task. This represents the maximum energy consumption of the nth user device; This represents the maximum transmit power of the nth user equipment. This represents the maximum transmit power of the k-th MEC server; This indicates the maximum transmit power of the user equipment; This indicates the maximum transmit power of the MEC server; This represents the maximum computing resources of the MEC server; The compression factor is the value of the k-th subtask of the n-th user device. The number of calculation results returned by the nth user equipment; The calculation method for the longest time required to complete the computing task of each user device is as follows: ; ; ; ; The formula is, This represents the time required to compress data on the nth user device. This represents the time required for the nth user device to compute the subtask; This represents the time required for the k-th MEC server to process the uncompressed data of the n-th user device. This represents the time required for the k-th MEC server to process the compressed data of the n-th user device; This represents the time required for the nth user device to upload an uncompressed task. This represents the time required for the nth user device to upload the compression task. This represents the time required for the MEC server to send the calculation results back to the nth user device; The optimization module uses the artificial fish swarm algorithm to solve the optimization problem model to obtain the optimal MEC system parameters. The process includes: Set the initial position of the artificial fish as follows: Initialize artificial fish swarm parameters; initialize population size. Artificial fish vision Step length Crowding factor and number of attempts ; The adaptive step size in the artificial fish swarm algorithm is updated, and the position of the artificial fish is updated through foraging behavior function, swarming behavior function, tail chasing behavior function and random behavior function to obtain a new generation of artificial fish swarms; Artificial fish with the best evaluation function value are selected using an evaluation function. The best evaluation function value in the new generation of artificial fish population is compared with the evaluation function value on the bulletin board, which records the best evaluation function value in all generations of artificial fish populations. If the new generation of artificial fish population is better than the best evaluation function value on the bulletin board, the best evaluation function value recorded on the bulletin board is updated; otherwise, the original best evaluation function value on the bulletin board remains unchanged. The optimization process is repeated until the preset number of generations is reached to obtain the final artificial fish swarm. The state of the artificial fish with the optimal evaluation function value in the final artificial fish swarm is taken as the best MEC system parameters. The optimal evaluation function value of the output bulletin board is taken as the time delay for the user to unload and complete the calculation task.

8. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor performs the steps of the low-latency computing task offloading method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the steps of the motor fault detection method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • A high-energy-efficiency computing task unloading method based on data compression

    CN109729543A

  • Resource allocation method in multi-user mobile edge computing system based on NOMA

    CN111615129A

  • Edge computing task unloading method based on foreground theory framework

    CN115150405A