A particle swarm optimization method for large-scale workflow scheduling problem

By employing a multi-swarm particle swarm optimization method and the random selection of adaptive weight coefficients ω, the problem of premature convergence in large-scale workflow scheduling is solved, realizing a low-cost scheduling scheme under deadline constraints and improving scheduling efficiency.

CN115237546BActive Publication Date: 2025-12-09NORTHWESTERN POLYTECHNICAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211060655.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-31
Publication Date
2025-12-09
Estimated Expiration
2042-08-31

AI Technical Summary

Technical Problem

Existing particle swarm optimization algorithms are prone to premature convergence in large-scale workflow scheduling problems, making it difficult to optimize execution costs while satisfying deadline constraints.

Method used

A multi-population particle swarm optimization method is adopted. Through a master-slave distributed collaborative optimization framework, combined with differential evolution algorithm and random selection of adaptive weight coefficient ω, the population diversity and global search capability are enhanced, and a particle swarm optimization method for large-scale workflow scheduling problem is designed.

Benefits of technology

It effectively solves the premature convergence problem, improves the solution quality of large-scale workflow scheduling problems, finds a better scheduling scheme, and balances completion time and execution cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115237546B_ABST
    Figure CN115237546B_ABST
Patent Text Reader

Abstract

The application discloses a particle swarm optimization method for large-scale workflow scheduling problems, comprising the following steps: step S1, establishing a resource pool and marking resources according to ascending order of resource computing capacity; step S2, randomly initializing a population; step S3, evaluating target values of each particle in the population; step S4, calculating the number M of sub-populations to be divided; step S5, randomly dividing the population into M sub-populations; step S6, sending each sub-population to a corresponding slave node, waiting for the slave node to update the speed and position of the particle, receiving the updated sub-population from the slave node after the slave node updates the sub-population; step S7, t: = t + 1, if t > T, ending the execution, otherwise, continuing step S4. The application uses the multi-population mode to enhance the diversity of the population, quickly locates the region where the global optimum is located, and can find a better solution for the problem.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of distributed computing, and particularly relates to a particle swarm optimization method for large-scale workflow scheduling problems. BACKGROUND

[0002] A workflow is composed of a set of tasks connected by data or computation, and is widely used to construct practical applications, such as the Montage workflow that can be used to generate custom mosaics of the sky, and the CyberShake workflow that can be used to analyze seismic hazards in a region. Workflow scheduling is the process of finding the most suitable execution resources and start times for each task while satisfying the quality of service (QOS) requirements of the user.

[0003] In the past few decades, researchers have often studied workflow scheduling problems in traditional distributed computing systems, such as multiprocessor systems, homogeneous clusters, and grids. With the popularity of cloud computing, workflow scheduling based on cloud resources has gradually become an important research direction, but it is also more challenging. Grids usually have a fixed and limited static resource pool, while resources in cloud computing are elastic and almost unlimited, and users can rent any number of resources at any time according to the pay-as-you-go method. Renting more resources or expensive resources can shorten the completion time of the workflow, but also requires more payment.

[0004] Therefore, the workflow scheduling problem in cloud computing needs to consider both the completion time and the execution cost. The deadline-constrained scheduling strategy is often used to solve such problems, that is, the user sets a time limit for the completion time, and the scheduler executes all tasks of the workflow within the time limit while trying to reduce the execution cost of the workflow. The deadline-constrained technique can balance the completion time and execution cost of the workflow. The workflow problem is an NP-hard problem, and the search space increases exponentially with the number of tasks. Traditional exact methods such as linear programming and branch-and-bound method take too long to execute, so researchers generally use heuristic methods to solve this problem. Rule-based heuristic methods are very effective in solving small or medium-sized workflow scheduling problems (i.e., the number of tasks is less than 1000), but when the number of tasks in the workflow continues to increase, the performance of the heuristic algorithm decreases significantly due to the huge solution space and exponentially increasing local optimum. Therefore, many researchers use evolutionary algorithms such as genetic algorithm (GA), particle swarm optimization (PSO), and ant colony optimization (ACO) to solve large-scale workflow scheduling problems. Although evolutionary algorithms take longer to execute than ordinary heuristic methods, the quality of the solutions they find is much better than that of heuristic methods.

