CN115330189A - Workflow optimization scheduling method based on improved moth flame algorithm - Google Patents

Workflow optimization scheduling method based on improved moth flame algorithm Download PDF

Info

Publication number
CN115330189A
CN115330189A CN202210963223.2A CN202210963223A CN115330189A CN 115330189 A CN115330189 A CN 115330189A CN 202210963223 A CN202210963223 A CN 202210963223A CN 115330189 A CN115330189 A CN 115330189A
Authority
CN
China
Prior art keywords
workflow
task
flame
moth
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210963223.2A
Other languages
Chinese (zh)
Inventor
袁友伟
高一鸣
黄笑成
邱仁志
洪宇杰
鄢腊梅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Dianzi University
Original Assignee
Hangzhou Dianzi University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Dianzi University filed Critical Hangzhou Dianzi University
Priority to CN202210963223.2A priority Critical patent/CN115330189A/en
Publication of CN115330189A publication Critical patent/CN115330189A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • G06Q10/06316Sequencing of tasks or work
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0633Workflow analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/103Workflow collaboration or project management

Landscapes

  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Engineering & Computer Science (AREA)
  • Strategic Management (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Economics (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Operations Research (AREA)
  • Marketing (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Data Mining & Analysis (AREA)
  • Development Economics (AREA)
  • Game Theory and Decision Science (AREA)
  • Educational Administration (AREA)
  • Biophysics (AREA)
  • Artificial Intelligence (AREA)
  • General Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a workflow optimization scheduling method based on an improved moth flame algorithm. The method comprises the steps of establishing a fitness function as system cost by calculating energy consumption and time delay in a workflow scheduling scheme under the constraint of a workflow task deadline, improving a moth flame optimization algorithm, updating the position of flame through a proper mutation process and a dynamic cross mechanism, and introducing a weight factor related to the fitness to update the position of the moth, so that the algorithm is used for carrying out iterative updating on the workflow scheduling scheme based on server energy consumption and time delay information under the constraint of the deadline, the moth is guided to develop in a constraint optimization direction according to the unique flame updating position corresponding to the moth, the global optimization searching capability of the algorithm is enhanced, and the energy consumption and the time delay of an edge server are minimized, thereby obtaining the optimal workflow scheduling scheme.

Description

Workflow optimization scheduling method based on improved moth flame algorithm
Technical Field
The invention belongs to the technical field of mobile edge computing environments, and particularly relates to a workflow optimization scheduling method based on an improved moth flame algorithm.
Background
The development of intelligent mobile devices meets the requirements of users for running application programs in various scenes by using the devices. However, as the quality of service and data rate of users are continuously improved, the mode of cloud computing cannot meet the requirements of users due to resource limitations. The mobile edge computing technology provides a new idea for solving the limitation of cloud computing. Although mobile edge computing provides computing and processing services for users through base stations deployed near the users and overcomes the problems of limited computing power of user equipment and large delay in offloading tasks to remote clouds, mobile edge computing still faces many challenges in actual operation. The mobile edge computing provides services to the user through different types of servers, including different numbers of CPUs, memories, and networks. The user equipment can reduce the resource consumption of the user equipment by unloading the task to the edge server for execution, and different task unloading schemes can cause different influences. Corresponding deadline exists in different tasks in the workflow, and energy consumption and time delay generated by different scheduling schemes are different, so that optimization of energy consumption and time delay of the server in the deadline range of the tasks is of great importance to execution of the workflow.
How to find a better solution in the workflow scheduling optimization process is an important problem, most of the current workflow scheduling optimization algorithms are evolutionary scheduling algorithms, local optimization traps exist, and the workflow scheduling optimization method is characterized by population dependence and lack of initial assumptions. Due to the characteristics of the algorithm, the problems of premature convergence and slow population diversity are easily caused when the workflow is executed.
The method is researched aiming at the defects existing in the current workflow scheduling algorithm, so that local optimal stagnation is avoided, the convergence speed is increased, and the searching performance of the algorithm is improved.
Disclosure of Invention
The invention provides a workflow optimization scheduling method based on an improved moth flame algorithm, aiming at overcoming the defects in the current workflow scheduling. The method comprises the steps of establishing a fitness function as system cost by calculating energy consumption and time delay in a workflow scheduling scheme under the constraint of a workflow task deadline, improving a moth flame optimization algorithm, updating the position of flame through a proper mutation process and a dynamic cross mechanism, and introducing a weight factor related to the fitness to update the position of the moth, so that the algorithm is used for carrying out iterative updating on the workflow scheduling scheme based on server energy consumption and time delay information under the constraint of the deadline, the moth is guided to develop in a constraint optimization direction according to the unique flame updating position corresponding to the moth, the global optimization searching capability of the algorithm is enhanced, and the energy consumption and the time delay of an edge server are minimized, thereby obtaining the optimal workflow scheduling scheme.
In order to solve the existing technical problems, the technical scheme of the invention is as follows:
a workflow optimization scheduling method based on an improved moth flame algorithm comprises the following steps:
step (1): workflows and servers in an edge environment are defined.
The invention adopts directed acyclic graph DAG to represent service workflow provided by a user to a mobile edge environment, and the DAG workflow is defined as w = { T, E, D }, wherein T = { T }, and 1 ,t 2 ,...,t n the method comprises the steps of (1) setting a workflow task set, wherein n is the number of workflow tasks; e = { (t) k ,t l ,c kl )|t k ,t l E.g. T, k ≠ l } represents the dependency between workflow tasks, T k Is t l Predecessor task of, t l Is t k C is a subsequent task of kl Representing a task t k And t l The amount of data transfer in between; d is the maximum time allowed for the workflow to execute after the workflow is submitted.
Defining the set of edge servers as M = { s = 1 ,s 2 ,...,s m And m is the number of servers in the mobile edge computing system.
At the same time, each edge server is only allowed to execute for the same user equipmentAnd one task needs to be executed in sequence before scheduling, and the task execution sequence is determined by the task priority. Task t i In the absence of a preceding task, the priority is
Figure BDA0003793679770000021
If task t i Presence of pre-tasking
Figure BDA0003793679770000022
Then the priority is:
Figure BDA0003793679770000023
wherein, T i pre As task t i The pre-tasking set of (2). After the priorities of all tasks are obtained, sequencing the workflow subtasks in ascending order, if the tasks with the same priority exist, sequencing the workflow subtasks in ascending order according to the starting time of the tasks, and finally obtaining the level of each workflow subtask;
step (2): and establishing a time limit model.
According to the priority of the workflow subtasks, a deadline is allocated to the workflow subtasks of each level, and each task in the same level can be guaranteed to be completed before the specified deadline.
2.1 defining an expiration date D assigned to level r r The initial values are as follows:
Figure BDA0003793679770000024
where φ is a task t i Completion time performed on each server; v rank Representing the set of all tasks at level r.
2.2 pairs of deadline D r Updating according to formula (3):
Figure BDA0003793679770000025
wherein,D last Is the deadline of the task at the maximum level.
2.3 task t in level r i Satisfies the following constraints:
T f (t i )≤D r formula (4)
And (3): and (5) encoding.
And recording the server distributed by each task in the workflow, and defining a moth as a workflow scheduling scheme. In one workflow, the number of tasks is n, and the number of servers is m. Let R denote a moth, R i Indicating the location of the ith task assignment. The scheduling scheme is:
R=[r 1 r 2 ... r n ]formula (5)
Each task in the scheduling scheme completes time on the corresponding server to meet the deadline constraint, namely:
T f (r i )≤D r formula (6)
And (4): and initializing populations and parameters.
The initial population influences the speed of searching the workflow scheduling scheme to the optimal direction, in order to accelerate the search process of the workflow scheduling scheme, a random method is used for generating the initial population, wherein the initial moth population comprises the workflow scheduling scheme which is randomly generated, the initial optimal flame population is generated by the initial moth population after the initial moth population is sorted according to ascending fitness, and each subtask of the workflow meets the deadline constraint in the generation process of the initial population. The advantages and disadvantages of the initial population influence the searching performance of the algorithm on the optimal workflow scheduling scheme, and the excellent initial population can reduce the searching time of the optimal workflow scheduling scheme. The method comprises the following specific steps:
traversing the whole task set, and generating a random integer rd for the server distributed by each task i ,rd i ∈[1,m]Until all workflow subtasks are distributed to corresponding servers, a workflow scheduling scheme R is obtained; initializing moth population as matrix P = [ R = [) 1 ,R 2 ,...,R N ] T Where the population number is N and the superscript T denotes transposition.
And (5): and (5) calculating the fitness. After the initial population is obtained, the fitness of each moth in the population needs to be calculated, and the fitness calculation comprises the following steps:
step (5.1): and (5) calculating time. The time consumed in the workflow scheduling process includes task execution time, transmission time and waiting time.
Step (5.1.1): calculating the execution time: when workflow task t i Is distributed to the server s j Then, its execution time is:
Figure BDA0003793679770000031
wherein, l (t) i ) As task t i Calculated load of (c), SC(s) j ) For servers s j The processing power of (2).
Step (5.1.2): the transmission time is calculated. It is assumed that all servers are contained in the same physical area, so the average bandwidth between servers is approximately equal. Task t with dependency relationship i And t j The data transmission time between depends on the data transmission quantity c ij The specific calculation is as follows:
Figure BDA0003793679770000041
wherein, t i Is t j Bw is the average bandwidth of the server, ser (t) i ),ser(t j ) Are respectively task t i And t j A distributed server.
Step (5.1.3): and calculating the waiting time and the completion time. Task t i At server s l The waiting time and the completion time of the upper operation are respectively as follows:
Figure BDA0003793679770000042
T f (t i ,s l )=T w (t i ,s l )+T e (t i ,s l ) Formula (10)
Wherein, T r (t i ,s l ) For servers s l Ready to execute task t i The time required, pre (t) i ) As task t i A set of predecessor tasks.
The total time for workflow execution is:
Figure BDA0003793679770000043
step (5.2): and (5) calculating energy consumption. The energy consumption in the workflow scheduling process mainly comprises the energy consumption consumed by the server for executing the tasks and the energy consumption consumed in the task transmission process.
Step (5.2.1): an energy consumption calculation is performed. When the main board of the server is mainly composed of CMOS circuits, the power consumption generated by the server is dynamic power consumption, the source of the dynamic power consumption is the charging and discharging current of a capacitive load, and then the server s i In that
Figure BDA0003793679770000044
The power at the time is calculated as follows:
Figure BDA0003793679770000045
where ζ is a constant associated with the server component, C represents the server capacitance, V represents the server supply voltage, f C Representing the clock frequency of the server CPU.
The energy consumption of the server to execute the workflow task depends on the task t i At the server s j The execution time and the power of the server are specifically calculated as follows:
Figure BDA0003793679770000046
step (5.2.2): and (5) transmission energy consumption calculation. Order server s j At a transmission power of
Figure BDA0003793679770000047
The transmission energy consumption of the workflow is:
Figure BDA0003793679770000051
wherein, U is a task set that needs to transmit data.
Step (5.2.3): and (4) calculating total energy consumption. The total energy consumption of the workflow is the sum of the task execution energy consumption and the transmission energy consumption, namely:
E(w)=E e +E t formula (15)
Step (5.3): and (5) calculating the fitness. The definition fitness is determined by the total execution time and the total energy consumption of the workflow, and is specifically calculated as follows:
l (w) = T (w) + alpha E (w) formula (16)
Wherein α is a weighting factor representing the degree of importance occupied by the objective optimization function for the total execution time and the total execution energy consumption of the workflow.
And (6): an optimal location matrix is initialized. After fitness calculation, recording fitness information of the ith moth as OR i Then the initial fitness matrix of the population is OP = [ OR = [) 1 ,OR 2 ,...,OR N ] T Defining gamma as the average fitness of the initial population, and specifically calculating as follows:
Figure BDA0003793679770000052
in order to avoid that the workflow scheduling scheme is trapped in local optimization, each moth uses a unique flame updating position corresponding to the moth, and in a search space, the number of initial flames is consistent with the number of moths. Defining an optimal position matrix as F = [ FR = [) 1 ,FR 2 ,...,FR N ] T Wherein FR is i And representing the ith flame, wherein each moth corresponds to one flame for the optimal scheduling scheme of the current workflow. In order to initialize F, the population P is sorted in an ascending order according to the fitness recorded in the fitness matrix OP, the sorted population is correspondingly assigned to the optimal position matrix F, and the fitness matrix OF F is recorded as OF = [ OFR = 1 ,OFR 2 ,...,OFR N ] T Wherein OFR i The fitness of the ith flame.
And (7): a solution is constructed. The workflow scheduling scheme is established and updated through continuous iteration, and the specific steps are as follows:
step (7.1): and recording the elite population and the elite individuals.
By recording and updating the optimal workflow scheduling scheme up to now, the diversity of the population is kept, and the loss of the elite individual information is avoided.
1) Judging whether an elite population and an elite individual exist, if so, performing a step 3), and if not, performing a step 2);
2) Initialization definition elite population H = [ HR ] 1 ,HR 2 ,...,HR N ] T I.e., H = P; elite individuals R best The moths corresponding to the optimal fitness in the OP are obtained; setting the maximum iteration times K; wherein HR i Is the ith moth;
3) Replacing and updating the optimal position of the elite population by the optimal moth in the population under the current iteration number k; and then screening out the optimal moth updating elite individual according to the updated elite population.
4) And (5) performing mutation operation.
The mutation operation ensures optimal variability of the workflow scheduling schemes in the population, enhances global search capability for the workflow scheduling schemes and improves local search.
Setting the mutation probability as theta, theta is epsilon to [0,1 ]]Traversing each flame FR in the optimal position matrix i In [0,1 ]]Randomly generating a number within the range, and if the random number is greater than theta, then the flame FR is tested i Performing mutation operation, specifically comprising the following steps:
Figure BDA0003793679770000061
wherein, the dom is uniformly distributed in [0,1 ]]Random number between,/ i Is in [1, N ]]A random integer generated in between, and l 1 ≠l 2 ≠l 3 ≠l 4
5) And (4) performing a crossover operation.
The cross operation provides diversity for the search of the workflow scheduling scheme, so that the elite individual information can be transmitted to the current optimal workflow scheduling scheme. The flame FR after mutation i And an elite individual R best The mixing is carried out by crossing, and the operation is as follows: traversing flame FR i Setting the crossing rate eta (k) under the current iteration number, and setting the crossing rate eta (k) at the evenly distributed [0, 1')]If the random number is greater than eta (k), the position allocated by the task is replaced by an elite individual R best To the corresponding position in (c).
The crossing operation depends on a crossing rate eta (k), and in order to refine the search for the optimal solution, eta (k) is set as a dynamic crossing rate and linearly decreases with the increase of the iteration number k, and the specific calculation is as follows:
Figure BDA0003793679770000062
wherein eta max And η min The maximum and minimum values of η, respectively.
6) And setting a dynamic weight. The influence degree of the individual flame on the individual moth search is determined by the dynamic weight, and the utilization rate of the optimal workflow scheduling scheme is improved. Defining omega as a dynamic weight, wherein the dynamic weight changes nonlinearly with the iteration times and the adaptability of a workflow scheduling scheme, and specifically calculating as follows:
Figure BDA0003793679770000063
7) And updating the position of the moth. According to the flame positionAnd updating the current workflow scheduling scheme, and searching the workflow scheduling scheme with a better position. For each moth R in the population i The relative flame position update mechanism can be expressed as:
R i =S(R i ,FR j ) Formula (21)
Wherein, S represents a path function of a moth swatter to the flame, specifically, a spiral function with a starting point being a moth position and an end point being a flame position, and specifically, the path function is represented as follows:
S(R i ,FR j )=ω i,j ×DIS i ×exp(b·t)×cos(2πt)+(1-ω i,j )×FR j formula (22)
Wherein b is a constant whose value is related to the shape of the spiral, and t is [ -1,1]Random numbers in the range, moth position closest to flame when t = -1, moth position farthest from flame when t =1, DIS i Is a moth R i And flame FR j The distance between the two is specifically calculated as follows:
DIS i =|FR j -R i equation (23)
8) And updating the flame position. And updating the current optimal workflow scheduling scheme. After the updated population P is obtained, the corresponding fitness is calculated according to equation (16) and the fitness matrix OP is updated. And (3) sequencing the population P in an ascending order according to the fitness recorded in the fitness matrix OP, traversing the individuals in the population, comparing the individual fitness with the fitness of the flame in the original optimal position matrix, and replacing the flame position if the updated fitness of the individual is smaller than the original fitness so as to update the optimal position matrix F, otherwise, not replacing.
9) Flame rejection behavior. And the number of flames is reduced in a flame abandoning behavior self-adaptive manner, and the number of the current optimal workflow scheduling schemes is updated until the positions of the flames are kept optimal, so that the global search capability and the local development capability of the algorithm in a search space of a workflow scheduling solution are balanced. Make num F Indicating the number of flames, the number of flames being reducedThe specific calculation is as follows:
Figure BDA0003793679770000071
and discarding the flame with the corresponding number in the optimal position matrix F from back to front according to the flame reduction number, and updating the position of the moth in the population corresponding to the last flame in the flame sequence when the next iteration is performed.
10 Determine whether an end condition is reached. And if the iteration times of the workflow scheduling scheme reach the originally set maximum iteration times, the circulation is exited, the optimal workflow scheduling scheme is output, and otherwise, the step 1) is returned.
Compared with the prior art, the invention has the following beneficial effects:
robustness: the method adopts an improved moth flame optimization algorithm and a positive feedback mechanism, continuously converges in iteration and finally approaches to the optimal solution of the workflow scheduling scheme. Moths always tend to update their positions relative to flames, which are the optimal solution of the workflow scheduling scheme in the current iterative process, so that the convergence of the algorithm is guaranteed, and the workflow scheduling scheme can be prevented from being trapped in local optimization to the maximum extent by performing optimization by using a large number of moths. The algorithm is further optimized by using the dynamic weight value, so that the algorithm has higher global search capability in the initial iteration stage, local extreme values can be jumped out, local development is emphasized in the later iteration stage, the search process is accelerated to converge, and the optimal solution is found.
High efficiency: the invention considers the influence of the task time limit on the workflow execution during the workflow task scheduling, and reduces the resource waste caused by the workflow execution by defining the weighted sum of the energy consumption and the time delay as a fitness function. The global optimal solution is continuously searched in the iterative process, the available frame resources are effectively processed through proper task scheduling, and the maximum completion time is limited, so that the performance of the system is improved.
Drawings
FIG. 1 is a system framework diagram of a workflow optimization scheduling method based on a moth flame algorithm according to the present invention;
FIG. 2 is an algorithm flow chart of a workflow optimization scheduling method based on a moth flame algorithm provided by the invention;
FIG. 3 is a workflow architecture diagram provided by the present invention;
FIG. 4 is a comparison of the present invention with the remaining three algorithms for different numbers of tasks;
FIG. 5 is a comparison graph of the present invention with the remaining three algorithms at different numbers of server nodes;
FIG. 6 is a graph comparing the completion times of the present invention and the remaining three algorithms;
FIG. 7 is a graph comparing the energy consumption and the time delay at different iteration times for the present invention and the remaining three algorithms when the number of tasks is 20;
Detailed Description
The following detailed description will further illustrate the invention in conjunction with the above-described figures.
FIG. 1 is a system framework diagram of a workflow optimization scheduling method based on a moth flame algorithm in a mobile edge environment. Firstly, the user equipment generates a corresponding workflow through executing a program, wherein the workflow comprises a subtask set. And secondly, generating a task execution sequence under the constraint of task priority, and modeling the system. And then, generating a workflow scheduling scheme meeting the constraint by using the algorithm. And finally, different tasks are moved to corresponding servers to be executed according to the generated workflow scheduling scheme.
Referring to fig. 2, a flow chart of the workflow optimization scheduling method based on the moth-killing flame algorithm in the mobile edge environment is shown, and the method specifically includes the following steps:
step (1): workflows and servers in an edge environment are defined.
The invention adopts directed acyclic graph DAG to represent service workflow provided by a user to a mobile edge environment, and the DAG workflow is defined as w = { T, E, D }, wherein T = { T }, and 1 ,t 2 ,...,t n the method comprises the steps of (1) setting a workflow task set, wherein n is the number of workflow tasks; e = { (t) k ,t l ,c kl )|t k ,t l E.g. T, k ≠ l } represents the dependency between workflow tasks, T k Is t l Predecessor task of (1), t l Is t k C is a subsequent task of kl Representing a task t k And t l The amount of data transfer therebetween; d is the maximum time allowed for the workflow to execute after the workflow is submitted.
Defining the set of edge servers as M = { s = 1 ,s 2 ,...,s m And m is the number of servers in the mobile edge computing system.
At the same time, each edge server only allows one task to be executed for the same user equipment, the tasks need to be executed in sequence before being scheduled, and the task execution sequence is determined by the task priority. Task t i In the absence of a preceding task, the priority is
Figure BDA0003793679770000091
If task t i Presence of pre-tasking
Figure BDA0003793679770000092
Then the priority is:
Figure BDA0003793679770000093
wherein, T i pre As task t i The set of pre-tasks. After the priorities of all tasks are obtained, sequencing the workflow subtasks in an ascending order, if the tasks with the same priority exist, sequencing the tasks in the ascending order according to the starting time of the tasks, and finally obtaining the level of each workflow subtask;
FIG. 3 is a specific workflow example w, t in the structure diagram entry And t exit The nodes are respectively input and exit of the workflow, the rest nodes represent tasks in the workflow, each edge in the graph represents the dependency relationship among the tasks, and the weight of each edge is the data transmission quantity among the tasks. Each task node has its priority, which is related to the preceding task, task t 1 Without a pre-task, its priority
Figure BDA0003793679770000094
According to a formula of priority, task t 2 、t 3 、t 4 Priority of
Figure BDA0003793679770000095
Task t 5 、t 6 、t 7 、t 8 Priority of
Figure BDA0003793679770000096
Task t 9 、t 10 、t 11 、t 12 Priority of (2)
Figure BDA0003793679770000097
Task t 13 、t 14 、t 15 Priority of
Figure BDA0003793679770000098
Thus, the workflow generates an execution sequence of { t } 1 ,t 2 ,t 3 ,t 4 ,t 7 ,t 5 ,t 6 ,t 8 ,t 11 ,t 9 ,t 10 ,t 12 ,t 13 ,t 14 ,t 15 }。
Step (2): and establishing a time limit model.
According to the priority of the workflow subtasks, a deadline is allocated to the workflow subtasks of each level, and each task in the same level can be guaranteed to be completed before the specified deadline.
2.1 defining an expiration date D assigned to level r r The initial values are as follows:
Figure BDA0003793679770000099
where φ is a task t i Completion time performed on each server; v rank Representing all task sets at level r.
2.2 pairs of deadline D r Updating according to formula (3):
Figure BDA00037936797700000910
wherein D is last Is the deadline of the task at the maximum level.
2.3 tasks t in level r i Satisfies the following constraints:
T f (t i )≤D r formula (4)
And (3): and (5) encoding.
And recording the server distributed by each task in the workflow, and defining a moth as a workflow scheduling scheme. In one workflow, the number of tasks is n, and the number of servers is m. Let R denote a moth, R i Indicating the location of the ith task assignment. The scheduling scheme is:
R=[r 1 r 2 ... r n ]formula (5)
Each task in the scheduling scheme completes time on the corresponding server to meet the deadline constraint, namely:
T f (r i )≤D r formula (6)
And (4): and initializing populations and parameters.
The initial population influences the speed of searching the workflow scheduling scheme to the optimal direction, in order to accelerate the searching process of the workflow scheduling scheme, a random method is used for generating the initial population, wherein the initial moth population comprises the workflow scheduling scheme which is randomly generated, the initial optimal flame population is generated by the initial moth population after the initial moth population is sorted according to the ascending order of fitness, and each subtask of the workflow meets the time limit constraint in the generation process of the initial population. The advantages and disadvantages of the initial population affect the searching performance of the algorithm on the optimal workflow scheduling scheme, and the excellent initial population can reduce the searching time of the optimal workflow scheduling scheme. The method comprises the following specific steps:
traversing the whole task set and generating a server distributed to each taskInto a random integer rd i ,rd i ∈[1,m]Until all workflow subtasks are distributed to corresponding servers, thereby obtaining a workflow scheduling scheme R; initializing moth population as matrix P = [ R = [) 1 ,R 2 ,...,R N ] T Where the population number is N and the superscript T represents the transposition.
And (5): and (5) calculating the fitness. After the initial population is obtained, the fitness of each moth in the population needs to be calculated, and the fitness calculation comprises the following steps:
step (5.1): and (5) calculating time. The time consumed in the workflow scheduling process includes task execution time, transmission time and waiting time.
Step (5.1.1): calculating the execution time: when workflow task t i Is distributed to the server s j Then, its execution time is:
Figure BDA0003793679770000101
wherein, l (t) i ) As task t i Calculated load of (c), SC(s) j ) For servers s j The processing power of (1).
Step (5.1.2): the transmission time is calculated. It is assumed that all servers are contained in the same physical area and therefore the average bandwidth between servers is approximately equal. Task t with dependency relationship i And t j The data transmission time therebetween depends on the data transmission amount c ij The specific calculation is as follows:
Figure BDA0003793679770000111
wherein, t i Is t j Bw is the average bandwidth of the server, ser (t) i ),ser(t j ) Are respectively task t i And t j A distributed server.
Step (5.1.3): and calculating the waiting time and the completion time. Task t i At the server s l Waiting time of upper runThe time and the completion time are respectively:
Figure BDA0003793679770000112
T f (t i ,s l )=T w (t i ,s l )+T e (t i ,s l ) Formula (10)
Wherein, T r (t i ,s l ) For servers s l Ready to execute task t i The time required, pre (t) i ) As task t i The set of predecessor tasks.
The total time for workflow execution is:
Figure BDA0003793679770000113
step (5.2): and (5) calculating energy consumption. The energy consumption in the workflow scheduling process mainly consists of the energy consumption consumed by the server to execute the tasks and the energy consumption consumed in the task transmission process.
Step (5.2.1): an energy consumption calculation is performed. When the main board of the server is mainly composed of CMOS circuits, the power consumption generated by the server is dynamic power consumption, the source of the dynamic power consumption is the charging and discharging current of a capacitive load, and then the server s i In that
Figure BDA0003793679770000114
The power at a time is calculated as follows:
Figure BDA0003793679770000115
where ζ is a constant associated with the server component, C represents the server capacitance, V represents the server supply voltage, f C Representing the clock frequency of the server CPU.
The energy consumption of a server to perform a workflow task depends on the task t i At the server s j On execution time and serverThe power is specifically calculated as follows:
Figure BDA0003793679770000116
step (5.2.2): and (5) transmitting energy consumption calculation. Order server s j At a transmission power of
Figure BDA0003793679770000117
The transmission energy consumption of the workflow is:
Figure BDA0003793679770000121
wherein, U is a task set that needs to transmit data.
Step (5.2.3): and (4) calculating total energy consumption. The total energy consumption of the workflow is the sum of the task execution energy consumption and the transmission energy consumption, namely:
E(w)=E e +E t formula (15)
Step (5.3): and (5) calculating the fitness. The definition fitness is determined by the total execution time and the total energy consumption of the workflow, and is specifically calculated as follows:
l (w) = T (w) + alpha E (w) formula (16)
Wherein α is a weighting factor representing the degree of importance occupied by the objective optimization function for the total execution time and the total execution energy consumption of the workflow.
And (6): the optimal position matrix is initialized. After the fitness is calculated, recording the fitness information of the ith moth as OR i Then the initial fitness matrix of the population is OP = [ OR = [) 1 ,OR 2 ,...,OR N ] T Defining gamma as the average fitness of the initial population, and specifically calculating as follows:
Figure BDA0003793679770000122
to avoid workflow dispatchersAnd (4) locally optimizing the case, wherein each moth uses a unique flame updating position corresponding to the moth, and the initial flame number is consistent with the moth number in the search space. Defining an optimal location matrix as F = [ FR = 1 ,FR 2 ,...,FR N ] T Wherein FR is i And representing the ith flame, wherein each moth corresponds to one flame for the optimal scheduling scheme of the current workflow. In order to initialize F, the population P is sorted in an ascending order according to the fitness recorded in the fitness matrix OP, the sorted population is correspondingly assigned to the optimal position matrix F, and the fitness matrix OF F is recorded as OF = [ OFR = 1 ,OFR 2 ,...,OFR N ] T Wherein OFR i The fitness of the ith flame.
And (7): a solution is constructed. The workflow scheduling scheme is established and updated through continuous iteration, and the specific steps are as follows:
step (7.1): and recording the elite population and the elite individuals.
By recording and updating the optimal workflow scheduling scheme so far, the diversity of the population is kept, and the loss of the elite individual information is avoided.
1) Judging whether an elite population and an elite individual exist, if so, performing a step 3), and if not, performing a step 2);
2) Initializing definition elite population H = [ HR ] 1 ,HR 2 ,...,HR N ] T I.e., H = P; elite individuals R best The moths corresponding to the optimal fitness in the OP are obtained; setting a maximum iteration number K; wherein HR i Is the ith moth;
3) Carrying out corresponding position replacement updating on the elite population by the optimal moth in the population under the current iteration number k; and then screening out the optimal moth updating elite individual according to the updated elite population.
4) And (5) performing mutation operation.
The mutation operation ensures the best variability of the workflow scheduling schemes in the population, enhances the global searching capability of the workflow scheduling schemes and improves the local searching.
Setting the variation probability as theta, theta belongs to [0,1 ]]Traversing each flame FR in the optimal position matrix i In [0,1 ]]Randomly generating a number within the range, and if the random number is greater than theta, then comparing the FR of the flame i Performing mutation operation, specifically comprising the following steps:
Figure BDA0003793679770000131
wherein, the dom is uniformly distributed in [0,1 ]]Random number of between,/ i Is in [1, N ]]Random integer generated in between, and l 1 ≠l 2 ≠l 3 ≠l 4
5) And (5) performing crossover operation.
The cross operation provides diversity for the search of the workflow scheduling scheme, so that the elite individual information can be transmitted to the current optimal workflow scheduling scheme. Flame FR after mutation i And elite individual R best The mixing is carried out by crossing, and the operation is as follows: traversing flame FR i Setting the crossing rate eta (k) under the current iteration number, and setting the crossing rate eta (k) at the evenly distributed [0, 1')]If the random number is greater than eta (k), the position allocated by the task is replaced by an elite individual R best To a corresponding position in (a).
The crossing operation depends on a crossing rate eta (k), and in order to refine the search for the optimal solution, eta (k) is set as a dynamic crossing rate and linearly decreases with the increase of the iteration number k, and the specific calculation is as follows:
Figure BDA0003793679770000132
wherein eta is max And η min The maximum and minimum values of η, respectively.
6) And setting a dynamic weight value. The influence degree of the individual flame on the individual moth search is determined by the dynamic weight, and the utilization rate of the optimal workflow scheduling scheme is improved. Defining omega as a dynamic weight, wherein the dynamic weight changes nonlinearly with the iteration times and the adaptability of a workflow scheduling scheme, and specifically calculating as follows:
Figure BDA0003793679770000133
7) And updating the position of the moth. And updating the current workflow scheduling scheme according to the flame position, and searching the workflow scheduling scheme with a better position. For each moth R in the population i The relative flame position update mechanism can be expressed as:
R i =S(R i ,FR j ) Formula (21)
Wherein S represents a path function of the moth stamp towards the flame, specifically a spiral function with a starting point being the position of the moth and an end point being the position of the flame, and is specifically represented as follows:
S(R i ,FR j )=ω i,j ×DIS i ×exp(b·t)×cos(2πt)+(1-ω i,j )×FR j formula (22)
Wherein b is a constant whose value is related to the shape of the spiral, and t is [ -1,1]Random numbers in the range, moth position closest to flame when t = -1, moth position farthest from flame when t =1, DIS i Is a moth R i And flame FR j The distance between them is specifically calculated as follows:
DIS i =|FR j -R i equation (23)
8) The flame position is updated. And updating the current optimal workflow scheduling scheme. After the updated population P is obtained, the corresponding fitness is calculated according to equation (16) and the fitness matrix OP is updated. And (4) sequencing the population P in an ascending order according to the fitness recorded in the fitness matrix OP, traversing individuals in the population, comparing the fitness of the individuals with the fitness of flames in the original optimal position matrix, and replacing the positions of the flames if the updated fitness of the individuals is smaller than the original fitness so as to update the optimal position matrix F, otherwise, not replacing the flame positions.
9) Flame rejection behavior. The number of flames is reduced in a self-adaptive mode through flame abandoning behaviors, and the number of the current optimal workflow scheduling schemes is increasedAnd newly, until the flame position is kept optimal, the global searching capability and the local developing capability of the algorithm in the searching space of the workflow scheduling solution are balanced. Make num F Representing the number of flames, the specific calculation of the reduction in the number of flames is as follows:
Figure BDA0003793679770000141
and discarding the flame with the corresponding number in the optimal position matrix F from back to front according to the flame reduction number, and updating the position of the moth in the population corresponding to the last flame in the flame sequence when the next iteration is performed.
10 ) whether an end condition is reached. And if the iteration times of the workflow scheduling scheme reach the originally set maximum iteration times, exiting the loop and outputting the optimal workflow scheduling scheme, otherwise returning to the step 1).
In order to show the effectiveness of the method, the method is respectively compared with a genetic algorithm-based multi-workflow scheduling algorithm GA, an immunity-based particle swarm optimization algorithm IMPSO and a multi-target differential evolution method NSDE-II in the aspects of energy consumption, time delay and the like. The GA algorithm puts the ready tasks into the task execution pool, and then uses the genetic algorithm to map the tasks in the task execution pool to the server. The IMPSO algorithm utilizes characteristics of immune mechanisms such as immune memory, affinity evaluation of antibodies and antigens, antibody concentration, excitation degree and the like to obtain an optimized workflow scheduling scheme. The NSDE-II algorithm uses non-dominant relationships to stratify populations and uses a crowding distance algorithm to preferentially select individuals with higher diversity depending on the degree of diversity between solutions.
The IntelliJ IDEA platform is used as a simulation platform in the experiment, and the specific experimental environment is as follows: the operating system is Win10 bits, the processor is AMD-5600X, and the memory is 16GB. Generating workflows by adopting a DAG random generation mode, wherein the task number of each workflow obeys Poisson distribution with the parameter of 30, the size of the tasks in the workflow obeys uniform distribution between 1KB and 10KB, and the calculated amount of the tasks obeys uniform distribution between 1GHz and 10 Ghz. The average bandwidth bw of the servers is =10MHz, the computing power is 4GHz, the transmission rate is 80Mb/s, the number of edge servers ranges from [10,30], and the memory is 8GB. The algorithm of the invention has the weight factor alpha =0.7, the variation probability theta =0.4, the crossing rate eta =0.3, the spiral constant b =1, and the iteration number is set to 700.
FIG. 4 compares system costs for various algorithms across different numbers of workflow tasks. In this experiment, the number of workflow subtasks was 20 to 60, and the fixed number of servers was 20. When the workflow scale is small, the system cost of the four algorithms is basically the same, but with the continuous expansion of the workflow scale, the method has lower system cost than the IMPSO algorithm and the GA algorithm. The algorithm of the present invention divides tasks by levels during scheduling to achieve more accurate deadline allocation, and achieves optimal system cost minimization with workflow composed of multiple levels with each level having a high degree of parallelism.
Fig. 5 compares the system cost of each algorithm with the number of different server nodes, and it can be found that the system cost of each algorithm is in a descending trend with the increase of the number of server nodes. The system cost is the lowest because the optimal variability of the population is ensured by performing the mutation operation, the global search capability of the system is improved, the local search is finer, more information is transmitted to flames from the elite population by using the cross operation, the optimal value search is refined, the system cost is reduced while the time limit constraint is ensured, and the optimal scheduling scheme is obtained.
Fig. 6 compares the workflow completion time of each algorithm under different task numbers, and it can be seen from the figure that the completion time of each algorithm gradually increases as the number of tasks increases. Compared with other two algorithms, the completion time of the method tends to be lower level all the time, and the reason is that the method strictly restricts the time limit of each task, so that the workflow tasks can be distributed to the servers capable of meeting the time limit restriction to operate in the scheduling process, and the completion time of the workflow is reduced to the maximum extent.
Fig. 7 compares the energy consumption and the time delay of each algorithm under different iteration times under the condition that the number of tasks is 20, and it can be seen from the figure that the energy consumption and the time delay of each algorithm are gradually reduced along with the increase of the iteration times, because the workflow scheduling scheme gradually tends to be optimal along with the iteration of the algorithm. Compared with the other three algorithms, the method has the advantages that the energy consumption and the time delay are minimum under the same iteration times, which shows that the method can effectively utilize the current optimal workflow scheduling scheme and has stronger global search capability.
Table 1 shows the comparison table of energy consumption and time delay of each algorithm under different iteration times
Figure BDA0003793679770000151
Figure BDA0003793679770000161

