A task offloading method for edge computing

By establishing a multi-objective optimization model and optimizing computing task allocation using particle swarm algorithms, the problem of time delay and energy consumption imbalance in mobile edge computing technology is solved, and the computing efficiency is improved.

CN114564304BActive Publication Date: 2025-05-06GCI SCI & TECH +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210138983.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-15
Publication Date
2025-05-06
Estimated Expiration
2042-02-15

AI Technical Summary

Technical Problem

The calculation and unloading methods of existing mobile edge computing technology are unbalanced in delay and energy consumption, resulting in low efficiency.

Method used

By establishing a multi-objective optimization model of delay, energy consumption and user satisfaction, the particle swarm algorithm is used to optimize energy consumption, delay and satisfaction, and reasonably allocate computing tasks to the MEC server.

Benefits of technology

Optimizes energy consumption, delay and user satisfaction, and improves the efficiency of mobile edge computing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114564304B_ABST
    Figure CN114564304B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for offloading tasks of edge computing, which comprises constructing a network model including several mobile devices and several MEC servers; calculating the total offloading delay of the current task according to the network model and a pre-constructed delay calculation model; calculating the transmission energy consumption of the current task according to the network model and a pre-constructed energy consumption calculation model; constructing scene satisfaction models of different application scenes according to the total offloading delay and the transmission energy consumption; constructing an objective function of the total cost of offloading the current task according to the scene satisfaction model, the total offloading delay and the transmission energy consumption, and combining a penalty function; optimizing the objective function according to a particle swarm algorithm, solving the optimal position of task offloading, and completing the offloading of the current task according to the optimal position. The method can optimize energy consumption, delay and satisfaction, reasonably allocate computing tasks to corresponding MEC servers, and improve the efficiency of mobile edge computing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Internet of Things, and in particular to a task offloading method for edge computing. Background Art

[0002] In recent years, smart cities have gradually become a new trend in urbanization. Smart cities require fast data transmission, fast decision-making, and fast processing. However, the computing power and battery capacity of local terminals are limited, and it is difficult to meet the computing power required by intensive applications. In order to solve this problem, MEC (Mobile Edge Computing) came into being. Computation offloading is a key technology in MEC. Computation offloading deploys edge servers at the edge of the wireless network and offloads user tasks to a reasonable location for calculation to improve the computing power of local terminals. However, the latency and energy consumption of the computation offloading methods in the prior art are unbalanced, resulting in low efficiency of mobile edge computing. Summary of the invention

[0003] The embodiment of the present invention provides a task offloading method for edge computing, which optimizes energy consumption, latency and satisfaction by establishing a multi-objective optimization model of latency, energy consumption and user satisfaction, reasonably allocates computing tasks to corresponding MEC servers, and improves the efficiency of mobile edge computing.

[0004] An embodiment of the present invention provides a method for offloading edge computing tasks, the method comprising:

[0005] Build a network model that includes several mobile devices and several MEC servers;

[0006] Calculate the total offloading delay of the current task based on the constructed network model and the pre-constructed delay calculation model;

[0007] Calculating the transmission energy consumption of the current task according to the constructed network model and the pre-constructed energy consumption calculation model;

[0008] Constructing scenario satisfaction models for different application scenarios according to the total unloading delay and the transmission energy consumption;

[0009] According to the scenario satisfaction model, the total offloading delay and the transmission energy consumption, and in combination with a penalty function, an objective function of the total cost of the current task offloading is constructed;

[0010] The objective function is optimized according to the particle swarm algorithm to find the optimal position for task unloading, and the unloading of the current task is completed according to the optimal position.

[0011] Preferably, the total unloading delay is T i =T t,i,j +T s,i;

[0012] The transmission delay T of the current task from the i-th mobile device to the j-th MEC server is t,i,j =B i *f i / r i,j , B i is the data volume of the current task, f i The clock cycle required to process each bit of data, B i *f i is the computational amount of the current task, the transmission rate from the i-th mobile device to the j-th MEC server W is the transmission bandwidth, P i is the transmission power of the i-th mobile device, H i,j is the channel gain, N 0 Noise power spectrum density, MEC computing server computing delay T s,i =B i *f i / f s,i , f s,i is the CPU clock frequency of the MEC server.