[0005] Among numerous evolutionary algorithms, Probabilistic Search (PSO) has gained favor among researchers due to its simple design, few control parameters, and rapid convergence. However, in large-scale optimization problems, to achieve a balance between PSO's rapid convergence and global search capability, thus avoiding premature convergence, existing researchers mainly extend PSO through adaptive adjustment of control parameters, modification of topology, combination with other search techniques, and multi-population collaborative optimization. Among these, multi-population approaches can enhance population diversity and more effectively handle large-scale optimization problems. Therefore, in this invention, we first design a multi-population PSO method for large-scale optimization and apply it to the deadline-constrained workflow execution cost optimization problem. Summary of the Invention

[0006] This invention provides a particle swarm optimization method for large-scale workflow scheduling problems to solve the problem of premature convergence in existing particle swarm optimization techniques.

[0007] This invention provides a particle swarm optimization method for large-scale workflow scheduling problems, comprising the following steps:

[0008] Step S1: Establish a resource pool and label the resources according to their computing power in ascending order; the virtual machine type provided by cloud computing is V = {v1, v2, ..., v...} k}, where v k Let represent the k-th type of virtual machine, where the virtual machine types are already sorted in ascending order of computing power. Then, the computing resource pool used for scheduling is represented as follows: MT represents the maximum number of tasks that can be parallelized. Each type of virtual machine leases MT instances, and the total number of virtual machines is k*MT. The instances are listed in ascending order of computing power, starting with... Secondly Refers to the first instance of virtual machine type v1; Refers to the MTth instance of virtual machine type v1; Refers to virtual machine type v k The MTth instance;

[0009] Step S2: Randomly initialize the population, setting the current iteration t = 0; any particle P in the population i It has two vectors: a vector representing velocity. and vectors representing positions Where D represents the dimension of the search space, i.e. the number of variables; The speed of the D-dimensional variable, i.e., its range of change; This represents the value of the variable in dimension D;

[0010] Step S3: Use formulas (1) and (2) to evaluate the target value f(X) of each particle in the population.i t),

[0011]

[0012]

[0013] wherein, is the target value of the particle at iteration number t, represents the position of the particle at iteration number t, is the target function value of the particle at iteration number t+1; TEC is the total execution cost of the workflow to be minimized, TET is the total execution time of the workflow, Dl is the deadline of the workflow, t is the current iteration number, T is the total iteration number, Dl ε (t) is the deadline of the relaxed workflow;

[0014] Step S4, calculating the number M of sub-populations to be divided according to formula (3),

[0015]

[0016] wherein, Floor is a floor function, N is the population number, t is the current iteration number, T is the total iteration number, and the value range of the number of sub-populations is

[0017] Step S5, randomly dividing the population into M sub-populations;

[0018] Step S6, sending each sub-population to a corresponding slave node, waiting for the slave node to update the speed and position of the particle, and receiving the updated sub-population from the slave node after the slave node updates the sub-population;

[0019] Step S7, t:=t+1, if t>T, ending the execution, otherwise continuing step S4.

[0020] As a preferred mode of the present application, the step S6 comprises the following steps:

[0021] Step S61, receiving the corresponding sub-population from the master node;

[0022] Step S62, calculating the target value of each particle according to formula (1) and formula (2);

[0023] Step S63, sorting the particles in the sub-population according to the target values of the particles, and selecting the particles with the top p% smallest target values as the sbest set;

[0024] Step S64, calculating the promotion ratio of each particle compared with the target value of the last iteration, and selecting the particles with the top p% largest promotion ratio as the mbest set;

[0025] Step S65, the particle with the minimum target value remains unchanged and directly enters the next generation population, and a random selection is made for each of the remaining particles i and mbest i , sbest i and mbest i is expressed as a particle P i The selected learning object is updated using the formula (4) and (5) to update the speed and position of the particle;