Claims (6)

1. A workflow optimization scheduling method based on an improved moth flame algorithm is characterized by comprising the following steps:
step (1): defining a workflow and a server under an edge environment;
step (2): establishing a time limit model;
and (3): coding all tasks;
recording a server distributed by each task in a workflow, and defining a moth as a workflow scheduling scheme; in one workflow, the number of tasks is n, and the number of servers is m; let R denote a moth, R i Indicating the position of the ith task allocation; the scheduling scheme is:
R=[r 1 r 2 ... r n ]formula (5)
The completion time of each task on the corresponding server in the scheduling scheme meets the deadline constraint, namely:
T f (r i )≤D r formula (6)
Wherein T is f (r i ) Representing tasks t in level r i The completion time of (c); d r An expiration date representing the level r;
and (4): initializing a population and parameters;
traversing the whole task set, and generating a random integer rd for the server distributed by each task i ,rd i ∈[1,m]Until all workflow subtasks are distributed to corresponding servers, a workflow scheduling scheme R is obtained; initializing moth population as matrix P = [ R = 1 ,R 2 ,...,R N ] T Wherein the population number is N, and the superscript T represents transposition;
and (5): calculating the fitness of each moth in the population:
5.1 calculating the total time consumed in the workflow scheduling process, wherein the total time comprises task execution time, transmission time and waiting time;
when workflow task t i Is distributed to the server s j Then, the task execution time is:
Figure FDA0003793679760000011
wherein l (t) i ) As task t i Calculated load of (c), SC(s) j ) For servers s j The processing capacity of (a);
assuming that all servers are contained in the same physical area, the average bandwidth between servers is approximately equal; task t with dependency relationship i And t j The data transmission time therebetween depends on the data transmission amount c ij Therefore, the transmission time is specifically calculated as follows:
Figure FDA0003793679760000012
wherein t is i Is t j Bw is the average bandwidth of the server, ser (t) i )、ser(t j ) Are respectively task t i And t j A distributed server;
task t i At the server s l The wait time for the upper run is:
Figure FDA0003793679760000021
T f (t i ,s l )=T w (t i ,s l )+T e (t i ,s l ) Formula (10)
Wherein T is r (t i ,s l ) For servers s l Ready to execute task t i The time required, pre (t) i ) As task t i Set of all predecessor tasks of, T f (t i ,s l ) Presentation Server s l Performing task t i The completion time of (1).
The total time for workflow execution is:
Figure FDA0003793679760000022
5.2 the total energy consumption of the workflow mainly comprises the energy consumption consumed by the server when executing the task and the energy consumption consumed when transmitting the task;
5.3 the fitness is determined by the total execution time and the total energy consumption of the workflow, and is specifically calculated as follows:
l (w) = T (w) + alpha E (w) formula (15)
Wherein α is a weighting factor; e (w) represents total workflow energy consumption;
and (6): initializing an optimal position matrix;
recording the fitness information of the ith moth as OR i Then the initial fitness matrix of the population is OP = [ OR = [) 1 ,OR 2 ,...,OR N ] T Defining gamma as the average fitness of the initial population, and specifically calculating as follows:
Figure FDA0003793679760000023
in order to avoid that the workflow scheduling scheme is trapped in local optimization, each moth uses a unique flame updating position corresponding to the moth, and in a search space, the number of initial flames is consistent with that of moths; defining an optimal position matrix as F = [ FR = [) 1 ,FR 2 ,...,FR N ] T Wherein FR is i Representing the ith flame, wherein each moth corresponds to one flame for the optimal scheduling scheme of the current workflow; in order to initialize F, the population P is sorted in an ascending order according to the fitness recorded in the fitness matrix OP, the sorted population is correspondingly assigned to the optimal position matrix F, and the fitness matrix OF F is recorded as OF = [ OFR = 1 ,OFR 2 ,...,OFR N ] T Wherein OFR i The fitness of the ith flame;
and (7): the workflow scheduling scheme is established and updated through continuous iteration, and the method comprises the following specific steps:
7.1 judging whether the elite population and the elite individual exist in the population, if so, performing step 7.3, otherwise, performing step 7.2;
7.2 initializing definition Elite population H = [ HR = 1 ,HR 2 ,...,HR N ] T I.e., H = P; elite individuals R best The moths corresponding to the optimal fitness in the fitness matrix OP are obtained; setting a maximum iteration number K; wherein HR i Is the ith moth;
7.3, carrying out corresponding position replacement updating on the optimal moth and elite population in the population under the current iteration number k; then screening out the optimal moth according to the updated elite population, and updating the elite individual;
7.4 mutation operation;
setting the mutation probability as theta, theta is epsilon to [0,1 ]]Traversing each flame FR in the optimal position matrix i In [0,1 ]]Randomly generating a number within the range, and if the random number is greater than theta, then comparing the FR of the flame i Performing mutation operation, specifically comprising the following steps:
Figure FDA0003793679760000031
wherein the dom is uniformly distributed in [0,1 ]]Random number between,/ i Is in [1, N ]]Random integer generated in between, and l 1 ≠l 2 ≠l 3 ≠l 4
7.5, performing cross operation;
the cross operation provides diversity for searching the workflow scheduling scheme, so that the elite individual information can be transmitted to the current optimal workflow scheduling scheme; flame FR after mutation i And an elite individual R best Mixing is carried out through crossing, and the concrete operations are as follows: traversing flame FR i Setting the crossing rate eta (k) under the current iteration number, and setting the crossing rate eta (k) at the evenly distributed [0, 1')]If the random number is greater than eta (k), the position allocated by the task is replaced by an elite individual R best To the corresponding position in (a);
the crossing operation depends on a crossing rate eta (k), and in order to refine the search for the optimal solution, eta (k) is set as a dynamic crossing rate and linearly decreases with the increase of the iteration number k, and the specific calculation is as follows:
Figure FDA0003793679760000032
wherein eta is max And η min The maximum value and the minimum value of eta are respectively;
7.6 setting dynamic weight:
defining omega as a dynamic weight, wherein the dynamic weight changes nonlinearly along with the iteration times and the workflow scheduling scheme fitness, and specifically calculating as follows:
Figure FDA0003793679760000033
7.7 updating the position of the moth:
the current workflow scheduling scheme is updated according to the flame position, and the workflow scheduling scheme with the more optimal position is updatedSearching; for each moth R in the population i The relative flame position update mechanism is expressed as:
R i =S(R i ,FR j ) Formula (20)
Wherein S represents a path function of a moth swatter to the flame, which is a spiral function with a starting point as the position of the moth and an end point as the position of the flame, and is specifically represented as follows:
S(R i ,FR j )=ω i,j ×DIS i ×exp(b·t)×cos(2πt)+(1-ω i,j )×FR j formula (21)
Wherein b is a constant whose value is related to the shape of the spiral, and t is [ -1,1]Random number in the range, t ∈ [ -1,1]When t = -1, the moth position is closest to the flame, when t =1, the moth position is farthest from the flame, DIS i Is a moth R i And flame FR j The distance between the two is specifically calculated as follows:
DIS i =|FR j -R i i type (22)
7.8 updating flame position:
updating the current optimal workflow scheduling scheme; after the updated population P is obtained, calculating corresponding fitness according to the formula (15) and updating a fitness matrix OP; carrying out ascending sequencing on the population P according to the fitness recorded in the fitness matrix OP, traversing individuals in the population, comparing the fitness of the individuals with the fitness of flames in the original optimal position matrix, replacing the positions of the flames if the updated fitness of the individuals is smaller than the original fitness, updating the optimal position matrix F, and otherwise, not replacing the flame positions;
7.9 flame rejection behavior:
the number of flames is reduced in a flame abandoning behavior self-adaptive manner, the number of the current optimal workflow scheduling schemes is updated until the positions of the flames are kept optimal, and the global search capability and the local development capability of the algorithm in a search space of a workflow scheduling solution are balanced; make num F Representing the number of flames, the specific calculation of the reduction in the number of flames is as follows:
Figure FDA0003793679760000041
discarding a corresponding number of flames in the optimal position matrix F from back to front according to the number of the flames reduced, and updating the positions of the redundant moths in the population corresponding to the last flame in the flame sequence in the next iteration;
7.10 judging whether the ending condition is reached; and if the iteration times of the workflow scheduling scheme reach the originally set maximum iteration times, the circulation is exited, the optimal workflow scheduling scheme is output, and otherwise, the step 7.1 is returned.
2. The method according to claim 1, characterized in that step (1) is in particular:
representing service workflow provided by a user to a mobile edge environment by adopting directed acyclic graph DAG, wherein the DAG workflow is defined as w = { T, E, D }, and T = { T }, and 1 ,t 2 ,...,t n the method comprises the steps of (1) setting a workflow task set, wherein n is the number of workflow tasks; e = { (t) k ,t l ,c kl )|t k ,t l E.g. T, i ≠ j represents the dependency between workflow tasks, T k Is t l Predecessor task of, t l Is t k C is a subsequent task of kl Representing a task t k And t l The amount of data transfer therebetween; d is the maximum time allowed for the workflow to execute after the workflow is submitted;
define the set of edge servers as M = { s = 1 ,s 2 ,...,s m M is the number of servers in the mobile edge computing system;
at the same time, each edge server only allows one task to be executed for the same user equipment, the tasks are required to be executed in sequence before scheduling, and the task execution sequence is determined by task priority; task t i In the absence of a preceding task, the priority is
Figure FDA0003793679760000051
If task t i Presence of pre-tasking
Figure FDA0003793679760000052
The priority is then:
Figure FDA0003793679760000053
wherein, T i pre As task t i The pre-posed task set of (2); and after the priorities of all the tasks are obtained, sequencing the workflow subtasks in an ascending order, if the tasks with the same priority exist, sequencing the tasks in the ascending order according to the starting time of the tasks, and finally obtaining the level of each workflow subtask.
3. The method according to claim 2, characterized in that step (2) is in particular:
2.1 defining an expiration date D assigned to level r r The initial values are as follows:
Figure FDA0003793679760000054
where φ is a task t i Completion time performed on each server; v rank All task sets representing level r;
2.2 pairs of deadline D r Updating according to formula (3):
Figure FDA0003793679760000055
wherein D is last The deadline of the task under the maximum level;
2.3 tasks t in level r i Satisfies the following constraints:
T f (t i )≤D r formula (4)
4. The method according to claim 3, characterized in that step 5.2 is in particular:
5.2.1: performing energy consumption calculation:
currently, the server motherboard is mainly composed of CMOS circuits, so that the power consumption generated by the server is dynamic power consumption, which is derived from the charging and discharging currents of the capacitive load, and then the server s i In that
Figure FDA0003793679760000056
The power at the time is calculated as follows:
Figure FDA0003793679760000057
where ζ is a constant associated with the server component, C represents the server capacitance, V represents the server supply voltage, f C Indicating the clock frequency of the server CPU;
energy consumption and task t of server for executing workflow task i At server s j The execution time of (3) is related to the power of the server, and is specifically calculated as follows:
Figure FDA0003793679760000061
wherein T represents a workflow task set;
5.2.2: and (3) transmission energy consumption calculation:
order server s j With a transmission power of
Figure FDA0003793679760000062
The transmission energy consumption of the workflow is:
Figure FDA0003793679760000063
wherein, U is a task set needing data transmission;
5.2.3: and (3) calculating total energy consumption:
the total energy consumption of the workflow is the sum of the task execution energy consumption and the transmission energy consumption, namely:
E(w)=E e +E t formula (15)
5. A computer-readable storage medium, on which a computer program is stored which, when executed in a computer, causes the computer to carry out the method of any one of claims 1-4.
6. A computing device comprising a memory having executable code stored therein and a processor that, when executing the executable code, implements the method of any of claims 1-4.
CN202210963223.2A 2022-08-11 2022-08-11 Workflow optimization scheduling method based on improved moth flame algorithm Pending CN115330189A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210963223.2A CN115330189A (en) 2022-08-11 2022-08-11 Workflow optimization scheduling method based on improved moth flame algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210963223.2A CN115330189A (en) 2022-08-11 2022-08-11 Workflow optimization scheduling method based on improved moth flame algorithm

Publications (1)

Publication Number Publication Date
CN115330189A true CN115330189A (en) 2022-11-11

Family

ID=83923280

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210963223.2A Pending CN115330189A (en) 2022-08-11 2022-08-11 Workflow optimization scheduling method based on improved moth flame algorithm

Country Status (1)

Country Link
CN (1) CN115330189A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114356545A (en) * 2021-12-07 2022-04-15 重庆邮电大学 Task unloading method for privacy protection and energy consumption optimization
CN116151589A (en) * 2023-04-04 2023-05-23 武汉理工大学 Green repairable workshop production scheduling method based on improved moth fire suppression algorithm
CN116245449A (en) * 2023-05-06 2023-06-09 北京邮电大学 Low-carbon logistics distribution method, device and equipment
CN117631615A (en) * 2023-10-12 2024-03-01 中国电建集团山东电力管道工程有限公司 Production workshop data acquisition and processing method and system based on Internet of things equipment
CN117877024A (en) * 2024-03-13 2024-04-12 江西省农业科学院蔬菜花卉研究所 Big data-based monitoring method and system for fusarium wilt of bitter melon

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114356545A (en) * 2021-12-07 2022-04-15 重庆邮电大学 Task unloading method for privacy protection and energy consumption optimization
CN114356545B (en) * 2021-12-07 2024-05-28 重庆邮电大学 Task unloading method oriented to privacy protection and energy consumption optimization
CN116151589A (en) * 2023-04-04 2023-05-23 武汉理工大学 Green repairable workshop production scheduling method based on improved moth fire suppression algorithm
CN116245449A (en) * 2023-05-06 2023-06-09 北京邮电大学 Low-carbon logistics distribution method, device and equipment
CN117631615A (en) * 2023-10-12 2024-03-01 中国电建集团山东电力管道工程有限公司 Production workshop data acquisition and processing method and system based on Internet of things equipment
CN117877024A (en) * 2024-03-13 2024-04-12 江西省农业科学院蔬菜花卉研究所 Big data-based monitoring method and system for fusarium wilt of bitter melon

Similar Documents

Publication Publication Date Title
Wang et al. Distributed machine learning with a serverless architecture
Abed-Alguni et al. Distributed Grey Wolf Optimizer for scheduling of workflow applications in cloud environments
Ma et al. An IoT-based task scheduling optimization scheme considering the deadline and cost-aware scientific workflow for cloud computing
CN115330189A (en) Workflow optimization scheduling method based on improved moth flame algorithm
Alkayal et al. Efficient task scheduling multi-objective particle swarm optimization in cloud computing
CN110489229B (en) Multi-target task scheduling method and system
Garg et al. Multi-objective workflow grid scheduling using ε-fuzzy dominance sort based discrete particle swarm optimization
Kaur et al. Deep‐Q learning‐based heterogeneous earliest finish time scheduling algorithm for scientific workflows in cloud
Nanjappan et al. An adaptive neuro-fuzzy inference system and black widow optimization approach for optimal resource utilization and task scheduling in a cloud environment
Kamalinia et al. Hybrid task scheduling method for cloud computing by genetic and DE algorithms
Madhura et al. An improved list-based task scheduling algorithm for fog computing environment
Wadhwa et al. Optimized task scheduling and preemption for distributed resource management in fog-assisted IoT environment
Xiao et al. A cooperative coevolution hyper-heuristic framework for workflow scheduling problem
Muthusamy et al. Cluster-based task scheduling using K-means clustering for load balancing in cloud datacenters
Mahmoud et al. An efficient load balancing technique for task scheduling in heterogeneous cloud environment
Chhabra et al. QoS-aware energy-efficient task scheduling on HPC cloud infrastructures using swarm-intelligence meta-heuristics
Jalalian et al. A hierarchical multi-objective task scheduling approach for fast big data processing
Elsedimy et al. MOTS‐ACO: An improved ant colony optimiser for multi‐objective task scheduling optimisation problem in cloud data centres
Ghafari et al. An efficient task scheduling in fog computing using improved artificial hummingbird algorithm
Garg et al. Enhancing the discrete particle swarm optimization based workflow grid scheduling using hierarchical structure
Ahmed et al. An Enhanced Workflow Scheduling Algorithm for Cloud Computing Environment.
Kumar et al. EAEFA: An Efficient Energy-Aware Task Scheduling in Cloud Environment
Akraminejad et al. A multi-objective crow search algorithm for optimizing makespan and costs in scientific cloud workflows (CSAMOMC)
Zhang et al. Learning driven parallelization for large-scale video workload in hybrid CPU-GPU cluster
Nath et al. A novel task assignment heuristic using local search in distributed computing systems

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination