Multi-user workflow task offloading decision and scheduling method based on genetic algorithm
By using a multi-user workflow task unloading decision and scheduling scheme based on genetic algorithms, the execution order and unloading location of workflow tasks are optimized, solving the energy consumption problem of mobile edge computing networks in multi-user, multi-virtual server scenarios and achieving energy minimization under time constraints.
Patent Information
- Application Number
- CN202210840069.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-18
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2042-07-18
AI Technical Summary
In mobile edge computing networks with multiple users and multiple virtual servers, existing technologies have failed to effectively solve the energy consumption problem of workflow tasks, especially how to perform optimal offloading and scheduling to reduce the total system energy consumption while meeting time constraints.
A multi-user workflow task offloading decision and scheduling scheme based on genetic algorithm is adopted. By constructing a latency and energy consumption model, the execution order and offloading position of workflow tasks are jointly represented as individuals in the genetic algorithm. The individual modification, crossover and mutation operations of the genetic algorithm are used to optimize the execution order and offloading position of workflow tasks to minimize system energy consumption.
Under the condition of meeting the time constraints, the total energy consumption of the system is effectively reduced, the execution order and unloading position of the workflow tasks are optimized, and the simulation results show that it can significantly reduce energy consumption compared with other methods.
Smart Images

Figure CN115408121B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a workflow task offloading decision and scheduling method in the field of mobile edge computing, specifically a multi-user workflow task offloading decision and scheduling method based on a genetic algorithm. Background Technology
[0002] With the development of computer networks, cloud computing, and the Internet of Things (IoT), mobile devices have become an indispensable part of people's daily lives. These devices have also become the main platforms supporting computationally intensive applications such as interactive games and image processing. However, compared with traditional devices, mobile devices have certain limitations in terms of computing power, storage capacity, and especially battery capacity. Mobile edge computing (MEC) can extend the computing power of the edge cloud to resource-constrained mobile devices to enhance their processing capabilities, and has become a key technology for realizing the IoT and 5G.
[0003] Service workflows can break down an entire task into multiple subtasks, with preorder and data dependencies between them. Compared to general parallel tasks, the workflow offloading problem in MEC is more complex and challenging because the execution order and location of subtasks affect the completion time and energy consumption of the entire workflow task. Therefore, how to reasonably distribute subtasks in the workflow to local and edge execution under time constraints to reduce the overall system energy consumption is an important issue in mobile edge environments. To address the task offloading problem in mobile edge computing systems, the paper "X.Li, T. Chen, D.Yuan, J.Xu and X.Liu,"A Novel Graph-based ComputationOffloading Strategy for Workflow Applications in Mobile Edge Computing," in IEEE Transactions on Services Computing, proposes a novel graph-based MEC workflow application strategy. This strategy utilizes graph-based partitioning techniques to obtain the offloading decision scheme with the lowest energy consumption for terminal devices under latency constraints. The paper "G.Zhang, W.Zhang, Y.Cao, D.Li and L.Wang," in IEEE Transactions on Industrial... The paper "Informatics, vol.14, no.10, pp.4642-4655, Oct.2018, doi:10.1109 / TII.2018.2843365" proposes an online dynamic task allocation and scheduling method to achieve efficient and low-latency communication in MEC systems. The paper "Dong Hao, Zhang Haiping, Li Zhongjin, Liu Hui. Computational Offloading of Service Workflows in Mobile Edge Computing Environment [J]. Computer Engineering and Applications, 2019, 55(02):36-43" uses a traditional genetic algorithm to reduce workflow execution time and energy consumption for single-user, single-MEC server application scenarios. However, the two methods proposed in the above literature only consider the offloading problem of workflow tasks for a single user and do not consider the more common multi-user scenarios in real-world applications.To address the computational offloading of multi-user workflow tasks, the paper "S. Sundar and B. Liang, 'Offloading Dependent Tasks with Communication Delay and Deadline Constraint,' IEEE INFOCOM 2018 - IEEE Conference on Computer Communications, 2018, pp. 37-45" considers a scenario with multiple users and a remote server and proposes a heuristic algorithm to minimize the system's execution cost. The paper "S. Guo, J. Liu, Y. Yang, B. Xiao and Z. Li, 'Energy-Efficient Dynamic Computation Offloading and Cooperative Task Scheduling in Mobile Cloud Computing,' in IEEE Transactions on Mobile Computing, vol. 18, no. 2, pp. 319-333, 1 Feb. 2019" proposes a dynamic offloading and resource scheduling strategy to reduce energy consumption and execution time. The paper "SUN J, YIN L, ZOU M, et al. Makespan-minimization workflow scheduling for complex networks with social groups in edge computing[J]. Journal of Systems Architecture, 2020, 108: 101799" studies the workflow scheduling problem of minimizing the maximum completion time in a multi-user MEC system and proposes an improved composite heuristic algorithm. However, the above paper only considers the single-server scenario. In order to enhance the computing power of the MEC server, the BS station is always equipped with multiple VM servers.The paper "WANG Z, ZHENG W, CHENP, et al. A Novel Coevolutionary Approach to Reliability Guaranteed Multi-Workflow Scheduling upon Edge Computing Infrastructures[J]. Security and Communication Networks, 2020, 2020: 6697640" considers a multi-user, multi-VM server MEC scenario and proposes a multi-workflow scheduling method based on the edge environment. This method maximizes the reliability of workflow task offloading success rate while reducing the service call cost for users. However, the above paper only considers offloading cost and efficiency, without considering energy consumption. Energy consumption is a fundamental issue in the Internet of Things. Therefore, how to optimally offload and schedule workflow tasks in a multi-user, multi-virtual server MEC network to minimize the total energy consumption of the system remains an urgent problem to be solved. Summary of the Invention
[0004] To address the technical problems existing in the background art, the present invention provides a multi-user workflow task offloading decision and scheduling scheme based on genetic algorithm, which can minimize the total energy consumption of the system while satisfying time constraints.
[0005] The technical solution adopted in this invention is: a multi-user workflow task offloading decision and scheduling scheme based on genetic algorithms, including the following system model:
[0006] (1) The mobile edge computing system consists of K mobile devices and a base station equipped with an MEC server. The MEC server contains M virtual servers for concurrently processing multiple computing tasks. The K mobile devices can access the MEC server via wireless channels. Each mobile device has a workflow task that needs to be computed and unloaded. Each workflow task consists of I subtasks. The workflow task can be described by a weighted directed acyclic graph to show the sequential dependencies of the subtasks.
[0007] (2) Define the workflow task of the mobile device k (1≤k≤K) as W. k W k Consisting of a binary tuple (V) k E k ) represents. Wherein, V k It is the set of I subtasks in a workflow task, E k It is a set of edges between subtasks. Each edge connects two subtasks, indicating a data dependency between them. The i-th subtask v of mobile device k.i,k Define a tuple v i,k =(ω i,k ,c i,k ω is represented by ) i,k c represents the input data size (in bits) of the i-th subtask of the k-th user; i,k This indicates the number of CPU cycles required to execute a unit bit task.
[0008] (3) Each user offloads tasks to the base station using Orthogonal Frequency Division Multiple Access (OFDM). Let... Let be the uplink transmission rate of mobile device k, where k = 1, 2, ..., K. Assume the downlink channels have the same fading environment and noise. Let be the downlink transmission rate of mobile device k, where k = 1, 2, ..., K.
[0009] (4) Subtask v i,k When executed locally, the execution time and energy consumption are determined by the computing power of the local device; the execution time is the number of CPU cycles required divided by the CPU frequency. Therefore, the execution latency of a subtask... and energy consumption for:
[0010]
[0011]
[0012] Where: κ is the energy consumption factor related to the CPU chip structure. Let k be the local computing frequency of the mobile device. Then the energy consumption per CPU cycle is:
[0013] (5) Subtask v i,k When the subtask is unloaded to the MEC virtual server m for computation, the latency can be divided into two parts: the unloading latency of the subtask to the MEC server and the computation latency of the subtask on the virtual server. Therefore, the transmission latency of the subtask being unloaded to the MEC virtual server m is... and energy consumption for:
[0014]
[0015]
[0016] in, The transmission power when user k uploads data.
[0017] (6) Subtask v i,k When a subtask is offloaded to MEC virtual server m for execution, it is assumed that the subtask continuously occupies the CPU until the task is completed. The execution latency of the subtask on MEC virtual server m depends on the computing power of the MEC virtual server and its CPU frequency. Therefore, the execution latency of the subtask on MEC virtual server m is:
[0018]
[0019] in, This refers to the CPU frequency of the MEC virtual server m.
[0020] (7) Define a set L = S∪{0} = {0, 1, 2, ..., M} to represent the execution position of a subtask in the workflow. Since a subtask can only be executed on one virtual server, define a variable x. i,k,m ∈{0,1} represents the i-th subtask v of mobile device k. i,k The uninstallation decision. If task v i,k If the execution is offloaded to the edge server m (m∈S), then x i,k,m =1, otherwise x i,k,m =0. Let subtask v i,k The total delay is T i,k Energy consumption is E i,k .
[0021] (8) In a workflow task, workflow task W k Two related subtasks v i,k and v j,k If they are executed in the same location, the data transmission and latency between them are zero; if they are executed in different locations, data transmission is required between them. Task v i,k Execute locally, subsequent task v j,k When executing on the MEC virtual server m, let the latency for data transfer between the two subtasks be . Energy consumption is Similarly, task v j,k Execute locally, subsequent task v i,k When executing on the MEC virtual server m, let the latency for data transfer between the two subtasks be . Energy consumption is
[0022] (9) Workflow Task W kThe total computation time is the sum of the latency for data transfer between related subtasks and the computation time of each subtask. The total energy consumption of a workflow task is the sum of local computation energy consumption, offloading energy consumption, and the energy consumption for data transfer between related subtasks. As mentioned above, the total computation time and total energy consumption can be calculated as follows:
[0023]
[0024]
[0025] In summary, under the mobile edge computing system, the overall energy consumption can be reduced by optimizing the workflow task offloading strategy and offloading location while meeting user latency constraints. The system energy consumption minimization problem can be expressed as:
[0026]
[0027]
[0028]
[0029]
[0030] A genetic algorithm is used to solve for the execution order and unloading location of workflow tasks. Based on the energy consumption and latency factors in the model, individual tasks are modified, crossovered, and mutated to obtain a task unloading decision and scheduling scheme for the workflow tasks, minimizing system energy consumption. The task unloading decision and scheduling scheme for workflow tasks based on the genetic algorithm is obtained according to the following steps:
[0031] Step 1: Initialize the population. Assume the system has K mobile devices and one MEC edge server containing M virtual servers. Each mobile device's workflow task can be divided into I subtasks. Represent the execution order and execution position of the workflow tasks together as an individual; the individual length is I×K, and each individual corresponds to one execution order and execution position. Randomly generate an initial population containing N individuals.
[0032] Step 2: Individual initialization, including the initialization of the execution location and execution order of subtasks;
[0033] Step 3: Fitness assessment. Calculate the fitness value, i.e., the total energy consumption of the system, according to equation (7).
[0034] Step 4: Individual Correction. For each mobile device workflow task, calculate the task completion time. If the time constraint is not met, the unloading strategy represented by the chromosome will not be considered in the operation selection. Chromosomes that meet the time constraint become valid chromosomes.
[0035] Step 5: Selection operation, using an elite selection strategy to select the individual with the highest fitness from the population;
[0036] Step Six: Survival competition. In each generation of the population, two individuals are randomly selected to compete for survival. The individual with higher fitness is selected, resulting in N / 2 individuals in the population that enter the next generation.
[0037] Step 7: Crossover operation, randomly pair up the winning individuals from the survival competition with a crossover probability P. c Perform a single-point crossover, and the crossover population enters the next generation population;
[0038] Step 8: Mutation operation, the best individual in each generation is mutated with probability P. m Mutation occurs, generating N / 4 individuals to enter the next generation;
[0039] Step 9: Randomly generate N / 4 individuals to enter the next generation;
[0040] Step 10: Generate a new population and make individual adjustments;
[0041] Step 11: Calculate the fitness value of the new population, and replace the worst individual in the current population with the best individual from the previous generation;
[0042] Step 12: The iteration terminates when either of the following two termination conditions is met, and the execution order and execution position of the workflow tasks are obtained. The two termination conditions are: first, the maximum number of iterations is exceeded; second, the difference between the best and worst individuals in the current population is small enough, that is, the difference in fitness is less than V times the fitness of the best individual; otherwise, jump to step five to continue the iteration.
[0043] Step 13: The algorithm ends, outputting the optimal task execution order and execution location.
[0044] The advantages and beneficial effects of this invention are as follows:
[0045] This invention addresses the workflow task scheduling problem in a multi-user, multi-virtual-server (MEC) network. Under latency constraints, it minimizes system energy consumption by jointly optimizing the execution order and location of workflow tasks. First, a latency and energy consumption model for workflow task scheduling is constructed. The execution order and unloading location of workflow tasks are jointly represented as an individual in a genetic algorithm. System energy consumption is used as the fitness evaluation function. Then, the optimal solution is obtained through individual modification, crossover, and mutation operations in the genetic algorithm, thus achieving the optimal task execution location and order. This method considers the workflow task unloading scenario in a multi-user, multi-virtual-server environment. It uses a genetic algorithm to make optimal decisions regarding the execution order and unloading location of workflow tasks, minimizing total system energy consumption while satisfying latency constraints. Simulation results demonstrate that this method effectively reduces system energy consumption compared to other comparative methods. Attached Figure Description
[0046] Figure 1 A graph showing the impact of different unloading methods on total system power consumption for different numbers of mobile devices;
[0047] Figure 2 A graph showing the impact of different unloading methods on the total system energy consumption for different numbers of tasks;
[0048] Figure 3 A graph showing the impact of different offloading methods on total system energy consumption for different numbers of MEC virtual servers;
[0049] Figure 4 A graph showing the impact of different unloading methods on the total system energy consumption at different workload levels. Detailed Implementation
[0050] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments: The mobile edge computing system model of this patent consists of K mobile devices and an MEC server deployed at a base station. In the MEC system of the present invention, mobile devices include communication devices with limited computing power, such as mobile phones, laptops, and in-vehicle computers. The MEC server contains M virtual machines (VMs) for concurrently processing multiple computing tasks. Each VM works independently and is represented by the set S = {1, 2, ..., M}. The K mobile devices can access the MEC server through wireless channels, and the set U = {1, 2, ..., K} represents the mobile users. Mobile users can offload all or part of their computing tasks to the MEC server for computation, thereby improving the computing performance of mobile devices and reducing energy consumption and latency.
[0051] The execution order dependencies of workflow tasks in a mobile edge computing system are described using a weighted directed acyclic graph (DAG). Each workflow task for a mobile device k (1 ≤ k ≤ K) can be represented by a tuple W. k (V k E k ) indicates that V k V is the set of I subtasks in a workflow task. k ={v 1,k ,v 2,k ,...,v I,K}, where v i,k E represents the i-th subtask of mobile device k; k ={e i,j |i,j∈I} represents the set of edges between subtasks. Each edge connects two subtasks, indicating a data dependency between them. For example, in workflow task W... k In this context, v0 is the initial subtask, and v1 is the successor task of subtask v0. This means that v1 can only begin execution after v0 has finished. For the i-th subtask v of mobile device k... i,k Define a tuple v i,k =(ω i,k ,c i,k Let ω be the value of ω. i,k c represents the input data size (in bits) of the i-th subtask of the k-th mobile device; i,k This represents the number of CPU cycles required to execute a unit of bit task. Furthermore, it is assumed that all VMs have sufficient capacity to execute tasks, and that tasks will be executed until completion after allocation.
[0052] Each mobile device offloads tasks to the base station using Orthogonal Frequency Division Multiple Access (OFDM). (Using g) k Let represent the channel gain between the mobile device k and the MEC server. Furthermore, the system noise follows a Gaussian distribution with zero expectation, and its variance is denoted by σ. 2 Let's represent it. According to Shannon's formula, the uplink transmission rate of mobile device k is... It can be represented as:
[0053]
[0054] In the formula: B k The wireless bandwidth allocated to mobile device k. Let k be the transmit power transmitted from the mobile device k to the MEC. Similarly, assuming the downlink channels have the same fading environment and noise, This refers to the transmit power for downlink MEC transmission. Therefore, the downlink rate... It can be represented as:
[0055]
[0056] Workflow tasks W on mobile device k k It can consist of I subtasks. These subtasks can be computed locally or offloaded to a VM for computation via a wireless channel. Subtask v i,k When executed locally, the execution time and energy consumption are determined by the computing power of the local device; the execution time is the required number of CPU cycles divided by the CPU frequency. Therefore, subtask v i,k Execution latency and energy consumption for:
[0057]
[0058]
[0059] Where: κ is the energy consumption factor related to the CPU chip structure. Let k be the local computing frequency of the mobile device. Then the energy consumption per CPU cycle is:
[0060] Subtask v i,k When the subtask is unloaded to the MEC virtual server m for computation, the latency can be divided into two parts: the unloading latency of the subtask to the MEC server and the computation latency of the subtask on the virtual server. Therefore, the transmission latency of the subtask being unloaded to the MEC virtual server m is... and energy consumption for:
[0061]
[0062]
[0063] in, The transmission power when user k uploads data.
[0064] Subtask v i,k When a subtask is offloaded to MEC virtual server m for execution, it is assumed that the subtask continuously occupies the CPU until the task is completed. The execution latency of the subtask on MEC virtual server m depends on the computing power of the MEC virtual server and its CPU frequency. i,k The execution latency on the MEC virtual server m is:
[0065]
[0066] in, This refers to the CPU frequency of the MEC virtual server m. Therefore, subtask v... i,k When the process is offloaded to the MEC virtual server m, the total latency can be expressed as:
[0067]
[0068] Similarly, subtask v i,k When the device is unloaded to the MEC virtual server m for execution, the energy consumed by the mobile device k includes upload energy consumption and local device circuit loss. This invention only considers upload energy consumption and ignores circuit loss during upload. Therefore, subtask v i,k Energy consumption during unloading Represented as:
[0069]
[0070] Define a set L = S ∪ {0} = {0, 1, 2, ..., M} to represent the execution position of a subtask in the workflow. Since a subtask can only be executed on one virtual server, define a variable x. i,k,m ∈{0,1} represents the i-th subtask v of mobile device k. i,k The uninstallation decision. If task v i,k If the execution is offloaded to the edge server m (m∈S), then x i,k,m =1, otherwise x i,k,m =0. Subtask v i,k Total latency T i,k and energy consumption E i,k for:
[0071]
[0072]
[0073] In a workflow task, workflow task W k Two related subtasks v i,k and v j,k If they are executed in the same location, the data transmission and latency between them are zero; if they are executed in different locations, data transmission is required between them. Task v i,k Execute locally, subsequent task v j,k When executing on the MEC virtual server m, set two subtasks v. i,k and v j,k The data transfer size between them is d i,j,k The latency of data transmission between the two subtasks. and energy consumption for:
[0074]
[0075]
[0076] Similarly, subtask v i,k Execute task v on MEC virtual server m. j,k When executed locally, the local device needs to receive data transmitted from the MEC server, involving two subtasks v. j,k and v i,k The data transfer size between them is d j,i,k Define the power of user k when receiving data as: The delay in data transmission between the two subtasks Energy consumption of local devices receiving data for
[0077]
[0078]
[0079] Therefore, the workflow task W of mobile device k k Total time T k and energy consumption expenditure E k for:
[0080]
[0081]
[0082] Under the condition of satisfying user latency constraints, the total energy consumption of the system can be reduced by optimizing the workflow task offloading strategy and offloading location. Therefore, the system energy consumption minimization problem can be expressed as:
[0083]
[0084]
[0085]
[0086] Where: C1 is the latency constraint of the workflow task; C2 represents the unloading decision variable of the task; C3 represents the unloading constraint of the task, that is, each subtask of the workflow can only be executed locally or unloaded to the MEC virtual server m for execution.
[0087] This invention uses a genetic algorithm to solve the problem of workflow task execution order and unloading decision, aiming to minimize system energy consumption under latency constraints. First, the execution order and unloading decision of workflow tasks are jointly represented as an individual, with an individual length of I×K. An initial population of N individuals is randomly generated and initialized. Individual initialization includes initializing the execution position and execution order of subtasks. For task position initialization, a set of execution positions is used to represent the task execution position. Since priority constraints must be satisfied between subtasks, a sortable set of tasks is used to represent the task execution order. System energy consumption is defined as a fitness evaluation function. Then, a new generation of the population is generated through individual modification, selection, crossover, and mutation operations. Each individual in the population is evaluated using the fitness function, and the individual with the best fitness value is selected from the new population. If the difference between the best and worst individuals in the current population is sufficiently small or the maximum number of iterations has been reached, the algorithm terminates, outputting the optimal task execution order and execution position; otherwise, iteration continues until the maximum number of iterations is satisfied. The multi-user workflow task unloading decision and scheduling scheme based on the genetic algorithm in the above scheme is obtained according to the following steps:
[0088] Step 1: Initialize the population. Assume the system has K mobile devices and one MEC edge server containing M virtual servers. The workflow task of each mobile device can be divided into I subtasks. Randomly generate an initial population containing N individuals, and then randomly initialize each individual in the population.
[0089] Step 2 involves individual initialization, including initializing the execution position and order of subtasks. Let set S represent sortable subtasks, i.e., tasks that have no predecessor or whose predecessor has already been executed. First, randomly select a sortable task and add it to set S. Then, select another sortable task and add it to set S. Continue iterating until a feasible task order is generated. For initializing task positions, randomly generate an integer from 0 to M to represent the execution position of each subtask. Continue iterating through all tasks in the same way to generate a set of task position initializations.
[0090] Step 3: Fitness function. Calculate the fitness value according to equation (17), which is the total energy consumption of the system.
[0091] Step 4 Individual correction: For each workflow task, the completion time of the task is calculated according to formula (16). If the time constraint is not met, the unloading strategy represented by the chromosome will not be considered in the selection operation. The chromosome that meets the time constraint becomes the valid chromosome.
[0092] Step 5: Selection Operation. This invention employs an elite selection strategy to select the individual with the highest fitness from the population.
[0093] Step 6: Survival competition. In each generation of the population, two individuals are randomly selected to compete for survival. The individual with higher fitness is selected, resulting in a population of N / 2 individuals.
[0094] Step 7: Crossover operation. In this invention, the winning individuals obtained from the survival competition are randomly paired and crossovered with a probability P. c A single-point crossover is performed, and the resulting N / 2 population enters the next generation. Based on the adaptive crossover probability adjustment formula proposed by Srinivas et al., the adaptive crossover probability constructed in this invention is:
[0095]
[0096] Among them, f min f represents the minimum fitness value in the population; avg f represents the average fitness value of the entire population; c p represents the smaller fitness value among the two individuals in the selected crossover operation. c1 p c2 These are the maximum and minimum crossover probabilities, respectively.
[0097] Interleaving operations in the execution order require that, because the subtasks within a workflow task must satisfy a certain sequential relationship, the new entities created after the interleaving operation must also satisfy a certain sequential relationship. For example, two related subtasks v... i,k and v j,k v i,k It is v j,k If the predecessor node is a given node, then the new individual after the intersection should also satisfy the previous order relationship. Assuming the execution order sets of the two individuals are Order1 and Order2, first, a random intersection point is generated and the intersection user is determined. The task sequence before the intersection point is called the matching region. Order2 is moved after the matching region of Order1, and Order1 is moved after the matching region of Order2. This generates two temporary matching sequence sets, Order12 and Order21. Then, starting from the first task of the intersection user, the process iterates backwards, removing duplicate task sorts. Finally, two new task sort sets are generated.
[0098] The single-point intersection of task execution locations is similar to the execution order. First, a random intersection point is selected in the task unloading location sequence. Then, matching regions in the two execution location sequences are swapped. Finally, two new sets of task execution locations are generated.
[0099] Step 8: Mutation operation. In this invention, the strongest individual in each generation is selected with a mutation probability P. m Mutation is performed to generate N / 4 individuals to enter the next generation. The mutation operation at the task execution location randomly selects an individual with a mutation probability P.m The decision to perform mutation is made, with mutation values ranging from 0 to M. Task sorting mutation must also satisfy the order relationship; first, a subtask v is randomly selected from the tasks. i,k Then, perform a predecessor traversal on the task set to find its predecessor task set {v 0,k ,v 1,k ,...,v a,k}; Simultaneously, perform a successor traversal on the task set to find its successor set {v b,k ,v b+1,k ,...,v I-1,k At this point, task v i,k It must be in {v a+1,k ,...,v b-1,k} and can be in {v a+1,k ,...,v b-1,k Any position within}. Finally, exclude v. i,k The initial position is randomly selected to perform the insertion operation. Based on the adaptive mutation probability adjustment formula proposed by Srinivas et al., the adaptive mutation probability constructed in this invention is:
[0100]
[0101] Among them, f min f represents the minimum fitness value in the population; avg f represents the average fitness value of the entire population; m p represents the fitness value of the selected individual; m1 p m2 These represent the maximum and minimum mutation probabilities, respectively.
[0102] Step 9: Randomly generate N / 4 individuals to enter the next generation.
[0103] Step 10 generates a new population and performs individual adjustments.
[0104] Step 11: Calculate the fitness value of the new population, and replace the worst individual in the current population with the best individual from the previous generation.
[0105] Step 12: The iteration terminates when either of the following two termination conditions is met, yielding the execution order and location of the workflow tasks: First, the maximum number of iterations is exceeded; second, the difference between the best and worst individuals in the current population is sufficiently small, i.e., the difference in fitness is less than V times the fitness of the best individual. Otherwise, skip to step 5 and continue the iteration.
[0106] Step 13: The algorithm ends, outputting the optimal task execution order and execution location.
[0107] Experimental Analysis:
[0108] The multi-user workflow task offloading decision and scheduling scheme based on genetic algorithm of this invention is experimentally analyzed. The simulation software is PyCharm. User mobile devices are randomly distributed in a 60m × 60m area, and the wireless access base station is located at the center of this area. For wireless access, the channel bandwidth B = 5MHz and the transmission power are set to... Received power Background noise σ 2 = -113dBm. Based on the path loss model, set the channel gain. Where d k,m α is the distance between mobile user k and MEC, and α = 4 is the path loss factor. The simulation results are obtained by averaging 200 Monte Carlo simulations. Other simulation parameters are shown in Table 1.
[0109] Table 1. Simulation Parameter Settings
[0110]
[0111] The following comparison will be made between the multi-user workflow task offloading decision and scheduling scheme based on genetic algorithm proposed in this application, local computing and random offloading algorithms, and the MEC task offloading method based on adaptive genetic algorithm proposed in the literature "Yan Wei, Shen Bin, Liu Xiaoxiao. MEC task offloading and resource allocation based on adaptive genetic algorithm [J]. Electronic Technology Application, 2020, 46(08):95-100.DOI:10.16157 / j.issn.0258-7998.200113".
[0112] Figure 1 The impact of different unloading methods on total system power consumption for different numbers of mobile devices. Each workflow contains 10 subtasks. Figure 1 As can be seen, the total system energy consumption of all four methods increases with the number of mobile devices and the execution of more subtasks. The method proposed in this invention allocates optimal execution positions to subtasks, consuming less energy than the other three comparison algorithms. Since all computational tasks can only be performed locally, local computation algorithms consume more energy. For the random unloading algorithm, its energy consumption is the highest because the execution order and unloading position of tasks are randomly assigned. For the adaptive genetic algorithm, the adaptive crossover probability and mutation probability can be dynamically adjusted with adaptive values, avoiding entering local optima. Therefore, the energy consumption of this algorithm is second only to our proposed algorithm.
[0113] Figure 2 The impact of different unloading methods on total system power consumption for different numbers of tasks. Figure 2It can be seen that as the number of tasks increases, the total energy consumption of the system also increases. Local computing performs the worst in terms of energy consumption because local device energy consumption is positively correlated with the amount of computation and negatively correlated with the local device's computing power. Since local computing power is limited, the more tasks there are, the greater the computational load, and the more energy is consumed. Among the four algorithms, the unloading method proposed in this invention consumes less energy than the other three. This is because the unloading method proposed in this invention can optimize the allocation of the execution order and unloading position of each subtask in the workflow.
[0114] Figure 3 The impact of different offloading methods on total system energy consumption for different numbers of MEC virtual servers. Figure 3 As can be seen, the total system energy consumption of these three algorithms decreases accordingly with the increase in the number of MEC virtual servers, because the more virtual servers that can be selected, the lower the energy consumption. The algorithm of this invention optimizes resource allocation and has lower energy consumption than the other two algorithms. In addition, when the number of MEC virtual servers increases, especially when the number of virtual servers is greater than 9, the rate of decrease in total system energy consumption slows down, because the number of virtual servers is large enough to allow subtasks to select tasks that minimize energy consumption, and some virtual servers are idle.
[0115] Figure 4 The impact of different unloading methods on total system energy consumption under varying workloads. Figure 4 It is evident that as the workload of subtasks increases, the energy consumption required to compute more tasks also increases accordingly. Compared to the other three algorithms, the algorithm of this invention can achieve the lowest system energy consumption through reasonable resource allocation.
[0116] Based on the above analysis and discussion, the proposed multi-user workflow task offloading decision and scheduling scheme based on genetic algorithms determines the execution order and offloading decision of workflow tasks through operations such as individual modification, elite selection, adaptive crossover, and mutation probability. Simulation results show that, compared with local computation and random offloading algorithms, as well as the MEC task offloading method based on adaptive genetic algorithms proposed by Yan Wei, the proposed method can effectively schedule the execution order and offloading position of workflow tasks under the condition of meeting latency constraints, achieving minimum system energy consumption and thus effectively reducing system energy consumption.
Claims
1. A multi-user workflow task offloading decision and scheduling method based on genetic algorithm, the method comprising the following system model: (1) The mobile edge computing system consists of It consists of a mobile device and a base station equipped with an MEC server. The MEC server contains M virtual servers for concurrently processing multiple computing tasks. Each virtual machine works independently and is composed of a set of... express, Each mobile device can access the MEC server via a wireless channel. Each mobile device has a workflow task that needs to be computed and unloaded. Each workflow task is... The workflow consists of subtasks, and the execution order of subtasks can be described by a weighted directed acyclic graph. (2) Define mobile devices as users Workflow tasks are ,in , A binary tuple It means that, among them, In workflow tasks A collection of sub-tasks It is a set of edges between subtasks, where each edge connects two subtasks, representing the data dependencies between them. The mobile device is the user. The i-th subtask Define a tuple To indicate, Indicates the first The first user's The size of the input data for each subtask (in bits); This represents the number of CPU cycles required to execute a unit bit task. Represents a set of mobile users; (3) Each user offloads the task to the base station using Orthogonal Frequency Division Multiple Access (OFDM). For mobile devices Uplink transmission rate, of which, Assuming the downlink channels have the same fading environment and noise, For mobile devices Downlink transmission rate, of which, ; (4) Subtasks When executed locally, the execution time and energy consumption are determined by the computing power of the local device. The execution time is calculated by dividing the required number of CPU cycles by the CPU frequency. Therefore, the execution latency of the subtask... and energy consumption for: , (1) , (2) in: This refers to the energy consumption factor related to the CPU chip structure. For mobile devices If the local computing frequency is [value], then the energy consumption per CPU cycle is [value]. ; (5) Subtasks Unload to MEC virtual server During computation, the latency can be divided into two parts: the offloading latency of the subtask to the MEC server and the computation latency of the subtask on the virtual server. Therefore, the subtask is offloaded to the MEC virtual server. Transmission delay and energy consumption for: , (3) , (4) in, The transmission power when user k uploads; (6) Subtasks Unloaded to MEC virtual server During execution, it is assumed that the subtask continuously occupies the CPU until the task is completed. The subtask resides on the MEC virtual server. The execution latency of the subtask depends on the computing power and CPU frequency of the MEC virtual server. The execution latency is: , (5) in, For MEC virtual servers CPU frequency; (7) Define a set ,exist The value in the variable represents the execution position of a subtask in the workflow. Since a subtask can only be executed on one virtual server, a variable is defined accordingly. Indicates mobile device The Sub-tasks The uninstallation decision, if the task Offload to edge server Execute on, where ,but ,otherwise Set subtasks The total latency is Energy consumption is ; (8) In workflow tasks, workflow tasks Two related subtasks and If they are executed in the same location, the data transmission and latency between them are zero; if they are executed in different locations, data transmission is required between them. Execute locally, subsequent tasks In MEC virtual server During execution, let the latency for data transmission between the two subtasks be . Energy consumption is Similarly, the task Execute locally, subsequent tasks In MEC virtual server During execution, let the latency for data transmission between the two subtasks be . Energy consumption is ; (9) Workflow Tasks The total computation time is the sum of the latency for data transfer between related subtasks and the computation time of each subtask. The total energy consumption of a workflow task is the sum of local computation energy consumption, offloading energy consumption, and the energy consumption for data transfer between related subtasks. As mentioned above, the total computation time and total energy consumption can be calculated as follows: , (6) (7) In summary, under the mobile edge computing system, by optimizing the workflow task offloading strategy and offloading location while meeting user latency constraints, the total energy consumption of the system can be reduced. The system energy consumption minimization problem can be expressed as: (8)。 2. The multi-user workflow task offloading decision and scheduling method based on genetic algorithm according to claim 1, characterized in that: The task offloading decision and scheduling scheme for its workflow tasks is obtained through the following steps: Step 1: Initialize the population. Assume the system has... There are one mobile device and one MEC edge server containing M virtual servers. The workflow tasks for each mobile device can be divided into... Each subtask represents a workflow task by combining its execution order and execution location as an individual task; the length of each individual task is... Each individual corresponds to an execution order and execution location, and a random number containing... The initial population of individuals; Step 2: Individual initialization, including initialization of the execution location and execution order of subtasks; Step 3: Fitness assessment. Calculate the fitness value, i.e., the total energy consumption of the system, according to equation (7). Step 4 Individual Correction: For each mobile device workflow task, calculate the task completion time. If the time constraint is not met, the unloading strategy represented by the chromosome will not be considered in the operation selection. Chromosomes that meet the time constraint become valid chromosomes. Step 5: Selection operation, using an elite selection strategy to select the individual with the highest fitness from the population; Step 6: Survival competition. In each generation of the population, two individuals are randomly selected to compete for survival. The individual with higher fitness is chosen. Individuals in a population move to the next generation; Step 7: Crossover operation. Randomly pair up the winning individuals from the survival competition and crossover probability. Perform a single-point crossover, and the crossover population enters the next generation population; Step 8: Mutation operation. The best individual in each generation is selected based on its mutation probability. Mutate to generate Individuals in a population move to the next generation; Step 9: Randomly generate Individuals in a population move to the next generation; Step 10: Generate a new population and perform individual adjustments; Step 11: Calculate the fitness value of the new population, and replace the worst individual in the current population with the best individual from the previous generation. Step 12: The iteration terminates when either of the following two termination conditions is met, yielding the execution order and location of the workflow tasks. The two termination conditions are: 1) exceeding the maximum number of iterations; Second, the difference between the best and worst individuals in the current population is small enough, meaning the difference in fitness is less than the fitness of the best individual. If the result is positive, then skip to step 5 and continue the iteration; Step 13: The algorithm ends, outputting the optimal task execution order and execution location.
Citation Information
Patent Citations
Task unloading decision-making method based on adaptive genetic algorithm
CN111585816A
Joint optimization method for task unloading and resource allocation in multi-cell scene
CN111586720A