[0013] Furthermore, the transmission energy consumption is E t,i,j =P i *T t,i,j .

[0014] As a preferred solution, the scenario satisfaction model of different application scenarios is q g =w 1 T g,i +w 2 E g,i ;

[0015] Where g = a, b, c, q a is the scenario satisfaction when the scenario of the current task is to enhance mobile broadband, q b The scenario satisfaction of the current task is a high-reliability, low-latency connection scenario, q c is the scene satisfaction when the scene of the current task is massive IoT; weight w 1 , w 2 are both greater than 0 and less than 1, and w 1 +w 2 =1,T g,i is the total unloading delay of the current task in different scenarios, E g,i is the transmission energy consumption of the current task in different scenarios.

[0016] Preferably, the objective function of the total cost of the current task offloading is

[0017] in, w 1 +w 2 =1, V is the unloading vector to be solved, J is the preset penalty coefficient, and the energy consumption of each task P i Not greater than the maximum energy consumption P max , that is, 0≤P i ≤P max ; CPU cycle frequency f of mobile device u,i Not greater than the maximum CPU cycle frequency f u,max , that is, 0≤f u,i ≤f u,max ; CPU turnover rate of MEC server f s,i Not greater than the maximum CPU turnover rate f s,max , that is, 0≤f s,i ≤f s,max ; Satisfaction of the current task q g Not less than the preset minimum satisfaction level Q of the current environment g , that is, q g =w 1 T g,i +w 2 E g,i ≥Q g , k is the number of mobile devices in the network model, n is the number of MEC servers in the network model, T g,i is the total unloading delay of the current task in different scenarios, E g,i is the transmission energy consumption of the current task in different scenarios, E g,max is the maximum transmission energy consumption of the current task in different scenarios.

[0018] Preferably, the objective function is optimized according to the particle swarm algorithm to solve the optimal position for task unloading, and the unloading of the current task is completed according to the optimal position, which specifically includes:

[0019] According to the network model, a channel gain matrix H is established to represent the channel gains of different tasks transmitted from different mobile devices to different MEC servers;

[0020] For one of the application scenarios, a particle swarm of size U is established to represent different tasks, and particles are randomly unloaded to any MEC server to obtain the unloading decision vectors of all particles and the positions v of different particles. i and speed x ij ;

[0021] Calculate the fitness of each particle according to the preset fitness function;

[0022] The particle speed at each iteration is adjusted according to the preset satisfaction value calculation model to perform an iterative process of optimal particle allocation;

[0023] Update the speed and position of each particle according to the preset speed update function and position update function;

[0024] When the number of iterations reaches the preset number, the optimal position and fitness of the last iteration are output;

[0025] Unloading the current task to the optimal location for execution;

[0026] The set of all tasks in the network model is represented as M = {m i , m 2 , ..., m k}, task m i (B i , f i , E max ), B i is the input data volume of the task, f i is the computational density of the task, E max is the energy consumption constraint of the task, and the set of cycle frequencies of different MEC servers in the network model is S = {s 1 ,s 2 , ..., s n}, channel gain matrix Hi,j represents the channel gain required for the current task to be transmitted from the i-th mobile device to the j-th MEC server, 1≤i≤K, 1≤j≤N, i≠j, K is the number of mobile devices in the network model, N is the number of MEC servers in the network model, and the offloading decision vector of each particle is V={v 1 , v 2 , ..., v k}, the position of different particles is v i , when v i =0, the task is executed by the local mobile device, v i =j, the task is offloaded to the jth MEC server for execution, and the speed of different particles is the fitness function is The position update function is v′ ij =v ij +x ij , the speed update formula is x′ ij =ω·x ij +θ 1 r 1 [p ij -v ij ]+θ 2 r 2 [pgi -v ij ], p ij is the local optimal position of particle i, p gi represents the global optimal position found by the particle so far, r 1 With r 2 is a random number distributed in [0, 1], θ 1 With θ 2 is the preset learning parameter, ω is the weight; the satisfaction value calculation model is is the satisfaction value of particle i at the tth iteration, is the optimal position of particle i in the tth iteration, is the global optimal position, is the fitness of the global optimal position, and the success rate of the particle swarm in the tth iteration is is the sum of the success values ​​of all particles, n is the number of particles in the particle swarm, and the inertia weight at the tth iteration 0≤ω min ≤ω max ,ω min and ω max are the maximum weight and minimum weight in the previous iteration respectively.

