WO2018036282A1 - 一种任务调度方法、装置及计算机存储介质 - Google Patents

一种任务调度方法、装置及计算机存储介质 Download PDF

Info

Publication number
WO2018036282A1
WO2018036282A1 PCT/CN2017/091802 CN2017091802W WO2018036282A1 WO 2018036282 A1 WO2018036282 A1 WO 2018036282A1 CN 2017091802 W CN2017091802 W CN 2017091802W WO 2018036282 A1 WO2018036282 A1 WO 2018036282A1
Authority
WO
WIPO (PCT)
Prior art keywords
particle
task
allocation
processor
optimal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2017/091802
Other languages
English (en)
French (fr)
Inventor
李航
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sanechips Technology Co Ltd
Original Assignee
Sanechips Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sanechips Technology Co Ltd filed Critical Sanechips Technology Co Ltd
Publication of WO2018036282A1 publication Critical patent/WO2018036282A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration

Definitions

  • the present invention relates to a task scheduling technology, and in particular, to a task scheduling method, apparatus, and computer storage medium.
  • the particle swarm optimization algorithm is usually used to obtain the optimal solution as the processor scheduling scheme.
  • the so-called traditional particle swarm optimization algorithm is inspired by the bird group foraging behavior. The basic idea is to pass the group. Collaboration and information sharing among individuals to find the optimal solution.
  • the particle swarm algorithm treats each individual in the particle population as a volumeless particle in the search space and flies from a random initial position in a search space according to a random initial velocity.
  • Each particle represents a candidate solution to the solution space, and the flight speed of the particle is dynamically adjusted according to its flight experience and flight experience of the companion. The most experienced each particle in flight A good position is the individual optimal solution found by the particle itself.
  • the best position that the entire particle group has experienced is the overall optimal solution that the entire particle population currently finds.
  • Each particle continually updates itself through the individual optimal solution and the global optimal solution, resulting in a new generation of particle populations until the specified number of iterations or the specified error criteria are met.
  • the existing particle swarm optimization algorithm has the disadvantages of premature convergence, easy to fall into local optimum, and obvious convergence speed in the late evolutionary process when solving the scheduling problem.
  • the embodiments of the present invention provide a task scheduling method, a device, and a computer storage medium, which can solve the task scheduling problem in an optimized, comprehensive, and effective manner based on a suitable algorithm.
  • an embodiment of the present invention provides a task scheduling method, where the method includes:
  • the task random allocation operation randomly allocates all N tasks to M processors; M, N, and Q are natural numbers And M ⁇ N;
  • the task allocation mode with the shortest required time satisfies the requirement
  • the task allocation mode with the shortest required time is used as the final task allocation mode of the task scheduling.
  • the method further includes:
  • the updated processing is performed.
  • the task assignment mode in the device allocation scheme performs the mutation operation.
  • the randomly assigning all N tasks to the M processors includes:
  • Randomly selecting a random integer between m [1, M] 1, and select a task is assigned to a processor of m tasks from all N random; randomly selecting a random integer between [1, M] number m 2, and select from the remaining N-1 tasks randomly allocated to a task processor m 2; this cycle until all N tasks are assigned to the m processors, to obtain a task allocation the way.
  • the local processor and global search update processor allocation scheme includes:
  • the particle swarm optimization algorithm performs a local search on the current processor allocation scheme, and obtains a local optimal task assignment manner in the current processor allocation scheme, including:
  • the particle group is The task allocation manner corresponding to the optimal particle is used as a local optimal task allocation manner in the current processor allocation scheme;
  • the randomly generating an initial particle swarm including one particle and each particle is a task assignment manner, including:
  • the above allocation process is executed cyclically until I particles of one-to-one correspondence with the type I task assignment are acquired.
  • an embodiment of the present invention provides a task scheduling apparatus, where the apparatus includes: an initialization module, and a processing module;
  • the initialization module is configured to repeatedly perform a task random allocation operation to obtain an initial processor allocation scheme including Q task allocation modes; the task random allocation operation randomly allocates all N tasks to M processors; M, N, and Q are natural numbers and M ⁇ N;
  • the processing module is configured to repeatedly perform the following operations until a final task assignment manner is found:
  • the task allocation mode with the shortest required time satisfies the requirement
  • the task allocation mode with the shortest required time is used as the final task allocation mode of the task scheduling.
  • the processing module is further configured to perform a mutation operation on the task allocation manner in the updated processor allocation scheme when the task allocation mode with the shortest required time does not meet the requirement.
  • the initialization module randomly assigns all N tasks to the M processors:
  • Randomly selecting a random integer between m [1, M] 1, and select a task is assigned to a processor of m tasks from all N random; randomly selecting a random integer between [1, M] number m 2, and select from the remaining N-1 tasks randomly allocated to a task processor m 2; this cycle until all N tasks are assigned to the m processors, to obtain a task allocation the way.
  • the processing module updates the processor allocation scheme based on the local search and the global search as:
  • the processing module performs a local search on the current processor allocation scheme by using a particle swarm optimization algorithm, and obtains a local optimal task allocation manner in the current processor allocation scheme:
  • Randomly generating an initial particle swarm containing one particle and each particle is a task assignment manner, and using the global optimal task allocation manner in the current processor allocation scheme as the initial maximum of the initial particle swarm Excellent particles are added to the initial particle group;
  • the particle group is The task allocation manner corresponding to the optimal particle is used as a local optimal task allocation manner in the current processor allocation scheme;
  • the processing module randomly generates an initial particle swarm containing one particle and each particle is a task assignment manner:
  • the above allocation process is executed cyclically until I particles of one-to-one correspondence with the type I task assignment are acquired.
  • the embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the task scheduling method according to the embodiment of the present invention.
  • the task scheduling method and device and the computer storage medium provided by the embodiments of the present invention repeatedly perform a task random allocation operation to obtain an initial processor allocation scheme including Q task allocation modes; the task random allocation operation is to all N tasks Randomly assigned to M processors; M, N, Q are natural numbers and M ⁇ N; repeatedly perform the following operations until the final task allocation mode is found: update the processor allocation scheme based on local search and global search, and calculate the updated In the processor allocation scheme, all N tasks in each task allocation mode complete the required time in M processors; when the task allocation mode with the shortest required time meets the requirements, the task with the shortest required time is allocated.
  • the way is the final task assignment method for task scheduling. It can be seen that the embodiment of the present invention combines the global optimal solution in the global space search with the local optimal solution in the local space search, and the two coordinate and promote each other to obtain an optimal task allocation mode.
  • the genetic algorithm is used to solve the global optimal task assignment of task scheduling
  • the particle swarm optimization algorithm is used to solve the local optimal task assignment of task scheduling
  • the local optimal task assignment is used as the basis for the evolution of the global optimal task assignment.
  • FIG. 1 is a schematic flowchart of an implementation process of a task scheduling method according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of a specific implementation process of a task scheduling method according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of a specific implementation process for optimizing a chromosome population by using a particle swarm optimization algorithm according to an embodiment of the present invention
  • FIG. 4 is a schematic structural diagram of a task scheduling apparatus according to an embodiment of the present invention.
  • Genetic algorithm is a computational model that simulates the natural evolution of Darwin's biological evolution theory and the biological evolution process of genetic mechanism. It is a method to search for optimal solutions by simulating natural evolutionary processes.
  • the processing of this method is as follows: First, to create a random initial state, that is, a group of initial solutions, compare these solutions to chromosomes or genes, which can be called the first generation; then, according to the actual solution of the problem The degree assigns a reasonable fitness value to each chromosome; then, various evolutionary operations such as selection, crossover, and mutation are performed on the chromosome. In the various evolutionary operations above, the algorithm can achieve satisfactory results by selecting appropriate control parameters.
  • Existing research has proven that genetic algorithms are self-learning and adaptive, and can reduce the risk of falling into local optimum.
  • the embodiment of the invention utilizes the advantages of the genetic algorithm, and the genetic algorithm is used to complete the processor load distribution and task scheduling.
  • FIG. 1 is a schematic flowchart of an implementation of a task scheduling method according to an embodiment of the present invention, where the method includes:
  • Step 101 repeatedly performing a task random allocation operation, and obtaining an initial processor allocation scheme including Q task allocation modes; the task random allocation operation is to randomly allocate all N tasks to M processors;
  • the Q task random allocation operation is repeatedly performed to obtain an initial processor allocation scheme including Q task allocation modes, that is, each time a task random allocation operation is performed, all N tasks are assigned to M processes.
  • the task allocation mode in the device; the task random allocation operation is to randomly allocate all N tasks to M processors.
  • the randomly assigning all N tasks to the M processors includes: randomly selecting an integer random number m 1 between [1, M], and randomly selecting one task from all N tasks to assign to m 1 -th processor; randomly selecting a random integer between m 2 [1, m], and a processor selects two tasks assigned to the m N-1 from the remaining tasks randomly; this cycle Until all N tasks are assigned to M processors to obtain a task assignment manner in which all N tasks are allocated to M processors.
  • the M, N, and Q are natural numbers and M ⁇ N; the tasks are independent, and the load of each task may be the same or different, and the processors are also independent, and the load is small. Affecting the completion time of the processor to the task; in practical applications, to improve the generalization to ensure the difference between the task allocation modes, Q can be set to be greater than or equal to M; due to random factors and the size of Q,
  • the same task allocation mode may exist in the Q task allocation manners included in the initial processor allocation scheme. Therefore, the same task allocation manner may be deleted from the initial processor allocation scheme to improve the initial processing.
  • the diversity of task assignments in the allocation scheme are natural numbers and M ⁇ N; the tasks are independent, and the load of each task may be the same or different, and the processors are also independent, and the load is small. Affecting the completion time of the processor to the task; in practical applications, to improve the generalization to ensure the difference between the task allocation modes, Q can be set to be greater than or equal to M; due to random factors and the size of
  • Step 102 Repeat the following operations until the final task allocation mode is found: based on the local search and the global search update processor allocation scheme, calculate all the N tasks in each task allocation mode in the updated processor allocation scheme in M The required time is completed in the processor; when the task allocation mode with the shortest required time satisfies the requirement, the task allocation mode with the shortest required time is used as the final task allocation mode of the task scheduling.
  • the shortest task allocation manner that satisfies the requirement means that all the N tasks in the task allocation mode with the shortest required time are completed in M processors and all N tasks are in M.
  • the difference between the ideal time required to complete in the processor is less than or equal to the preset time threshold; the ideal time required for all N tasks to be completed in M processors is completed for all N tasks in any one of the processors
  • the required time T is divided by M, ie the ideal time can be expressed as T/M.
  • the processor allocation scheme based on local search and global search update includes:
  • the current processor allocation scheme may be the initial processor allocation scheme generated in step 101, or may be a processor allocation scheme formed after one or more updates to the initial processor allocation scheme generated in step 101.
  • the current processor allocation scheme includes Q task assignment manners.
  • performing cross operation on the task assignment manner in the current processor allocation scheme may be in all Q task assignment manners.
  • Two or more task assignment methods perform cross operations according to the genetic algorithm, and the number of cross operations may be one or more times; when the two task assignment modes perform more than one cross operation, all the generated after the crossover will be generated.
  • the two task assignment modes with the shortest time required in the new task assignment mode are used as the task assignment mode generated after the two task assignment modes are updated; when each of the Q task assignment modes is executed once After the above crossover operation, a new task allocation method with a quantity greater than Q will be generated. Calculate the time required for all N tasks to complete in M processors in each new task allocation mode, and use the new Q task assignment mode with the shortest time required as the updated processor allocation scheme to ensure The updated processor allocation scheme includes Q task assignment methods.
  • different tasks are assigned by performing cross operations on any two task assignment modes. Part of the tasks in the mode are interchanged, that is, the tasks assigned to different processors are exchanged to generate a new task allocation manner, thereby completing the update processing of the processor allocation scheme, and avoiding premature convergence.
  • the particle swarm algorithm performs a local search on the current processor allocation scheme, and obtains a local optimal task assignment manner in the current processor allocation scheme, including:
  • Randomly generating an initial particle swarm containing one particle and each particle is a task assignment manner, and using the global optimal task allocation manner in the current processor allocation scheme as the initial maximum of the initial particle swarm Excellent particles are added to the initial particle group;
  • the particle group is The task allocation manner corresponding to the optimal particle is used as a local optimal task allocation manner in the current processor allocation scheme;
  • a task allocation manner is added to the initial particle swarm, and the global optimal task allocation manner in the current processor allocation scheme is used as an initial optimal particle of the initial particle swarm; for example, the current The first five required task allocation methods in the processor allocation scheme are added to the initial particle swarm.
  • X gbest (0) represents the position of the optimal particle in the initial particle group, that is, the task allocation mode corresponding to the optimal particle in the initial particle group
  • X ibest (0) represents the The initial optimal position of the particle i in the initial particle group, that is, the task allocation mode corresponding to the particle i in the initial particle group
  • V i (0) represents the initial velocity of the particle i in the initial particle group, which is (T i ( 0)*M*v)/T 1 (0); wherein T i (0) represents that all N tasks in the task allocation mode corresponding to the particle i in the initial particle group are completed in M processors Time, T 1 (0) represents the time required for all N tasks in the task allocation mode corresponding to the optimal particle in the initial particle group to complete in M processors, and v represents the speed parameter.
  • the number of tasks assigned to each processor in the task allocation manner corresponding to the particles changes, and the particles in the current particle group are Approaching the optimal particles in the current particle swarm, that is, the task assignment manner corresponding to the particles is approaching to the task allocation manner corresponding to the optimal particles, so that the task load trend of each processor in the task allocation manner corresponding to the particles Equal.
  • the particle i in the particle group generated after the k+1th iteration is smaller than the fitness value of the particle i in the particle group generated after the kth iteration, the particle i is maintained at the k+th
  • the optimal position X ibest (k+1) after one iteration is the optimal position of the particle i after the kth iteration X ibest (k); the optimal particle swarm generated after the k+ 1th iteration
  • the optimal particle in the particle group generated after the k+1th iteration remains the kth iteration.
  • the optimal particle in the generated particle group and the position of the optimal particle X gbest (k+1) in the particle group generated after the k+ 1th iteration remain as the particle group generated after the kth iteration.
  • the similarity value between two or more of the I+1 particles can be calculated, for example, when it is calculated that the similarity value between the two particles is greater than the set second threshold, it can be considered as
  • the same task is assigned to the same processor in the task assignment mode corresponding to the two particles; if the similarity value between the two particles is greater than the set second threshold, the two particles can be separately executed.
  • the mutation operation is to exchange the tasks assigned to different processors in the task allocation manner corresponding to the particles, thereby avoiding falling into the local optimal solution.
  • the mutation operation can be performed only for two or more of all the I+1 particles, and it is not necessary to perform the mutation operation for all of the I+1 particles. For example, when there are three particles and each of the two particles has a similarity value to each other greater than the set second threshold, the mutation operation can be performed only on any two of the three particles.
  • the randomly generating an initial particle group containing one particle and each particle is a task allocation manner, including:
  • the above allocation process is executed cyclically until I particles of one-to-one correspondence with the type I task assignment are acquired.
  • m is greater than M
  • that m tasks have been randomly assigned to M processors, and after each processor is assigned a task, the task is re-assigned from the first processor, that is, from the remaining NM.
  • One task is randomly selected to be assigned to the first processor, one task is randomly selected from the remaining NM-1 tasks, and the second processor is assigned, and so on.
  • the method further includes: performing a mutation operation on the task allocation manner in the updated processor allocation scheme when the task allocation manner with the shortest required time does not meet the requirement.
  • step 102 when the task allocation mode with the shortest required time acquired in step 102 does not meet the requirement, that is, all N tasks in the task allocation mode with the shortest required time are required to be completed in M processors. Performing a mutation operation on the task allocation manner in the updated processor allocation scheme, and then continuing execution, when the difference between the ideal time required for all N tasks to complete in the M processors is greater than the preset time threshold. Step 102.
  • the number of times the mutation operation is performed on the task allocation manner in the updated processor allocation scheme may be one or more task assignment manners in all Q task assignment manners, and the mutation operation is performed according to a genetic algorithm.
  • the number of mutation operations may be one or more times; when one task assignment method performs more than one mutation operation, the task assignment method with the shortest time required in all new task assignment methods generated after the mutation is taken as The task assignment mode is updated after the task assignment mode; when each of the Q task assignment modes performs one or more mutation operations, a new task assignment mode with a quantity greater than Q is generated, and the calculation is performed.
  • all N tasks complete the required time in M processors, and the Q new task assignment method with the shortest time required is used as the updated one.
  • the allocation mode is to ensure that the processor allocation scheme obtained after the update includes Q task allocation modes.
  • the mutation operation is performed on any task allocation method, and the position and velocity of the particle are changed, so that the particle group as a whole jumps out of the local optimum. Continue to find excellence.
  • FIG. 2 is a schematic flowchart of a specific implementation process of the task scheduling method, where the method includes:
  • Step 201 randomly generate an initial chromosome population
  • the Q task random allocation operation is repeatedly performed to obtain an initial chromosome population including Q chromosomes; wherein the task random allocation operation randomly allocates all N tasks to M processors.
  • the randomly assigning all N tasks to the M processors includes: randomly selecting an integer random number m 1 between [1, M], and randomly selecting one task from all N tasks to assign to m 1 -th processor; randomly selecting a random integer between m 2 [1, m], and a processor selects two tasks assigned to the m N-1 from the remaining tasks randomly; this cycle Until all N tasks are assigned to M processors, a task assignment mode in which all N tasks are assigned to M processors is obtained.
  • each chromosome represents a task assignment mode
  • the M, N, and Q are natural numbers and M ⁇ N
  • the tasks are independent, and each task may have the same or different load
  • the processor The size of the load is also independent. The size of the load affects the completion time of the processor.
  • Q can be set to be greater than or equal to M; Under the influence of random factors and the size of Q, the same chromosome may exist in the initial chromosome population, that is, the same task assignment mode may exist, and therefore, the same chromosome may be deleted from the initial chromosome population to improve the The diversity of chromosomes in the initial chromosome population.
  • Step 202 Using a particle swarm optimization algorithm to optimize a chromosome population, and obtaining an optimal solution of the particle group;
  • the particle cluster algorithm is used to perform a local optimization search on the current chromosome population, and the optimal solution of the particle group is obtained, that is, the local optimal task allocation mode of the current chromosome population.
  • the current chromosome population may be the initial chromosome population generated in step 201, or may be the chromosome population generated after one or more updates of the initial chromosome population generated in step 201, but the current chromosome population There are Q chromosomes in the middle.
  • FIG. 3 is a schematic diagram of a specific implementation process for optimizing a chromosome population by using a particle swarm optimization algorithm, where the optimization process includes:
  • Step 20201 randomly generate an initial particle group
  • an initial particle group including 1 particle and each particle is a task assignment manner is randomly generated, and an optimal chromosome in the current chromosome population is used as an initial of the initial particle group.
  • Optimal particles are added to the initial population of particles to form an initial population of particles comprising I+1 particles.
  • the optimal chromosome in the current chromosome population is the chromosome corresponding to the shortest task assignment mode required for all N tasks to be completed in M processors; except for the most current of the current chromosome populations Adding a superior chromosome to the initial particle population, a plurality of chromosomes having less time required in the current chromosome population may be added to the initial particle population, and in the current chromosome population.
  • An optimal chromosome as the initial optimal particle of the initial particle group for example, a chromosome corresponding to the first five required task assignment modes in the current chromosome population may be added to the initial particle group .
  • the randomly generating an initial particle group containing one particle and each particle is a task allocation manner, including:
  • the above allocation process is executed cyclically until I particles of one-to-one correspondence with the type I task assignment are acquired.
  • m is greater than M
  • that m tasks have been randomly assigned to M processors, and after each processor is assigned a task, the task is re-assigned from the first processor, that is, from the remaining NM.
  • One task is randomly selected to be assigned to the first processor, one task is randomly selected from the remaining NM-1 tasks, and the second processor is assigned, and so on.
  • Step 20202 Update the velocity and position of the particles in the particle group
  • X gbest (k) represents The position of the optimal particle in the current particle swarm before the k+ 1th iteration
  • X ibest (k) represents the optimal position of the particle i in the current particle swarm before the k+ 1th iteration
  • K is the set maximum number of iterations
  • the optimal particle is the particle with the smallest fitness value in the particle group
  • the fitness value is the particle in the corresponding task allocation mode, all N tasks are in the M The time required to complete the processor
  • the position X i (k+1) of the particle i in the current particle swarm at the k+1th iteration is updated.
  • X gbest (0) represents the position of the optimal particle in the initial particle group, that is, the task allocation mode corresponding to the optimal particle in the initial particle group
  • X ibest (0) represents the The initial optimal position of the particle i in the initial particle group, that is, the task allocation mode corresponding to the particle i in the initial particle group
  • V i (0) represents the initial velocity of the particle i in the initial particle group, which is (T i ( 0)*M*v)/T 1 (0);
  • T i (0) represents that all N tasks in the task allocation mode corresponding to the particle i in the initial particle group are completed in M processors
  • T 1 (0) represents the time required for all N tasks in the task allocation mode corresponding to the optimal particle in the initial particle group to complete in M processors
  • v represents the speed parameter.
  • the number of tasks assigned to each processor in the task allocation manner corresponding to the particles changes, and the particles in the current particle group are Approaching the optimal particles in the current particle swarm, that is, the task assignment manner corresponding to the particles is approaching to the task allocation manner corresponding to the optimal particles, so that the task load trend of each processor in the task allocation manner corresponding to the particles Equal.
  • Step 20203 Update an optimal position of the particles in the particle group and an optimal particle
  • the optimal position of each particle in the current particle group is updated according to the speed and position obtained after each particle update in the current particle group in step 20202, and the current particle is updated.
  • the optimal particle in the group and the position of the optimal particle in the current particle group are updated according to the speed and position obtained after each particle update in the current particle group in step 20202, and the current particle is updated.
  • the optimal particle is a particle having a minimum fitness value in the particle group; the fitness value is a time required for the particles to complete all N tasks in the M processors in the corresponding task allocation manner;
  • the particle i is kept at the k+1th time
  • the optimal position X ibest (k+1) after iteration is the optimal position of the particle i after the kth iteration X ibest (k); the optimal particle of the particle group generated after the k+ 1th iteration
  • the optimal particle in the particle group generated after the k+1th iteration remains as the kth iteration.
  • the optimal particle in the generated particle group and the position of the optimal particle in the particle group generated after the k+ 1th iteration X gbest (k+1) remain the optimal among the particle groups generated after the kth iteration The position of the particle X gbest (k).
  • Step 20204 Determine whether the number of iterations of the particle group is less than the maximum number of iterations. If it is less than, Then proceed to step 20205, otherwise go to step 20208;
  • step 20202 it is determined whether the value of the number of iterations k+1 of the current particle group in the step 20202 is less than the set maximum number of iterations K. If the value is less than, the process proceeds to step 20205; otherwise, the pair of chromosomes is determined. The process of performing local optimization ends and step 20208 is performed.
  • Step 20205 determining whether the fitness value of the optimal solution of the particle group is less than the set first threshold, if yes, executing step 20208, otherwise proceeding to step 20206;
  • step 20203 it is determined whether the fitness value of the optimal particle in the current particle group obtained in step 20203 is less than a set first threshold, and if less, determining that the process of locally optimizing the chromosome population ends Step 20208 is performed, otherwise step 20206 is continued.
  • Step 20206 Determine whether the similarity value of the particles in the particle group is less than the set second threshold, if it is less, return to step 20202, otherwise continue to step 20207;
  • step 20202 calculating a similarity value between each two particles in the particle group, when the similarity value is greater than or equal to the set second threshold, proceeding to step 20207; when the similarity value is less than the setting When the second threshold is reached, step 20202 is returned.
  • the similarity value between two or more of all the I+1 particles can be calculated; for example, when it is calculated that the similarity value between the two particles is greater than the set second threshold, it can be considered as The same task is assigned to the same processor in the task assignment mode corresponding to the two particles.
  • Step 20207 Perform a mutation operation on the particles in the particle group, and return to step 20202;
  • step 20206 when it is determined in step 20206 that the similarity value between the particles is greater than or equal to the set second threshold, respectively, the mutation operation is performed on the particles, so that the task assignment manner corresponding to the particles is allocated. Tasks for different processors are exchanged with each other to avoid falling into local optimal solutions.
  • the mutation operation can be performed only for two or more of all the I+1 particles, and it is not necessary to perform the mutation operation for all of the I+1 particles. For example, when there are three particles and every two particles When the similarity values between each other are greater than the set second threshold, the mutation operation can be performed only on any two of the three particles.
  • Step 20208 Output an optimal solution of the particle swarm.
  • the task allocation manner corresponding to the optimal particle in the current particle group in step 20204 or step 20205 is output as a local optimal task allocation manner obtained by performing local optimization on the chromosome population. .
  • Step 203 determining whether the fitness value of the optimal solution of the particle group is smaller than the fitness value of the optimal chromosome in the chromosomal group, and if so, proceeding to step 204, otherwise performing step 205;
  • the optimal solution of the particle group is the task allocation mode corresponding to the optimal particle in the current particle group in step 20208;
  • the fitness value of the optimal solution of the particle group is the optimal particle
  • the optimal chromosome is the shortest time required for all N tasks in the current chromosome population to be completed in M processors
  • the fitness value of the optimal chromosome in the chromosomal group is the time required for all N tasks to complete in the M processors in the task allocation mode corresponding to the optimal chromosome.
  • Step 204 Replace the optimal solution with the optimal chromosome in the chromosome group;
  • the optimal chromosome is replaced by a task allocation method obtained by the particle swarm algorithm and having a smaller fitness value than the optimal chromosome in the chromosome population, to complete the localization of the chromosome population.
  • the optimization update process continues and step 205 is continued.
  • Step 205 Perform a cross operation on the chromosomes in the chromosome population
  • the performing the crossover operation on the chromosomes in the chromosome population may be performing a cross operation according to a genetic algorithm on two or more chromosomes of all Q chromosomes in the chromosome population, and the number of cross operations may be one or more times.
  • the two chromosomes perform more than one crossover operation, the two chromosomes with the shortest time required for all chromosomes generated after the crossover are used as cross-updated chromosomes of the two chromosomes; when each of the Q chromosomes Two After performing more than one crossover operation on the chromosomes, a new number of chromosomes larger than Q will be generated.
  • the shortest Q chromosomes are used as the updated chromosome population to ensure that the chromosome population obtained after the update contains Q chromosomes.
  • Step 206 Determine whether the optimal chromosome in the updated chromosome population meets the requirements, if yes, go to step 208, otherwise go to step 207;
  • step 205 calculating the fitness value of each chromosome in the updated chromosomal population obtained in step 205, obtaining the optimal chromosome in the updated chromosomal population, that is, the chromosome having the smallest fitness value, and determining the location
  • the difference between the fitness value of the optimal chromosome and the ideal time required for all N tasks to be completed in the M processors is less than the preset time threshold. If not, step 208 is performed, otherwise step 207 is performed.
  • the ideal time required for all N tasks to be completed in M processors is the time T required for all N tasks to be completed in any one processor divided by M, that is, the ideal time can be expressed as T /M;
  • the size of the preset time threshold can be set and adjusted according to actual conditions.
  • the number of loop operations of step 202 to step 205 may also be counted.
  • the optimization operation may be stopped and the optimal chromosome in the chromosome group is taken as The final task assignment mode output of the task schedule.
  • Step 207 Perform a mutation operation on the chromosomes in the updated chromosome population, and return to step 202.
  • the difference between the fitness value of the optimal chromosome in step 206 and the ideal time required for all N tasks to be completed in the M processors is greater than or equal to the preset time threshold. Then, a mutation operation is performed on the chromosomes in the updated chromosome population in step 206, and then the process returns to step 202.
  • the number of times the mutation operation is performed on the chromosome in the updated chromosome population may be a mutation operation performed on one or more chromosomes of all Q chromosomes according to a genetic algorithm, and the number of mutation operations It may be one or more times; when one chromosome performs more than one mutation operation, the chromosome with the shortest time in all new chromosomes generated after mutation is used as the chromosome generated after the chromosome is updated; when Q chromosome After each chromosome in each of the chromosomes performs more than one mutation operation, a new chromosome with a number greater than Q will be generated.
  • the Q chromosome with the shortest time is used as the updated chromosome population to ensure that the chromosome population obtained after the update contains Q chromosomes.
  • the optimal chromosome that is, the shortest task allocation method does not meet the requirement, that is, the chromosome population as a whole falls into the local optimum
  • the mutation operation is performed on any chromosome, so that the chromosome population jumps out of the local optimum and continues to search for a better task. Allocation.
  • Step 208 The optimal chromosome in the updated chromosome population is used as a final task allocation mode of task scheduling.
  • the task assignment manner corresponding to the optimal chromosome in the updated chromosome population that meets the requirements in step 206 is used as the final task assignment manner of the task scheduling to complete the task scheduling process.
  • FIG. 4 is a schematic structural diagram of a task scheduling apparatus according to an embodiment of the present invention, where the apparatus includes: an initialization module 11 and a processing module 12;
  • the initialization module 11 is configured to repeatedly perform a task random allocation operation to obtain an initial processor allocation scheme including Q task allocation modes; the task random allocation operation randomly allocates all N tasks to M processors. ;
  • the processing module 12 is configured to repeatedly perform the following operations until a final task assignment mode is found:
  • the task allocation mode with the shortest required time satisfies the requirement
  • the task allocation mode with the shortest required time is used as the final task allocation mode of the task scheduling.
  • the initialization module 11 is specifically configured to: repeatedly perform Q task random allocation operations, and obtain an initial processor allocation scheme including Q task allocation modes, that is, each time a task random allocation operation is performed, one type is obtained. N tasks are assigned to a task allocation mode among M processors; the task random allocation operation is to randomly allocate all N tasks to M processors.
  • the initialization module 11 randomly allocates all N tasks to the M processors, including: randomly selecting an integer random number m 1 between [1, M], and randomly selecting one from all N tasks. tasks are assigned to the m 1 -th processor; randomly selected [1, m] a random integer between 2 m, and select from the remaining N-1 tasks randomly allocated to a task processor 2 m; This loops until all N tasks are assigned to M processors to obtain a task assignment manner in which all N tasks are allocated to M processors.
  • the M, N, and Q are natural numbers and M ⁇ N; the tasks are independent, and the load of each task may be the same or different, and the processors are also independent, and the load is small. Affecting the completion time of the processor to the task; in practical applications, to improve the generalization to ensure the difference between the task allocation modes, Q can be set to be greater than or equal to M; due to random factors and the size of Q,
  • the same task allocation mode may exist in the Q task allocation manners included in the initial processor allocation scheme. Therefore, the same task allocation manner may be deleted from the initial processor allocation scheme to improve the initial processing.
  • Task allocation in the allocation scheme The diversity of the way.
  • the shortest task allocation manner that satisfies the requirement means that all the N tasks in the task allocation mode with the shortest required time are completed in M processors and all N tasks are in M.
  • the difference between the ideal time required to complete in the processor is less than or equal to the preset time threshold; the ideal time required for all N tasks to be completed in M processors is completed for all N tasks in any one of the processors
  • the required time T is divided by M, ie the ideal time can be expressed as T/M.
  • the processing module 12 updates the processor allocation scheme based on the local search and the global search, which is:
  • the current processor allocation scheme may be an initial processor allocation scheme generated by the initialization module 11, or may be formed by updating the initial processor allocation scheme generated by the initialization module 11 one or more times. a processor allocation scheme, but the current processor allocation scheme includes a Q task allocation manner; in addition, performing a cross operation on the task allocation manner in the current processor allocation scheme may be for all Q tasks.
  • Two or more task assignment methods in the distribution mode perform cross operations according to the genetic algorithm, and cross operations
  • the number of times can be one or more times; when the two task assignment modes perform more than one cross operation, the two task assignment modes with the shortest time required in all new task assignment modes generated after the crossover are taken as the two A task assignment mode generated after the task assignment mode is updated; when each of the two task assignment modes in the Q task assignment mode performs more than one crossover operation, a new task assignment mode with a quantity greater than Q is generated.
  • the Q new task assignment method with the shortest required time is used as the updated processor allocation scheme.
  • the processor allocation scheme obtained after the update is guaranteed to include Q task assignment methods.
  • the processing module 12 performs a local search on the current processor allocation scheme by using a particle swarm optimization algorithm to obtain a local optimal task allocation manner in the current processor allocation scheme, which is:
  • Randomly generating an initial particle swarm containing one particle and each particle is a task assignment manner, and using the global optimal task allocation manner in the current processor allocation scheme as the initial maximum of the initial particle swarm Excellent particles are added to the initial particle group;
  • the particle group is The task allocation manner corresponding to the optimal particle is used as a local optimal task allocation manner in the current processor allocation scheme;
  • a task allocation manner is added to the initial particle swarm, and the global optimal task allocation manner in the current processor allocation scheme is used as an initial optimal particle of the initial particle swarm; for example, the current The first five required task allocation methods in the processor allocation scheme are added to the initial particle swarm.
  • X gbest (0) represents the position of the optimal particle in the initial particle group, that is, the task allocation mode corresponding to the optimal particle in the initial particle group
  • X ibest (0) represents the The initial optimal position of the particle i in the initial particle group, that is, the task allocation mode corresponding to the particle i in the initial particle group
  • V i (0) represents the initial velocity of the particle i in the initial particle group, which is (T i ( 0)*M*v)/T 1 (0); wherein T i (0) represents that all N tasks in the task allocation mode corresponding to the particle i in the initial particle group are completed in M processors Time, T 1 (0) represents the time required for all N tasks in the task allocation mode corresponding to the optimal particle in the initial particle group to complete in M processors, and v represents the speed parameter.
  • the number of tasks assigned to each processor in the task allocation manner corresponding to the particles changes, and the particles in the current particle group are Approaching the optimal particles in the current particle swarm, that is, the task assignment manner corresponding to the particles is approaching to the task allocation manner corresponding to the optimal particles, so that the task load trend of each processor in the task allocation manner corresponding to the particles Equal.
  • the particle i in the particle group generated after the k+1th iteration is smaller than the fitness value of the particle i in the particle group generated after the kth iteration, the particle i is maintained at the k+th
  • the optimal position X ibest (k+1) after one iteration is the optimal position of the particle i after the kth iteration X ibest (k); the optimal particle swarm generated after the k+ 1th iteration
  • the optimal particle in the particle group generated after the k+1th iteration remains the kth iteration.
  • the optimal particle in the generated particle group and the position of the optimal particle X gbest (k+1) in the particle group generated after the k+ 1th iteration remain as the particle group generated after the kth iteration.
  • the similarity value between two or more of the I+1 particles can be calculated, for example, when it is calculated that the similarity value between the two particles is greater than the set second threshold, it can be considered as
  • the same task is assigned to the same processor in the task assignment mode corresponding to the two particles; if the similarity value between the two particles is greater than the set second threshold, the two particles can be separately executed.
  • the mutation operation is to exchange the tasks assigned to different processors in the task allocation manner corresponding to the particles, thereby avoiding falling into the local optimal solution.
  • mutation operations can be performed on only two or more of all I+1 particles. It is not necessary to perform mutation operations on all I+1 particles. For example, when there are three particles and each of the two particles has a similarity value to each other greater than the set second threshold, the mutation operation can be performed only on any two of the three particles.
  • the processing module 12 randomly generates an initial particle group including 1 particle and each particle is a task allocation manner, including:
  • the above allocation process is executed cyclically until I particles of one-to-one correspondence with the type I task assignment are acquired.
  • m is greater than M
  • that m tasks have been randomly assigned to M processors, and after each processor is assigned a task, the task is re-assigned from the first processor, that is, from the remaining NM.
  • One task is randomly selected to be assigned to the first processor, one task is randomly selected from the remaining NM-1 tasks, and the second processor is assigned, and so on.
  • the processing module 12 is further configured to perform a mutation operation on the task allocation manner in the updated processor allocation scheme when the task allocation mode with the shortest required time does not meet the requirement.
  • the task assigner in the updated processor allocation scheme for the difference between the ideal time required for all N tasks to complete in the M processors is greater than the preset time threshold Perform the mutation operation and then continue to use the particle swarm algorithm for local optimization.
  • the number of times the mutation operation is performed on the task allocation manner in the updated processor allocation scheme may be one or more task assignment manners in all Q task assignment manners, and the mutation operation is performed according to a genetic algorithm.
  • the number of mutation operations may be one or more times; when one task assignment method performs more than one mutation operation, the task assignment method with the shortest time required in all new task assignment methods generated after the mutation is taken as The task assignment mode is updated after the task assignment mode; when each of the Q task assignment modes performs one or more mutation operations, a new task assignment mode with a quantity greater than Q is generated, and the calculation is performed.
  • all N tasks complete the required time in M processors, and the Q new task assignment mode with the shortest required time is used as the updated task assignment mode to ensure the update is obtained.
  • the Q processor allocation scheme includes Q task assignment methods.
  • the mutation operation is performed on any task allocation method, and the position and velocity of the particle are changed, so that the particle group as a whole jumps out of the local optimum. Continue to find excellence.
  • the initialization module 11 and the processing module 12 may each be a central processing unit (CPU), a microprocessor (MPU, a Microprocessor Unit), and a digital signal processor (DSP, Digital Signal) located in the terminal. Processor), or Field-Programmable Gate Array (FPGA) implementation.
  • CPU central processing unit
  • MPU microprocessor
  • DSP digital signal processor
  • FPGA Field-Programmable Gate Array
  • the embodiment further provides a storage medium storing a computer program, and after the computer program is executed by the processor, can implement any one or more of the foregoing task scheduling methods.
  • the computer storage medium may be various types of storage media, and may be preferably a non-transitory storage medium in this embodiment.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
  • the technical solution of the embodiment of the present invention combines the global optimal solution in the global space search with the local optimal solution in the local space search, and the two coordinate and promote each other to obtain an optimal task allocation mode.
  • the technical solution of the embodiment of the invention utilizes a genetic algorithm to solve the global optimal task assignment mode of the task scheduling, and uses the particle swarm optimization algorithm to solve the local optimal task assignment mode of the task scheduling, and uses the local optimal task assignment mode as the global optimal task.
  • the basis of the evolution of the distribution method can change the current position and velocity of the particle through the mutation operation when the particle swarm is trapped in the local optimum.
  • the particle swarm optimization algorithm is prone to premature convergence and easy to fall into the local optimum when solving the scheduling problem.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Devices For Executing Special Programs (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

一种任务调度方法,包括:重复执行任务随机分配操作,获得包含有Q种任务分配方式的初始处理器分配方案;所述任务随机分配操作为将所有N个任务随机分配于M个处理器中;M、N、Q为自然数且M<N(101);重复执行下述操作,直至找到最终任务分配方式:基于局部搜索和全局搜索更新处理器分配方案,计算更新后的处理器分配方案中每种任务分配方式下所有N个任务在M个处理器中完成所需的时间;当所需时间最短的任务分配方式满足要求时,将所述所需时间最短的任务分配方式作为任务调度的最终任务分配方式(102)。

Description

一种任务调度方法、装置及计算机存储介质
相关申请的交叉引用
本申请基于申请号为201610715089.9、申请日为2016年08月24日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本发明涉及任务调度技术,尤其涉及一种任务调度方法、装置及计算机存储介质。
背景技术
在嵌入式多处理器系统中,经常会出现这样一种情况,即:一些处理器的负载很重,而另一些处理器的负载却很轻,甚至空闲。然而,这种情况无疑会降低整体系统的工作效率。为了提高处理器的利用率以及整体系统并行计算的效率,应该把负载过重的处理器上的一部分负载即任务转移到空闲的或负载较轻的处理器上,这就出现了关于处理器的负载分配问题的研究。
目前,解决处理器负载分配问题时,通常采用粒子群算法获得最优解作为处理器调度的方案;所谓传统粒子群算法是受鸟群觅食行为的启发而提出的,其基本思想是通过群体中个体之间的协作和信息共享来寻找最优解。粒子群算法将粒子群体中的每个个体看作是搜索空间中的一个没有体积的微粒,并且在搜索空间中从一个随机初始位置根据随机初始速度飞行。每个粒子代表解空间的一个候选解,粒子的飞行速度根据自身的飞行经验和同伴的飞行经验来进行动态调整。每个粒子在飞行过程中所经历过的最 好位置就是该粒子本身找到的个体最优解,整个粒子群体所经历过的最好位置就是整个粒子群体目前所找到的整体最优解。每个粒子都通过个体最优解和整体最优解不断地更新自己,从而产生新一代粒子群体,直到达到规定的迭代次数或者满足规定的误差标准为止。但是,现有的粒子群算法在求解调度问题时都存在早熟收敛、易陷入局部最优、进化后期算法收敛速度明显下降等缺点。
显然,现有技术中没有合适、优化的算法能用于解决求解调度问题,基于算法求解来实现处理器的负载分配和任务优化调度尚没有好的解决方案。
发明内容
有鉴于此,本发明实施例提供了一种任务调度方法、装置及计算机存储介质,能基于合适的算法求解来优化、全面、有效地解决任务调度问题。
为达到上述目的,本发明实施例的技术方案是这样实现的:
第一方面,本发明实施例提供了一种任务调度方法,所述方法包括:
重复执行任务随机分配操作,获得包含有Q种任务分配方式的初始处理器分配方案;所述任务随机分配操作为将所有N个任务随机分配于M个处理器中;M、N、Q为自然数且M<N;
重复执行下述操作,直至找到最终任务分配方式:
基于局部搜索和全局搜索更新处理器分配方案,计算更新后的处理器分配方案中每种任务分配方式下所有N个任务在M个处理器中完成所需的时间;
当所需时间最短的任务分配方式满足要求时,将所述所需时间最短的任务分配方式作为任务调度的最终任务分配方式。
在一实施例中,所述方法还包括:
当所需时间最短的任务分配方式不满足要求时,对所述更新后的处理 器分配方案中的任务分配方式执行变异操作。
在一实施例中,所述将所有N个任务随机分配于M个处理器中,包括:
随机选择[1,M]之间的一个整数随机数m1,并从所有N个任务中随机选择一个任务分配给第m1个处理器;随机选择[1,M]之间的一个整数随机数m2,并从剩余的N-1个任务中随机选择一个任务分配给第m2个处理器;以此循环,直至所有N个任务都被分配给M个处理器,获得一种任务分配方式。
在一实施例中,所述基于局部搜索和全局搜索更新处理器分配方案,包括:
利用粒子群算法对当前的处理器分配方案进行局部搜索,获取所述当前的处理器分配方案中的局部最优任务分配方式;
将所述当前的处理器分配方案中的局部最优任务分配方式下所有N个任务在M个处理器中完成所需的时间作为第一时间;所述当前的处理器分配方案中的全局最优任务分配方式下所有N个任务在M个处理器中完成所需的时间作为第二时间;
确定所述第一时间小于或等于所述第二时间时,将所述当前的处理器分配方案中的全局最优任务分配方式替换为所述当前的处理器分配方案中的局部最优任务分配方式;
对所述当前的处理器分配方案中的任务分配方式执行交叉操作,获得更新后的处理器分配方案。
在一实施例中,所述利用粒子群算法对当前的处理器分配方案进行局部搜索,获取所述当前的处理器分配方案中的局部最优任务分配方式,包括:
随机生成一个包含有I个粒子且每个粒子为一种任务分配方式的初始粒子群,并将所述当前的处理器分配方案中的全局最优任务分配方式作为 所述初始粒子群的初始最优粒子加入到所述初始粒子群中;
根据
Figure PCTCN2017091802-appb-000001
更新在第k+1次迭代时粒子i的速度Vi(k+1),1≤i≤I+1,0≤k≤K-1;其中,Xgbest(k)表示在第k+1次迭代之前所述粒子群中最优粒子的位置,Xibest(k)表示在第k+1次迭代之前粒子i的最优位置,
Figure PCTCN2017091802-appb-000002
表示交叉操作,K为设置的最大迭代次数;所述最优粒子为粒子群中具有最小适应度值的粒子;所述适应度值为粒子在所对应的任务分配方式下所有N个任务在M个处理器中完成所需的时间;
根据
Figure PCTCN2017091802-appb-000003
更新在第k+1次迭代时粒子i的位置Xi(k+1);
计算粒子i在第k+1次迭代时的适应度值,并根据粒子i在第k+1次迭代时的适应度值更新所述粒子i在第k+1次迭代后的最优位置Xibest(k+1)、以及更新在第k+1次迭代后所述粒子群中的最优粒子和所述粒子群中更新后的最优粒子的位置Xgbest(k+1);
当检测出所述迭代次数k+1小于K且所述粒子群中最优粒子的适应度值小于设置的第一阈值或所述迭代次数k+1等于K时,将所述粒子群中的最优粒子所对应的任务分配方式作为所述当前的处理器分配方案中的局部最优任务分配方式;
当检测出所述迭代次数k+1小于K且所述粒子群中最优粒子的适应度值大于或等于设置的第一阈值时,计算第k+1次迭代后所述粒子群中粒子之间的相似度值,若所述相似度值大于或等于设置的第二阈值,则对所述粒子的位置执行变异操作。
在一实施例中,所述随机生成一个包含有I个粒子且每个粒子为一种任务分配方式的初始粒子群,包括:
从所有N个任务中随机选择一个任务分配给第一个处理器;从剩余的N-1个任务中随机选择一个任务分配给所述第二个处理器;从剩余的N-m 个任务中随机选择一个任务分配给所述第m个处理器,3≤m≤M;以此循环,直至所有N个任务都被分配给M个处理器,获得一个对应一种任务分配方式的粒子;其中,当m大于M即随机分配了M个任务后,重新自第一个处理器开始分配;
循环执行上述分配过程,直至获取到与I种任务分配方式一一对应的I个粒子。
第二方面,本发明实施例提供了一种任务调度装置,所述装置包括:初始化模块、处理模块;其中,
所述初始化模块,配置为重复执行任务随机分配操作,获得包含有Q种任务分配方式的初始处理器分配方案;所述任务随机分配操作为将所有N个任务随机分配于M个处理器中;M、N、Q为自然数且M<N;
所述处理模块,配置为重复执行下述操作,直至找到最终任务分配方式:
基于局部搜索和全局搜索更新处理器分配方案,计算更新后的处理器分配方案中每种任务分配方式下所有N个任务在M个处理器中完成所需的时间;
当所需时间最短的任务分配方式满足要求时,将所述所需时间最短的任务分配方式作为任务调度的最终任务分配方式。
在一实施例中,所述处理模块,还配置为当所需时间最短的任务分配方式不满足要求时,对所述更新后的处理器分配方案中的任务分配方式执行变异操作。
在一实施例中,所述初始化模块将所有N个任务随机分配于M个处理器中为:
随机选择[1,M]之间的一个整数随机数m1,并从所有N个任务中随机选择一个任务分配给第m1个处理器;随机选择[1,M]之间的一个整数随机数 m2,并从剩余的N-1个任务中随机选择一个任务分配给第m2个处理器;以此循环,直至所有N个任务都被分配给M个处理器,获得一种任务分配方式。
在一实施例中,所述处理模块基于局部搜索和全局搜索更新处理器分配方案为:
利用粒子群算法对当前的处理器分配方案进行局部搜索,获取所述当前的处理器分配方案中的局部最优任务分配方式;
将所述当前的处理器分配方案中的局部最优任务分配方式下所有N个任务在M个处理器中完成所需的时间作为第一时间;所述当前的处理器分配方案中的全局最优任务分配方式下所有N个任务在M个处理器中完成所需的时间作为第二时间;
确定所述第一时间小于或等于所述第二时间时,将所述当前的处理器分配方案中的全局最优任务分配方式替换为所述当前的处理器分配方案中的局部最优任务分配方式;
对所述当前的处理器分配方案中的任务分配方式执行交叉操作,获得更新后的处理器分配方案。
在一实施例中,所述处理模块利用粒子群算法对当前的处理器分配方案进行局部搜索,获取所述当前的处理器分配方案中的局部最优任务分配方式为:
随机生成一个包含有I个粒子且每个粒子为一种任务分配方式的初始粒子群,并将所述当前的处理器分配方案中的全局最优任务分配方式作为所述初始粒子群的初始最优粒子加入到所述初始粒子群中;
根据
Figure PCTCN2017091802-appb-000004
更新在第k+1次迭代时粒子i的速度Vi(k+1),1≤i≤I+1,0≤k≤K-1;其中,Xgbest(k)表示在第k+1次迭代之前所述粒子群中最优粒子的位置,Xibest(k)表示在第k+1次迭代之前粒子i的最 优位置,
Figure PCTCN2017091802-appb-000005
表示交叉操作,K为设置的最大迭代次数;所述最优粒子为粒子群中具有最小适应度值的粒子;所述适应度值为粒子在所对应的任务分配方式下所有N个任务在M个处理器中完成所需的时间;
根据
Figure PCTCN2017091802-appb-000006
更新在第k+1次迭代时粒子i的位置Xi(k+1);
计算粒子i在第k+1次迭代时的适应度值,并根据粒子i在第k+1次迭代时的适应度值更新所述粒子i在第k+1次迭代后的最优位置Xibest(k+1)、以及更新在第k+1次迭代后所述粒子群中的最优粒子和所述粒子群中更新后的最优粒子的位置Xgbest(k+1);
当检测出所述迭代次数k+1小于K且所述粒子群中最优粒子的适应度值小于设置的第一阈值或所述迭代次数k+1等于K时,将所述粒子群中的最优粒子所对应的任务分配方式作为所述当前的处理器分配方案中的局部最优任务分配方式;
当检测出所述迭代次数k+1小于K且所述粒子群中最优粒子的适应度值大于或等于设置的第一阈值时,计算第k+1次迭代后所述粒子群中粒子之间的相似度值,若所述相似度值大于或等于设置的第二阈值,则对所述粒子的位置执行变异操作。
在一实施例中,所述处理模块随机生成一个包含有I个粒子且每个粒子为一种任务分配方式的初始粒子群为:
从所有N个任务中随机选择一个任务分配给第一个处理器;从剩余的N-1个任务中随机选择一个任务分配给所述第二个处理器;从剩余的N-m个任务中随机选择一个任务分配给所述第m个处理器,3≤m≤M;以此循环,直至所有N个任务都被分配给M个处理器,获得一个对应一种任务分配方式的粒子;其中,当m大于M即随机分配了M个任务后,重新自第一个处理器开始分配;
循环执行上述分配过程,直至获取到与I种任务分配方式一一对应的I个粒子。
第三方面,本发明实施例还提供了一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行本发明实施例所述的任务调度方法。
本发明实施例提供的任务调度方法、装置及计算机存储介质,重复执行任务随机分配操作,获得包含有Q种任务分配方式的初始处理器分配方案;所述任务随机分配操作为将所有N个任务随机分配于M个处理器中;M、N、Q为自然数且M<N;重复执行下述操作,直至找到最终任务分配方式:基于局部搜索和全局搜索更新处理器分配方案,计算更新后的处理器分配方案中每种任务分配方式下所有N个任务在M个处理器中完成所需的时间;当所需时间最短的任务分配方式满足要求时,将所述所需时间最短的任务分配方式作为任务调度的最终任务分配方式。可见,本发明实施例通过将在全局空间搜索全局最优解和在局部空间搜索局部最优解结合起来,两者相互协调和促进,以求取最优的任务分配方式。
此外,利用遗传算法求解任务调度的全局最优任务分配方式,而利用粒子群算法求解任务调度的局部最优任务分配方式,并将局部最优任务分配方式作为全局最优任务分配方式进化的依据,能够在粒子群整体陷入局部最优时,通过变异操作改变粒子的当前位置和速度,解决了粒子群算法在求解调度问题时容易出现早熟收敛、易陷入局部最优等缺陷。
附图说明
图1为本发明实施例任务调度方法的实现流程示意图;
图2为本发明实施例任务调度方法的具体实现流程示意图;
图3为本发明实施例中所述利用粒子群算法对染色体种群进行寻优的具体实现流程示意图;
图4为本发明实施例任务调度装置的组成结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述。
遗传算法是模拟达尔文生物进化论的自然选择和遗传学机理的生物进化过程的计算模型,是一种通过模拟自然进化过程搜索最优解的方法。该方法的处理过程是这样的:首先,要创建一个随机的初始状态即一群初始解,将这些解比喻为染色体或基因,可将该种群称为第一代;接着,根据问题求解的实际接近程度对每一个染色体指定一个合理的适应度值;然后,对染色体进行各种进化操作如选择、交叉和变异等。在以上的各种进化操作过程中,通过选择适当的控制参数可以使算法获得令人满意的结果。现有的研究已证明,遗传算法具有自学习性和自适应性,并能够减少陷入局部最优的风险。
本发明实施例正是利用遗传算法的优势,将遗传算法求解用于完成处理器负载分配和任务调度。
图1为本发明实施例任务调度方法的实现流程示意图,该方法包括:
步骤101:重复执行任务随机分配操作,获得包含有Q种任务分配方式的初始处理器分配方案;所述任务随机分配操作为将所有N个任务随机分配于M个处理器中;
具体地,重复执行Q次任务随机分配操作,获得包含有Q种任务分配方式的初始处理器分配方案,即每执行一次任务随机分配操作,则获得一种所有N个任务被分配于M个处理器中的任务分配方式;所述任务随机分配操作为将所有N个任务随机分配于M个处理器中。
这里,所述将所有N个任务随机分配于M个处理器中,包括:随机选择[1,M]之间的一个整数随机数m1,并从所有N个任务中随机选择一个任务 分配给第m1个处理器;随机选择[1,M]之间的一个整数随机数m2,并从剩余的N-1个任务中随机选择一个任务分配给第m2个处理器;以此循环,直至所有N个任务都被分配给M个处理器,以获得一种所有N个任务被分配于M个处理器中的任务分配方式。
这里,所述M、N、Q为自然数且M<N;任务之间都是独立的,每个任务所具有的负载可能相同或不相同,处理器之间也都是独立的,负载的大小影响处理器对任务的完成时间;在实际应用中,为保证任务分配方式之间的差异性而提高泛化性,Q可设置为大于或等于M;由于受到随机因素和Q的大小的影响,所述初始处理器分配方案中包含的Q种任务分配方式中可能存在相同的任务分配方式,因此,可将相同的任务分配方式从所述初始处理器分配方案中删除,以提高所述初始处理器分配方案中任务分配方式的多样性。
步骤102:重复执行下述操作,直至找到最终任务分配方式:基于局部搜索和全局搜索更新处理器分配方案,计算更新后的处理器分配方案中每种任务分配方式下所有N个任务在M个处理器中完成所需的时间;当所需时间最短的任务分配方式满足要求时,将所述所需时间最短的任务分配方式作为任务调度的最终任务分配方式。
这里,所述所需时间最短的任务分配方式满足要求是指所述所需时间最短的任务分配方式下所有N个任务在M个处理器中完成所需的时间与所有N个任务在M个处理器中完成所需的理想时间之差小于或等于预设时间阈值;所述所有N个任务在M个处理器中完成所需的理想时间为所有N个任务在任意一个处理器中完成所需的时间T除以M,即所述理想时间可表示为T/M。
这里,所述基于局部搜索和全局搜索更新处理器分配方案,包括:
利用粒子群算法对当前的处理器分配方案进行局部搜索,获取所述当 前的处理器分配方案中的局部最优任务分配方式;
将所述当前的处理器分配方案中的局部最优任务分配方式下所有N个任务在M个处理器中完成所需的时间作为第一时间;所述当前的处理器分配方案中的全局最优任务分配方式下所有N个任务在M个处理器中完成所需的时间作为第二时间;
确定所述第一时间小于或等于所述第二时间时,将所述当前的处理器分配方案中的全局最优任务分配方式替换为所述当前的处理器分配方案中的局部最优任务分配方式;
对所述当前的处理器分配方案中的任务分配方式执行交叉操作,获得更新后的处理器分配方案。
这里,所述当前的处理器分配方案可能是步骤101中生成的初始处理器分配方案,也可能是对步骤101中生成的初始处理器分配方案进行一次或一次以上更新后形成的处理器分配方案,但所述当前的处理器分配方案中都包含有Q种任务分配方式;此外,对所述当前的处理器分配方案中的任务分配方式执行交叉操作可以是对全部Q种任务分配方式中的两种或两种以上任务分配方式按照遗传算法执行交叉操作,且交叉操作的次数可以是一次或一次以上;当两种任务分配方式执行完一次以上交叉操作后,则将经交叉后生成的所有新的任务分配方式中所需时间最短的两种任务分配方式作为该两种任务分配方式进行更新后生成的任务分配方式;当Q种任务分配方式中的每两种任务分配方式都执行完一次以上的交叉操作后,将会生成数量大于Q的新的任务分配方式,通过计算每一种新的任务分配方式下所有N个任务在M个处理器中完成所需的时间,将所需时间最短的Q种新的任务分配方式作为更新后的处理器分配方案,以保证更新后获得的处理器分配方案中包含Q种任务分配方式。
这里,通过对任意两种任务分配方式执行交叉操作,使不同任务分配 方式中的部分任务进行互换即互换分配给不同处理器的任务,以生成新的任务分配方式,从而完成对处理器分配方案的更新处理,能够避免陷入早熟收敛。
这里,所述利用粒子群算法对当前的处理器分配方案进行局部搜索,获取所述当前的处理器分配方案中的局部最优任务分配方式,包括:
随机生成一个包含有I个粒子且每个粒子为一种任务分配方式的初始粒子群,并将所述当前的处理器分配方案中的全局最优任务分配方式作为所述初始粒子群的初始最优粒子加入到所述初始粒子群中;
根据
Figure PCTCN2017091802-appb-000007
更新在第k+1次迭代时粒子i的速度Vi(k+1),1≤i≤I+1,0≤k≤K-1;其中,Xgbest(k)表示在第k+1次迭代之前所述粒子群中最优粒子的位置,Xibest(k)表示在第k+1次迭代之前粒子i的最优位置,
Figure PCTCN2017091802-appb-000008
表示交叉操作,K为设置的最大迭代次数;所述最优粒子为粒子群中具有最小适应度值的粒子;所述适应度值为粒子在所对应的任务分配方式下所有N个任务在M个处理器中完成所需的时间;
根据
Figure PCTCN2017091802-appb-000009
更新在第k+1次迭代时粒子i的位置Xi(k+1);
计算粒子i在第k+1次迭代时的适应度值,并根据粒子i在第k+1次迭代时的适应度值更新所述粒子i在第k+1次迭代后的最优位置Xibest(k+1)、以及更新在第k+1次迭代后所述粒子群中的最优粒子和所述粒子群中更新后的最优粒子的位置Xgbest(k+1);
当检测出所述迭代次数k+1小于K且所述粒子群中最优粒子的适应度值小于设置的第一阈值或所述迭代次数k+1等于K时,将所述粒子群中的最优粒子所对应的任务分配方式作为所述当前的处理器分配方案中的局部最优任务分配方式;
当检测出所述迭代次数k+1小于K且所述粒子群中最优粒子的适应度 值大于或等于设置的第一阈值时,计算第k+1次迭代后所述粒子群中粒子之间的相似度值,若所述相似度值大于或等于设置的第二阈值,则对所述粒子的位置执行变异操作。
这里,除了将所述当前的处理器分配方案中的全局最优任务分配方式加入到所述初始粒子群中以外,还可以将所述当前的处理器分配方案中所需时间较少的多种任务分配方式都加入到所述初始粒子群中,并以所述当前的处理器分配方案中的全局最优任务分配方式作为所述初始粒子群的初始最优粒子;例如,可将所述当前的处理器分配方案中的前5种所需时间最短的任务分配方式加入所述初始粒子群中。
这里,当k=0时,Xgbest(0)表示所述初始粒子群中最优粒子的位置,即所述初始粒子群中最优粒子对应的任务分配方式;Xibest(0)表示所述初始粒子群中粒子i的初始最优位置,即所述初始粒子群中粒子i对应的任务分配方式;Vi(0)表示所述初始粒子群中粒子i的初始速度,为(Ti(0)*M*v)/T1(0);其中,Ti(0)表示所述初始粒子群中粒子i对应的任务分配方式下所有N个任务在M个处理器中完成所需的时间,T1(0)表示所述初始粒子群中最优粒子对应的任务分配方式下所有N个任务在M个处理器中完成所需的时间,v表示速度参数。
这里,当对所述当前的粒子群中的粒子的速度和位置进行更新后,粒子对应的任务分配方式中给每个处理器分配的任务数量发生变化,所述当前的粒子群中的粒子都向所述当前的粒子群中的最优粒子靠近,即粒子对应的任务分配方式都朝向最优粒子对应的任务分配方式靠近,以使粒子对应的任务分配方式中每个处理器的任务负载趋向于相等。
这里,当第k+1次迭代后所生成的粒子群中粒子i的适应度值小于第k次迭代后所生成的粒子群中粒子i的适应度值时,则保持粒子i在第k+1次迭代后的最优位置Xibest(k+1)为粒子i在第k次迭代后的最优位置Xibest(k);当第 k+1次迭代后所生成的粒子群中最优粒子的适应度值小于第k次迭代后所生成的粒子群中最优粒子的适应度值时,则第k+1次迭代后所生成的粒子群中最优粒子仍然保持为第k次迭代后所生成的粒子群中最优粒子、第k+1次迭代后所生成的粒子群中最优粒子的位置Xgbest(k+1)仍然保持为第k次迭代后所生成的粒子群中最优粒子的位置Xgbest(k)。
这里,根据公式
Figure PCTCN2017091802-appb-000010
计算所述粒子的位置相互之间的相似度值similarity(Xij);其中,
Figure PCTCN2017091802-appb-000011
分别代表粒子i和粒子j对应的任务分配方式中相同处理器被分配的任务。
这里,可以计算所有I+1个粒子中两个或两个以上粒子之间的相似度值,比如,当计算出两个粒子之间的相似度值大于设置的第二阈值时,可认为是这两个粒子分别所对应的任务分配方式中将相同的任务分配给了相同的处理器;若两个粒子之间的相似度值大于设置的第二阈值时,可对这两个粒子分别执行变异操作,以使粒子所对应的任务分配方式中分配给不同处理器的任务进行互换,从而避免陷入局部最优解。
这里,可以只对所有I+1个粒子中两个或两个以上粒子执行变异操作,而不必对所有I+1个粒子执行变异操作。例如,当有三个粒子且每两个粒子相互之间的相似度值都大于设置的第二阈值时,可只对所述三个粒子中的任意两个粒子执行变异操作。
这里,所述随机生成一个包含有I个粒子且每个粒子为一种任务分配方式的初始粒子群,包括:
从所有N个任务中随机选择一个任务分配给第一个处理器;从剩余的N-1个任务中随机选择一个任务分配给所述第二个处理器;从剩余的N-m个任务中随机选择一个任务分配给所述第m个处理器,3≤m≤M;以此循环,直至所有N个任务都被分配给M个处理器,获得一个对应一种任务分配方 式的粒子;其中,当m大于M即随机分配了M个任务后,重新自第一个处理器开始分配;
循环执行上述分配过程,直至获取到与I种任务分配方式一一对应的I个粒子。
这里,当m大于M时,即已将m个任务随机分配给M个处理器,而每个处理器被分配了一个任务后,重新自第一个处理器开始分配任务,即从剩余的N-M个任务中随机选择一个任务分配给所述第一个处理器,从剩余的N-M-1个任务中随机选择一个任务分配给所述第二个处理器,并以此类推。
进一步地,该方法还包括:当所需时间最短的任务分配方式不满足要求时,对所述更新后的处理器分配方案中的任务分配方式执行变异操作。
作为一种实施方式,当步骤102中获取的所需时间最短的任务分配方式不满足要求时,即所述所需时间最短的任务分配方式下所有N个任务在M个处理器中完成所需的时间与所有N个任务在M个处理器中完成所需的理想时间之差大于预设时间阈值,则对所述更新后的处理器分配方案中的任务分配方式执行变异操作,然后继续执行步骤102。
这里,所述对所述更新后的处理器分配方案中的任务分配方式执行变异操作的次数可以是对全部Q种任务分配方式中的一种或一种以上任务分配方式按照遗传算法执行变异操作,且变异操作的次数可以是一次或一次以上;当一种任务分配方式执行完一次以上变异操作后,则将经变异后生成的所有新的任务分配方式中所需时间最短的任务分配方式作为该任务分配方式进行更新后的任务分配方式;当Q种任务分配方式中的每一种任务分配方式都执行完一次以上变异操作后,将会生成数量大于Q的新的任务分配方式,通过计算每一个新的任务分配方式下所有N个任务在M个处理器中完成所需的时间,将所需时间最短的Q种新的任务分配方式作为更新后的任 务分配方式,以保证更新后获得的处理器分配方案中包含Q种任务分配方式。
这里,当所需时间最短的任务分配方式不满足要求即粒子群整体陷入局部最优时,通过对任意任务分配方式执行变异操作,改变粒子的位置和速度,从而使粒子群整体跳出局部最优继续寻优。
下面以一个具体的实施例对所述任务调度方法进行举例说明,图2为所述任务调度方法的具体实现流程示意图,该方法包括:
步骤201:随机生成初始染色体种群;
作为一种实施方式,重复执行Q次任务随机分配操作,获得包含有Q条染色体的初始染色体种群;其中,所述任务随机分配操作为将所有N个任务随机分配于M个处理器中。
这里,所述将所有N个任务随机分配于M个处理器中,包括:随机选择[1,M]之间的一个整数随机数m1,并从所有N个任务中随机选择一个任务分配给第m1个处理器;随机选择[1,M]之间的一个整数随机数m2,并从剩余的N-1个任务中随机选择一个任务分配给第m2个处理器;以此循环,直至所有N个任务都被分配给M个处理器,获得一种所有N个任务被分配于M个处理器中的任务分配方式即一条染色体。
这里,每条染色体代表一种任务分配方式;所述M、N、Q为自然数且M<N;任务之间都是独立的,每个任务所具有的负载可能相同或不相同,处理器之间也都是独立的,负载的大小影响处理器对任务的完成时间;在实际应用中,为保证任务分配方式之间的差异性而提高泛化性,Q可设置为大于或等于M;由于受到随机因素和Q的大小的影响,所述初始染色体种群中可能存在相同的染色体即可能存在相同的任务分配方式,因此,可将相同的染色体从所述初始染色体种群中删除,以提高所述初始染色体种群中染色体的多样性。
步骤202:利用粒子群算法对染色体种群进行寻优,获取粒子群的最优解;
作为一种实施方式,利用粒子群算法对当前的染色体种群进行局部寻优搜索,获取粒子群的最优解即所述当前的染色体种群的局部最优任务分配方式。
这里,所述当前的染色体种群可能是步骤201中生成的初始染色体种群,也可能是对步骤201中生成的初始染色体种群进行一次或一次以上更新后生成的染色体种群,但所述当前的染色体种群中都包含有Q条染色体。
图3为所述利用粒子群算法对染色体种群进行寻优的具体实现流程示意图,该寻优过程包括:
步骤20201:随机生成初始粒子群;
作为一种实施方式,随机生成一个包含有I个粒子且每个粒子为一种任务分配方式的初始粒子群,并将所述当前的染色体种群中的最优染色体作为所述初始粒子群的初始最优粒子加入到所述初始粒子群中,以形成一个包含有I+1个粒子的初始粒子群。
这里,所述当前的染色体种群中的最优染色体为所有N个任务在M个处理器中完成所需的时间最短的任务分配方式所对应的染色体;除了将所述当前的染色体种群中的最优染色体加入到所述初始粒子群中以外,还可以将所述当前的染色体种群中所需时间较少的多个染色体都加入到所述初始粒子群中,并以所述当前的染色体种群中的最优染色体作为所述初始粒子群的初始最优粒子;例如,可将所述当前的染色体种群中的前5个所需时间最短的任务分配方式所对应的染色体加入所述初始粒子群中。
这里,所述随机生成一个包含有I个粒子且每个粒子为一种任务分配方式的初始粒子群,包括:
从所有N个任务中随机选择一个任务分配给第一个处理器;从剩余的 N-1个任务中随机选择一个任务分配给所述第二个处理器;从剩余的N-m个任务中随机选择一个任务分配给所述第m个处理器,3≤m≤M;以此循环,直至所有N个任务都被分配给M个处理器,获得一个对应一种任务分配方式的粒子;其中,当m大于M即随机分配了M个任务后,重新自第一个处理器开始分配;
循环执行上述分配过程,直至获取到与I种任务分配方式一一对应的I个粒子。
这里,当m大于M时,即已将m个任务随机分配给M个处理器,而每个处理器被分配了一个任务后,重新自第一个处理器开始分配任务,即从剩余的N-M个任务中随机选择一个任务分配给所述第一个处理器,从剩余的N-M-1个任务中随机选择一个任务分配给所述第二个处理器,并以此类推。
步骤20202:更新粒子群中粒子的速度和位置;
作为一种实施方式,根据
Figure PCTCN2017091802-appb-000012
更新在第k+1次迭代时当前的粒子群中粒子i的速度Vi(k+1),1≤i≤I+1,0≤k≤K-1;其中,Xgbest(k)表示在第k+1次迭代之前当前的粒子群中最优粒子的位置,Xibest(k)表示在第k+1次迭代之前当前的粒子群中粒子i的最优位置,
Figure PCTCN2017091802-appb-000013
表示交叉操作,K为设置的最大迭代次数;所述最优粒子为粒子群中具有最小适应度值的粒子;所述适应度值为粒子在所对应的任务分配方式下所有N个任务在M个处理器中完成所需的时间;根据
Figure PCTCN2017091802-appb-000014
更新在第k+1次迭代时当前的粒子群中粒子i的位置Xi(k+1)。
这里,当k=0时,Xgbest(0)表示所述初始粒子群中最优粒子的位置,即所述初始粒子群中最优粒子对应的任务分配方式;Xibest(0)表示所述初始粒子群中粒子i的初始最优位置,即所述初始粒子群中粒子i对应的任务分配方式;Vi(0)表示所述初始粒子群中粒子i的初始速度,为(Ti(0)*M*v)/T1(0); 其中,Ti(0)表示所述初始粒子群中粒子i对应的任务分配方式下所有N个任务在M个处理器中完成所需的时间,T1(0)表示所述初始粒子群中最优粒子对应的任务分配方式下所有N个任务在M个处理器中完成所需的时间,v表示速度参数。
这里,当对所述当前的粒子群中的粒子的速度和位置进行更新后,粒子对应的任务分配方式中给每个处理器分配的任务数量发生变化,所述当前的粒子群中的粒子都向所述当前的粒子群中的最优粒子靠近,即粒子对应的任务分配方式都朝向最优粒子对应的任务分配方式靠近,以使粒子对应的任务分配方式中每个处理器的任务负载趋向于相等。
步骤20203:更新粒子群中粒子的最优位置以及最优粒子;
作为一种实施方式,根据步骤20202中所述当前的粒子群中每个粒子更新后获得的速度和位置,更新所述当前的粒子群中每个粒子的最优位置,更新所述当前的粒子群中的最优粒子以及所述当前的粒子群中的最优粒子的位置。
这里,所述最优粒子为粒子群中具有最小适应度值的粒子;所述适应度值为粒子在所对应的任务分配方式下所有N个任务在M个处理器中完成所需的时间;当第k+1次迭代后所生成的粒子群中粒子i的适应度值小于第k次迭代后所生成的粒子群中粒子i的适应度值时,则保持粒子i在第k+1次迭代后的最优位置Xibest(k+1)为粒子i在第k次迭代后的最优位置Xibest(k);当第k+1次迭代后所生成的粒子群中最优粒子的适应度值小于第k次迭代后所生成的粒子群中最优粒子的适应度值时,则第k+1次迭代后所生成的粒子群中最优粒子仍然保持为第k次迭代后所生成的粒子群中最优粒子、第k+1次迭代后所生成的粒子群中最优粒子的位置Xgbest(k+1)仍然保持为第k次迭代后所生成的粒子群中最优粒子的位置Xgbest(k)。
步骤20204:判断粒子群的迭代次数是否小于最大迭代次数,若小于, 则继续执行步骤20205,否则执行步骤20208;
作为一种实施方式,判断步骤20202中所述当前的粒子群的迭代次数k+1的值是否小于设置的最大迭代次数K,若小于,则继续执行步骤20205;否则,判定所述对染色体种群进行局部寻优的过程结束并执行步骤20208。
步骤20205:判断粒子群的最优解的适应度值是否小于设置的第一阈值,若满足,则执行步骤20208,否则继续执行步骤20206;
作为一种实施方式,判断步骤20203中获得的所述当前的粒子群中的最优粒子的适应度值是否小于设置的第一阈值,若小于,则判定对染色体种群进行局部寻优的过程结束并执行步骤20208,否则继续执行步骤20206。
步骤20206:判断粒子群中粒子的相似度值是否小于设置的第二阈值,若小于,则返回执行步骤20202,否则继续执行步骤20207;
作为一种实施方式,计算粒子群中每两个粒子之间的相似度值,当所述相似度值大于或等于设置的第二阈值时,继续执行步骤20207;当所述相似度值小于设置的第二阈值时,返回执行步骤20202。
这里,可以计算所有I+1个粒子中两个或两个以上粒子之间的相似度值;例如,当计算出两个粒子之间的相似度值大于设置的第二阈值时,可认为是这两个粒子分别所对应的任务分配方式中将相同的任务分配给了相同的处理器。
步骤20207:对粒子群中的粒子执行变异操作,并返回执行步骤20202;
作为一种实施方式,当步骤20206中判断出粒子之间的相似度值大于或等于设置的第二阈值时,则对所述粒子分别执行变异操作,以使粒子所对应的任务分配方式中分配给不同处理器的任务相互之间进行交换,从而避免陷入局部最优解。
这里,可以只对所有I+1个粒子中两个或两个以上粒子执行变异操作,而不必对所有I+1个粒子执行变异操作。例如,当有三个粒子且每两个粒子 相互之间的相似度值都大于设置的第二阈值时,可只对所述三个粒子中的任意两个粒子执行变异操作。
步骤20208:输出粒子群的最优解。
作为一种实施方式,将步骤20204或步骤20205中所述当前的粒子群中的最优粒子所对应的任务分配方式作为所述对染色体种群进行局部寻优后获得的局部最优任务分配方式输出。
步骤203:判断粒子群的最优解的适应度值是否小于染色体群中最优染色体的适应度值,若是,则继续执行步骤204,否则执行步骤205;
这里,所述粒子群的最优解即步骤20208中所述当前的粒子群中的最优粒子所对应的任务分配方式;所述粒子群的最优解的适应度值为所述最优粒子所对应的任务分配方式下所有N个任务在M个处理器中完成所需的时间;所述最优染色体为当前的染色体种群中所有N个任务在M个处理器中完成所需的时间最短的任务分配方式所对应的染色体;所述染色体群中最优染色体的适应度值为所述最优染色体所对应的任务分配方式下所有N个任务在M个处理器中完成所需的时间。
步骤204:将所述最优解替换所述染色体群中最优染色体;
作为一种实施方式,将通过粒子群算法所求得的、且具有比所述染色体种群中最优染色体的适应度值小的任务分配方式替换所述最优染色体,以完成对染色体种群的局部寻优更新处理,并继续执行步骤205。
步骤205:对染色体种群中的染色体执行交叉操作;
这里,所述对染色体种群中的染色体执行交叉操作可以是对染色体种群中全部Q条染色体中的两条或两条以上染色体按照遗传算法执行交叉操作,且交叉操作的次数可以是一次或一次以上;当两条染色体执行完一次以上交叉操作后,则将经交叉后生成的所有染色体中所需时间最短的两条染色体作为该两条染色体进行交叉更新后的染色体;当Q条染色体中的每两 条染色体都执行完一次以上的交叉操作后,将会生成数量大于Q的新的染色体,通过计算每一条新的染色体下所有N个任务在M个处理器中完成所需的时间,将所需时间最短的Q条新的染色体作为更新后的染色体种群,以保证更新后获得的染色体种群中包含Q条染色体。
这里,通过对任意两条染色体执行交叉操作,使不同染色体对应的部分任务进行互换即互换分配给处理器的任务,以生成新的染色体,从而完成对染色体种群的更新处理,能够避免陷入早熟收敛。
步骤206:判断更新后的染色体种群中最优染色体是否满足要求,若满足,则执行步骤208,否则执行步骤207;
作为一种实施方式,计算步骤205中获得的更新后的染色体种群中每个染色体的适应度值,获得所述更新后的染色体种群中的最优染色体即具有最小适应度值的染色体,判断所述最优染色体的适应度值与所有N个任务在M个处理器中完成所需的理想时间之差是否小于预设时间阈值,若小于,则执行步骤208,否则执行步骤207。
这里,所述所有N个任务在M个处理器中完成所需的理想时间为所有N个任务在任意一个处理器中完成所需的时间T除以M,即所述理想时间可表示为T/M;所述预设时间阈值的大小可以根据实际情况进行设置和调整。
这里,还可以对步骤202至步骤205的循环操作次数进行计数,当所述循环操作次数达到一定条件比如大于设置的临界值时,可停止寻优操作并将所述染色体群中最优染色体作为任务调度的最终任务分配方式输出。
步骤207:对更新后的染色体种群中染色体执行变异操作,返回步骤202。
作为一种实施方式,当步骤206中最优染色体的适应度值与所有N个任务在M个处理器中完成所需的理想时间之差大于或等于预设时间阈值 时,则对步骤206中所述更新后的染色体种群中的染色体执行变异操作,然后返回执行步骤202。
这里,所述对所述更新后的染色体种群中的染色体即任务分配方式执行变异操作的次数可以是对全部Q条染色体中的一条或一条以上染色体按照遗传算法执行变异操作,且变异操作的次数可以是一次或一次以上;当一条染色体执行完一次以上变异操作后,则将经变异后生成的所有新的染色体中所需时间最短的染色体作为该染色体进行更新后生成的染色体;当Q条染色体中的每一条染色体都执行完一次以上变异操作后,将会生成数量大于Q的新的染色体,通过计算每一条染色体下所有N个任务在M个处理器中完成所需的时间,将所需时间最短的Q条染色体作为更新后的染色体种群,以保证更新后获得的染色体种群中包含Q条染色体。
这里,当最优染色体即所需时间最短的任务分配方式不满足要求即染色体种群整体陷入局部最优时,通过对任意染色体执行变异操作,从而使染色体种群跳出局部最优继续寻找更优的任务分配方式。
步骤208:将所述更新后的染色体种群中最优染色体作为任务调度的最终任务分配方式。
具体地,将步骤206中满足要求的所述更新后的染色体种群中最优染色体所对应的任务分配方式作为任务调度的最终任务分配方式,以完成任务调度过程。
为实现上述方法,本发明实施例还提供了一种任务调度装置,图4为本发明实施例任务调度装置的组成结构示意图,该装置包括:初始化模块11、处理模块12;其中,
所述初始化模块11,配置为重复执行任务随机分配操作,获得包含有Q种任务分配方式的初始处理器分配方案;所述任务随机分配操作为将所有N个任务随机分配于M个处理器中;
所述处理模块12,配置为重复执行下述操作,直至找到最终任务分配方式:
基于局部搜索和全局搜索更新处理器分配方案,计算更新后的处理器分配方案中每种任务分配方式下所有N个任务在M个处理器中完成所需的时间;
当所需时间最短的任务分配方式满足要求时,将所述所需时间最短的任务分配方式作为任务调度的最终任务分配方式。
其中,所述初始化模块11,具体配置为:重复执行Q次任务随机分配操作,获得包含有Q种任务分配方式的初始处理器分配方案,即每执行一次任务随机分配操作,则获得一种所有N个任务被分配于M个处理器中的任务分配方式;所述任务随机分配操作为将所有N个任务随机分配于M个处理器中。
这里,所述初始化模块11将所有N个任务随机分配于M个处理器中,包括:随机选择[1,M]之间的一个整数随机数m1,并从所有N个任务中随机选择一个任务分配给第m1个处理器;随机选择[1,M]之间的一个整数随机数m2,并从剩余的N-1个任务中随机选择一个任务分配给第m2个处理器;以此循环,直至所有N个任务都被分配给M个处理器,以获得一种所有N个任务被分配于M个处理器中的任务分配方式。
这里,所述M、N、Q为自然数且M<N;任务之间都是独立的,每个任务所具有的负载可能相同或不相同,处理器之间也都是独立的,负载的大小影响处理器对任务的完成时间;在实际应用中,为保证任务分配方式之间的差异性而提高泛化性,Q可设置为大于或等于M;由于受到随机因素和Q的大小的影响,所述初始处理器分配方案中包含的Q种任务分配方式中可能存在相同的任务分配方式,因此,可将相同的任务分配方式从所述初始处理器分配方案中删除,以提高所述初始处理器分配方案中任务分配 方式的多样性。
这里,所述所需时间最短的任务分配方式满足要求是指所述所需时间最短的任务分配方式下所有N个任务在M个处理器中完成所需的时间与所有N个任务在M个处理器中完成所需的理想时间之差小于或等于预设时间阈值;所述所有N个任务在M个处理器中完成所需的理想时间为所有N个任务在任意一个处理器中完成所需的时间T除以M,即所述理想时间可表示为T/M。
所述处理模块12基于局部搜索和全局搜索更新处理器分配方案,为:
利用粒子群算法对当前的处理器分配方案进行局部搜索,获取所述当前的处理器分配方案中的局部最优任务分配方式;
将所述当前的处理器分配方案中的局部最优任务分配方式下所有N个任务在M个处理器中完成所需的时间作为第一时间;所述当前的处理器分配方案中的全局最优任务分配方式下所有N个任务在M个处理器中完成所需的时间作为第二时间;
确定所述第一时间小于或等于所述第二时间时,将所述当前的处理器分配方案中的全局最优任务分配方式替换为所述当前的处理器分配方案中的局部最优任务分配方式;
对所述当前的处理器分配方案中的任务分配方式执行交叉操作,获得更新后的处理器分配方案。
这里,所述当前的处理器分配方案可能是所述初始化模块11生成的初始处理器分配方案,也可能是对所述初始化模块11生成的初始处理器分配方案进行一次或一次以上更新后形成的处理器分配方案,但所述当前的处理器分配方案中都包含有Q种任务分配方式;此外,对所述当前的处理器分配方案中的任务分配方式执行交叉操作可以是对全部Q种任务分配方式中的两种或两种以上任务分配方式按照遗传算法执行交叉操作,且交叉操作 的次数可以是一次或一次以上;当两种任务分配方式执行完一次以上交叉操作后,则将经交叉后生成的所有新的任务分配方式中所需时间最短的两种任务分配方式作为该两种任务分配方式进行更新后生成的任务分配方式;当Q种任务分配方式中的每两种任务分配方式都执行完一次以上的交叉操作后,将会生成数量大于Q的新的任务分配方式,通过计算每一种新的任务分配方式下所有N个任务在M个处理器中完成所需的时间,将所需时间最短的Q种新的任务分配方式作为更新后的处理器分配方案,以保证更新后获得的处理器分配方案中包含Q种任务分配方式。
这里,通过对任意两种任务分配方式执行交叉操作,使不同任务分配方式中的部分任务进行互换即互换分配给不同处理器的任务,以生成新的任务分配方式,从而完成对处理器分配方案的更新处理,能够避免陷入早熟收敛。
所述处理模块12利用粒子群算法对当前的处理器分配方案进行局部搜索,获取所述当前的处理器分配方案中的局部最优任务分配方式,为:
随机生成一个包含有I个粒子且每个粒子为一种任务分配方式的初始粒子群,并将所述当前的处理器分配方案中的全局最优任务分配方式作为所述初始粒子群的初始最优粒子加入到所述初始粒子群中;
根据
Figure PCTCN2017091802-appb-000015
更新在第k+1次迭代时粒子i的速度Vi(k+1),1≤i≤I+1,0≤k≤K-1;其中,Xgbest(k)表示在第k+1次迭代之前所述粒子群中最优粒子的位置,Xibest(k)表示在第k+1次迭代之前粒子i的最优位置,
Figure PCTCN2017091802-appb-000016
表示交叉操作,K为设置的最大迭代次数;所述最优粒子为粒子群中具有最小适应度值的粒子;所述适应度值为粒子在所对应的任务分配方式下所有N个任务在M个处理器中完成所需的时间;
根据
Figure PCTCN2017091802-appb-000017
更新在第k+1次迭代时粒子i的位置Xi(k+1);
计算粒子i在第k+1次迭代时的适应度值,并根据粒子i在第k+1次迭代时的适应度值更新所述粒子i在第k+1次迭代后的最优位置Xibest(k+1)、以及更新在第k+1次迭代后所述粒子群中的最优粒子和所述粒子群中更新后的最优粒子的位置Xgbest(k+1);
当检测出所述迭代次数k+1小于K且所述粒子群中最优粒子的适应度值小于设置的第一阈值或所述迭代次数k+1等于K时,将所述粒子群中的最优粒子所对应的任务分配方式作为所述当前的处理器分配方案中的局部最优任务分配方式;
当检测出所述迭代次数k+1小于K且所述粒子群中最优粒子的适应度值大于或等于设置的第一阈值时,计算第k+1次迭代后所述粒子群中粒子之间的相似度值,若所述相似度值大于或等于设置的第二阈值,则对所述粒子的位置执行变异操作。
这里,除了将所述当前的处理器分配方案中的全局最优任务分配方式加入到所述初始粒子群中以外,还可以将所述当前的处理器分配方案中所需时间较少的多种任务分配方式都加入到所述初始粒子群中,并以所述当前的处理器分配方案中的全局最优任务分配方式作为所述初始粒子群的初始最优粒子;例如,可将所述当前的处理器分配方案中的前5种所需时间最短的任务分配方式加入所述初始粒子群中。
这里,当k=0时,Xgbest(0)表示所述初始粒子群中最优粒子的位置,即所述初始粒子群中最优粒子对应的任务分配方式;Xibest(0)表示所述初始粒子群中粒子i的初始最优位置,即所述初始粒子群中粒子i对应的任务分配方式;Vi(0)表示所述初始粒子群中粒子i的初始速度,为(Ti(0)*M*v)/T1(0);其中,Ti(0)表示所述初始粒子群中粒子i对应的任务分配方式下所有N个任务在M个处理器中完成所需的时间,T1(0)表示所述初始粒子群中最优粒子对应的任务分配方式下所有N个任务在M个处理器中完成所需的时间,v表 示速度参数。
这里,当对所述当前的粒子群中的粒子的速度和位置进行更新后,粒子对应的任务分配方式中给每个处理器分配的任务数量发生变化,所述当前的粒子群中的粒子都向所述当前的粒子群中的最优粒子靠近,即粒子对应的任务分配方式都朝向最优粒子对应的任务分配方式靠近,以使粒子对应的任务分配方式中每个处理器的任务负载趋向于相等。
这里,当第k+1次迭代后所生成的粒子群中粒子i的适应度值小于第k次迭代后所生成的粒子群中粒子i的适应度值时,则保持粒子i在第k+1次迭代后的最优位置Xibest(k+1)为粒子i在第k次迭代后的最优位置Xibest(k);当第k+1次迭代后所生成的粒子群中最优粒子的适应度值小于第k次迭代后所生成的粒子群中最优粒子的适应度值时,则第k+1次迭代后所生成的粒子群中最优粒子仍然保持为第k次迭代后所生成的粒子群中最优粒子、第k+1次迭代后所生成的粒子群中最优粒子的位置Xgbest(k+1)仍然保持为第k次迭代后所生成的粒子群中最优粒子的位置Xgbest(k)。
这里,根据公式
Figure PCTCN2017091802-appb-000018
计算所述粒子的位置相互之间的相似度值similarity(Xij);其中,
Figure PCTCN2017091802-appb-000019
分别代表粒子i和粒子j对应的任务分配方式中相同处理器被分配的任务。
这里,可以计算所有I+1个粒子中两个或两个以上粒子之间的相似度值,比如,当计算出两个粒子之间的相似度值大于设置的第二阈值时,可认为是这两个粒子分别所对应的任务分配方式中将相同的任务分配给了相同的处理器;若两个粒子之间的相似度值大于设置的第二阈值时,可对这两个粒子分别执行变异操作,以使粒子所对应的任务分配方式中分配给不同处理器的任务进行互换,从而避免陷入局部最优解。
这里,可以只对所有I+1个粒子中两个或两个以上粒子执行变异操作, 而不必对所有I+1个粒子执行变异操作。例如,当有三个粒子且每两个粒子相互之间的相似度值都大于设置的第二阈值时,可只对所述三个粒子中的任意两个粒子执行变异操作。
所述处理模块12随机生成一个包含有I个粒子且每个粒子为一种任务分配方式的初始粒子群,包括:
从所有N个任务中随机选择一个任务分配给第一个处理器;从剩余的N-1个任务中随机选择一个任务分配给所述第二个处理器;从剩余的N-m个任务中随机选择一个任务分配给所述第m个处理器,3≤m≤M;以此循环,直至所有N个任务都被分配给M个处理器,获得一个对应一种任务分配方式的粒子;其中,当m大于M即随机分配了M个任务后,重新自第一个处理器开始分配;
循环执行上述分配过程,直至获取到与I种任务分配方式一一对应的I个粒子。
这里,当m大于M时,即已将m个任务随机分配给M个处理器,而每个处理器被分配了一个任务后,重新自第一个处理器开始分配任务,即从剩余的N-M个任务中随机选择一个任务分配给所述第一个处理器,从剩余的N-M-1个任务中随机选择一个任务分配给所述第二个处理器,并以此类推。
作为一种实施方式,所述处理模块12,还配置为当所需时间最短的任务分配方式不满足要求时,对所述更新后的处理器分配方案中的任务分配方式执行变异操作。
作为一种实施方式,当获取的所需时间最短的任务分配方式不满足要求时,即所述所需时间最短的任务分配方式下所有N个任务在M个处理器中完成所需的时间与所有N个任务在M个处理器中完成所需的理想时间之差大于预设时间阈值,则对所述更新后的处理器分配方案中的任务分配方 式执行变异操作,然后继续利用粒子群算法进行局部寻优。
这里,所述对所述更新后的处理器分配方案中的任务分配方式执行变异操作的次数可以是对全部Q种任务分配方式中的一种或一种以上任务分配方式按照遗传算法执行变异操作,且变异操作的次数可以是一次或一次以上;当一种任务分配方式执行完一次以上变异操作后,则将经变异后生成的所有新的任务分配方式中所需时间最短的任务分配方式作为该任务分配方式进行更新后的任务分配方式;当Q种任务分配方式中的每一种任务分配方式都执行完一次以上变异操作后,将会生成数量大于Q的新的任务分配方式,通过计算每一个新的任务分配方式下所有N个任务在M个处理器中完成所需的时间,将所需时间最短的Q种新的任务分配方式作为更新后的任务分配方式,以保证更新后获得的处理器分配方案中包含Q种任务分配方式。
这里,当所需时间最短的任务分配方式不满足要求即粒子群整体陷入局部最优时,通过对任意任务分配方式执行变异操作,改变粒子的位置和速度,从而使粒子群整体跳出局部最优继续寻优。
在实际应用中,所述初始化模块11、处理模块12均可由位于终端中的中央处理器(CPU,Central Processing Unit)、微处理器(MPU,Microprocessor Unit)、数字信号处理器(DSP,Digital Signal Processor)、或现场可编程门阵列(FPGA,Field-Programmable Gate Array)等实现。
本实施例还提供一种存储介质,所述存储介质存储有计算机程序,所述计算机程序被处理器执行之后,能够实现前述任意一项或多项任务调度方法。
所述计算机存储介质可为各种类型的存储介质,在本实施例中可优选为非瞬间存储介质。
本领域技术人员应当理解,本实施例的存储介质中各程序的功能,可 参照实施例所述的任务调度方法的相关描述而理解。
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。凡在本发明的精神和范围之内所作的任何修改、等同替换和改进 等,均包含在本发明的保护范围之内。
工业实用性
本发明实施例的技术方案通过将在全局空间搜索全局最优解和在局部空间搜索局部最优解结合起来,两者相互协调和促进,以求取最优的任务分配方式。本发明实施例的技术方案利用遗传算法求解任务调度的全局最优任务分配方式,而利用粒子群算法求解任务调度的局部最优任务分配方式,并将局部最优任务分配方式作为全局最优任务分配方式进化的依据,能够在粒子群整体陷入局部最优时,通过变异操作改变粒子的当前位置和速度,解决了粒子群算法在求解调度问题时容易出现早熟收敛、易陷入局部最优等缺陷。

Claims (13)

  1. 一种任务调度方法,所述方法包括:
    重复执行任务随机分配操作,获得包含有Q种任务分配方式的初始处理器分配方案;所述任务随机分配操作为将所有N个任务随机分配于M个处理器中;M、N、Q为自然数且M<N;
    重复执行下述操作,直至找到最终任务分配方式:
    基于局部搜索和全局搜索更新处理器分配方案,计算更新后的处理器分配方案中每种任务分配方式下所有N个任务在M个处理器中完成所需的时间;
    当所需时间最短的任务分配方式满足要求时,将所述所需时间最短的任务分配方式作为任务调度的最终任务分配方式。
  2. 根据权利要求1所述的方法,其中,所述方法还包括:
    当所需时间最短的任务分配方式不满足要求时,对所述更新后的处理器分配方案中的任务分配方式执行变异操作。
  3. 根据权利要求1或2所述的方法,其中,所述将所有N个任务随机分配于M个处理器中,包括:
    随机选择[1,M]之间的一个整数随机数m1,并从所有N个任务中随机选择一个任务分配给第m1个处理器;随机选择[1,M]之间的一个整数随机数m2,并从剩余的N-1个任务中随机选择一个任务分配给第m2个处理器;以此循环,直至所有N个任务都被分配给M个处理器,获得一种任务分配方式。
  4. 根据权利要求1或2所述的方法,其中,所述基于局部搜索和全局搜索更新处理器分配方案,包括:
    利用粒子群算法对当前的处理器分配方案进行局部搜索,获取所述当 前的处理器分配方案中的局部最优任务分配方式;
    将所述当前的处理器分配方案中的局部最优任务分配方式下所有N个任务在M个处理器中完成所需的时间作为第一时间;所述当前的处理器分配方案中的全局最优任务分配方式下所有N个任务在M个处理器中完成所需的时间作为第二时间;
    确定所述第一时间小于或等于所述第二时间时,将所述当前的处理器分配方案中的全局最优任务分配方式替换为所述当前的处理器分配方案中的局部最优任务分配方式;
    对所述当前的处理器分配方案中的任务分配方式执行交叉操作,获得更新后的处理器分配方案。
  5. 根据权利要求4所述的方法,其中,所述利用粒子群算法对当前的处理器分配方案进行局部搜索,获取所述当前的处理器分配方案中的局部最优任务分配方式,包括:
    随机生成一个包含有I个粒子且每个粒子为一种任务分配方式的初始粒子群,并将所述当前的处理器分配方案中的全局最优任务分配方式作为所述初始粒子群的初始最优粒子加入到所述初始粒子群中;
    根据
    Figure PCTCN2017091802-appb-100001
    更新在第k+1次迭代时粒子i的速度Vi(k+1),1≤i≤I+1,0≤k≤K-1;其中,Xgbest(k)表示在第k+1次迭代之前所述粒子群中最优粒子的位置,Xibest(k)表示在第k+1次迭代之前粒子i的最优位置,
    Figure PCTCN2017091802-appb-100002
    表示交叉操作,K为设置的最大迭代次数;所述最优粒子为粒子群中具有最小适应度值的粒子;所述适应度值为粒子在所对应的任务分配方式下所有N个任务在M个处理器中完成所需的时间;
    根据
    Figure PCTCN2017091802-appb-100003
    更新在第k+1次迭代时粒子i的位置Xi(k+1);
    计算粒子i在第k+1次迭代时的适应度值,并根据粒子i在第k+1次迭代 时的适应度值更新所述粒子i在第k+1次迭代后的最优位置Xibest(k+1)、以及更新在第k+1次迭代后所述粒子群中的最优粒子和所述粒子群中更新后的最优粒子的位置Xgbest(k+1);
    当检测出所述迭代次数k+1小于K且所述粒子群中最优粒子的适应度值小于设置的第一阈值或所述迭代次数k+1等于K时,将所述粒子群中的最优粒子所对应的任务分配方式作为所述当前的处理器分配方案中的局部最优任务分配方式;
    当检测出所述迭代次数k+1小于K且所述粒子群中最优粒子的适应度值大于或等于设置的第一阈值时,计算第k+1次迭代后所述粒子群中粒子之间的相似度值,若所述相似度值大于或等于设置的第二阈值,则对所述粒子的位置执行变异操作。
  6. 根据权利要求5所述的方法,其中,所述随机生成一个包含有I个粒子且每个粒子为一种任务分配方式的初始粒子群,包括:
    从所有N个任务中随机选择一个任务分配给第一个处理器;从剩余的N-1个任务中随机选择一个任务分配给所述第二个处理器;从剩余的N-m个任务中随机选择一个任务分配给所述第m个处理器,3≤m≤M;以此循环,直至所有N个任务都被分配给M个处理器,获得一个对应一种任务分配方式的粒子;其中,当m大于M即随机分配了M个任务后,重新自第一个处理器开始分配;
    循环执行上述分配过程,直至获取到与I种任务分配方式一一对应的I个粒子。
  7. 一种任务调度装置,所述装置包括:初始化模块、处理模块;其中,
    所述初始化模块,配置为重复执行任务随机分配操作,获得包含有Q种任务分配方式的初始处理器分配方案;所述任务随机分配操作为将所有N个任务随机分配于M个处理器中;M、N、Q为自然数且M<N;
    所述处理模块,配置为重复执行下述操作,直至找到最终任务分配方式:
    基于局部搜索和全局搜索更新处理器分配方案,计算更新后的处理器分配方案中每种任务分配方式下所有N个任务在M个处理器中完成所需的时间;
    当所需时间最短的任务分配方式满足要求时,将所述所需时间最短的任务分配方式作为任务调度的最终任务分配方式。
  8. 根据权利要求7所述的装置,其中,所述处理模块,还配置为当所需时间最短的任务分配方式不满足要求时,对所述更新后的处理器分配方案中的任务分配方式执行变异操作。
  9. 根据权利要求7或8所述的装置,其中,所述初始化模块将所有N个任务随机分配于M个处理器中为:
    随机选择[1,M]之间的一个整数随机数m1,并从所有N个任务中随机选择一个任务分配给第m1个处理器;随机选择[1,M]之间的一个整数随机数m2,并从剩余的N-1个任务中随机选择一个任务分配给第m2个处理器;以此循环,直至所有N个任务都被分配给M个处理器,获得一种任务分配方式。
  10. 根据权利要求7或8所述的装置,其中,所述处理模块基于局部搜索和全局搜索更新处理器分配方案为:
    利用粒子群算法对当前的处理器分配方案进行局部搜索,获取所述当前的处理器分配方案中的局部最优任务分配方式;
    将所述当前的处理器分配方案中的局部最优任务分配方式下所有N个任务在M个处理器中完成所需的时间作为第一时间;所述当前的处理器分配方案中的全局最优任务分配方式下所有N个任务在M个处理器中完成所需的时间作为第二时间;
    确定所述第一时间小于或等于所述第二时间时,将所述当前的处理器分配方案中的全局最优任务分配方式替换为所述当前的处理器分配方案中的局部最优任务分配方式;
    对所述当前的处理器分配方案中的任务分配方式执行交叉操作,获得更新后的处理器分配方案。
  11. 根据权利要求10所述的装置,其中,所述处理模块利用粒子群算法对当前的处理器分配方案进行局部搜索,获取所述当前的处理器分配方案中的局部最优任务分配方式为:
    随机生成一个包含有I个粒子且每个粒子为一种任务分配方式的初始粒子群,并将所述当前的处理器分配方案中的全局最优任务分配方式作为所述初始粒子群的初始最优粒子加入到所述初始粒子群中;
    根据
    Figure PCTCN2017091802-appb-100004
    更新在第k+1次迭代时粒子i的速度Vi(k+1),1≤i≤I+1,0≤k≤K-1;其中,Xgbest(k)表示在第k+1次迭代之前所述粒子群中最优粒子的位置,Xibest(k)表示在第k+1次迭代之前粒子i的最优位置,
    Figure PCTCN2017091802-appb-100005
    表示交叉操作,K为设置的最大迭代次数;所述最优粒子为粒子群中具有最小适应度值的粒子;所述适应度值为粒子在所对应的任务分配方式下所有N个任务在M个处理器中完成所需的时间;
    根据
    Figure PCTCN2017091802-appb-100006
    更新在第k+1次迭代时粒子i的位置Xi(k+1);
    计算粒子i在第k+1次迭代时的适应度值,并根据粒子i在第k+1次迭代时的适应度值更新所述粒子i在第k+1次迭代后的最优位置Xibest(k+1)、以及更新在第k+1次迭代后所述粒子群中的最优粒子和所述粒子群中更新后的最优粒子的位置Xgbest(k+1);
    当检测出所述迭代次数k+1小于K且所述粒子群中最优粒子的适应度值小于设置的第一阈值或所述迭代次数k+1等于K时,将所述粒子群中的最 优粒子所对应的任务分配方式作为所述当前的处理器分配方案中的局部最优任务分配方式;
    当检测出所述迭代次数k+1小于K且所述粒子群中最优粒子的适应度值大于或等于设置的第一阈值时,计算第k+1次迭代后所述粒子群中粒子之间的相似度值,若所述相似度值大于或等于设置的第二阈值,则对所述粒子的位置执行变异操作。
  12. 根据权利要求11所述的装置,其中,所述处理模块随机生成一个包含有I个粒子且每个粒子为一种任务分配方式的初始粒子群为:
    从所有N个任务中随机选择一个任务分配给第一个处理器;从剩余的N-1个任务中随机选择一个任务分配给所述第二个处理器;从剩余的N-m个任务中随机选择一个任务分配给所述第m个处理器,3≤m≤M;以此循环,直至所有N个任务都被分配给M个处理器,获得一个对应一种任务分配方式的粒子;其中,当m大于M即随机分配了M个任务后,重新自第一个处理器开始分配;
    循环执行上述分配过程,直至获取到与I种任务分配方式一一对应的I个粒子。
  13. 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行权利要求1至6任一项所述的任务调度方法。
PCT/CN2017/091802 2016-08-24 2017-07-05 一种任务调度方法、装置及计算机存储介质 Ceased WO2018036282A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610715089.9 2016-08-24
CN201610715089.9A CN107783831A (zh) 2016-08-24 2016-08-24 一种任务调度方法及装置

Publications (1)

Publication Number Publication Date
WO2018036282A1 true WO2018036282A1 (zh) 2018-03-01

Family

ID=61245454

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/091802 Ceased WO2018036282A1 (zh) 2016-08-24 2017-07-05 一种任务调度方法、装置及计算机存储介质

Country Status (2)

Country Link
CN (1) CN107783831A (zh)
WO (1) WO2018036282A1 (zh)

Cited By (31)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109343966A (zh) * 2018-11-01 2019-02-15 西北工业大学 一种无人节点的集群组织方法及装置
CN110400073A (zh) * 2019-07-24 2019-11-01 河南工业大学 一种基于多方向收敛粒子群优化算法的fsp方法及系统
CN110991808A (zh) * 2019-11-06 2020-04-10 中国建设银行股份有限公司 一种任务分配方法和装置
CN111191840A (zh) * 2019-12-30 2020-05-22 沈阳理工大学 基于离散粒子群优化算法的多无人机动平台任务分配方法
CN111427688A (zh) * 2020-03-23 2020-07-17 武汉轻工大学 云任务多目标调度方法、装置、电子设备及存储介质
CN112163706A (zh) * 2020-09-30 2021-01-01 北京理工大学 一种搜索任务下无人平台编组的混合优化方法
CN112328364A (zh) * 2020-11-05 2021-02-05 北京理工大学 一种基于农田肥力算法的计算密集型云工作流调度方法
CN112395059A (zh) * 2020-11-16 2021-02-23 哈尔滨工程大学 一种改进萤火虫算法的cmp任务调度方法
CN112465192A (zh) * 2020-11-06 2021-03-09 浙江华睿科技有限公司 任务调度的方法、装置、设备及介质
CN112465318A (zh) * 2020-11-17 2021-03-09 西北工业大学 一种异构水下航行器编队的任务分配方法
CN112738049A (zh) * 2020-12-23 2021-04-30 国网河北省电力有限公司电力科学研究院 一种扫描策略调整方法、装置、电子设备和存储介质
CN112785132A (zh) * 2021-01-14 2021-05-11 北京理工大学 一种用于智能仓库的多机器人移动货架任务分配方法
CN113760504A (zh) * 2020-06-04 2021-12-07 富士通株式会社 优化装置、优化方法和记录介质
CN113791879A (zh) * 2021-08-06 2021-12-14 西安电子科技大学 云平台的任务调度方法、装置、设备和计算机存储介质
CN114296898A (zh) * 2021-12-28 2022-04-08 万达信息股份有限公司 一种基于arpso的边缘计算任务调度方法
CN114638332A (zh) * 2021-12-28 2022-06-17 西北工业大学 一种基于多子群粒子群算法的侦察机器人任务分配方法
CN114648221A (zh) * 2022-03-21 2022-06-21 深圳市库宝软件有限公司 订单处理方法、装置、设备、仓储系统及存储介质
CN114692552A (zh) * 2022-03-24 2022-07-01 中国长城科技集团股份有限公司 一种三维芯片的布局方法、装置及终端设备
CN114968758A (zh) * 2022-02-23 2022-08-30 南京邮电大学 一种基于分治化粒子群算法的组合测试用例生成方法
CN114997834A (zh) * 2022-06-20 2022-09-02 哈尔滨工业大学 一种改进的免疫多智能体无人机任务分配方法
CN115187010A (zh) * 2022-06-23 2022-10-14 深圳前海微众银行股份有限公司 一种工单分配方法、工单系统和存储介质
CN115423256A (zh) * 2022-08-01 2022-12-02 电子科技大学 一种有限资源下的电子产品调试任务并行调度方法
CN115665154A (zh) * 2022-09-27 2023-01-31 武汉轻工大学 云任务分配方法及设备
CN116165542A (zh) * 2023-03-01 2023-05-26 上海玫克生储能科技有限公司 一种电池参数的辨识方法、装置、设备及存储介质
CN116529741A (zh) * 2020-10-29 2023-08-01 西门子股份公司 基于仿真的闭环aps调度优化方法、系统及存储介质
CN116663601A (zh) * 2023-06-15 2023-08-29 四川大学 一种基于粒子群优化的检测器生成方法
CN117032969A (zh) * 2023-08-14 2023-11-10 北京凯思昊鹏软件工程技术有限公司 异构多核处理器的任务分配方法、系统、装置及存储介质
CN118014541A (zh) * 2024-02-23 2024-05-10 浙江思维特数字科技有限公司 基于大数据融合算法的ipa转产时间优化方法、系统及装置
CN119835690A (zh) * 2024-12-16 2025-04-15 武汉理工大学 基于改进型鲸鱼算法的uav与usv网络资源分配系统及方法
CN120256066A (zh) * 2025-06-04 2025-07-04 杭州市滨江区浙工大人工智能创新研究院 一种基于q学习和遗传算法的异构集群任务调度融合方法
CN120743477A (zh) * 2025-08-29 2025-10-03 山东浪潮科学研究院有限公司 一种异构多核处理器任务调度方法、系统、设备及介质

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110717684B (zh) * 2019-10-15 2022-06-17 西安工程大学 一种基于任务分配协调策略与粒子群算法的任务分配方法
CN112925636B (zh) * 2019-12-06 2024-10-18 北京沃东天骏信息技术有限公司 一种请求调度、处理方法和装置
CN111343259B (zh) * 2020-02-17 2022-08-12 武汉轻工大学 基于二进制编码的云任务调度方法、服务器及存储介质
CN112766781B (zh) * 2021-01-27 2024-08-09 重庆航凌电路板有限公司 一种设备的生产任务分配方法及系统
CN114968520B (zh) * 2022-05-19 2023-11-24 北京百度网讯科技有限公司 任务搜索方法及装置、服务器和存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101604258A (zh) * 2009-07-10 2009-12-16 杭州电子科技大学 一种嵌入式异构多处理器系统的任务调度方法
CN102662743A (zh) * 2012-04-13 2012-09-12 南京信息工程大学 一种启发式粗粒度并行网格任务调度方法
CN102866912A (zh) * 2012-10-16 2013-01-09 首都师范大学 一种单指令集异构多核系统静态任务调度方法
CN103699446A (zh) * 2013-12-31 2014-04-02 南京信息工程大学 基于量子粒子群优化算法的多目标工作流动态调度方法
CN104765640A (zh) * 2014-01-02 2015-07-08 中国科学院声学研究所 一种智能服务调度方法

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104408589B (zh) * 2014-10-24 2018-03-06 陕西科技大学 基于混合粒子群算法的agv优化调度方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101604258A (zh) * 2009-07-10 2009-12-16 杭州电子科技大学 一种嵌入式异构多处理器系统的任务调度方法
CN102662743A (zh) * 2012-04-13 2012-09-12 南京信息工程大学 一种启发式粗粒度并行网格任务调度方法
CN102866912A (zh) * 2012-10-16 2013-01-09 首都师范大学 一种单指令集异构多核系统静态任务调度方法
CN103699446A (zh) * 2013-12-31 2014-04-02 南京信息工程大学 基于量子粒子群优化算法的多目标工作流动态调度方法
CN104765640A (zh) * 2014-01-02 2015-07-08 中国科学院声学研究所 一种智能服务调度方法

Cited By (44)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109343966A (zh) * 2018-11-01 2019-02-15 西北工业大学 一种无人节点的集群组织方法及装置
CN109343966B (zh) * 2018-11-01 2023-04-07 西北工业大学 一种无人节点的集群组织方法及装置
CN110400073A (zh) * 2019-07-24 2019-11-01 河南工业大学 一种基于多方向收敛粒子群优化算法的fsp方法及系统
CN110991808A (zh) * 2019-11-06 2020-04-10 中国建设银行股份有限公司 一种任务分配方法和装置
CN110991808B (zh) * 2019-11-06 2022-06-28 中国建设银行股份有限公司 一种任务分配方法和装置
CN111191840A (zh) * 2019-12-30 2020-05-22 沈阳理工大学 基于离散粒子群优化算法的多无人机动平台任务分配方法
CN111191840B (zh) * 2019-12-30 2024-02-02 沈阳理工大学 基于离散粒子群优化算法的多无人机动平台任务分配方法
CN111427688A (zh) * 2020-03-23 2020-07-17 武汉轻工大学 云任务多目标调度方法、装置、电子设备及存储介质
CN111427688B (zh) * 2020-03-23 2023-08-11 武汉轻工大学 云任务多目标调度方法、装置、电子设备及存储介质
CN113760504A (zh) * 2020-06-04 2021-12-07 富士通株式会社 优化装置、优化方法和记录介质
CN112163706A (zh) * 2020-09-30 2021-01-01 北京理工大学 一种搜索任务下无人平台编组的混合优化方法
CN116529741A (zh) * 2020-10-29 2023-08-01 西门子股份公司 基于仿真的闭环aps调度优化方法、系统及存储介质
CN112328364B (zh) * 2020-11-05 2022-07-08 北京理工大学 一种基于农田肥力算法的计算密集型云工作流调度方法
CN112328364A (zh) * 2020-11-05 2021-02-05 北京理工大学 一种基于农田肥力算法的计算密集型云工作流调度方法
CN112465192A (zh) * 2020-11-06 2021-03-09 浙江华睿科技有限公司 任务调度的方法、装置、设备及介质
CN112465192B (zh) * 2020-11-06 2024-05-17 浙江华睿科技股份有限公司 任务调度的方法、装置、设备及介质
CN112395059A (zh) * 2020-11-16 2021-02-23 哈尔滨工程大学 一种改进萤火虫算法的cmp任务调度方法
CN112465318B (zh) * 2020-11-17 2023-08-29 西北工业大学 一种异构水下航行器编队的任务分配方法
CN112465318A (zh) * 2020-11-17 2021-03-09 西北工业大学 一种异构水下航行器编队的任务分配方法
CN112738049B (zh) * 2020-12-23 2023-04-07 国网河北省电力有限公司电力科学研究院 一种扫描策略调整方法、装置、电子设备和存储介质
CN112738049A (zh) * 2020-12-23 2021-04-30 国网河北省电力有限公司电力科学研究院 一种扫描策略调整方法、装置、电子设备和存储介质
CN112785132A (zh) * 2021-01-14 2021-05-11 北京理工大学 一种用于智能仓库的多机器人移动货架任务分配方法
CN113791879A (zh) * 2021-08-06 2021-12-14 西安电子科技大学 云平台的任务调度方法、装置、设备和计算机存储介质
CN114296898A (zh) * 2021-12-28 2022-04-08 万达信息股份有限公司 一种基于arpso的边缘计算任务调度方法
CN114638332B (zh) * 2021-12-28 2024-03-01 西北工业大学 一种基于多子群粒子群算法的侦察机器人任务分配方法
CN114638332A (zh) * 2021-12-28 2022-06-17 西北工业大学 一种基于多子群粒子群算法的侦察机器人任务分配方法
CN114968758A (zh) * 2022-02-23 2022-08-30 南京邮电大学 一种基于分治化粒子群算法的组合测试用例生成方法
CN114648221A (zh) * 2022-03-21 2022-06-21 深圳市库宝软件有限公司 订单处理方法、装置、设备、仓储系统及存储介质
CN114692552A (zh) * 2022-03-24 2022-07-01 中国长城科技集团股份有限公司 一种三维芯片的布局方法、装置及终端设备
CN114997834B (zh) * 2022-06-20 2025-02-18 哈尔滨工业大学 一种改进的免疫多智能体无人机任务分配方法
CN114997834A (zh) * 2022-06-20 2022-09-02 哈尔滨工业大学 一种改进的免疫多智能体无人机任务分配方法
CN115187010A (zh) * 2022-06-23 2022-10-14 深圳前海微众银行股份有限公司 一种工单分配方法、工单系统和存储介质
CN115423256A (zh) * 2022-08-01 2022-12-02 电子科技大学 一种有限资源下的电子产品调试任务并行调度方法
CN115665154A (zh) * 2022-09-27 2023-01-31 武汉轻工大学 云任务分配方法及设备
CN115665154B (zh) * 2022-09-27 2024-06-11 武汉轻工大学 云任务分配方法及设备
CN116165542B (zh) * 2023-03-01 2023-10-20 上海玫克生储能科技有限公司 一种电池参数的辨识方法、装置、设备及存储介质
CN116165542A (zh) * 2023-03-01 2023-05-26 上海玫克生储能科技有限公司 一种电池参数的辨识方法、装置、设备及存储介质
US12222395B2 (en) 2023-03-01 2025-02-11 Shanghai Makesens Energy Storage Technology Co., Ltd. Method, apparatus and device for identifying battery parameters and storage medium
CN116663601A (zh) * 2023-06-15 2023-08-29 四川大学 一种基于粒子群优化的检测器生成方法
CN117032969A (zh) * 2023-08-14 2023-11-10 北京凯思昊鹏软件工程技术有限公司 异构多核处理器的任务分配方法、系统、装置及存储介质
CN118014541A (zh) * 2024-02-23 2024-05-10 浙江思维特数字科技有限公司 基于大数据融合算法的ipa转产时间优化方法、系统及装置
CN119835690A (zh) * 2024-12-16 2025-04-15 武汉理工大学 基于改进型鲸鱼算法的uav与usv网络资源分配系统及方法
CN120256066A (zh) * 2025-06-04 2025-07-04 杭州市滨江区浙工大人工智能创新研究院 一种基于q学习和遗传算法的异构集群任务调度融合方法
CN120743477A (zh) * 2025-08-29 2025-10-03 山东浪潮科学研究院有限公司 一种异构多核处理器任务调度方法、系统、设备及介质

Also Published As

Publication number Publication date
CN107783831A (zh) 2018-03-09

Similar Documents

Publication Publication Date Title
WO2018036282A1 (zh) 一种任务调度方法、装置及计算机存储介质
CN113821318B (zh) 一种物联网跨域子任务组合协同计算方法及系统
Ali et al. Multiobjective harris hawks optimization-based task scheduling in cloud-fog computing
Tang et al. A hybrid algorithm for flexible job-shop scheduling problem
Visalakshi et al. Dynamic task scheduling with load balancing using hybrid particle swarm optimization
CN106227599B (zh) 一种云计算系统中资源调度的方法及系统
CN104572297B (zh) 一种基于遗传算法的Hadoop作业调度方法
CN104252383B (zh) 基于混沌粒子群算法的可重构计算的软硬件任务划分方法
CN107995039A (zh) 面向云软件服务的资源自学习与自适应分配方法
CN104035816A (zh) 一种基于改进nsga-ii的云计算任务调度方法
CN104866898A (zh) 一种基于协同混合人工鱼群模型的多目标柔性作业车间调度方法
CN110969362A (zh) 一种云计算系统下多目标任务调度方法及系统
CN106843997B (zh) 一种基于Spark与优化MBBO算法的并行虚拟机聚合方法
Sivanandam et al. Dynamic task scheduling with load balancing using parallel orthogonal particle swarm optimisation
CN109684088B (zh) 云平台资源约束的遥感大数据快速处理任务调度方法
CN105976122A (zh) 一种多目标资源配置系统
CN108427602A (zh) 一种分布式计算任务的协同调度方法及装置
CN110780985A (zh) 一种有限时间的并行任务调度方法与装置
Sajedi et al. A metaheuristic algorithm for job scheduling in grid computing
CN110088730B (zh) 任务处理方法、装置、介质及其设备
CN108399105A (zh) 一种基于改进头脑风暴算法的软硬件划分方法
CN116339973A (zh) 基于粒子群优化算法的数字孪生云平台计算资源调度方法
CN113010319A (zh) 混合启发式规则和遗传算法的动态工作流调度优化方法
CN118132193B (zh) 一种基于图划分的虚拟机关联调度方法
CN112948087A (zh) 一种基于拓扑排序的任务调度方法及系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17842705

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17842705

Country of ref document: EP

Kind code of ref document: A1