A cloud workflow scheduling method based on improved snake optimizer

By improving the snake optimizer algorithm, adjusting the step size parameter, and introducing a dual mutation mechanism, the contradiction between budget constraints and completion time in cloud workflow scheduling was resolved, achieving efficient multi-workflow task scheduling and improving scheduling efficiency and accuracy in the cloud computing environment.

CN116225657BActive Publication Date: 2025-10-24BEIJING INST OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310260716.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-17
Publication Date
2025-10-24
Estimated Expiration
2043-03-17

AI Technical Summary

Technical Problem

Existing cloud workflow scheduling methods struggle to effectively reduce the maximum workflow completion time while meeting user budget constraints. In particular, heuristic and metaheuristic algorithms suffer from slow convergence speeds or a lack of global search mechanisms in large-scale complex application scheduling problems.

Method used

An improved snake optimizer algorithm is adopted, which optimizes the scheduling of multi-workflow tasks in the cloud environment by adaptively adjusting the step size parameter, introducing a dual mutation mechanism and dual survival mode, and combining the strategies of exploration, development and mating phases.

Benefits of technology

It improves the efficiency and accuracy of cloud workflow scheduling, significantly reduces the total completion time of workflows while meeting user budget constraints, and enhances the algorithm's global search capability and convergence speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116225657B_ABST
    Figure CN116225657B_ABST
Patent Text Reader

Abstract

The application discloses a cloud workflow scheduling method based on an improved snake optimizer, applies the snake optimization algorithm to a discrete optimization problem, realizes scheduling of multiple workflow tasks in a cloud environment, provides a new solution path for a workflow scheduling problem in the cloud environment, and simultaneously modifies parameters of different stages of the SO algorithm on the basis of analyzing the SO algorithm and characteristics of the workflow scheduling problem, so as to take into account exploration and development, speed up convergence of the algorithm, and improve calculation efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of multi-workflow scheduling in cloud computing environment, and particularly relates to a cloud workflow scheduling method based on an improved snake optimizer. BACKGROUND

[0002] With the development and deepening of research of cloud computing, more and more scientific applications are deployed to be executed on a cloud platform. Users need not build local hardware facilities and invest in operation and maintenance costs, but only need to connect to the network to remotely access a mass shared computing resource pool and configure computing resources according to their own needs. Users in a cloud computing environment can pay according to the usage.

[0003] Multi-workflow scheduling in a cloud environment refers to a process of assigning tasks with a dependency relationship in a workflow to specific computing resources and executing the tasks, aiming to meet the quality of service (QoS) requirements of users and improve the interests of cloud service providers. Therefore, how to allocate appropriate computing resources for cloud workflow tasks while meeting the budget constraints of users and minimizing the maximum completion time of the workflow becomes a problem that needs to be solved by cloud service providers.

[0004] At present, heuristic algorithms and meta-heuristic algorithms are mainly used to solve the workflow scheduling problem. Heuristic algorithms are optimization algorithms based on intuitive experience and constructed for a certain type of specific problem, such as heterogeneous earliest finish time (HEFT), HEFT under budget constraints (BHEFT), and maximum-minimum algorithm (MAX-MIN), which are generally difficult to solve large-scale complex application scheduling problems. Meta-heuristic algorithms are based on random search techniques, such as genetic algorithm (GA), snake optimization algorithm (SO), particle swarm optimization algorithm (PSO), and ant colony algorithm (ACO), which generally have good adaptability to scheduling problems of different scales. However, although evolutionary algorithms such as GA have good global search capability, the search time is often too long. Swarm intelligence optimization algorithms such as SO, PSO, and ACO have fast convergence speed, but lack effective global search mechanisms, resulting in relatively poor optimization performance of the algorithms. Therefore, the existing cloud workflow scheduling methods need to be further improved. SUMMARY

[0005] Therefore, the application provides a cloud workflow scheduling method based on an improved snake optimizer, which realizes the scheduling of multi-workflow tasks in a cloud environment.

[0006] The cloud workflow scheduling method based on the improved snake optimizer provided by the application comprises the following steps:

[0007] Step 1, modeling a multi-workflow task with budget constraints, a virtual machine resource pool, and cloud workflow scheduling;

[0008] Step 2: Population Generate M uniformly distributed individuals X=(x1,...,x m ,...,x M ) as the initial scheduling scheme, where is the combined workflow, M is The total number of tasks in x m Assigned to task t m The index of the virtual machine number; the population Divided into male subpopulations and female subpopulations The number of iterations l is initialized to 0; an indicator δ is established for each individual X Record the number of times it has not changed during the evolution process, let δ X is 0;