[0027] The present invention provides a method for offloading tasks of edge computing, which constructs a network model including several mobile devices and several MEC servers; calculates the total offloading delay of the current task according to the constructed network model and the pre-constructed delay calculation model; calculates the transmission energy consumption of the current task according to the constructed network model and the pre-constructed energy consumption calculation model; constructs scenario satisfaction models of different application scenarios according to the total offloading delay and the transmission energy consumption; constructs an objective function of the total cost of offloading the current task according to the scenario satisfaction model, the total offloading delay and the transmission energy consumption, and in combination with a penalty function; optimizes the objective function according to a particle swarm algorithm, solves the optimal position of task offloading, and completes the offloading of the current task according to the optimal position. By establishing a multi-objective optimization model of delay, energy consumption and user satisfaction, optimizing energy consumption, delay and satisfaction, and reasonably allocating computing tasks to corresponding MEC servers, the efficiency of mobile edge computing is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 It is a flowchart of a method for offloading edge computing tasks provided by an embodiment of the present invention;

[0029] Figure 2 It is a structural diagram of a network model provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0030] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0031] See also Figure 1 , is a flowchart of a method for offloading edge computing tasks provided by an embodiment of the present invention, including steps S1 to S6:

[0032] S1, build a network model including several mobile devices and several MEC servers;

[0033] S2, calculating the total offloading delay of the current task based on the constructed network model and the pre-constructed delay calculation model;

[0034] S3, calculating the transmission energy consumption of the current task according to the constructed network model and the pre-constructed energy consumption calculation model;

[0035] S4, constructing a scenario satisfaction model for different application scenarios according to the total unloading delay and the transmission energy consumption;

[0036] S5, constructing an objective function of the total cost of the current task offloading according to the scenario satisfaction model, the total offloading delay and the transmission energy consumption, and in combination with a penalty function;

[0037] S6, optimizing the objective function according to the particle swarm algorithm, solving the optimal position for task unloading, and completing the unloading of the current task according to the optimal position.

[0038] In the specific implementation of the present invention, see Figure 2 As shown, it is a structural diagram of a network model provided by an embodiment of the present invention, wherein the network model includes mobile device 1, mobile device 2, mobile device 3, mobile device 4, MEC server 1, MEC server 2, MEC server 3 and MEC server 4.

[0039] MEC servers are mainly used for delay-sensitive tasks and tasks with large computational workloads. Mobile devices (smart devices, industrial equipment, etc.) mainly perform preliminary data processing. When disconnected from the MEC server, the intelligence relies on its own capabilities to handle simple tasks. When performing delay-sensitive and computationally intensive tasks, the tasks need to be transferred to the MEC server for calculation. The MEC server is deployed on the side of the microcell base station close to the user. The user uploads the task to the edge server wirelessly, and the edge server returns the calculation results to the user after completing the calculation.

[0040] Calculate the total offloading delay and transmission energy consumption of the current task based on the pre-built delay calculation model and pre-built energy consumption calculation model of the tasks running on different devices;

[0041] The 5G era defines the following three application scenarios: EMBB: Enhanced Mobile Broadband, which is aimed at high-traffic mobile broadband services; URLLC: Ultra-high Reliability and Ultra-low Latency Communication; MMTC: Massively Connected Internet of Things, which targets large-scale Internet of Things services and builds scenario satisfaction models for different application scenarios based on the total offload delay and the transmission energy consumption;

[0042] According to the scenario satisfaction model, the total offloading delay and the transmission energy consumption, and in combination with a penalty function, an objective function of the total cost of the current task offloading is constructed;

[0043] The objective function is optimized according to the particle swarm algorithm to find the optimal position for task unloading, and the unloading of the current task is completed according to the optimal position.