[0026]

[0027]

[0028] Wherein, ω is a weight coefficient, which is a random number in the interval [0.4, 0.9], and r1 and r2 are two random numbers between 0 and 1.

[0029] Step S66, the sub-population composed of the updated particles is sent to the master node.

[0030] The particle swarm optimization method for large-scale workflow scheduling problems provided by the application can enhance the diversity of the population, quickly locate the area where the global optimum is located, and find a better solution for the problem. In addition, in order to solve the large-scale workflow optimization problem, a workflow scheduling method is designed by combining the proposed PSO, and the method can find a scheduling scheme with small execution cost for large-scale workflows under deadline constraints. BRIEF DESCRIPTION OF DRAWINGS

[0031] In order to more clearly illustrate the technical solutions in the embodiments of the application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor.

[0032] Figure 1 The master-slave distributed multi-population collaborative optimization framework provided by the embodiments of the application. DETAILED DESCRIPTION

[0033] In order to enable the personnel in the technical field to better understand the application scheme, the technical solutions in the embodiments of the application will be described clearly and completely in the following with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only some embodiments of the application, not all. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor should belong to the scope of protection of the application.

[0034] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0035] A particle swarm optimization method for large-scale workflow scheduling problems includes:

[0036] Step S1: Establish a resource pool and label the resources according to their computing power in ascending order; the virtual machine type provided by cloud computing is V = {v1, v2, ..., v...} k}, where v k Let represent the k-th type of virtual machine, where the virtual machine types are already sorted in ascending order of computing power. Then, the computing resource pool used for scheduling is represented as follows: MT represents the maximum number of tasks that can be parallelized. Each type of virtual machine leases MT instances, and the total number of virtual machines is k*MT. The instances are listed in ascending order of computing power, starting with... Secondly Refers to the first instance of virtual machine type v1; Refers to the MTth instance of virtual machine type v1; Refers to virtual machine type v k The MTth instance;

[0037] Step S2: Randomly initialize the population, setting the current iteration t = 0; any particle P in the population i It has two vectors: a vector representing velocity. and vectors representing positions Where D represents the dimension of the search space, i.e. the number of variables; The speed of the D-dimensional variable, i.e., its range of change; This represents the value of the variable in dimension D;

[0038] Step S3: Use formulas (1) and (2) to evaluate the target value of each particle in the population.

[0039]

[0040]

[0041] in, Let be the target value of the particle at iteration number t. This represents the position of the particle at iteration number t. Let be the objective function value at particle iteration number t+1; TEC is the total execution cost of minimizing the workflow, TET is the total execution time of the workflow, Dl is the deadline of the workflow, t is the current iteration number, T is the total number of iterations, and Dl is the total number of iterations.ε (t) is the relaxed deadline, from formula (1) we can see that in the first T / 2 iterations of the method execution, the relaxed deadline Dl is gradually reduced from 2Dl to Dl, which helps to select the solution with small execution cost, in the last T / 2 iterations of the method execution, the deadline is no longer relaxed, which helps to select the solution that meets the deadline and has small execution cost; ε (t) is the relaxed deadline, from formula (1) we can see that in the first T / 2 iterations of the method execution, the relaxed deadline Dl is gradually reduced from 2Dl to Dl, which helps to select the solution with small execution cost, in the last T / 2 iterations of the method execution, the deadline is no longer relaxed, which helps to select the solution that meets the deadline and has small execution cost;

[0042] Step S4, calculate the number of sub-populations M that need to be divided according to formula (3),

[0043]

[0044] Where Floor is the floor function, N is the population size, t is the current iteration number, T is the total number of iterations, and the value range of the sub-population number is From formula (3), we can see that as the iteration number t increases, the number of sub-populations gradually decreases from to 1, in the early stage of iteration, each sub-population contains a small number of individuals, and the learning strength of particles is small, which can better maintain the diversity of the population; in the later stage of iteration, the number of sub-populations is small, even only one, which helps to speed up the convergence of the population;