[0009] Step 3: Calculate the amount of food Q and the ambient temperature Temp. When the amount of food Q is lower than the set threshold, the population Enter the exploration phase and execute step 4; when the food quantity Q is greater than the set threshold and the ambient temperature Temp is higher than the set threshold, the population Enter the development stage and execute step 5; when the ambient temperature Temp is lower than the set threshold, the population Enter the mating phase and execute step 6;

[0010] Step 4: Population Individuals in the random movement determine the male subpopulation of the l+1 generation The position of the hth individual in and the l+1 generation female subpopulation The position of the hth individual in The calculation method is:

[0011]

[0012] in, and In the first generation, and Individuals randomly selected from the population, and are the upper and lower boundaries of the solution space, respectively, and c2 is a constant; and are the search capabilities of male and female individuals, and and θ is a random number in the set (0,1), T(·) is the total completion time of the workflow corresponding to the scheduling scheme; if the fitness of the individual in the new position is the same as the original one, let δ X Add 1 to it, otherwise let δ XLet δ

[0013] Step 5, population towards the current optimal position X b movement determination position and The calculation method is:

[0014]

[0015] wherein c3 is a constant; if the fitness of the individual at the new position is the same as the original, let δ X be added by 1, otherwise let δ X be 0; let l be added by 1, and step 9 is executed.

[0016] Step 6, when θ is less than a preset probability, enter the fighting mode and execute step 7; otherwise, enter the mating mode and execute step 8.

[0017] Step 7, determine the position by using the following calculation method and

[0018]

[0019] wherein c4 is a constant; and are the fighting abilities of the male and female individuals respectively, and satisfy and X b,u and X b,v are the optimal solutions in the male sub-population and the female sub-population respectively; if the fitness of the individual at the new position is the same as the original, let δ X be added by 1, otherwise let δ X be 0; let l be added by 1, and step 9 is executed.

[0020] Step 8, and the individuals with the same number in the male and female populations and are iterated in pairs, and the position is determined by using the following calculation method and

[0021]

[0022] wherein c5 is a constant, and are the mating abilities of the male and female individuals respectively, and satisfy and if the fitness of the individual at the new position is the same as the original, let δX Add 1 to it, otherwise let δ X is 0; let l be incremented by 1 and execute step 9;

[0023] Step 9: If l is greater than or equal to the threshold, the entire population The optimal individual X in b Output the workflow scheduling solution and end this process; otherwise, go to step 3.

[0024] Furthermore, the jth task in the i-th workflow to be scheduled Start time Calculated using the following formula: Among them, a k For virtual machines k Available time, tasks For the task The parent task, For the task Parent task The completion time, For the task To its subtasks The transmission time, For the currently executed The number of subtasks.

[0025] Furthermore, the constant c2 in step 4 is calculated as follows:

[0026] Furthermore, step 4 further includes mixing the parent population and the child population, sorting them, and then selecting the top N individual scheduling solutions as the next generation population. The sorting method is:

[0027] Calculate the constraint exceedance evaluation index Θ, Among them, C i and B i represent the execution cost and budget constraint of the i-th workflow, respectively. Represents a workflow collection The total number of workflows included;

[0028] For two individual scheduling plans X1 and X2, if and only if:

[0029] T(X1)<T(X2), if Θ(X1)=Θ(X2)

[0030] Θ(X1)<Θ(X2), others

[0031] If yes, X1 is superior to X2, wherein T(X1) and T(X2) represent the total completion time of the work flow corresponding to the scheduling scheme X1 and X2 respectively, and Θ(X1) and Θ(X2) represent the constraint exceeding degree of the scheduling scheme X1 and X2 respectively.

[0032] Further, the constant c3 in the step 5 is 3.

[0033] Further, in the step 4, the step 5, the step 7 and the step 8, if the fitness of the individual in the new position is the same as the original one, then let δ X If yes, let δ X be 0, then the individual whose δ X is not less than the threshold value is executed with forced variation, and part of the individuals whose δ X is less than the threshold value is randomly selected to execute variation according to a set probability; and the δ X of the individual after variation is set to 0; and the optimal individual of the population is updated.

[0034] Further, the variation is to execute variation on the individual by adopting a single-point variation strategy.

[0035] Beneficial effects:

[0036] 1. The snake optimization algorithm is applied to the discrete optimization problem, the scheduling of the multiple work flow tasks in the cloud environment is realized, and a new solution path is provided for the work flow scheduling problem in the cloud environment.