[0044] In another embodiment provided by the present invention, the total unloading delay is T i =T t,i,j +T s,i ;

[0045] The transmission delay T of the current task from the i-th mobile device to the j-th MEC server is t,i,j =B i *f i / r i,j , B i is the data volume of the current task, f i The clock cycle required to process each bit of data, B i *f i is the computational amount of the current task, the transmission rate from the i-th mobile device to the j-th MEC server W is the transmission bandwidth, P i is the transmission power of the i-th mobile device, H i,j is the channel gain, N 0 Noise power spectrum density, MEC computing server computing delay T s,i =B i *f i / f s,i , f s,i is the CPU clock frequency of the MEC server.

[0046] When this embodiment is implemented, the delay model will be different depending on the tasks running on different devices. If the current task is executed on the local device and each task has no queuing delay constraints, only the local calculation delay needs to be considered. When the MEC server executes, the delay required to complete the current task will increase, including transmission delay, MEC calculation delay, and feedback delay. However, the difference between feedback delay and transmission delay is a large order of magnitude, so the feedback delay is ignored in this embodiment.

[0047] Local computing latency

[0048] Among them, B i is the data volume of the current task, f i The clock cycle required to process each bit of data, B i *f i is the computational effort of the current task, f u,i Indicates the CPU cycle frequency of the mobile device;

[0049] Transmission calculation delay

[0050] Among them, r i,j represents the transmission rate from the i-th mobile device to the j-th MEC server, W represents the transmission bandwidth, and P i Transmit power of a single local device, H i,j is the channel gain, and N 0 Noise power spectral density. i,j is the transmission rate of the current task in the channel, B i *f i is the computational amount of the task.

[0051] The transmission delay is T t,i,j =B i *f i / r i,j ;

[0052] The MEC calculation delay is T s,i =B i *f i / f s,i ;

[0053] Among them, f s,i is the CPU clock frequency of the MEC server. It can be seen from the above formula that the MEC computing delay is proportional to the inverse of the MEC server cycle frequency.

[0054] The total delay to complete an offload task is the sum of the transmission delay and the server calculation delay, that is, T i =T t,i,j +T s,i;

[0055] The total delay time for the local device to perform a task is T i =T l ;

[0056] In another embodiment provided by the present invention, the transmission energy consumption is E t,i,j =P i *T t,i,j .

[0057] In the specific implementation of this embodiment, the computing power of the CPU is closely related to its internal chip architecture. Each generation of CPU architecture has a fixed energy consumption ratio. Under the same architecture, power consumption is proportional to voltage and frequency. The energy consumption between devices will also be affected by the amount of computing tasks. Therefore, the transmission energy consumption E of the i-th task is i =C i *L 2 *f u,i *B i *f i ;

[0058] Among them, C i The capacitance depends on the effective switch capacitance, L represents the voltage.

[0059] The transmission energy consumption is for the tasks offloaded to the MEC server. In the calculation of the delay model and transmission delay, the transmission energy consumption E t,i,j =P i *T t,i,j .

[0060] In another embodiment provided by the present invention, the scenario satisfaction model of different application scenarios is q g =w 1 T g,i +w 2 E g,i ;

[0061] Where g = a, b, c, q a is the scenario satisfaction when the scenario of the current task is to enhance mobile broadband, q b The scenario satisfaction of the current task is a high-reliability, low-latency connection scenario, q c is the scene satisfaction when the scene of the current task is massive IoT; weight w 1 , w 2 are both greater than 0 and less than 1, and w 1 +w 2 =1,T g,i is the total unloading delay of the current task in different scenarios, E g,i is the transmission energy consumption of the current task in different scenarios.

[0062] In the specific implementation of this embodiment, three major application scenarios are defined in the 5G era: EMBB: Enhanced Mobile Broadband, which is aimed at high-traffic mobile broadband services; URLLC: Ultra-high Reliability and Ultra-low Latency Communication; MMTC: Massively Connected Internet of Things;

[0063] For large-scale IoT business, we give the following satisfaction formula for the above three scenarios: g =w 1 T g,i +w 2 E g,i ;

[0064] Among them, stw 1 +w 2 =1;

