Workflow scheduling method and device based on multiple targets
Through the multi-objective workflow scheduling method and variable neighborhood search strategy, the workflow scheduling algorithm is optimized, solving the problems of long scheduling time and load imbalance in the existing technology, and achieving more efficient workflow development and execution.
Patent Information
- Application Number
- CN202410912172.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-09
- Publication Date
- 2024-09-27
AI Technical Summary
Existing workflow scheduling algorithms have high time complexity, insufficient convergence and diversity, and cannot effectively reduce the scheduling completion time of workflow tasks and balance machine loads.
A workflow scheduling method based on multi-objectives is adopted to generate an initial population, mutate and iterate individuals, and adjust neighborhood values to optimize the scheduling plan. Combined with the variable neighborhood search strategy in the MOEA/D algorithm, the diversity and diversity of the algorithm are improved. Convergence.
It significantly reduces the scheduling completion time of workflow tasks, improves machine load balancing, and improves workflow development efficiency and speed.
Smart Images

Figure CN118708323A
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of high performance computing technology, and in particular to a workflow scheduling method and device based on multiple objectives. Background Art
[0002] The core of workflow lies in the automation of business processes. Different task allocation strategies have a great impact on the execution performance of workflows. Therefore, it is necessary to formulate a good task allocation strategy to schedule workflow tasks. Workflow scheduling refers to allocating each task node in the workflow to a machine that can serve the node and determining the execution order of the assigned tasks on each machine, while meeting the timing constraints between tasks and customer needs. Currently, there are many scheduling algorithms that can be applied to workflow scheduling, such as heuristic algorithms, genetic algorithms, particle swarm algorithms, etc.
[0003] However, the above scheduling algorithm only focuses on one of the scheduling indicators, namely the scheduling time indicator and the machine load indicator. In addition, the existing workflow scheduling algorithm has a high time complexity, and the algorithm's convergence and diversity are insufficient. An algorithm with higher solution quality is needed to optimize the workflow scheduling problem, which can effectively reduce the scheduling completion time of workflow tasks, make the machine load more balanced, and significantly improve the efficiency and speed of workflow development. Summary of the invention
[0004] The embodiments of the present application provide a multi-objective-based workflow scheduling method and device, which adjusts the neighborhood value to obtain a workflow scheduling solution with shorter execution time and more uniform machine load, thereby improving the efficiency and speed of workflow development.
[0005] In a first aspect, an embodiment of the present application provides a multi-objective-based workflow scheduling method, including:
[0006] Based on the tasks to be scheduled and the machines to be executed for executing the tasks to be scheduled, an initial population of N individuals is generated; wherein each individual represents a scheduling scheme, and each scheduling scheme indicates the machines to be executed corresponding to each task node of each task to be scheduled;
[0007] Determine multiple fitness of each individual under multiple objectives, wherein the multiple objectives include the execution time of the scheduling scheme and the load condition of the machine to be executed;
[0008] Population iteration is achieved by mutating individuals to obtain an optimized population, and the optimal scheduling scheme is determined from the optimized population; wherein each population iteration process is as follows: for any individual, the individual is mutated to obtain a mutant individual; based on the neighborhood value of this population iteration, the neighbor individual of the individual is determined; and whether the neighbor individual is updated to the mutant individual is determined based on multiple fitness values of the individual;
[0009] The selection probability of the neighborhood value is determined through the update results of the neighbor individuals in this population iteration; and the neighborhood value of the next population iteration is determined according to the selection probability of each neighborhood value.
[0010] This application adjusts the neighborhood value and calculates the success probability of the individual update solution of the selected neighborhood value T to obtain the selection probability of the neighborhood value T. That is, the higher the success rate of T, the higher the probability of its selection, indicating that under the neighborhood parameter T, a workflow scheduling solution with shorter execution time and more uniform machine load can be obtained, thereby improving the efficiency and speed of workflow development. Compared with the parameters of the original MOEA / D algorithm, which are more sensitive to the size of the neighborhood value T, the larger the neighborhood value T is set, the new unknown search area can be explored, more diverse solutions can be obtained, and the algorithm diversity can be improved. The smaller the neighborhood value T is set, the more conducive it is to explore the current search interval, which can better retain the information of the optimal solution and improve the convergence of the algorithm.
[0011] Optionally, the update result of the neighbor individuals in this population iteration is determined by the following methods, including:
[0012] For any individual, if the neighbor individual is updated to be a variant individual of the individual, the number of successes is increased; if the neighbor individual is not updated, the number of failures is increased;
[0013] In this population iteration, N individuals all complete individual mutation, and the update result of this population iteration is determined by the number of successes and the number of failures.
[0014] Optionally, determining whether to update the neighbor individual to the variant individual through multiple fitness of the individuals includes:
[0015] Determining a multi-objective aggregation value of the mutated individual based on multiple fitnesses of the mutated individual;
[0016] Determining a multi-objective aggregation value of the neighboring individuals based on multiple fitness values of the neighboring individuals;
[0017] It is determined whether to update the neighbor individual to the mutated individual according to the multi-objective aggregation value of the mutated individual and the multi-objective aggregation value of the neighbor individual.
[0018] Optionally, any individual includes a node code and a machine code, the node code represents the order of each task node of each task to be scheduled, and the machine code represents the machine to be executed corresponding to each task node.
[0019] Optionally, if the number of population iterations is greater than an iteration threshold, the execution time of individuals with non-optimal solutions in the population of this population iteration is optimized and / or the load condition of the machine to be executed is optimized.
[0020] Applying the variable neighborhood search strategy to the original MOEA / D algorithm can optimize the current optimal solution of each subproblem by using the variable neighborhood search within the framework of the MOEA / D algorithm, thereby improving the quality and diversity of the solution set, enhancing the global search capability of the MOEA / D algorithm, avoiding the algorithm from falling into local optimality, obtaining a solution set with better quality, and making the execution time of the workflow scheduling solution shorter and the machine load more even.
[0021] Optionally, the optimizing of the execution time of individuals with non-optimal solutions in the population of this population iteration includes:
[0022] If the machine to be executed corresponding to the first task node of the individual non-optimal solution has the execution time margin corresponding to the first task node, the machine to be executed will be selected as the machine to be executed of the task node;
[0023] For any task node of the individual non-optimal solution, a to-be-executed machine whose execution state is an idle state and has the shortest execution time is selected as the to-be-executed machine of the task node.
[0024] Optionally, the optimizing of the load condition of the execution machine for the individuals with non-optimal solutions in the population of this population iteration includes:
[0025] For any task node of the individual non-optimal solution, if the task node executes two workflows respectively on two to-be-executed machines, swap the to-be-executed machines corresponding to the two workflows;
[0026] For any task node of the individual non-optimal solution, select a to-be-executed machine with the shortest execution time as the to-be-executed machine of the task node;
[0027] For the execution path with the longest execution time among the individuals of the non-optimal solutions, any task node on the execution path corresponds to multiple machines to be executed, and a machine to be executed is selected from the multiple machines to be executed as a replacement machine for the task node.
[0028] In a second aspect, an embodiment of the present application provides a multi-objective workflow scheduling device, including:
[0029] A generation module, used for generating an initial population of N individuals based on the tasks to be scheduled and the machines to be executed for executing the tasks to be scheduled; wherein each individual represents a scheduling scheme, and each scheduling scheme indicates the machines to be executed corresponding to each task node of each task to be scheduled;
[0030] A determination module, used to determine multiple fitness of each individual under multiple objectives, wherein the multiple objectives include the execution time of the scheduling scheme and the load condition of the machine to be executed;
[0031] The optimization module is used to implement population iteration by mutating individuals to obtain an optimized population, and determine the optimal scheduling solution from the optimized population; wherein each population iteration process is as follows: for any individual, mutate the individual to obtain a mutated individual; determine the neighbor individuals of the individual based on the neighborhood value of this population iteration; determine whether to update the neighbor individuals to the mutated individuals based on multiple fitness values of the individuals;
[0032] The determination module is further specifically used to determine the selection probability of the neighborhood value through the update results of the neighbor individuals in this population iteration; and determine the neighborhood value of the next population iteration according to the selection probability of each neighborhood value.
[0033] This application adjusts the neighborhood value and calculates the success probability of the individual update solution of the selected neighborhood value T to obtain the selection probability of the neighborhood value T. That is, the higher the success rate of T, the higher the probability of its selection, indicating that under the neighborhood parameter T, a workflow scheduling solution with shorter execution time and more uniform machine load can be obtained, thereby improving the efficiency and speed of workflow development. Compared with the parameters of the original MOEA / D algorithm, which are more sensitive to the size of the neighborhood value T, the larger the neighborhood value T is set, the new unknown search area can be explored, more diverse solutions can be obtained, and the algorithm diversity can be improved. The smaller the neighborhood value T is set, the more conducive it is to explore the current search interval, which can better retain the information of the optimal solution and improve the convergence of the algorithm.
[0034] Optionally, the determining module is specifically used to:
[0035] For any individual, if the neighbor individual is updated to be a variant individual of the individual, the number of successes is increased; if the neighbor individual is not updated, the number of failures is increased;
[0036] In this population iteration, N individuals all complete individual mutation, and the update result of this population iteration is determined by the number of successes and the number of failures.
[0037] Optionally, the optimization module is specifically used for:
[0038] Determining a multi-objective aggregation value of the mutated individual based on multiple fitnesses of the mutated individual;
[0039] Determining a multi-objective aggregation value of the neighboring individuals based on multiple fitness values of the neighboring individuals;
[0040] It is determined whether to update the neighbor individual to the mutated individual according to the multi-objective aggregation value of the mutated individual and the multi-objective aggregation value of the neighbor individual.
[0041] Optionally, any individual includes a node code and a machine code, the node code represents the order of each task node of each task to be scheduled, and the machine code represents the machine to be executed corresponding to each task node.
[0042] Optionally, the optimization module is specifically used for:
[0043] If the number of population iterations is greater than the iteration threshold, the execution time of the individuals with non-optimal solutions in the population of this population iteration and / or the load condition of the machine to be executed are optimized.
[0044] Applying the variable neighborhood search strategy to the original MOEA / D algorithm can optimize the current optimal solution of each subproblem by using the variable neighborhood search within the framework of the MOEA / D algorithm, thereby improving the quality and diversity of the solution set, enhancing the global search capability of the MOEA / D algorithm, avoiding the algorithm from falling into local optimality, obtaining a solution set with better quality, and making the execution time of the workflow scheduling solution shorter and the machine load more even.
[0045] Optionally, the optimization module is specifically used for:
[0046] If the machine to be executed corresponding to the first task node of the individual non-optimal solution has the execution time margin corresponding to the first task node, the machine to be executed will be selected as the machine to be executed of the task node;
[0047] For any task node of the individual non-optimal solution, a to-be-executed machine whose execution state is an idle state and has the shortest execution time is selected as the to-be-executed machine of the task node.
[0048] Optionally, the optimization module is specifically used for:
[0049] For any task node of the individual non-optimal solution, if the task node executes two workflows respectively on two to-be-executed machines, swap the to-be-executed machines corresponding to the two workflows;
[0050] For any task node of the individual non-optimal solution, select a to-be-executed machine with the shortest execution time as the to-be-executed machine of the task node;
[0051] For the execution path with the longest execution time among the individuals of the non-optimal solutions, any task node on the execution path corresponds to multiple machines to be executed, and a machine to be executed is selected from the multiple machines to be executed as a replacement machine for the task node.
[0052] In a third aspect, an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned multi-objective workflow scheduling method when executing the program.
[0053] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program executable by a computer device, which, when the program is run on the computer device, enables the computer device to execute the steps of the above-mentioned multi-objective workflow scheduling method.
[0054] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer program stored on a computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer device, the computer device executes the steps of the above-mentioned multi-objective workflow scheduling method. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0056] Figure 1 A flowchart of a multi-objective-based workflow scheduling method provided by an embodiment of the present invention;
[0057] Figure 2 A schematic diagram of node code and machine code encoding provided by an embodiment of the present invention;
[0058] Figure 3 A schematic diagram of the structure of a task entity provided by an embodiment of the present invention;
[0059] Figure 4 A schematic diagram of performing a cross operation on individual tasks provided by an embodiment of the present invention;
[0060] Figure 5 A schematic diagram of exchanging gene fragments in a task individual provided by an embodiment of the present invention;
[0061] Figure 6 A schematic diagram of producing offspring individuals provided by an embodiment of the present invention;
[0062] Figure 7 A schematic diagram of producing offspring individuals provided by an embodiment of the present invention;
[0063] Figure 8 A schematic diagram of a process for generating an initialization population provided by an embodiment of the present invention;
[0064] Fig. 9 A schematic diagram of a node of an individual that is not an optimal solution provided by an embodiment of the present invention;
[0065] Fig.10 A schematic diagram of performing a neighborhood search action NS2 provided by an embodiment of the present invention;
[0066] Fig.11 A schematic diagram of performing a neighborhood search action NS3 provided by an embodiment of the present invention;
[0067] Fig.12 A schematic diagram of performing a neighborhood search action NS5 provided in an embodiment of the present invention;
[0068] Fig.13 A schematic diagram of the structure of a multi-objective workflow scheduling device provided by an embodiment of the present invention;
[0069] Fig.14 A schematic diagram of the structure of a computing device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0070] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0071] For ease of understanding, the terms involved in the embodiments of the present invention are explained below.
[0072] MOEA / D is a multi-objective evolutionary algorithm based on decomposition: It is a multi-objective evolutionary algorithm based on decomposition (Multi-objective Evolutionary Algorithm Based on Decomposition), which decomposes a multi-objective optimization problem into multiple single-objective optimization sub-problems, and uses evolutionary algorithms to optimize these sub-problems simultaneously. This method converts the multi-objective optimization problem into a single-objective optimization through an aggregation function, thereby reducing the computational complexity and having great advantages in maintaining the distribution of solutions. The essence of the MOEA / D algorithm is to decompose the multi-objective optimization problem into multiple single-objective optimization sub-problems through decomposition operations, and the optimal solution of each sub-problem corresponds to a solution on the Pareto frontier surface. Since only the relevant information of several sub-problems adjacent to each sub-problem is used when optimizing each sub-problem, the MOEA / D algorithm has a lower computational complexity. In addition, by analyzing the information of adjacent problems for optimization, it can avoid falling into local optimality.
[0073] POX: Precedence Operation Crossover, a crossover approach.
[0074] MPX: Multi-parents Precedence Operation Crossover, a crossover approach.
[0075] VNS: Variable Neighborhood Search, variable neighborhood search strategy.
[0076] Adaptive neighborhood adjustment strategy: A neighborhood adjustment strategy defined in this paper.
[0077] Pareto solution set: a solution set based on the Pareto dominance relationship in multi-objective optimization.
[0078] Crowding distance: It is a method to measure the quality of the solution.
[0079] Non-dominated Set (NDS): Corresponding to this workflow scheduling problem, if a scheduling scheme x1 dominates another scheduling scheme x2, but cannot dominate another scheduling scheme x3, then we can say that the scheduling scheme x1 is better than the scheduling scheme x2's f1(x2) and f2(x2) in terms of scheduling completion time f1(x1) and load balancing f2(x1), while x1 is worse than x3 in one indicator.
[0080] The core of workflow is the automation of business processes. Different task allocation strategies have a great impact on the execution performance of workflows. Therefore, it is necessary to formulate a good task allocation strategy to schedule workflow tasks. Workflow scheduling refers to allocating each task node in the workflow to an execution machine that can serve the node and determining the execution order of the assigned tasks on each execution machine, while meeting the timing constraints between tasks and customer needs.
[0081] In the one-stop data application development management portal (Data Sphere Studio, referred to as DSS) system, the workflow can support script-type nodes and third-party workflow nodes, and can be divided into seven types of nodes according to function: data development, data quality, data visualization, machine learning, signal, function, and data output. After creating a new workflow task, it is necessary to design the nodes needed in the development process based on development requirements, configure the properties and resource parameters of each node, and arrange the dependencies between nodes. After debugging each node, the workflow can be published to the production center, and finally the system schedules these task nodes according to the multi-objective workflow scheduling method proposed in this application. Taking into account the timing constraints between task nodes and the time heterogeneity of task nodes executed by different machines, and the fact that its scheduling scheme will grow exponentially with the increase in the number of task nodes and the number of machines, the workflow scheduling method proposed in this paper based on the improvement of the MOEA / D algorithm is used to schedule these task nodes.
[0082] like Figure 1 The figure shows a flow chart of a workflow scheduling method based on multiple objectives provided by the present application, which specifically includes the following steps:
[0083] Step S101, based on the tasks to be scheduled and the machines to be executed for executing the tasks to be scheduled, an initial population of N individuals is generated; wherein each individual represents a scheduling scheme, and each scheduling scheme indicates the machines to be executed corresponding to each task node of each task to be scheduled.
[0084] Specifically, after a new workflow task is created, that is, a task to be scheduled, N scheduling schemes to be executed are configured according to the task to be scheduled. These N scheduling schemes to be executed constitute an initial population, and each scheduling scheme is a population individual, which can also be called a chromosome. Each scheduling scheme contains multiple task nodes corresponding to each scheduling task, and each task node also has a corresponding execution machine. There will be multiple task nodes on the same execution machine, and these task nodes of each execution machine will have an execution order.
[0085] Since the workflow task scheduling problem is a complex combinatorial optimization problem, the encoding method of the task solution of the task population needs to be designed in consideration of the characteristics of the actual problem. Too long encoding will lead to a substantial increase in the individual neighborhood, which will greatly reduce the efficiency of the algorithm. Shorter encoding will lead to a smaller solution space and affect the effectiveness of the algorithm. This application uses integer encoding to divide the encoding of the task solution into two parts: node code and machine code. For any individual in the population, the node code is in front and the machine code is in the back, so that the two codes are independent of each other. The node code represents the order of each task node of each task to be scheduled, and the machine code represents the machine to be executed corresponding to each task node. They will not affect each other in subsequent crossover mutation operations. Through the above scheme, a task can be decoded into a chromosome. The decoding process is to translate a chromosome into a corresponding sequence containing node code and machine code, thereby obtaining an optional scheduling sequence scheme, and executing the nodes in the order of the node code.
[0086] Assume that a workflow task requires n workflows. After determining the working nodes of each workflow, different working nodes constitute the node set O = {O1,O 2, O3…O n}, then the total number of nodes is Since there is a one-to-one correspondence between nodes and machines, the encoding length is The number in the node code is the number of the workflow, the number in the machine code is the number of the machine, and the j-th occurrence of i is the j-th node of workflow i, as follows Figure 2 Schematic diagram of node code and machine code encoding shown.
[0087] For example, if Figure 3 The structural diagram of a task individual shown is also a chromosome. The code of task individual 1 is 2121, 1212; the first 4 codes are node codes, and the last 4 codes are machine codes. The node code 2121 of the task individual means the first node of task 2, the first node of task 1, the second node of task 2, and the second node of task 1 respectively; the machine code means that the first node of task 2 is executed on machine 1, the first node of task 1 is executed on machine 2, the second node of task 2 is executed on machine 1, and the second node of task 1 is executed on machine 2.
[0088] Step S102, determining multiple fitness of each individual under multiple objectives, where the multiple objectives include the execution time of the scheduling scheme and the load condition of the machine to be executed.
[0089] Specifically, the execution time of the scheduling scheme is used to describe the completion time of the last working node in the workflow task scheduling. The execution time of the scheduling scheme can intuitively reflect the quality of the scheduling result. Load status is also one of the main optimization goals of workflow task scheduling. The evaluation of load status ultimately determines the effective utilization rate of machine resources.
[0090] According to the execution time of the scheduling scheme and the load status of the machine to be executed, the fitness of each individual in the initial population is calculated. The execution time of the execution node under each task can be obtained by looking up the table, as shown in Table 1 below, which is the execution time of the node of a workflow scheduling task and the corresponding machine to be executed:
[0091]
[0092] For example, a scheduling scheme includes two workflow tasks, workflow task 1 and workflow task 2, which each contain two nodes; node 1 of workflow task 2 selects machine 1, so the table shows that the execution time is 12s; node 1 of workflow task 1 selects machine 2, so the table shows that the execution time is 18s; node 2 of workflow task 2 selects machine 1, so the table shows that the execution time is 10s; node 2 of workflow task 1 selects machine 2, so the table shows that the execution time is 8s; and so on, the total execution time is 12+18+10+8=48s. The execution time of workflow task 1 is 26s, and the execution time of workflow task 2 is 22s, so the end time of the last task is the maximum value of the execution time of workflow task 1 and workflow task 2, which is 26s, and the scheduling completion time is fit1=26s. The load condition of the machine to be executed is obtained by taking the square root of the total execution time and dividing it by the number of nodes. For example, the load condition calculated in the above example is 48 square root divided by 4 = 1.73, fit2 = 1.73. According to the same algorithm as above, the fitness values of all individuals in the initial population can be calculated.
[0093] Step S103, realizing population iteration by mutating individuals to obtain an optimized population, and determining the optimal scheduling plan from the optimized population; wherein each population iteration process is as follows: for any individual, mutate the individual to obtain a mutated individual; based on the neighborhood value of this population iteration, determine the neighbor individual of the individual; determine whether to update the neighbor individual to a mutated individual through multiple fitness values of the individual.
[0094] Specifically, an individual in the initial population can be mutated through a crossover operation or a mutation operation, and then the neighbor individuals of the mutated individual are determined according to the neighborhood value Ti of this population iteration. With the mutated individual as the center, the mutated individuals separated by the neighborhood value Ti on the left and right are respectively taken as neighbor individuals, and then the fitness of the neighbor individuals and the mutated individuals are calculated in turn. The smaller the fitness, the better the scheme of the individual performs. If the fitness of the neighbor individual is smaller than that of the mutated individual, the neighbor individual is not updated; if the fitness of the mutated individual is smaller than that of the neighbor individual, the neighbor individual is replaced by the mutated individual.
[0095] For example, there are 10 individuals in the mutation population, namely A1, A2, A3, A4, A5, A6, A7, A8, A9, and A10. In this round, the A4 individual is mutated to obtain B4. At the same time, assuming that the neighborhood value Ti of this iteration is 2, the two neighbor individuals obtained are A2 and A6. Calculate the fitness of B4 and A2 respectively. If the fitness of B4 is less than that of A2, replace A2 with B4; if the fitness of B4 is greater than that of A2, no replacement operation is performed.
[0096] The specific implementation process of the crossover operation is as follows: POX crossover is used for the node code. It is a crossover method based on mapping relationships. New chromosomes are generated by retaining some mapping relationships on the parent chromosome. To generate new chromosomes by retaining some mapping relationships on the parent chromosome, first randomly divide the workflow set {J1, J2, ..., Jn} into two non-empty subsets Q1 and Q2, select two gene fragments P1 and P2, copy the gene containing Q1 in the parent P1 to the offspring C1, and keep the relative position of the original Q1 gene in the parent, then copy the Q2 gene in the parent P2 to the remaining vacant position in the offspring C1, and keep the relative position of the original Q2 gene in the parent P2. Similarly, for the parent P2, cross the corresponding chromosomes as follows Figure 4 The schematic diagram of the crossover operation is shown in the figure. The MPX crossover method is used for the machine code. MPX crossover will randomly set multiple crossover points in the chromosome, and then exchange the gene fragments at these crossover points to produce offspring individuals. First, the machine code corresponding to the node code is selected as the parent individuals P1 and P2, and then a 01 reference sequence Q with the same length as P1 and P2 is randomly generated. "0" means that the genes here will not be exchanged, and "1" means that the genes here will be exchanged. The 01 code of the reference sequence Q exchanges the gene fragments at the corresponding positions of P1 and P2, and finally obtains the offspring individuals C1 and C2. The specific process is as follows Figure 5 Schematic diagram shown.
[0097] The specific implementation process of the mutation operation is: using the gene exchange method, that is, randomly selecting two genes of the parent node code for exchange, the resulting offspring individuals are as follows Figure 6 As shown in the figure, for machine code mutation, random gene mutation is adopted, that is, several genes of the parent machine code are randomly selected, and each selected gene randomly selects an individual different from the current machine in the optional spare machine set to replace the current gene, and generates offspring individuals. The generated offspring individuals are as follows Figure 7 shown.
[0098] Step S104, determining the selection probability of the neighborhood value through the update results of the neighbor individuals in this population iteration; and determining the neighborhood value of the next population iteration according to the selection probability of each neighborhood value.
[0099] Specifically, a neighborhood value parameter pool is set for the initial population, the selection probability of each neighborhood value in the neighborhood value parameter pool is calculated according to the update results of neighbor individuals in each population iteration, and the neighborhood value of the next population iteration is determined in the neighborhood value parameter pool according to the success probability.
[0100] This application adjusts the neighborhood value and calculates the success probability of the individual update solution of the selected neighborhood value T to obtain the selection probability of the neighborhood value T. That is, the higher the success rate of T, the higher the probability of its selection, indicating that under the neighborhood parameter T, a workflow scheduling solution with shorter execution time and more uniform machine load can be obtained, thereby improving the efficiency and speed of workflow development. Compared with the parameters of the original MOEA / D algorithm, which are more sensitive to the size of the neighborhood value T, the larger the neighborhood value T is set, the new unknown search area can be explored, more diverse solutions can be obtained, and the algorithm diversity can be improved. The smaller the neighborhood value T is set, the more conducive it is to explore the current search interval, which can better retain the information of the optimal solution and improve the convergence of the algorithm.
[0101] In some embodiments, in order to improve the quality and diversity of the initial population, a mixed population initialization strategy can be proposed in combination with the random initialization strategy and the local minimum execution time strategy in the above step S101 to generate an initial population with N individuals. Among them, the random initialization strategy is based on the workflow scheduling task table, the node sequence and the machine sequence are randomly generated, the workflow number in the node sequence is repeated according to the specified number of times and the entire sequence is rearranged, and each node in the machine sequence randomly selects the machine that the current node can select. This strategy can significantly increase the diversity of the population, but due to its random process, it will lead to low fitness and poor quality of the individuals in the population, which may cause the algorithm to converge at a lower speed. The local minimum execution time strategy is based on the workflow scheduling task table, by comparing the execution time of the currently available machines of each node, and selecting the machine with the shortest execution time for the node. This strategy can obtain a population with higher fitness and higher quality, but the diversity of the population is poor, and it is easy to fall into the local optimum after multiple iterations.
[0102] You can Figure 8 The flowchart of generating the initialized population shown in FIG1 first uses the random initialization strategy and the local execution time minimum strategy to generate a certain number of populations respectively, then merges the two populations, refers to their fitness and performs non-dominated sorting (corresponding to the subsequent multi-objective optimization sorting) to obtain the sorted population, removes individuals with the same fitness value, and uses the random initialization strategy to fill the part that is less than N, and finally obtains an initialized population with N scheduling schemes to be executed.
[0103] Through the local execution time minimum strategy, machines with shorter execution time are selected to form half of the population individuals, and the other half of the population individuals are composed of random initialization. The non-dominated solution set of the population individuals is obtained through fast non-dominated sorting. After deduplication, the remaining solutions are completed by the random initialization strategy. Compared with the original population, it has a higher quality population while taking into account randomness, avoiding falling into the local optimum.
[0104] The update results of neighbor individuals in this population iteration are determined in the following ways: for any individual, if the neighbor individual is updated to a variant individual of the individual, the number of successes is increased; if the neighbor individual is not updated, the number of failures is increased; in this population iteration, N individuals all complete individual mutation, and the update result of this population iteration is determined by the number of successes and failures.
[0105] Specifically, the present application designs an adaptive neighborhood value adjustment strategy, which enables each population individual to adaptively select a neighborhood value parameter pool T = {T1, T2, ..., T n}, improve the convergence and diversity of the algorithm. Before the algorithm starts to iterate, set the neighborhood value parameter pool T = {T1, T2, ..., T n}, and initialize the selection probability of each neighborhood value Ti to 1 / n. At the beginning of the iteration, each population individual is assigned a neighborhood value Ti according to random traversal sampling. Set the number of successes successCount and the number of failures failCount for the population iteration process; if the neighbor individual is updated to the individual's variant individual, increase successCount; if the neighbor individual is not updated, increase failCount. Until all N individuals in this population iteration complete individual mutation, get the final number of successes and failures, and calculate the success probability P of the neighborhood value Ti i = numSuccess / (numSuccess+numFail); Normalize the success probability of each neighborhood value Ti to get the selection probability of Ti P = {P1, P2, ..., P n}; Finally, the neighborhood parameters of the neighborhood pool T are assigned to the population through random traversal sampling. The algorithm steps are as follows:
[0106] The input of the adaptive neighborhood value adjustment strategy is the neighborhood value parameter pool T = {T1, T2, ..., T n}, population number N P , threshold threshold, the population is recorded as x; the output is the population x with assigned neighbors.
[0107]
[0108] This application can calculate the success probability of the individual update solution of the selected neighborhood value Ti through the adaptive neighborhood value adjustment strategy to obtain the selection probability of the neighborhood value Ti, that is, the higher the success rate of Ti, the higher the probability of its selection, indicating that this neighborhood value Ti can search for a better solution and is more suitable for the problem being solved this time. The larger the neighborhood value Ti is set, the new unknown search area can be explored, improving the diversity of the algorithm; and the smaller the neighborhood value Ti is set, the better the information of the optimal solution can be retained, which is conducive to exploring the current search interval and improving the convergence of the algorithm.
[0109] In the above step S103, whether to update the neighbor individual to the mutant individual is determined by the multiple fitness of the individual, including: determining the multi-objective aggregation value of the mutant individual based on the multiple fitness of the mutant individual; determining the multi-objective aggregation value of the neighbor individual based on the multiple fitness of the neighboring individuals; determining whether to update the neighbor individual to the mutant individual according to the multi-objective aggregation value of the mutant individual and the multi-objective aggregation value of the neighbor individual.
[0110] Specifically, a function calculation can be performed on multiple fitnesses to obtain a multi-objective aggregation value. The calculation method can be a Chebyshev function. The Chebyshev function value is a fixed formula. The purpose is to normalize the two target values (fitnesses) to a specific value. By comparing the size of this value, it is confirmed which of the two solutions is better, that is, the scheduling plan is better, and it is determined whether to update the neighbor individual to a mutant individual.
[0111] For example, suppose the individual is x. After crossover mutation, the mutant individual x' is obtained. The neighborhood value is T. The neighbor individual xk is obtained through the neighborhood value T. The Chebyshev aggregation value f of x' and the neighbor individual xk of x' is calculated by the Chebyshev function. TCH , if the f of chromosome xk in the neighborhood TCH f greater than x' TCH , then replace xk with x' and update its fitness value.
[0112] If the number of population iterations is greater than the iteration threshold, the execution time of the individuals with non-optimal solutions in the population of this population iteration and / or the load conditions of the machines to be executed are optimized. This improves the quality and diversity of individuals in the population, enhances the global search capability, and prevents the algorithm from falling into local optimality. A variable neighborhood search strategy with five neighborhood search actions is proposed: neighborhood actions based on the critical path, adjusting the node sequence and machine sequence respectively, specifically including two neighborhood search actions NS1 and NS2; neighborhood actions that randomly adjust the node and machine sequences, specifically including three neighborhood search actions NS3, NS4, and NS5. The specific algorithm of the variable neighborhood search strategy is as follows:
[0113]
[0114]
[0115] The length of the critical path determines the scheduling completion time. In order to extract the critical path, the reverse search method is used for searching. Its basic idea is: starting from a certain node that was completed last, continuously searching forward along the time axis. Assume that one of the individuals that does not belong to the non-optimal solution is as follows Fig. 9 As shown, the step indicated by the arrow is the critical path. 13 The completion time is the scheduled completion time.
[0116] The following explains the two neighborhood search actions NS1 and NS2 for optimizing the execution time of individuals with non-optimal solutions in the population of this population iteration:
[0117] Neighborhood search action NS1: If the machine to be executed corresponding to the first task node of the individual that is not the optimal solution has the execution time margin corresponding to the first task node, the machine to be executed will be selected as the machine to be executed of the task node. Specifically, find the first node N1 of the workflow task on the critical path, and determine whether the gap before the start of N1 execution of the matching machine can accommodate the execution time of N1. If it is satisfied, N1 will be moved to the gap (which means that the execution time of the N1 node will be advanced, provided that there is redundant time margin in front to support the execution of the node), otherwise the neighborhood action NS1 will not be performed.
[0118] Neighborhood search action NS2: For any task node of an individual that is not the optimal solution, select the machine to be executed that is in the idle state and has the shortest execution time as the machine to be executed of the task node. Specifically, traverse the critical path, if a critical node N k There are multiple candidate machines {M1,M2,...,M k}, first you need to determine whether each candidate machine is currently idle to ensure that the node task can be executed immediately; at the same time, you need to further determine the execution time of each candidate machine in order to select the machine with the shortest execution time. If the current candidate machine M1 is both idle and has a shorter execution time than the current machine M2, then machine M1 should be selected first and machine M2 should be replaced. For example, if Figure 8 The individual with the non-optimal solution shown, if O 31 Can be executed on M2 or M1, then it can be transferred from M2 to M1 for execution, such as Fig.10 shown.
[0119] The following explains the three neighborhood search actions NS3, NS4 and NS5 for optimizing the load condition of the execution machine for the individuals with non-optimal solutions in the population of this population iteration:
[0120] Neighborhood search action NS3: For any task node of an individual that is not the optimal solution, if the task node executes two workflows on two waiting machines, swap the waiting machines corresponding to the two workflows. Specifically, for the node code, randomly select N1 and N2 from all nodes and swap their positions in the node code. For example, the following scheduling scheme replaces O 31 and O 21 To exchange, such as Fig.11 shown.
[0121] Neighborhood search action NS4: For any task node of an individual that is not the optimal solution, select the machine with the shortest execution time as the machine to be executed for the task node. Specifically, for the machine code, a random selection is made among all nodes. For the selected node N1, if there are multiple candidate machines, the candidate machine with the shorter execution time is given priority for replacement. This is similar to NS2, except that the selected node is random and is not a node on the critical path.
[0122] Neighborhood search action NS5: For the execution path with the longest execution time among the individuals with non-optimal solutions, any task node on the execution path corresponds to multiple machines to be executed. A replacement machine with a seat task node is selected from the multiple machines to be executed. Specifically, for the machine code, the machine M with the longest cumulative execution time max Search on M max Select a node N from the working nodes k , if N k If there are multiple candidate machines, one is randomly selected for replacement. This is to find a machine M with the longest cumulative execution time. max , assuming it is M3, and then select one of the nodes O 13 , change it to another machine M2, as follows Fig.12 shown.
[0123] Applying the variable neighborhood search strategy to the original MOEA / D algorithm can optimize the current optimal solution of each subproblem by using the variable neighborhood search within the framework of the MOEA / D algorithm, thereby improving the quality and diversity of the solution set, enhancing the global search capability of the MOEA / D algorithm, avoiding the algorithm from falling into local optimality, obtaining a solution set with better quality, and making the execution time of the workflow scheduling solution shorter and the machine load more even.
[0124] In multi-objective optimization problems (MOP), the multiple objectives that need to be optimized are generally contradictory. In many cases, it is impossible to obtain a definite solution that can achieve the optimal state of all objectives at the same time. Based on the Pareto dominance relationship, multiple optimization objectives can be sorted and finally the Pareto solution set can be obtained. The Pareto dominance relationship is a method for sorting multiple optimization objectives. When one solution set A dominates another solution set B, it means that solution set A is at least the same as solution set B in all optimization objectives and better than solution set B in at least one optimization objective. By calculating the dominance relationship of all solutions, the Pareto solution set is obtained, which is the PF solution set. Corresponding to this workflow scheduling problem, the set of scheduling solutions that performs best in terms of the two objectives of scheduling completion time and load balancing is the PF solution set.
[0125] Let x1 and x2 be two solutions to the optimization problem if: and Then define x1Pareto dominates x2, denoted as On the contrary, if a solution is not dominated by other solutions in the solution space, it is called a non-dominated solution, and the set of all non-dominated solutions is called a non-dominated solution set NDS (Non-dominated Set). Corresponding to this workflow scheduling problem, if a scheduling scheme x1 dominates another scheduling scheme x2, but cannot dominate another scheduling scheme x3, then we can say that the scheduling scheme x1 is better than the scheduling scheme x2 f1(x2) and f2(x2) in terms of the two indicators of scheduling completion time f1(x1) and load balancing f2(x1), while x1 is worse than x3 in one indicator.
[0126] This scheme uses non-dominated sorting and crowding distance to sort the solution set (individuals in the population). First, determine the dominance relationship between the solution x generated after crossover mutation and variable neighborhood search and the sorted solution set, remove all vectors dominated by x, move in all vectors not dominated by x, generate a new PF solution set, repeat the above process to obtain the final PF solution set, and finally calculate the crowding distance to obtain the solution with the best quality.
[0127] Fast non-dominated sorting is an algorithm that can be implemented using NSGA-II (Non-dominated Sorting Genetic Algorithm-II, NSGA-II) or NSGA-III algorithm. Fast non-dominated sorting can sort the generated solution sets by fitness and stratify the solution sets according to fitness: First, the solution set N P The Pareto solution set X1 obtained in is recorded as level 1, and then the solution set X1 of level 1 is removed from N P Remove from the solution set N, and the remaining solutions are formed into a new solution set N P ′, repeat the above steps to get multiple subsets with clear hierarchical levels. Corresponding to this workflow scheduling problem, let’s take the example of the scheduling solutions x1, x2 and x3 above. x1 dominates another scheduling solution x2, but cannot dominate another scheduling solution x3. Then after non-dominated sorting, x1 and x3 are at the same level. If no other solution dominates x1 and x3, then x1 and x3 belong to the PF solution set; x2 cannot be at the same level as x1 and x3, and the scheduling solutions at the same level as x2 will be dominated by the scheduling solutions in the PF solution set, such as x1 and x2.
[0128] For the solution set at the same level, the crowding distance is used to sort the solutions (the ready-made formula is not the focus), which is defined as follows: CD mrepresents the crowding distance of the mth solution, and there are n optimization objectives in total, f m (x i ) represents the target value of the mth solution on the i-th optimization target. To find the crowding distance of the mth solution, we need to find the target value f of the solution that is adjacent to the optimization target i and has a larger value. m+1 (x i ) and the smaller solution target value f m-1 (x i ), the difference between the two is the crowding distance of the mth solution on target i, and the sum of the values of all targets and normalization is the crowding distance CD of the mth solution m Corresponding to this workflow scheduling problem, let’s take the scheduling solutions x1, x2 and x3 as an example. x1 and x3 are at the same level and also belong to the PF solution set. If the crowding distance of x1 is the smallest at this time, then we can assume that x1 is the optimal solution, that is, the optimal scheduling solution, at the same level.
[0129] Based on the above-mentioned mixed population initialization strategy, variable neighborhood search strategy and adaptive neighborhood adjustment strategy, the improved MOEA / D algorithm proposed in this application, that is, a multi-objective-based workflow scheduling method proposed in an embodiment of this application, the main steps of the algorithm flow are as follows.
[0130]
[0131]
[0132] Explain the above algorithm:
[0133] 1-5: Set uniform weight vectors, for example: weights are 0.1, 0.2, 0.3, 0.4, 0.5... The number of weight vectors is the same as the population size Np. For each weight vector, calculate the Euclidean distance with other weight vectors and sort them, and record the weight vector with the closest Euclidean distance T n The weight vector index.
[0134] 6: Obtain the initialized population through the mixed population initialization strategy.
[0135] 7: Calculate the fitness of each individual in the population and get f(x) = {f(x1), f(x2), ..., f(x Np )}.
[0136] 8: Calculate a global ideal point z based on population fitness * , the ideal point is not an individual in the initialized population, but the combination of solutions in the initialized population with the lowest execution time and machine load fitness respectively.
[0137] 9-29: When the value of i is less than the set number of iterations, the initialized population is updated;
[0138] 11-27: Perform 12-27 operations on each individual of the initialized population. The following takes an individual as an example to illustrate the steps of 11-27;
[0139] 12: Perform crossover and mutation operations on the individual to obtain a new individual x′ corresponding to the individual;
[0140] 13-14: Calculate the fitness of the new individual x′, and determine whether to update the ideal point based on the fitness result;
[0141] 15-23: Regardless of whether the ideal point is updated, two neighbor individuals with a neighborhood value of the distance from the individual are selected according to the neighborhood value, and the aggregation value of the neighbor individuals and the ideal point is calculated. The aggregation value is used to determine whether the neighbor individuals need to be updated. If the update is successful, the number of successes increases by one. If the update is unsuccessful, the number of failures increases by one.
[0142] 24-27: If the current number of iterations is greater than maxItr*V0, and the current individual does not belong to the PF solution set, a variable neighborhood search is performed on the current individual using the variable neighborhood search strategy.
[0143] 28: Sort the individuals in the updated population and use the concept of dominating solutions to stratify the individuals in the population.
[0144] 30: Perform non-dominated sorting and crowding distance to sort the updated population to obtain the final PF solution set, and finally calculate the crowding distance to obtain the solution with the best quality.
[0145] Based on the same technical concept, the embodiment of the present application provides a schematic diagram of the structure of a multi-objective workflow scheduling device, such as Fig.13 As shown, the device 1300 includes:
[0146] A generation module 1301 is used to generate an initial population of N individuals based on the tasks to be scheduled and the machines to be executed for executing the tasks to be scheduled; wherein each individual represents a scheduling scheme, and each scheduling scheme indicates the machines to be executed corresponding to each task node of each task to be scheduled;
[0147] A determination module 1302 is used to determine multiple fitness of each individual under multiple objectives, wherein the multiple objectives include the execution time of the scheduling scheme and the load status of the machine to be executed;
[0148] The optimization module 1303 is used to implement population iteration by mutating individuals to obtain an optimized population, and determine the optimal scheduling solution from the optimized population; wherein each population iteration process is as follows: for any individual, mutate the individual to obtain a mutated individual; determine the neighbor individuals of the individual based on the neighborhood value of this population iteration; determine whether to update the neighbor individuals to the mutated individuals based on multiple fitness values of the individuals;
[0149] The determination module 1302 is further specifically configured to determine the selection probability of the neighborhood value through the update results of the neighbor individuals in this population iteration; and determine the neighborhood value of the next population iteration according to the selection probability of each neighborhood value.
[0150] This application adjusts the neighborhood value and calculates the success probability of the individual update solution of the selected neighborhood value T to obtain the selection probability of the neighborhood value T. That is, the higher the success rate of T, the higher the probability of its selection, indicating that under the neighborhood parameter T, a workflow scheduling solution with shorter execution time and more uniform machine load can be obtained, thereby improving the efficiency and speed of workflow development. Compared with the parameters of the original MOEA / D algorithm, which are more sensitive to the size of the neighborhood value T, the larger the neighborhood value T is set, the new unknown search area can be explored, more diverse solutions can be obtained, and the algorithm diversity can be improved. The smaller the neighborhood value T is set, the more conducive it is to explore the current search interval, which can better retain the information of the optimal solution and improve the convergence of the algorithm.
[0151] Optionally, the determining module 1302 is specifically configured to:
[0152] For any individual, if the neighbor individual is updated to be a variant individual of the individual, the number of successes is increased; if the neighbor individual is not updated, the number of failures is increased;
[0153] In this population iteration, N individuals all complete individual mutation, and the update result of this population iteration is determined by the number of successes and the number of failures.
[0154] Optionally, the optimization module 1303 is specifically used for:
[0155] Determining a multi-objective aggregation value of the mutated individual based on multiple fitnesses of the mutated individual;
[0156] Determining a multi-objective aggregation value of the neighboring individuals based on multiple fitness values of the neighboring individuals;
[0157] It is determined whether to update the neighbor individual to the mutated individual according to the multi-objective aggregation value of the mutated individual and the multi-objective aggregation value of the neighbor individual.
[0158] Optionally, any individual includes a node code and a machine code, the node code represents the order of each task node of each task to be scheduled, and the machine code represents the machine to be executed corresponding to each task node.
[0159] Optionally, the optimization module 1303 is specifically used for:
[0160] If the number of population iterations is greater than the iteration threshold, the execution time of the individuals with non-optimal solutions in the population of this population iteration and / or the load condition of the machine to be executed are optimized.
[0161] Applying the variable neighborhood search strategy to the original MOEA / D algorithm can optimize the current optimal solution of each subproblem by using the variable neighborhood search within the framework of the MOEA / D algorithm, thereby improving the quality and diversity of the solution set, enhancing the global search capability of the MOEA / D algorithm, avoiding the algorithm from falling into local optimality, obtaining a solution set with better quality, and making the execution time of the workflow scheduling solution shorter and the machine load more even.
[0162] Optionally, the optimization module 1303 is specifically used for:
[0163] If the machine to be executed corresponding to the first task node of the individual non-optimal solution has the execution time margin corresponding to the first task node, the machine to be executed will be selected as the machine to be executed of the task node;
[0164] For any task node of the individual non-optimal solution, a to-be-executed machine whose execution state is an idle state and has the shortest execution time is selected as the to-be-executed machine of the task node.
[0165] Optionally, the optimization module 1303 is specifically used for:
[0166] For any task node of the individual non-optimal solution, if the task node executes two workflows respectively on two to-be-executed machines, swap the to-be-executed machines corresponding to the two workflows;
[0167] For any task node of the individual non-optimal solution, select a to-be-executed machine with the shortest execution time as the to-be-executed machine of the task node;
[0168] For the execution path with the longest execution time among the individuals of the non-optimal solutions, any task node on the execution path corresponds to multiple machines to be executed, and a machine to be executed is selected from the multiple machines to be executed as a replacement machine for the task node.
[0169] This application adjusts the neighborhood value and calculates the success probability of the individual update solution of the selected neighborhood value T to obtain the selection probability of the neighborhood value T. That is, the higher the success rate of T, the higher the probability of its selection, indicating that under the neighborhood parameter T, a workflow scheduling solution with shorter execution time and more uniform machine load can be obtained, thereby improving the efficiency and speed of workflow development. Compared with the parameters of the original MOEA / D algorithm, which are more sensitive to the size of the neighborhood value T, the larger the neighborhood value T is set, the new unknown search area can be explored, more diverse solutions can be obtained, and the algorithm diversity can be improved. The smaller the neighborhood value T is set, the more conducive it is to explore the current search interval, which can better retain the information of the optimal solution and improve the convergence of the algorithm.
[0170] Based on the same technical concept, the embodiment of the present application provides a computer device, such as Fig.14 As shown, it includes at least one processor 1401 and a memory 1402 connected to the at least one processor. The specific connection medium between the processor 1401 and the memory 1402 is not limited in the embodiment of the present application. Fig.14 For example, the processor 1401 and the memory 1402 are connected via a bus. The bus can be divided into an address bus, a data bus, a control bus, etc.
[0171] In an embodiment of the present application, the memory 1402 stores instructions that can be executed by at least one processor 1401. The at least one processor 1401 can execute the steps of the above-mentioned multi-objective-based workflow scheduling method by executing the instructions stored in the memory 1402.
[0172] Among them, the processor 1401 is the control center of the computer device, and can use various interfaces and lines to connect various parts of the computer device. By running or executing instructions stored in the memory 1402 and calling data stored in the memory 1402, the neighborhood value is adjusted to obtain a workflow scheduling solution with a shorter execution time and a more uniform machine load, thereby improving the efficiency and speed of workflow development. Optionally, the processor 1401 may include one or more processing units, and the processor 1401 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 1401. In some embodiments, the processor 1401 and the memory 1402 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on independent chips.
[0173] Processor 1401 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit (ASIC), a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware processor for execution, or can be executed by a combination of hardware and software modules in the processor.
[0174] Memory 1402, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs and modules. Memory 1402 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (Random Access Memory, RAM), static random access memory (Static Random Access Memory, SRAM), programmable read-only memory (Programmable Read Only Memory, PROM), read-only memory (Read Only Memory, ROM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), magnetic memory, disk, optical disk, etc. Memory 1402 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer device, but is not limited thereto. The memory 1402 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.
[0175] Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium storing a computer program executable by a computer device. When the program runs on the computer device, the computer device executes the steps of the above-mentioned multi-objective-based workflow scheduling method.
[0176] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0177] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0178] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0179] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0180] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A workflow scheduling method based on multiple objectives, characterized in that: include: Based on the tasks to be scheduled and the machines to be executed for executing the tasks to be scheduled, an initial population of N individuals is generated; wherein each individual represents a scheduling scheme, and each scheduling scheme indicates the machines to be executed corresponding to each task node of each task to be scheduled; Determine multiple fitness of each individual under multiple objectives, wherein the multiple objectives include the execution time of the scheduling scheme and the load condition of the machine to be executed; Population iteration is achieved by mutating individuals to obtain an optimized population, and the optimal scheduling scheme is determined from the optimized population; wherein each population iteration process is as follows: for any individual, the individual is mutated to obtain a mutant individual; based on the neighborhood value of this population iteration, the neighbor individual of the individual is determined; and whether the neighbor individual is updated to the mutant individual is determined based on multiple fitness values of the individual; The selection probability of the neighborhood value is determined through the update results of the neighbor individuals in this population iteration; and the neighborhood value of the next population iteration is determined according to the selection probability of each neighborhood value.
2. The method according to claim 1, characterized in that The update results of neighbor individuals in this population iteration are determined by the following methods, including: For any individual, if the neighbor individual is updated to be a variant individual of the individual, the number of successes is increased; if the neighbor individual is not updated, the number of failures is increased; In this population iteration, N individuals all complete individual mutation, and the update result of this population iteration is determined by the number of successes and the number of failures.
3. The method according to claim 1, characterized in that The determining whether to update the neighbor individual to the variant individual through multiple fitness of the individuals includes: Determining a multi-objective aggregation value of the mutated individual based on multiple fitnesses of the mutated individual; Determining a multi-objective aggregation value of the neighboring individuals based on multiple fitness values of the neighboring individuals; It is determined whether to update the neighbor individual to the mutated individual according to the multi-objective aggregation value of the mutated individual and the multi-objective aggregation value of the neighbor individual.
4. The method according to claim 1, characterized in that Any individual includes a node code and a machine code. The node code represents the order of each task node of each task to be scheduled, and the machine code represents the machine to be executed corresponding to each task node.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: If the number of population iterations is greater than the iteration threshold, the execution time of the individuals with non-optimal solutions in the population of this population iteration and / or the load condition of the machine to be executed are optimized.
6. The method according to claim 5, characterized in that The optimization of the execution time of individuals with non-optimal solutions in the population of this population iteration includes: If the machine to be executed corresponding to the first task node of the individual non-optimal solution has the execution time margin corresponding to the first task node, the machine to be executed will be selected as the machine to be executed of the task node; For any task node of the individual non-optimal solution, a to-be-executed machine whose execution state is an idle state and has the shortest execution time is selected as the to-be-executed machine of the task node.
7. The method according to claim 5, characterized in that The optimization of the load condition of the execution machine for the individuals with non-optimal solutions in the population of this population iteration includes: For any task node of the individual non-optimal solution, if the task node executes two workflows respectively on two to-be-executed machines, swap the to-be-executed machines corresponding to the two workflows; For any task node of the individual non-optimal solution, select a to-be-executed machine with the shortest execution time as the to-be-executed machine of the task node; For the execution path with the longest execution time among the individuals of the non-optimal solutions, any task node on the execution path corresponds to multiple machines to be executed, and a machine to be executed is selected from the multiple machines to be executed as a replacement machine for the task node.
8. A workflow scheduling device based on multiple objectives, characterized in that: include: A generation module, used for generating an initial population of N individuals based on the tasks to be scheduled and the machines to be executed for executing the tasks to be scheduled; wherein each individual represents a scheduling scheme, and each scheduling scheme indicates the machines to be executed corresponding to each task node of each task to be scheduled; A determination module, used to determine multiple fitness of each individual under multiple objectives, wherein the multiple objectives include the execution time of the scheduling scheme and the load condition of the machine to be executed; The optimization module is used to implement population iteration by mutating individuals to obtain an optimized population, and determine the optimal scheduling solution from the optimized population; wherein each population iteration process is as follows: for any individual, mutate the individual to obtain a mutant individual; determine the neighbor individual of the individual based on the neighborhood value of this population iteration; determine whether to update the neighbor individual to the mutant individual based on multiple fitness values of the individual; The determination module is further specifically used to determine the selection probability of the neighborhood value through the update results of the neighbor individuals in this population iteration; and determine the neighborhood value of the next population iteration according to the selection probability of each neighborhood value.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of any one of the methods of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: It stores a computer program executable by a computer device. When the program is run on the computer device, the computer device executes the steps of any method described in claims 1 to 7.
11. A computer program product, characterized in that The computer program product comprises a computer program stored on a computer-readable storage medium, wherein the computer program comprises program instructions, and when the program instructions are executed by a computer device, the computer device is caused to execute the steps of the method according to any one of claims 1 to 7.
Citation Information
Cited By
Chip production logistics optimization method and system based on multi-objective genetic algorithm
CN119378960A
Multi-target irrelevant parallel batch scheduling method considering degradation and maintenance collaborative optimization
CN119740829A
Multi-objective uncorrelated parallel batch scheduling method considering degradation and maintenance collaborative optimization
CN119740829B