[0037] 2. On the basis of analyzing the SO algorithm and the characteristics of the work flow scheduling problem, the parameters in different stages of the SO algorithm are modified correspondingly, the exploration and development are taken into account, the step length parameter is changed from the original constant to an adaptive parameter in the exploration stage, the unnecessary exploration is reduced in the development stage, the individual is guided to move towards the optimal solution, and the proportion of the competition mode and the mating mode is redistributed in the mating stage, and the convergence of the algorithm is accelerated.

[0038] 3. The double variation mechanism is introduced, the δ X of the individual is detected whether to enter the convergence in advance, the individual which has not evolved after a certain number of iterations is executed with forced variation, the remaining individuals are varied according to the probability, the diversity of the search is greatly increased, and the search is effectively prevented from falling into the local optimum too early. BRIEF DESCRIPTION OF DRAWINGS

[0039] Figure 1 A flow chart of the cloud work flow scheduling method based on the improved snake optimizer is provided.

[0040] Figure 2A cloud workflow scheduling method based on an improved snake optimizer provided by the application and an existing algorithm are compared in terms of success rate under different constraint factors and dataset D1.

[0041] Figure 3 A cloud workflow scheduling method based on an improved snake optimizer provided by the application and an existing algorithm are compared in terms of success rate under different constraint factors and dataset D2.

[0042] Figure 4 A cloud workflow scheduling method based on an improved snake optimizer provided by the application and an existing algorithm are compared in terms of makespan under different constraint factors and dataset D1.

[0043] Figure 5 A cloud workflow scheduling method based on an improved snake optimizer provided by the application and an existing algorithm are compared in terms of makespan under different constraint factors and dataset D2. DETAILED DESCRIPTION

[0044] The application will be described in detail below with reference to the accompanying drawings.

[0045] The application provides a cloud workflow scheduling method based on an improved snake optimizer (DM-SO), and the basic idea is as follows: on the basis of an original snake optimization algorithm (SO), algorithm parameters are adjusted to adapt to a workflow scheduling problem, a double mutation mechanism is introduced to solve a multi-workflow scheduling problem in a cloud computing environment, and in the case of meeting a user budget constraint, total work completion time of the workflow is optimized as much as possible.

[0046] The application provides a cloud workflow scheduling method based on an improved snake optimizer, as shown in Figure 1 The method specifically comprises the following steps.

[0047] Step 1, modeling of inputted multi-workflow tasks with budget constraints and a virtual machine resource pool.

[0048] Step 1.1, multi-workflow task modeling.

[0049] A group of workflows can be expressed as Wherein, the workflow Can be modeled as a directed acyclic graph (DAG) and expressed as Indicates a task set of the i th workflow, Indicates a j th task in the i th workflow to be scheduled; Indicates a dependency relationship between tasks in the i th workflow, Indicates a dependency relationship between the task And a child task Of the task Only when its parent task is finished execution can it start execution; B i represents the budget constraint defined by the user in advance for the i th workflow. The parent task set of the task and the child task set can be represented by and respectively. The task without parent task is called the entry task, represented by , and the task without child task is called the exit task, represented by .

[0050] At present, most of the workflow scheduling algorithms focus on single workflow scheduling and cannot solve the multi-workflow scheduling problem. Therefore, the application introduces a method of merging a group of workflows into a "big" workflow, i.e. a synchronous-based workflow combination method (SWC). Through SWC, multiple workflows from different requests can be combined into one workflow, and a meta-heuristic algorithm is used to map all workflow sub-tasks to a set of available resources to realize global task scheduling. Specifically, first, two virtual tasks with zero processing time and zero communication time with other tasks are created, i.e. a virtual entry task and a virtual exit task, then the starting tasks of all workflows are connected to the virtual entry task, and the termination tasks of all workflows are connected to the virtual exit task, to form a combined workflow

[0051] Step 1.2, cloud resource modeling.

[0052] The application adopts the IaaS cloud service model, and the available virtual machine resource set can be represented as wherein is the number of virtual machines rented by the user. The processing speed of the virtual machine r k is represented by p k , and the unit price is denoted by u k .

[0053] Step 1.3, cloud workflow scheduling problem modeling.

[0054] The application simultaneously maps the tasks of multiple workflows to different virtual machine resources, minimizes the total completion time of the workflows while meeting the user constraints. Therefore, the completion time and execution cost of the scheduling scheme need to be calculated. The execution time of the task on the virtual machine r k is obtained from formula (1):