[0045] Step S5, randomly divide the population into M sub-populations;

[0046] Step S6, send each sub-population to a corresponding slave node, wait for the slave node to update the speed and position of the particle, and receive the updated sub-population from the slave node after the slave node updates the sub-population;

[0047] Step S61, receive the corresponding sub-population from the master node;

[0048] Step S62, calculate the target value of each particle according to formula (1) and formula (2);

[0049] Step S63, sort the particles in the sub-population according to the target value of the particles, and select the top p% of the smallest target value particles as the sbest set;

[0050] Step S64, calculate the improvement ratio of each particle compared with the target value of the last iteration, and select the top p% of the maximum improvement ratio particles as the mbest set;

[0051] Step S65, the particle with the smallest target value remains unchanged and directly enters the next generation population, and randomly selects sbest i and mbest i from sbest i and mbest i for each particle, and the particle Pi The selected learning object, using formula (4) and (5) to update the particle speed and position;

[0052]

[0053]

[0054] Wherein, ω is a weight coefficient is [0.4, 0.9] interval in a random number, r1 and r2 are two [0, 1] between random number;

[0055] Step S66, the updated particle group consisting of subpopulation is sent to the master node;

[0056] Step S7, t: = t + 1, if t > T, end execution, otherwise continue step S4.

[0057] Master-slave multi-population distributed collaborative optimization framework uses multiple subpopulations to update the speed and position of particles, which can maintain the diversity of the population in the evolution process, and is beneficial to large-scale optimization problems. Therefore, the evolution process of PSO is controlled using the master-slave multi-population distributed framework, as shown in Figure 1 In this framework, the master node controls all the slave nodes through the message passing interface (MPI). In the evolution process of PSO, the master node is responsible for population division, which evenly distributes the population into several subpopulations. Assuming that the size of the population is N, the number of subpopulations in the current iteration process is M, then each subpopulation contains N / M particles. If N % M is not 0, N % M is the remainder operation, it is determined whether there are particles remaining, then the remaining N % M particles are placed in the first N % M subpopulations, each subpopulation adds one, the master node is not responsible for the update of the particles, after the population division is completed, the master node sends each subpopulation to a slave node; the slave node updates the particles in the corresponding subpopulation, and after the update is completed, the subpopulation is sent to the master node. The above process is an update process of PSO. Repeat the above process until the end condition is reached.

[0058] In the classical PSO, the weight coefficient ω is usually linearly reduced from 0.9 to 0.4 according to the number of iterations. The existence of ω can well guarantee the stability of population evolution. However, in large-scale optimization problems, random ω can better maintain the diversity of the population. Therefore, when updating the speed of the particle, ω is replaced by a random number in the interval [0.4, 0.9].

[0059] In the minimization problem, the sbest set is the first p % particles in the subpopulation with the minimum target value f(X), Imp(X i ) represents the proportion of the target value in the subpopulation compared with the target value in the last iteration, that is wherein, t represents the current iteration number, is the target value of the particle at iteration number t, is the target function value of the particle at iteration number t-1, the ratio of the improvement of each particle compared with the target value of the last iteration is calculated, and the particles with the top p% largest improvement ratios are selected as the mbest set. The selection ratio p% also affects the diversity and convergence ability of the population. When p is large, the learning objects of the particles are more, which helps the diversity of the population, and when p is small, the convergence ability is improved. In order to balance the diversity and convergence ability of the population, p can be set to 20, that is, the selection range of the sbest set is the top 20% individuals with the best fitness in the sub-population, and the selection range of the sbest set is the top 20% individuals with the largest fitness improvement in the sub-population. In order to keep the population evolving in a better direction, the individuals with the best fitness in the sub-population do not participate in learning and directly enter the next generation population.