[0065] When g is a, the scenario of the current task is EMMB, when g is b, the scenario of the current task is URLLC, and when g is C, the scenario of the current task is MMTC. In each environment, there are minimum satisfaction levels for each link, Qa, Qb, and Qc.

[0066] In another embodiment provided by the present invention, the objective function of the total cost of the current task offloading is:

[0067] in, w 1 +w 2 =1, V is the unloading vector to be solved, J is the preset penalty coefficient, and the energy consumption of each task P i Not greater than the maximum energy consumption P max , that is, 0≤P i ≤P max ; CPU cycle frequency f of mobile device u,i Not greater than the maximum CPU cycle frequency f u,max , that is, 0≤f u,i ≤f u,max ; CPU turnover rate of MEC server f s,i Not greater than the maximum CPU turnover rate f s,max , that is, 0≤f s,i ≤f s,max ; Satisfaction of the current task q g Not less than the preset minimum satisfaction level Q of the current environment g , that is, q g =w 1 T g,i +w 2 E g,i ≥Q g , k is the number of mobile devices in the network model, n is the number of MEC servers in the network model, Tg,i is the total unloading delay of the current task in different scenarios, E g,i is the transmission energy consumption of the current task in different scenarios, E g,max is the maximum transmission energy consumption of the current task in different scenarios.

[0068] In the specific implementation of this embodiment, the scenario satisfaction model, the total offloading delay and the transmission energy consumption can be used to obtain a solution formula for a computing task in the local device calculation and the MEC server calculation. Therefore, when facing the scenario g, the problem is jointly expressed as:

[0069]

[0070] E g,i <E g,max ;

[0071] 0≤P i ≤P max ;

[0072] 0≤f u,i ≤f u,max ;

[0073] 0≤f s,i ≤f s,max ;

[0074] q g =w 1 T g,i +w 2 E g,i ≥Q g ;

[0075] w 1 +w 2 =1;

[0076] Among them, P1 represents the unloading decision vector with the lowest latency and energy consumption, v i represents the server assigned to task i, and the energy consumption of each task is P i Not greater than the maximum energy consumption P max , that is, 0≤P i ≤P max ; CPU cycle frequency f of mobile device u,i Not greater than the maximum CPU cycle frequency f u,max , that is, 0≤f u,i ≤f u,max ; CPU turnover rate of MEC server f s,i Not greater than the maximum CPU turnover rate f s,max , that is, 0≤f s,i ≤f s,max ; Satisfaction of the current task qg Not less than the preset minimum satisfaction level Q of the current environment g .

[0077] In addition, according to the modeling method of P1, if one of all MEC servers has better performance, most of the tasks will be assigned to the MEC server with better performance because queuing delay is not considered. This will cause its average power consumption to be higher than the maximum power consumption, so transferring the current task to other MEC servers can relieve the load pressure. Therefore, problem P1 is transformed into problem P2 with an added penalty function: when the average energy of the device is greater than the maximum energy consumption, the total system cost of offloading tasks to the current MEC server is increased by adding the penalty function form.

[0078] Right now:

[0079] in, 0≤P i ≤P max , 0≤f u,i ≤f u,max , 0≤f s,i ≤f s,max ,q g =w 1 T g,i +w 2 E g,i ≥Q g , w 1 +w 2 =1;

[0080] V is the unloading vector to be solved, and J is the preset penalty coefficient. The more energy the calculation consumes, the larger the penalty term is. If it does not exceed the maximum energy consumption, there is no penalty. The significance of adding a penalty function is to balance energy consumption and time consumption. The extended P2 problem focuses more on the balance between delay and energy consumption in the entire unloading process in the g environment.

[0081] In another embodiment provided by the present invention, the step S6 specifically includes:

[0082] According to the network model, a channel gain matrix H is established to represent the channel gains of different tasks transmitted from different mobile devices to different MEC servers;

[0083] For one of the application scenarios, a particle swarm of size U is established to represent different tasks, and particles are randomly unloaded to any MEC server to obtain the unloading decision vectors of all particles and the positions v of different particles. i and speed x ij ;

[0084] Calculate the fitness of each particle according to the preset fitness function;