[0055]

[0056] wherein, is the instruction length of the task .​ Completion time As shown in formula (2):

[0057]

[0058] in, It's a task The start time is calculated as shown in formula (3):

[0059]

[0060] Among them, a k It is a virtual machine k Available time, tasks Representative tasks The parent task, Representative tasks Parent task The completion time, express The number of subtasks. Representative tasks To its subtasks The transmission time is expressed by formula (4):

[0061]

[0062] in, represent arrive The size of data transmitted between virtual machines, and b is the average bandwidth between virtual machines.

[0063] The i-th workflow With workflow collection The total completion time can be calculated using formula (5) and formula (6) respectively:

[0064]

[0065] When calculating the workflow cost, the present invention only considers the execution cost of the task The virtual machine adopts the on-demand billing model. When the task execution time is less than 60 seconds, it is charged as 60 seconds. When the execution time is greater than 60 seconds, it is charged in seconds, calculated by formula (7):

[0066]

[0067] in, It's a task In the virtual machine k The execution cost on , Δ is the unit billing time, Is a rounded function. Thus we can get the i-th workflow The total execution cost C i :

[0068]

[0069] in, is a set of task nodes, Represents the jth task in the i-th workflow to be scheduled.

[0070] In the existing workflow scheduling model, the calculation of task start time is relatively conservative, that is, if and only if the task All parent tasks of When the data transfer to all its subtasks is completed, the task Only then can it start executing, as shown in formula (3). For example, waiting for its parent task It is meaningless to transfer data to a subtask that has nothing to do with itself, or what needs to be waited for is: the parent task transfers the data to the subtask that is not related to itself. Therefore, in the present invention, Consider only parent tasks With the execution order in The transmission time between tasks of the same level can be replaced by equation (9):

[0071]

[0072] in, Indicates that it has been executed at this time The number of subtasks (including the current task). In this way, the task The start time of the task is brought forward, thereby reducing the gaps between tasks in the schedule, reducing the total completion time of the workflow, and making the model more realistic.

[0073] Step 2: Population initialization.

[0074] Step 2.1: Population initialization.

[0075] In the present invention, each individual in the population corresponds to a workflow scheduling scheme, each dimension element index of the individual represents the subtask number in the workflow, and each dimension element value of the individual represents the number of the virtual machine executing this task in the available resource list.

[0076] population The specific process of initialization is: first generate M uniformly distributed individuals in the range of [0,m), that is, generate M initial scheduling plans. Each individual, that is, X=(x1,...,x m ,...,x M) represents a scheduling scheme. Where M is The total number of tasks in x m Represents the task assigned to t m The index of the virtual machine number can be calculated according to formula (10).

[0077]

[0078] in, and Represent the lower and upper limits of the available virtual machine numbers respectively. θ represents a random number between 0 and 1. Since the generated scheduling scheme is a continuous value, and the virtual machine number is a discrete value, a floor function is needed to map the continuous value to a discrete value. are divided into two parts: male sub-population and female subpopulations The number of iterations is initialized to 0, i.e. l ​​= 0. In addition, in order to prevent the algorithm from falling into local optimum, the present invention designs an index δ for each individual X , to record the number of times that an individual has not changed during evolution, δ X The initial value is set to 0.

[0079] Step 2.2: Evaluation of multi-workflow constraint satisfaction based on workflow synthesis.

[0080] The present invention combines multiple workflows through the SWC workflow merging method. Integrate into a "big" workflow To build a multi-workflow model, we encode particles according to the concept of single-workflow scheduling. During the algorithm iteration and the non-dominated sorting process of particles, the two individuals X1 and X2 need to be evaluated. Depending on whether the individual meets the constraints, an individual may correspond to a feasible or infeasible scheduling solution. Therefore, the comparison of individuals X1 and X2 can be divided into the following three cases:

[0081] (1) When both X1 and X2 are feasible solutions, the superiority is determined by the non-dominated sorting of X1 and X2. The scheduling solution corresponding to the individual ranked in the front is better.

[0082] (2) When there is one feasible solution and one infeasible solution in X1 and X2, the scheduling scheme corresponding to the feasible solution is better;

[0083] (3) When both X1 and X2 are infeasible solutions, the constraint exceedance evaluation index Θ designed by the present invention is used for evaluation, as follows:

[0084] For the scheduling problem with budget constraints, the existing approach is: in each iteration, the execution cost C of all workflows corresponding to particle X is calculated. iThe sum of the budget constraints B of all workflows i If the sum is compared, Then X is considered a feasible solution, otherwise X is an infeasible solution. In fact, since each workflow has its own budget constraint B i , It is not guaranteed for any Both have C i ≤B i ,Right now It does not indicate how well the particle satisfies the constraints of each workflow, nor how many sub-workflow budget constraints it satisfies simultaneously. As a result, since it is impossible to accurately judge the quality of two infeasible solutions, the population evolution lacks a clear direction, ultimately reducing search efficiency and affecting the quality of finding near-optimal solutions.

[0085] To this end, this paper proposes a constraint exceedance evaluation index Θ, which evaluates the constraint exceedance of the solution from the perspective of satisfying the constraints of each workflow. That is, the sum of the percentages of the execution costs of all workflows in the entire "big" workflow exceeding their corresponding budget constraints, as shown in formula (11):

[0086]

[0087] Among them, C i and B i represent the execution cost and budget constraint of the i-th workflow, respectively. Represents a workflow collection The total number of workflows included.

[0088] For two scheduling schemes X1 and X2, X1 is better than X2 if and only if:

[0089]

[0090] Among them, T(X1) and T(X2) represent the total completion time of the “large” workflow corresponding to the scheduling schemes X1 and X2, respectively, and Θ(X1) and Θ(X2) represent the constraint exceedance degree of the scheduling schemes X1 and X2, respectively.

[0091] Through this method, we can accurately evaluate the comprehensive satisfaction of the "large" workflow scheduling scheme corresponding to two individuals for multiple workflow budget constraints, thereby selecting the individual with a higher degree of comprehensive constraint satisfaction, guiding the population towards the direction of truly optimizing cost and makespan, and accelerating the convergence of the algorithm.

[0092] Step 3: Calculate the food quantity Q and the ambient temperature Temp.

[0093] In the snake optimizer, the snake group's food search strategy is constrained by the ambient temperature Temp and the amount of food Q, which can be calculated according to equations (13) and (14):

[0094]

[0095] Among them, l and are the current iteration number and the given maximum iteration number of the algorithm respectively, c1 represents the change step size of Q, and c1=0.5, exp(·) represents the exponential function.

[0096] In order to obtain better living conditions, in each iteration, the snake group will change its behavior pattern according to the amount of food and ambient temperature in the environment, and enter the exploration, development or mating stage accordingly, so as to take into account both exploration and development and improve optimization efficiency.

[0097] Step 4: Exploration phase.

[0098] When the amount of food in the environment cannot meet the demand, that is, the amount of food Q is lower than the set threshold, the population Will enter the exploration phase to find more food.

[0099] In the exploration phase, the evolution of the population depends on the random movement of individuals, and the updated position of male individuals and the updated position of the female individual Calculate according to formula (15) and (16) respectively:

[0100]

[0101] in, and Represent the male subpopulation of the l+1 generation With female subpopulation The position of the hth individual in and Respectively represent the first generation and Individuals randomly selected from the population, and represents the upper and lower boundaries of the solution space. and Represent the search capabilities of male and female individuals, respectively, and and θ represents a random number between 0 and 1. T(·) is the total completion time of the workflow under the corresponding scheduling scheme. In the present invention, the constant c2 is set as an adaptive parameter that decreases as the amount of food increases, so that the scope of individual exploration gradually decreases, better balancing individual exploration and development, as shown in Equation (17):

[0102]

[0103] In the original snake optimization algorithm, the offspring population is composed of the offspring individuals generated by updating all the parents. However, since the offspring generated in the exploration stage is not necessarily better than the parent individuals, it cannot be guaranteed that each individual in the offspring population is the historical optimum, thereby increasing the randomness of exploration and affecting the convergence speed of the algorithm. Therefore, after all the new individuals are generated, the parent population and the offspring population are mixed and sorted, and the top N individuals are selected as the population of the next generation, so as to retain the historical optimal individuals in the current search solution space, not only increasing the use of excellent individuals, but also promoting the whole population to approach the global optimal solution and accelerating the convergence of the algorithm. When the exploration operation is completed, step 7 is directly entered.

[0104] Step 5, development stage.

[0105] If the amount of food in the environment is sufficient and the environmental temperature is still high, that is, the amount of food Q is greater than the set threshold and the environmental temperature Temp is higher than the set threshold, the population will enter the development stage.

[0106] In the development stage, the snake individuals will move towards the optimal position X b The position of the male individual after iteration And the position of the female individual after iteration Are calculated according to formulas (18), (19) respectively:

[0107]