[0060] In the unconstrained optimization problem, the fitness of the particle is only determined by the optimization target. However, in the workflow scheduling problem solved by the application, the execution cost is the optimization target, and the deadline is a constraint that must be met. Some methods consider that the solution that violates the deadline is not as good as the solution that does not violate the deadline when solving the constrained optimization problem, and do not consider the execution cost of the solution. In the early stage of evolution, many particles find solutions that violate the deadline. If the solution found by the particle only violates a few deadlines, but the execution time is very small, such a solution is also excellent. Therefore, the widely used ε-limitation processing method in the differential evolution algorithm is used to solve the comparison problem of the solution in the constrained optimization problem.

[0061] It should be noted that, for the embodiments of the above method, in order to simply describe, they are all expressed as a series of action combinations, but those skilled in the art should know that the application is not limited by the order of the described actions. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions involved are not necessarily necessary for the application.

[0062] The above only describes the preferred embodiments of the application, and is not intended to limit the application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the application shall be included in the protection scope of the application.

Claims

1. A particle swarm optimization method for large-scale workflow scheduling problems, characterized in that, Includes the following steps: Step S1: Establish a resource pool and label the resources according to their computing power in ascending order; the virtual machine type provided by cloud computing is V = {v1, v2, ..., v...} k }, where v k Let represent the k-th type of virtual machine, where the virtual machine types are already sorted in ascending order of computing power. Then, the computing resource pool used for scheduling is represented as follows: MT represents the maximum number of tasks that can be parallelized. Each type of virtual machine leases MT instances, and the total number of virtual machines is k*MT. The instances are listed in ascending order of computing power, starting with... Secondly Refers to the first instance of virtual machine type v1; Refers to the MTth instance of virtual machine type v1; Refers to virtual machine type v k The MTth instance; Step S2: Randomly initialize the population, setting the current iteration t = 0; any particle P in the population i It has two vectors: a vector representing velocity. and vectors representing positions Where D represents the dimension of the search space, i.e. the number of variables; Represents the velocity of the D-th dimension variable; Indicates the position of the D-th dimension variable; Step S3: Use formulas (1) and (2) to evaluate the target value of each particle in the population. in, Let be the target value of the particle at iteration number t. This represents the position of the particle at iteration number t. Let be the objective function value at particle iteration number t+1; TEC is the total execution cost of minimizing the workflow, TET is the total execution time of the workflow, Dl is the deadline of the workflow, t is the current iteration number, T is the total number of iterations, and Dl is the total number of iterations. ε (t) represents the deadline after the workflow relaxation; Step S4: Calculate the number M of subpopulations to be divided according to formula (3). Where Floor is the floor function, N is the population size, t is the current iteration number, T is the total number of iterations, and the number of subpopulations ranges from 1 to 2. Step S5: Randomly divide the population into M subpopulations; Step S6: Send each subpopulation to a corresponding slave node, wait for the slave node to update the particle velocity and position, and receive the updated subpopulation from the slave node after the slave node has finished updating the subpopulation. Step S7, t:=t+1, if t>T, then the execution ends; otherwise, continue to step S4.

2. The method according to claim 1, characterized in that, Step S6 includes the following steps: Step S61: Receive the corresponding subpopulation from the master node; Step S62: Calculate the target value for each particle according to formula (1) and formula (2); Step S63: Sort the particles according to their target values ​​in the subpopulation, and select the top p% particles with the smallest target values ​​as the sbest set. Step S64: Calculate the improvement ratio of each particle compared to the target value of the previous iteration, and select the top p% particles with the largest improvement ratio as the mbest set; Step S65: The particle with the smallest target value remains unchanged and directly enters the next generation population. For each of the remaining particles, randomly select the sbest. i and mbest i sbest i and mbest i Represented as particle P i The selected learning object is updated with the velocity and position of the particle using formulas (4) and (5); Where ω is a random number in the interval [0.4, 0.9] for the weight coefficient, and r1 and r2 are two random numbers between [0, 1]. Step S66: Send the updated subpopulation of particles to the master node.

Citation Information

Patent Citations

  • Virtual machine allocation method based on particle swarm optimization

    CN107491341A

  • Cloud resource scheduling method under multiple targets

    CN113326135A