[0085] The particle speed at each iteration is adjusted according to the preset satisfaction value calculation model to perform an iterative process of optimal particle allocation;

[0086] Update the speed and position of each particle according to the preset speed update function and position update function;

[0087] When the number of iterations reaches the preset number, the optimal position and fitness of the last iteration are output;

[0088] Unloading the current task to the optimal location for execution;

[0089] The set of all tasks in the network model is represented as M = {m 1 , m 2 , ..., m k}, task m i (B i , f i , E max ), B i is the input data volume of the task, f i is the computational density of the task, E max is the energy consumption constraint of the task, and the set of cycle frequencies of different MEC servers in the network model is S = {s 1 ,s 2 , ..., s n}, channel gain matrix Hi,j represents the channel gain required for the current task to be transmitted from the i-th mobile device to the j-th MEC server, 1≤i≤K, 1≤j≤N, i≠j, K is the number of mobile devices in the network model, N is the number of MEC servers in the network model, and the offloading decision vector of each particle is V={v 1 , v 2 , ..., v k}, the position of different particles is v i , when v i =0, the task is executed by the local mobile device, v i =j, the task is offloaded to the jth MEC server for execution, and the speed of different particles is the fitness function is The position update function is v′ ij =v ij +x ij , the speed update formula is x′ ij =ω·x ij +θ 1 r 1 [p ij -v ij ]+θ 2 r 2 [pgi -v ij ], p ij is the local optimal position of particle i, p gi represents the global optimal position found by the particle so far, r 1 With r 2 is a random number distributed in [0, 1], θ 1 With θ 2 is the preset learning parameter, ω is the weight; the satisfaction value calculation model is is the satisfaction value of particle i at the tth iteration, is the optimal position of particle i in the tth iteration, is the global optimal position, is the fitness of the global optimal position, and the success rate of the particle swarm in the tth iteration is is the sum of the success values ​​of all particles, n is the number of particles in the particle swarm, and the inertia weight at the tth iteration 0≤ω min ≤ω max ,ω min and ω max are the maximum weight and minimum weight in the previous iteration respectively.

[0090] When this embodiment is implemented, the biggest disadvantage of using the PSO algorithm for task offloading in the prior art is that it is easy to fall into a local optimal solution, resulting in task delays and high energy consumption. In order to solve this problem, this embodiment proposes an improved optimization algorithm based on particle swarm.

[0091] First, the particle swarm algorithm is improved. By changing the fixed inertia weight in the standard particle swarm to an adaptive inertia weight, it can avoid falling into the local optimal solution to a certain extent, better balance the local search and the global search, and improve the global optimization capability, thereby reducing energy consumption and meeting the delay requirements.

[0092] For one of the scenarios g, assuming that the size of the particle swarm is U, K represents the number of tasks, and N represents the number of MEC servers, the set of all tasks can be expressed as M = {m 1 , m 2 , ..., m k}; First, describe the task quantitatively. Assume that the task generated by the mobile device numbered i is m i (B i , f i , E max ), B i represents the amount of input data, f i represents the calculation density, E max represents the energy consumption constraint of the task, the period frequency set S = {s1 ,s 2 , ..., s n} contains the cycle frequencies of all MEC servers in the current network model.

[0093] A channel gain matrix H is established to represent the channel gain of different tasks transmitted from different mobile devices to different MEC servers. The channel gain H i,j (1≤i≤K, 1≤j≤N, i≠j) represents the channel gain required for the task generated by mobile device I to be transmitted to server numbered j, where

[0094] Each particle represents offloading tasks to a specific MEC server, and all tasks will be offloaded to this server. The offloading decision vector V of each particle is V = {v 1 , v 2 , ..., v k}, indicating the optimal execution position of all tasks. Among them, vi is randomly selected from 0 to N. When v i =0, the task will be solved locally. i =j(1≤j≤N) means that the current task is offloaded to the jth MEC server for execution. The update equations for particle velocity and position are as follows:

[0095] x′ ij =ω·x ij +θ 1 r 1 [p ij -v ij ]+θ 2 r 2 [p gi -v ij ];

[0096] v′ ij =v ij +x ij ;