[0108] Wherein, c3 is the step size parameter of the development stage, in order to accelerate the pace of the particles moving towards the optimal individual, the value of c3 is correspondingly increased in the application, and it is found through multiple experiments that when c3 = 3, the algorithm achieves the best performance. It should be noted that the corresponding formula in the original SO algorithm uses “±”, which means that the individual moves in the direction of and away from the optimal individual, while the application uses “+” instead of the original “±” to make the snake individual always move in the direction of the optimal solution, thereby accelerating the convergence speed. If the fitness value of the updated individual is the same as that of the original individual, then δ X ← δ X +1; otherwise, δ X =0. After the development stage is completed, step 7 is directly entered.

[0109] Step 6, mating stage.

[0110] When the environmental temperature continues to decrease and is below a certain threshold, the snake individuals will enter the mating stage. In the mating stage, the population adopts two survival modes of fighting and mating, and it is determined by random selection which evolution mode to enter. That is, if the generated random number θ is less than a preset probability, the fighting mode is entered, and step 6.1 is executed; otherwise, the mating mode is entered, and step 6.2 is executed. The specific steps are as follows:

[0111] Step 6.1, fighting mode.

[0112] In the fighting mode, the individual tends to attract the attention of the opposite sex by fighting, and the positions of the male individual after iteration and the position of the female individual after iteration are calculated according to formulas (20) and (21) respectively:

[0113]

[0114] where c4 is a step length parameter of the fighting mode, and represent the fighting abilities of the male and female snake individuals respectively, and have and θ represents a random number between 0 and 1; X b,u and X b,v represent the optimal solutions in the male sub-population and the female sub-population respectively.

[0115] Step 6.2, mating mode.

[0116] In the mating mode, and the individuals with the same number in and are iterated in pairs, and the positions of the male individual and the female individual after iteration and are calculated according to formulas (22) and (23) respectively:

[0117]

[0118] where c5 is a step length parameter of the mating mode, and represent the mating abilities of the male and female snake individuals respectively, and have and If the mating mode occurs, the worst individuals in the two sub-populations are replaced by two randomly generated individuals.

[0119] In the mating stage, the occurrence of the fighting mode and the mating mode is random. Considering the randomness of the guiding solution adopted by the mating mode, the present application increases the probability of the occurrence of the fighting mode from 60% to 95%, and to some extent, suppresses the convergence difficulty phenomenon caused by random search.

[0120] If the updated individual fitness value is the same as the original one, then δ X ← δ X + 1; otherwise, δ X = 0. When the mating stage ends, i.e. the operation of either the fighting mode or the mating mode is completed, go to step 7 directly.

[0121] Step 7, perform the double mutation operation.

[0122] The original SO algorithm is prone to premature convergence, thus making the search fall into local optimum. In the present application, the possibility of the search falling into local optimum is reduced by performing forced mutation on the individual that converges prematurely and randomly selecting a part of the remaining individuals for mutation. The specific steps are as follows:

[0123] Step 7.1, mark the individual to be mutated.

[0124] The present application introduces an index δ X to monitor the number of times of no change of the individual in the iteration process, so as to determine whether the individual needs to perform deterministic mutation. In the iteration process, if the number of times of no change of the individual exceeds the preset index δ , i.e. , then the individual will perform forced mutation; for the other remaining individuals, a part of them will be randomly selected for mutation according to the probability δ M .

[0125] Step 7.2, perform the mutation operation.

[0126] The present application adopts the single-point mutation strategy, i.e. randomly selecting a dimension of the individual to be mutated, and replacing the value in the dimension with another value. After mutation, the individual is set to be δ X = 0, i.e. δ X = 0, so as to re-count the number of times of no change of the individual.

[0127] Step 7.3, update the optimal position.

[0128] After completing a round of iteration, update the population optimal individual, i.e. the male optimal sub-individual X b,u , the female optimal individual X b,v , and the optimal individual X b of the whole population, and increase the iteration number l by 1, and go to step 8.

[0129] Step 8, judge whether the iteration number reaches the preset upper limit.

[0130] If l is greater than or equal to the optimal individual X in the current entire population is output as a workflow scheduling scheme; otherwise, go to step 3. b If l is greater than or equal to the optimal individual X in the current entire population is output as a workflow scheduling scheme; otherwise, go to step 3.

[0131] Embodiment:

[0132] In order to verify the effectiveness of the cloud workflow scheduling method based on the improved snake optimizer proposed in the application, the application uses the cloud workflow scheduling simulation tool WorkflowSim to conduct experiments, and selects four single-objective workflow scheduling algorithms for comparison: SO, GA, the owl search algorithm based on mutation (OSAM) and the farmland effort algorithm based on mutation and dynamic target (MDO-FF).

[0133] The application selects different sizes and different types of workflows for experiments, and on the basis of four types of workflows Montage, Inspiral, CyberShake and Epigenomics, small, medium and large mixed workflows are respectively constructed, that is, the following calculations are performed:

[0134] CW small = Montage_25+Inspiral_30+CyberShake_30+Epigenomics_24

[0135] CW medium = Montage_50+Inspiral_50+Cybershake_50+Epigenomics_46

[0136] CW large = Montage_100+Inspiral_100+CyberShake_100+Epigenomics_100.

[0137] On this basis, multi-workflow data sets D1 and D2 are constructed. Wherein, D1=CW medium , D2=4CW small +2CW largeThe on-demand resource feature of cloud service providers can meet the growing user demand through an unlimited resource pool. In order to fully reflect the elasticity advantage of cloud computing, 36 and 216 different types of virtual machine resource pools are provided for two data sets D1 and D2 respectively, and scheduling simulation experiments are carried out under 4 constraint factors (for example: 2, 4, 6 and 8). Each algorithm runs 15 simulations to reduce or avoid the randomness of algorithm iteration. The constraint satisfaction (success rate) of the scheduling algorithm and the maximum completion time makespan of the workflow are selected as evaluation indexes, and the comparison results of the experiment are as shown in Figures 2 to 5 .

[0138] As can be seen from Figure 2 , when the number of workflows is small, most algorithms can obtain a high success rate. Among them, the workflow scheduling algorithm DM-SO based on the improved snake optimizer provided by the application achieves a success rate of 100% under 4 constraint factors, the genetic algorithm GA and the owl search algorithm OSAM based on mutation have a success rate of 59% to 79% under the tightest constraint factor, and the original snake optimization algorithm SO cannot find a feasible solution under the relatively tight budget constraint. From Figure 3 , it can be seen that when the scale of the scheduling problem or the number of workflows increases sharply, most algorithms have difficulty finding a feasible solution under tight constraints. However, with the increase of the constraint factor, the algorithm DM-SO proposed by the application can find a feasible solution first and obtain a high success rate. Therefore, compared with existing algorithms, the algorithm DM-SO proposed by the application obtains a better success rate than other algorithms in both data sets, and shows better search ability.

[0139] As can be seen from Figure 4 , with the increase of the constraint factor, that is, the constraint changes from tight to loose, the optimization ability of most algorithms for makespan gradually increases. Specifically, under 4 constraint factors, the algorithm DM-SO proposed by the application obtains the smallest makespan and shows the best performance, followed by OSAM, MDO-FF and GA, and SO shows the worst performance, especially under the relatively tight constraint factor, the optimization performance and stability of SO are both poor.

[0140] As can be seen from Figure 5It can be seen that, compared with other algorithms, DM-SO obtains the minimum makespan in the wide constraint case, while the optimization performance is poor in the tight constraint case. This is because DM-SO focuses on finding a feasible solution at this time, resulting in the makespan of the found solution increasing, while other algorithms are difficult to find a feasible solution in the tight constraint case. In addition, MDO-FF also has certain advantages in optimization performance under loose constraints, which is due to the role of its mutation mechanism and dynamic target mechanism. Overall, the algorithm DM-SO proposed in the application obtains good optimization performance on different data sets.