[0097] p ij represents the local optimal position of each particle i, p gi represents the global optimal position found by the entire particle so far; r 1 With r 2 is a random number distributed in [0, 1], θ 1 With θ 2 The parameter that needs to be learned is also called the acceleration constant, and ω is the weight.

[0098] The fitness of each particle is calculated according to the fitness function fitness(V).

[0099] In the PSO algorithm, by comparing the fitness of each particle with the global optimal value, the position state of the particle can be described more accurately. The calculation formula of the satisfaction value S(i, t) is as follows:

[0100]

[0101] S(i, t) is the satisfaction value of particle i at the tth iteration, is the optimal position of particle i in the tth iteration, is the global optimal position, is the fitness of the global optimal position.

[0102] If the current optimal position fitness value is greater than the optimal position fitness value of the previous iteration and greater than the global optimal position fitness value, the success value is set to 1. If the current position fitness value is greater than the optimal position fitness value of the previous iteration and equal to the global optimal position fitness value, the satisfaction value is preferably set to 0.7. If the current optimal position fitness value is equal to the optimal position fitness value of the previous iteration, the satisfaction value is set to 0. This calculation method obtains a more accurate satisfaction value by fine-graining the particle state, further improving the success rate of the particle, thereby improving the adaptability of the inertia weight ω. It effectively avoids the particles from falling into the local optimum too early during the optimization process.

[0103] is the success rate of the particle swarm in the tth iteration, indicating that the position of this iteration is higher than the position of the last particle in the particle swarm. The calculation formula for the success rate is represents the sum of all particle success values, and n represents the number of particles in the entire particle swarm. It is the inertia weight ω(t) at the tth iteration, which is used to adjust the particle speed at each iteration.

[0104] Update the speed and position of each particle according to the preset speed update function and position update function;

[0105] When the number of iterations reaches a preset number, which can be set to 100, when the number of iterations is 100, the optimal position and fitness of the last iteration are output; the current task is unloaded to the optimal position for execution, completing the task unloading process.

[0106] The present invention proposes a computing task offloading problem under the requirements of three application scenarios (URLLC, MMTC, EMMB) in a 5G environment, which can reduce the energy consumption and delay of task offloading of mobile devices, adds the satisfaction function of each environment, and adopts a penalty function to balance the delay and energy consumption, and proposes an offloading strategy EIPSO based on the particle swarm optimization algorithm to improve the efficiency of task offloading.

[0107] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A method for offloading edge computing tasks, characterized in that: The method comprises: Build a network model that includes several mobile devices and several MEC servers; Calculate the total offloading delay of the current task based on the constructed network model and the pre-constructed delay calculation model; Calculating the transmission energy consumption of the current task according to the constructed network model and the pre-constructed energy consumption calculation model; Constructing scenario satisfaction models for different application scenarios according to the total unloading delay and the transmission energy consumption; According to the scenario satisfaction model, the total offloading delay and the transmission energy consumption, and in combination with a penalty function, an objective function of the total cost of the current task offloading is constructed; Optimizing the objective function according to the particle swarm algorithm to find the optimal position for task unloading, and completing the unloading of the current task according to the optimal position; The step of optimizing the objective function according to the particle swarm algorithm, solving the optimal position for task unloading, and completing the unloading of the current task according to the optimal position specifically includes: According to the network model, a channel gain matrix H is established to represent the channel gains of different tasks transmitted from different mobile devices to different MEC servers; For one of the application scenarios, a particle swarm of size U is established to represent different tasks, and particles are randomly unloaded to any MEC server to obtain the unloading decision vectors of all particles and the positions v of different particles. i and speed x ij ; Calculate the fitness of each particle according to the preset fitness function; The particle speed at each iteration is adjusted according to the preset satisfaction value calculation model to perform an iterative process for optimal particle allocation; Update the speed and position of each particle according to the preset speed update function and position update function; When the number of iterations reaches the preset number, the optimal position and fitness of the last iteration are output; Unloading the current task to the optimal location for execution; The set of all tasks in the network model is represented as M = {m1, m2, ..., m k }, task m i (B i , f i , E max ), B i is the input data volume of the task, f i is the computational density of the task, E max is the energy consumption constraint of the task, and the set of cycle frequencies of different MEC servers in the network model is S = {s1, s2, ..., s n }, channel gain matrix Hi,j represents the channel gain required for the current task to be transmitted from the i-th mobile device to the j-th MEC server, 1≤i≤K, 1≤j≤N, i≠j, K is the number of mobile devices in the network model, N is the number of MEC servers in the network model, and the offloading decision vector of each particle is V={v1, v2, ..., v k }, the position of different particles is v i , when v i =0, the task is executed by the local mobile device, v i = j, the task is offloaded to the jth MEC server for execution, and the speed of different particles is the fitness function is The position update function is v′ ij =v ij +x ij , the velocity update formula is x′ ij =ω·x ij +θ1r1[p ij -v ij ]+θ2r2[p gi -v ij ], p ij is the local optimal position of particle i, p gi represents the global optimal position found by the particle so far, r1 and r2 are random numbers distributed in [0,1], θ1 and θ2 are preset learning parameters, and ω is the weight; the satisfaction value calculation model is S(i, t) is the satisfaction value of particle i at the tth iteration, is the optimal position of particle i in the tth iteration, is the global optimal position, is the fitness of the global optimal position, and the success rate of the particle swarm in the tth iteration is is the sum of the success values ​​of all particles, n is the number of particles in the particle swarm, and the inertia weight at the tth iteration ω min and ω max are the maximum weight and minimum weight in the previous iteration respectively.