[0141] To sum up, the above is only a preferred embodiment of the present application, and is not used to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A cloud workflow scheduling method based on improved snake optimizer, characterized in that, The method comprises the following steps: Step 1, modeling a multi-workflow task with budget constraints, a virtual machine resource pool and cloud workflow scheduling; Step 2: Population Generate M uniformly distributed individuals X=(x1,...,x m ,...,x M ) as the initial scheduling scheme, where is the combined workflow, M is The total number of tasks in x m Assigned to task t m The index of the virtual machine number; the population Divided into male subpopulations and female subpopulations The number of iterations l is initialized to 0; an indicator δ is established for each individual X Record the number of times it has not changed during the evolution process, and use δ X Initialized to 0; Step 3, calculate the food quantity Q and the environmental temperature Temp, when the food quantity Q is lower than a set threshold, the population Step 4 is performed when the population enters the exploration phase; when the food quantity Q is greater than a set threshold and the environmental temperature Temp is higher than a set threshold, the population Step 5 is performed when the population enters the exploitation phase; when the food quantity Q is greater than a set threshold and the environmental temperature Temp is lower than a set threshold, the population Step 6 is performed when the population enters the mating phase; Step 4, population randomly moving individuals within the population determines the position of the hth individual in the (l+1)th male subpopulation randomly moving individuals within the population determines the position of the hth individual in the (l+1)th female subpopulation randomly moving individuals within the population determines the position of the hth individual in the (l+1)th male subpopulation randomly moving individuals within the population determines the position of the hth individual in the (l+1)th female subpopulation The calculation is: in, and In the first generation, and Individuals randomly selected from the population, and are the upper and lower boundaries of the solution space, respectively, and c2 is a constant; and are the search capabilities of male and female individuals, and and θ is a random number in the set (0,1), T(·) is the total completion time of the workflow corresponding to the scheduling scheme; if the fitness of the individual in the new position is the same as the original one, let δ X Add 1 to it, otherwise let δ X is 0; let l be incremented by 1 and execute step 9; Step 5, population the individuals within the population to move towards the current best position X b determine the position of the movement and is calculated as where c3 is a constant; if the fitness of the individual at the new position is the same as the original, then let δ X = 1, else let δ X = 0; let / be incremented by 1 and go to step 9. Step 6, when the θ is less than a preset probability, entering a fighting mode to execute step 7; otherwise, entering a mating mode to execute step 8; Step 7, determine position using the following calculation and Where c4 is a constant; and The fighting ability of male and female individuals, respectively, and satisfy and X b,u and X b,v Male subpopulations With female subpopulation The optimal solution in ; if the fitness of the individual in the new position is the same as the original one, let δ X Add 1 to it, otherwise let δ X is 0; let l be incremented by 1 and execute step 9; Step 8, As in Individuals of the same number As in Pairs are iterated and the position is determined using the following calculation And where c5 is a constant, wherein are the mating abilities of male and female individuals, respectively, and satisfy and if the fitness of the individual at the new position is the same as the original, then let δ X be 1, otherwise let δ X be 0; let / be incremented by 1 and go to step 9; Step 9, if l is greater than or equal to a threshold value, then output the best individual X in the current entire population as the workflow scheduling scheme, and end the procedure; otherwise, perform step 3. b Step 9, if l is greater than or equal to a threshold value, then output the best individual X in the current entire population as the workflow scheduling scheme, and end the procedure; otherwise, perform step 3.​ 2. The cloud workflow scheduling method of claim 1, wherein, the jth task in the ith workflow to be scheduled the start time of is calculated by the following equation: where a k is the available time of the virtual machine r k , task is the parent task of task , task is the finish time of the parent task of task , task , task is the transmission time of task to its child task , and is the number of child tasks of task that have been executed so far.

3. The cloud workflow scheduling method of claim 1, wherein, The constant c2 in step 4 is calculated as follows:

4. The cloud workflow scheduling method of claim 1, wherein, The step 4 further comprises the following steps of mixing the parent population and the offspring population, sorting the mixed population, and screening the first N individual scheduling schemes as the next generation population, wherein the sorting manner is: a computation constraint exceeding degree evaluation index Θ, wherein C i and B i represent the execution cost and budget constraint of the i-th workflow, respectively, represents the total number of workflows contained in the workflow set ​ For two individual scheduling schemes X1 and X2, the following conditions are met: X1 is superior to X2 if T(X1) < T(X2) and Θ(X1) < Θ(X2), where T(X1), T(X2) represent the total completion time of the workflow corresponding to scheduling scheme X1 and X2 respectively, and Θ(X1), Θ(X2) represent the constraint violation degree of scheduling scheme X1 and X2 respectively.

5. The cloud workflow scheduling method of claim 1, wherein, The constant c3 in the step 5 is 3.

6. The cloud workflow scheduling method of claim 1, wherein, The step 4, step 5, step 7 and step 8 are all after the "if the fitness of the individual in the new position is the same as the original, then let δ X increment 1, otherwise let δ X = 0", for the individual whose δ X is not less than the threshold value, perform forced mutation, according to the set probability, randomly select part of the individuals whose δ X is less than the threshold value to perform mutation; and set the δ X of the individual after mutation to 0; update the optimal individual of the population.

7. The cloud workflow scheduling method of claim 6, wherein, The mutation is a single-point mutation strategy for individual mutation.

Citation Information

Patent Citations

  • Calculation intensive cloud workflow scheduling method based on farmland fertility algorithm

    CN112328364A

  • Workflow scheduling system, workflow scheduling method, and electronic apparatus

    US20190213040A1