2. The method for offloading edge computing tasks according to claim 1, characterized in that: The total unloading delay is T i =T t,i,j +T s,i ; The transmission delay T of the current task from the i-th mobile device to the j-th MEC server is t,i,j =B i *f i / r i,j , B i is the data volume of the current task, f i The clock cycle required to process each bit of data, B i *f i is the computational amount of the current task, the transmission rate from the i-th mobile device to the j-th MEC server W is the transmission bandwidth, P i is the transmission power of the i-th mobile device, H i,j is the channel gain, N0 is the noise power spectral density, and the computational delay T of the MEC computing server s,i =B i *f i / f s,i , f s,i is the CPU clock frequency of the MEC server.

3. The edge computing task offloading method according to claim 2 is characterized in that: The transmission energy consumption is E t,i,j =P i *T t,i,j .

4. The method for offloading edge computing tasks according to claim 1, characterized in that: The scenario satisfaction model of different application scenarios is qg=w1T g,i +w2E g,i ; Where g = a, b, c, q a is the scenario satisfaction when the scenario of the current task is to enhance mobile broadband, q b The scenario satisfaction of the current task is a high-reliability, low-latency connection scenario, q c is the scenario satisfaction when the scenario of the current task is massive IoT; weights W1 and w2 are both greater than 0 and less than 1, and w1+w2=1, T g,i is the total unloading delay of the current task in different scenarios, E g,i is the transmission energy consumption of the current task in different scenarios.

5. The method for offloading edge computing tasks according to claim 1, characterized in that: The objective function of the total cost of the current task offloading is: in, w1+w2=1, V is the unloading vector to be solved, J is the preset penalty coefficient, and the energy consumption of each task P i Not greater than the maximum energy consumption P max , that is, 0≤P i ≤P max ; CPU cycle frequency f of mobile device u,i Not greater than the maximum CPU cycle frequency f u,max , that is, 0≤f u,i ≤f u,max ; CPU turnover rate of MEC server f s,i Not greater than the maximum CPU turnover rate f s,max , that is, 0≤f s,i ≤f s,max ; Satisfaction of the current task q g Not less than the preset minimum satisfaction level Qg of the current environment, that is, q g =w1T g,i +w2E g,i ≥Q g , k is the number of mobile devices in the network model, n is the number of MEC servers in the network model, T g,i is the total unloading delay of the current task in different scenarios, E g,i is the transmission energy consumption of the current task in different scenarios, E g,max is the maximum transmission energy consumption of the current task in different scenarios.

Citation Information

Patent Citations

  • Multi-user task unloading method based on delayed acceptance in mobile edge computing environment

    CN112559171A