CN115145694A - Cloud computing task scheduling method and device based on one-dimensional grayish wolf algorithm and storage medium - Google Patents

Cloud computing task scheduling method and device based on one-dimensional grayish wolf algorithm and storage medium Download PDF

Info

Publication number
CN115145694A
CN115145694A CN202210921087.0A CN202210921087A CN115145694A CN 115145694 A CN115145694 A CN 115145694A CN 202210921087 A CN202210921087 A CN 202210921087A CN 115145694 A CN115145694 A CN 115145694A
Authority
CN
China
Prior art keywords
population
wolf
cloud computing
value
algorithm
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210921087.0A
Other languages
Chinese (zh)
Inventor
黄兴旺
张宗良
苏锦河
李超鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jimei University
Original Assignee
Jimei University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jimei University filed Critical Jimei University
Priority to CN202210921087.0A priority Critical patent/CN115145694A/en
Publication of CN115145694A publication Critical patent/CN115145694A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides a cloud computing task scheduling method, a cloud computing task scheduling device and a storage medium based on a one-dimensional wolf algorithm, wherein the method aims at the task scheduling problem in the cloud computing environment, in the wolf algorithm, a one-dimensional real number direct coding mode is adopted for coding, so that the size of a population is equal to the number of tasks to be scheduled, and each wolf individual represents the allocation of one task to a virtual machine node; further, a greedy algorithm is adopted to carry out assignment updating on the population updated in the wolf algorithm until the end condition is met, and a cloud scheduling scheme with the minimum population fitness value is obtained and used as a final cloud computing task scheduling scheme. The method reduces the search space to one dimension, organically integrates the advantages of high performance of the evolutionary algorithm and high efficiency of the greedy algorithm, eliminates the super-parameter setting of the population size, optimizes the cloud computing resource allocation, reduces the total running time of the cloud computing task, and improves the computing efficiency of the allocated cloud computing task.

Description

Cloud computing task scheduling method and device based on one-dimensional wolf algorithm and storage medium
Technical Field
The invention relates to the field of cloud computing, in particular to a cloud computing task scheduling method and device based on a one-dimensional grey wolf algorithm and a storage medium.
Background
With the rapid development of the internet and the internet of things, the data volume in the network is increased sharply, and therefore cloud computing plays an increasingly important role. Compared with other distributed computing technologies such as grid computing, cloud computing can provide flexible and extensible services for users. The cloud provides multiple types of services. The most important services are infrastructure as a service (IaaS), platform as a service (PaaS) and software as a service (SaaS). Users can use computing resources and platforms over the internet in a pay-per-use manner without the need to know the underlying technology.
The basic working mechanism of cloud computing is to allocate computing tasks to Virtual Machines (VMs) in a resource pool to execute, so as to meet resource requirements and reduce the time required to complete the tasks. Since cloud computing is a market demand oriented application system, in order to maximize profits and return on investment for cloud providers and users, it is necessary to have a high-level resource scheduling policy capable of supporting software and user applications, tasks, works, and the like. In fact, scheduling has a direct impact on system performance, such as resource utilization efficiency and operating costs, and is therefore critical to cloud computing.
Due to the adoption of virtualization technology, virtual machines can be dynamically configured, allocated and managed, so the scheduling problem in cloud computing can be generally divided into two main levels. The first level is to plan the tasks submitted by the user and map them to a set of available VM nodes. The second level is the mapping between the VM and the host, which allows the VM to be created or migrated on the appropriate host. The tasks submitted to the virtual machines by the scheduling users directly influence the processing capacity of the cloud computing system, and the optimized scheduling algorithm can effectively improve the processing capacity of the cloud computing system. An efficient task scheduling process needs to be able to reduce the task completion time of an application. Therefore, there is a need to use algorithms for scheduling tasks in the cloud in order to allocate the tasks to resources in an optimal way. However, the time required to find a solution varies with the size of the problem, and therefore the problem is an NP-hard optimization problem, which is usually solved using two types of heuristic algorithms, evolutionary or greedy. When the evolutionary algorithm is adopted to process the task scheduling problem, although the mapping from the task to the virtual machine node can be conveniently expressed, the problems of low efficiency and dimension explosion exist. And because the greedy algorithm is adopted for processing, the global search capability is limited and the performance is difficult to guarantee because the random search or the local search is adopted.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a cloud computing task scheduling method, a cloud computing task scheduling device and a storage medium based on a one-dimensional Grey wolf algorithm, so that the search dimension of a solution space is reduced, the over-parameter setting of the population size is eliminated, a cloud scheduling scheme is greatly optimized, and the operating efficiency of a computer is improved.
In order to achieve the above object, in one aspect, a cloud computing task scheduling method based on a one-dimensional grayish wolf algorithm is provided, including:
s1, determining the problems to be solved by cloud computing task scheduling as follows: distributing N cloud computing tasks to M virtual machines to enable the total completion time of the N cloud computing tasks to be minimum, wherein N and M are both natural numbers, wherein each task in the N cloud computing tasks is distributed to a combination of scheduling schemes of the corresponding virtual machines in a gray wolf algorithm to construct a gray wolf population, and the size of the gray wolf population is N;
s2, encoding the wolf population by adopting a one-dimensional real number and initializing the wolf population, wherein each wolf individual in the wolf population is a one-dimensional integer and represents a scheduling scheme from one computing task to a virtual machine;
s3, calculating the fitness value of the scheduling scheme represented by all individuals in the wolf population by taking the total completion time of the N cloud computing tasks as a fitness function;
s4, judging whether the calculated fitness value or the iteration number meets a preset termination condition or not; if so, taking the population code with the minimum fitness value at the moment as a final cloud computing task scheduling scheme of the N cloud computing tasks, and ending the process; if not, executing step S5;
s5, updating the selected individuals in the current wolfsbane population by using a preset greedy strategy;
and S6, calculating the fitness value of the scheduling scheme represented by the updated population code, and repeating the steps S4-S6.
Further, the initialization step of step S2 includes:
s21, generating a group parent with the quantity of the individual gray wolfs equal to the task quantity by using a random generation function, wherein the parent is a variable, the dimension of each individual gray wolf in the group parent is 1, and the value range of each individual gray wolf is [1, M ];
s22, using a rounding function to the wolf individuals to obtain adjacent integer values;
s23, the fitness values of the population codes alpha, beta and delta corresponding to the three task scheduling schemes with the optimal fitness values are all inf, wherein inf represents infinite, and values of the position codes alpha _ pos, beta _ pos and delta _ pos corresponding to the population codes alpha, beta and delta are all set to be a full 0 vector of 1 xN.
Further, the evolutionary fitness of the population is calculated using a fitness function, which is fobj = max (time) i ) I is an element (1, 2,3, \8230;, M) in which M is the number of virtual machines and time i Representing the total time taken to complete all cloud computing tasks on virtual machine i.
Further, the step of updating the selected individuals in the current population in step S5 is: and updating individuals in the population by using population codes alpha, beta and delta corresponding to the three scheduling schemes with the optimal fitness value to generate a next generation population, and then randomly updating the virtual machine mapping distributed to the selected task in the original scheduling scheme by using a first wolf individual in the generated next generation population.
Further, the step S5 of updating the random individuals in the current population includes:
s51, calculating the fitness value of the current population parent by using the fitness function;
s52, updating the fitness values of the alpha, the beta and the delta according to the fitness value of the population parent, and respectively updating the corresponding population position codes alpha _ pos, beta _ pos and delta _ pos so as to keep the best fitness values of the alpha, the beta and the delta;
s53, making the next generation population as offset, and initializing the offset population by using the population code of the current parent;
s54, executing a Grey wolf algorithm hunting operation by utilizing the offset, the population size N, the Grey wolf individual value range, the Grey wolf algorithm weight factor a and the position codes of alpha, beta and delta, generating position codes representing candidate task scheduling schemes, and representing the position codes by using candidatePos;
s55, utilizing the value of the first wolf individual in the position code candidate Pos of the candidate task scheduling scheme to greedily replace the mapping of randomly selected task allocation of the offset group, generating a new candidate scheduling scheme, assigning the new candidate scheduling scheme to the offset group, and deleting the first wolf individual of the candidate Pos group;
s56, calculating the fitness value of the offset of the candidate task scheduling scheme by using a fitness function formula, if the obtained fitness value is smaller than the fitness value of the parent population, updating the parent population and the fitness value thereof by using the offset, otherwise, not operating;
s57, judging whether candidatePos are empty, if so, ending the process; if not, return to step S55.
Further, in step S54, the weighting factor a is linearly decreased from 2 to 0 as the number of iterations changes, and the hunting operation is:
calculating the values X of all N wolf individuals according to the wolf population offset i A candidate task scheduling scheme encoded candidates Pos population is composed, where i ∈ (1, 2,3, \8230; \8230, N), the X ∈ (1, 2,3, \8230;, N) i The calculation method comprises the following steps:
s5401, respectively generating 2 [0,1 ] S by using random generation function]Random numbers r1, r in between 2
S5402, using A 1 =2ar 1 -a,C 1 =2r 2 Computing the gray wolf algorithm around a gameSynergy coefficient A of phase alpha 1 And C 1
S5403, using formula D α =|C 1 ·X α -X | calculating the distance between the current offset population ith candidate gray wolf and the alpha population ith gray wolf, where X represents the value of the offset population ith gray wolf, X α Represents the value of the ith Wei Hui wolf of the alpha population;
s5404, using formula X 1 =X α -A 1 ·D α Calculating candidate solution position X of prey around alpha 1
S5405, respectively generating 2 [0,1 ] S by using random generation function]Random number r between 1 、r 2
S5406, using A 2 =2ar 1 -a,C 2 =2r 2 Calculating the synergy coefficient A of the gray wolf algorithm in the phase alpha of enclosing prey 2 And C 2
S5407, using formula D β =|C 2 ·X β -X | calculating the distance between the current offset group i-th group of candidate gray wolves and the beta group i-th gray wolves, where X represents the value of the offset group i-th group of gray wolves, X β Represents the value of the ith Wei Hui wolf of the beta population;
s5408, using formula X 2 =X β -A 2 ·D β Calculating candidate solution position X of prey around beta 2
S5409, respectively generating 2 [0,1 ] S by using random generation function]Random number r therebetween 1 、r 2
S5410, using A 3 =2ar 1 -a,C 3 =2r 2 Calculating the synergistic coefficient A of the gray wolf algorithm in the stage delta surrounding the prey 3 And C 3
S5411, using formula D δ =|C 3 ·X δ -X | calculating the distance between the current ith candidate grey wolf and the δ population ith grey wolf, where X denotes the value of the offset population ith grey wolf, X δ Represents the value of the ith Wei Hui wolf of the delta population;
s5412, using formula X 3 =X δ -A 3 ·D δ Calculating candidate solution position X of prey around delta 3
S5413, using formula X i =(X 1 +X 2 +X 3 ) Updating the position value of the offset group in the gray wolf of the ith dimension;
s5414, using integer function to X i Rounding to a value of [1,M]An integer in between.
The invention also provides a device for realizing the cloud computing task scheduling method based on the one-dimensional wolf algorithm, which comprises a memory and a processor, wherein the memory stores at least one program, and the at least one program is executed by the processor to realize the cloud computing task scheduling method based on the one-dimensional wolf algorithm.
A computer readable storage medium having stored therein at least one program, the at least one program being executed by a processor to implement the method for cloud computing task scheduling based on the one-dimensional graying algorithm described above.
The technical scheme has the following technical effects:
aiming at the task scheduling problem in the cloud computing environment, the invention provides a cloud computing task scheduling method based on a one-dimensional wolf algorithm by utilizing the characteristic that the distribution mapping from tasks to virtual machines has isomorphism in spatial distribution, wherein each individual in a population represents the mapping from a certain task to a virtual machine by carrying out one-dimensional real number direct coding on the computing task scheduling, and all the individuals jointly form a candidate feasible solution of a task scheduling scheme, so that the search space is reduced to 1 dimension, and the super parameter setting of the population size is eliminated; on the basis of a one-dimensional real number direct coding mechanism, a greedy strategy is combined to select a wolf population with excellent fitness value, a task scheduling scheme with the optimal global fitness value can be quickly and effectively searched, and the defect that the greedy algorithm is easy to fall into local optimization due to poor precision of the wolf algorithm is overcome. The method organically integrates the advantages of high performance of the evolutionary algorithm and high efficiency of the greedy algorithm, can effectively reduce the overall completion time of the cloud computing task, optimizes the cloud computing resource allocation, and accelerates the cloud computing speed.
Drawings
Fig. 1 is a schematic flowchart of a cloud computing task scheduling method based on a one-dimensional wolf algorithm according to an embodiment of the present invention;
fig. 2 is a model diagram of a cloud computing task scheduling method based on a one-dimensional wolf algorithm according to an embodiment of the present invention;
fig. 3 is a schematic diagram illustrating a comparison between one-dimensional real number codes and conventional codes of a grey wolf population in the cloud computing task scheduling method based on the one-dimensional grey wolf algorithm according to the embodiment of the present invention;
fig. 4 is a schematic diagram of an apparatus for implementing a cloud computing task scheduling method based on a one-dimensional grayish wolf algorithm according to an embodiment of the present invention;
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention.
The invention will now be further described with reference to the accompanying drawings and detailed description.
The first embodiment is as follows:
fig. 1 is a schematic flow diagram of a cloud computing task scheduling method based on a one-dimensional grayish wolf algorithm according to an embodiment of the present invention. The specific method comprises the following steps:
s1, determining the problems to be solved by cloud computing task scheduling as follows: distributing N cloud computing tasks to M virtual machines to enable the total completion time of the N cloud computing tasks to be minimum, wherein N and M are both natural numbers, wherein each task in the N cloud computing tasks is distributed to a combination of scheduling schemes of the corresponding virtual machines in a gray wolf algorithm to construct a gray wolf population, and the size of the gray wolf population is N;
specifically, in the assumption of the cloud computing task scheduling problem: task scheduling of cloud computing refers to allocating or mapping tasks to specific virtual machines, and aims to reasonably allocate required resources to tasks submitted by cloud computing users, so that resource utilization rate of a system and operation efficiency of cloud computers are improved. The result of the scheduling is typically embodied as a mapping association between the task and the virtual machine node, i.e., determining on which virtual machine node that task is executing. Due to the heterogeneous diversity of tasks and virtual machine nodes, research is needed to determine how to allocate cloud computing tasks to virtual machine nodes, so as to obtain the shortest task completion time. Specifically, for a given cloud computing task, it is necessary to find the most appropriate virtual machine to execute the task, thereby minimizing the task execution time, where the task execution time does not include the data transfer time.
Exemplarily, as shown in fig. 2, a model schematic diagram of a cloud computing task scheduling method based on a one-dimensional wolf algorithm according to an embodiment of the present invention is shown, and for convenience of research, the embodiment of the present invention makes the following assumptions, as shown in fig. 2:
(1) The influence of secondary factors such as communication delay, bandwidth and data transmission among the virtual machine nodes is not considered, and the execution time of each task is equal to the length of the task divided by the execution speed of the virtual machine node where the task is located;
(2) Abstracting a task into a machine instruction number with the unit of MI (million instructions) and the length randomly selected within a certain range;
(3) All cloud computing resources are mapped into virtual machines, the performance unit of the virtual machines is MIPS (million instructions per second), and the performance of the virtual machines is selected within a certain range;
(4) Each task is independent, and when a plurality of tasks are distributed to the same virtual machine, the tasks are executed according to the first-in first-out principle;
(5) The number of submitted tasks is more than or equal to the number of virtual machines;
based on the above assumptions, the cloud computing task scheduling problem can be described as: the N cloud computing tasks with different lengths are distributed to the M virtual machines with different performances, so that the total time for completing the N cloud computing tasks is the minimum.
S2, coding the grey wolf population by adopting a one-dimensional real number and initializing the grey wolf population, wherein each grey wolf individual in the grey wolf population is a one-dimensional integer and represents a scheduling scheme from one calculation task to a virtual machine; specifically, firstly, a group parent with the quantity of wolf individuals equal to the task quantity is generated by utilizing a random generation function, the parent is a variable, the dimension of each wolf individual in the group parent is 1, and the value range of the wolf individual is [1, M ]; secondly, using round rounding function to the individual wolf, rounding to obtain adjacent integer value; thirdly, the fitness values of the population codes alpha, beta and delta corresponding to the three task scheduling schemes with the optimal fitness value are all inf, wherein inf represents plus infinity, and the values of the corresponding position codes alpha _ pos, beta _ pos and delta _ pos are all set to be a full 0 vector of 1 xN.
Fig. 3 is a schematic diagram illustrating a comparison between one-dimensional real number codes and conventional codes of a gray wolf population in the cloud computing task scheduling method based on the one-dimensional gray wolf algorithm according to an embodiment of the present invention. In fig. 3, the scheduling schemes represented by the individual grey wolves in the conventional grey wolves algorithm are composed of N parameters, and all the scheduling schemes constitute a grey wolves total group including all the individual grey wolves. In the gray wolf algorithm of the embodiment of the invention, the gray wolf individual scheduling scheme is a mapping which is distributed to a certain virtual machine by a task and is a one-dimensional integer.
Exemplarily, suppose that there are N tasks, M virtual machine nodes, and the number of the position of the sirius in the group represents the number of a certain task, and the value range is [1, N ]](ii) a The positive integer value on each individual 1-dimensional wolf represents the number of the assigned virtual machine, and the value range is [1, M']. Exemplarily, let N =8,m =3, the group code is (2,3,1,3,2,3,1,1) T It shows that the 1 st and 5 th tasks are scheduled on the 2 nd virtual machine, the 2 nd, 4 th and 6 th tasks are scheduled on the 3 rd virtual machine, and the 3 rd, 7 th and 8 th tasks are scheduled on the 1 st virtual machine.
And S3, calculating the fitness value of the scheduling scheme represented by all individuals in the wolf population by taking the total completion time of the N cloud computing tasks as a fitness function. Wherein the fitness function is fobj = max (time) i ) I is an element (1, 2,3, \8230;, M) in which M is the number of virtual machines and time i Representing the total time taken to complete all cloud computing tasks on virtual machine i.
Specifically, in the embodiment of the invention, the shortest total task completion time of the cloud computing task is taken as an optimization target, so that the total task completion time of the cloud computing task is taken as a fitness function, and the smaller the total task completion time of the cloud computing task is, the more excellent the wolf population is; therefore, the fitness function is set to fobj = max (time) i ) I ∈ (1, 2,3, \8230;, M), in which time i The time taken for completing all cloud computing tasks on the virtual machine i is represented, and M is the number of the virtual machines. The fitness of the population depends on the virtual machine nodes which spend the most time to process all cloud tasks in the cloud, and the smaller the fitness value is, the greater the population evolution adaptability is represented, namely, the smaller the total time for completing the tasks of the cloud computing task is, the better the population is.
S4, judging whether the calculation result or the iteration times of the fitness value meets a preset termination condition or not; if yes, the cluster code with the minimum fitness value at the moment is used as a final cloud computing task scheduling scheme, and the process is ended; if not, step S5 is executed.
Specifically, the termination condition is a minimum threshold of the cloud computing user group to the acceptable task scheduling time or a maximum iteration number preset for the scheduling method; when the fitness value of a certain population reaches the lowest threshold value of the acceptable task scheduling time of the cloud user population, the cloud user population is considered to meet the termination condition, and the code of the population is the final cloud computing task scheduling coding scheme; or when the iteration times reach the preset maximum iteration times, the code of the population with the lowest fitness is the final cloud computing task scheduling scheme.
In this embodiment, for example, according to the grayish wolf algorithm, the population with the optimal fitness value is set to be α, the population with the suboptimal fitness value is set to be β, and the population with the third best fitness value is set to be δ, and if the fitness value calculation result or the iteration number satisfies the preset termination condition, the population with the smaller fitness value in the fitness value of the current parent population and the fitness value of α is used as the final cloud calculation task scheduling scheme.
S5, updating the random individuals in the current wolfsbane population by using a preset greedy strategy, wherein the updating comprises the following steps:
and updating individuals in the population by using population codes alpha, beta and delta corresponding to the three scheduling schemes with optimal fitness values to generate a next generation population, and randomly updating the mapping of the selected task allocation in the original scheduling scheme by using the first wolf individual in the generated next generation population, thereby realizing the organic integration of the greedy algorithm and the evolutionary algorithm.
Specifically, the step of updating the current population parent comprises the following steps:
s51, calculating the fitness value of the current population parent by using a fitness function;
s52, updating the fitness values of the alpha, the beta and the delta according to the fitness value of the population parent, and respectively updating the corresponding population position codes alpha _ pos, beta _ pos and delta _ pos so as to keep the best fitness values of the alpha, the beta and the delta;
s53, making the next generation population as offset, and initializing the offset population by using the population code of the current parent;
s54, executing a grey wolf algorithm hunting operation by utilizing the offset matching, the population size N, the grey wolf individual value range, the grey wolf algorithm weight factor a and the position codes of alpha, beta and delta, generating position codes representing candidate task scheduling schemes, and representing the position codes by using candidatePos;
s55, utilizing the value of the first grey wolf individual in the position code candidate Pos of the candidate task scheduling scheme to greedy the mapping distributed by a certain task of an offset group to randomly replace the offset group, generating a new candidate scheduling scheme and assigning the new candidate scheduling scheme to the offset group;
for example, the mapping allocated to all tasks in the offset group may also be replaced at one time by greedy individuals in candidatePos to obtain a new candidate scheduling scheme, and the new candidate scheduling scheme is assigned to offset, where all greedy individuals in the candidatePos group are replaced at one time by offset group.
S56, calculating the fitness value of the offset of the candidate task scheduling scheme by using a fitness function formula, if the obtained fitness value is smaller than the fitness value of the parent population, updating the parent population and the fitness value thereof by using the offset, otherwise, not operating;
s57, judging whether candidatePos is empty or not, if so, ending the process; if not, the process returns to step S55. Illustratively, this process of random individual updates to the parent population may be done only once, without looping.
Specifically, the hunting operation at S54 is: calculating the value X of all N wolf individuals for the wolf population offset i The candidate task scheduling scheme encoding candidate candidates pos population is obtained, where i e (1, 2,3, \8230;, N), the weighting factor a decreases linearly from 2 to 0 as the number of iterations varies. X i The calculation method comprises the following steps:
s5401, respectively generating 2 [0,1 ] S by using random generation function]Random number r between 1 、r 2
S5402, using A 1 =2ar 1 -a,C 1 =2r 2 Calculating the synergistic coefficient A of the gray wolf algorithm in the stage alpha of surrounding the prey 1 And C 1
S5403, using formula D α =|C 1 ·X α -X | calculating the distance between the current ith candidate gray wolf and the alpha population ith gray wolf, where X represents the position value of the offset population ith gray wolf, X α A value representing the ith dimension of the alpha population;
s5404, using formula X 1 =X α -A 1 ·D α Calculating candidate solution position X of prey around alpha 1
S5405, respectively generating 2 [0,1 ] S by using random generating function]Random number r between 1 、r 2
S5406, using A 2 =2ar 1 -a,C 2 =2r 2 Calculating the synergy coefficient A of the gray wolf algorithm in the phase alpha of enclosing prey 2 And C 2
S5407, using formula D β =|C 2 ·X β -X | calculating the distance between the current ith candidate gray wolf and the beta population ith gray wolf, where X represents the distanceThe location value, X, of the ith Wei Hui wolf of the offset group β A value representing the ith dimension of the beta population;
s5408, using formula X 2 =X β -A 2 ·D β Calculating candidate solution position X of prey around beta 2
S5409, respectively generating 2 [0,1 ] S by using random generation function]Random number r between 1 、r 2
S5410, using A 3 =2ar 1 -a,C 3 =2r 2 Calculating the synergistic coefficient A of the gray wolf algorithm in the stage delta of enclosing prey 3 And C 3
S5411, using formula D δ =|C 3 ·X δ -X | calculating the distance between the current ith candidate gray wolf and the δ population ith gray wolf, where X represents the position value of the offset population ith gray wolf, X δ A value representing the ith dimension of the δ population;
s5412, using formula X 3 =X δ -A 3 ·D δ Calculating candidate solution position X of prey around delta 3
S5413, using formula X i =(X 1 +X 2 +X 3 ) A/3, updating the position value of the gray wolf in the i dimension;
s5414, using integer function to X i Rounding to a value of [1,M]An integer in between.
And S6, calculating the fitness value of the scheduling scheme represented by the updated population code, and repeating the steps S4-S6.
By utilizing the characteristic that the distribution mapping from the tasks to the virtual machines has isomorphic spatial distribution, the embodiment of the invention provides a cloud task scheduling method based on a one-dimensional wolf algorithm, each individual in a population represents the mapping from a certain task to the virtual machines by directly coding the task scheduling by a one-dimensional real number, and all the individuals jointly form a candidate feasible solution of a task scheduling scheme, so that the search space is reduced to 1 dimension, and the super-parameter setting of the population size is eliminated; and further, assigning and updating the updated population in the wolf algorithm by adopting a greedy algorithm until the end condition is met, and acquiring a cloud scheduling scheme with the minimum population fitness value as a final cloud computing task scheduling scheme. The greedy strategy is combined to select the wolf population with excellent fitness value, the task scheduling scheme with the optimal global fitness value can be quickly and effectively searched, and the defect that the greedy algorithm is easy to fall into local optimal due to poor precision of the wolf algorithm is overcome. The cloud computing task scheduling method based on the multi-task scheduling has the advantages of combining the high performance of the evolutionary algorithm and the high efficiency of the greedy algorithm, optimizing the cloud computing task scheduling scheme, reducing the total operation time of the cloud computing tasks, and greatly improving the computing efficiency of the cloud computing under the condition that the virtual machine resources are limited and more tasks are scheduled at one time.
Example two:
the present invention further provides a schematic diagram of an apparatus for implementing a cloud computing task scheduling method based on a one-dimensional wolf's algorithm, as shown in fig. 4, the apparatus includes a processor 401, a memory 402, a bus 403, and a computer program stored in the memory 402 and operable on the processor 401, the processor 401 includes one or more processing cores, the memory 402 is connected to the processor 401 through the bus 403, the memory 402 is used for storing program instructions, and the processor implements the steps in the foregoing method embodiments of the first embodiment of the present invention when executing the computer program.
Further, as an executable scheme, the apparatus for implementing the cloud computing task scheduling method based on the one-dimensional grayish wolf algorithm may be a computer unit, and the computer unit may be a desktop computer, a notebook, a palm computer, a cloud server, and other computing devices. The computer unit may include, but is not limited to, a processor, a memory. It will be appreciated by those skilled in the art that the above-described constituent structures of the computer unit are merely examples of the computer unit, and do not constitute a limitation of the computer unit, and may include more or less components than those described above, or combine some components, or different components. For example, the computer unit may further include an input/output device, a network access device, a bus, and the like, which is not limited in this embodiment of the present invention.
Further, as an executable solution, the Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, a discrete hardware component, and the like. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like which is the control center for the computer unit and which is connected to various parts of the overall computer unit by various interfaces and lines.
The memory may be used to store the computer programs and/or modules, and the processor may implement the various functions of the computer unit by running or executing the computer programs and/or modules stored in the memory, as well as by invoking data stored in the memory. The memory can mainly comprise a program storage area and a data storage area, wherein the program storage area can store an operating system and an application program required by at least one function; the storage data area may store data created according to the use of the mobile phone, and the like. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
Example three:
the invention also provides a computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the steps of the above-mentioned method of an embodiment of the invention.
The computer unit integrated module/unit, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments described above may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, read-Only Memory (ROM), random Access Memory (RAM), software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is appropriately increased or decreased as required by legislation and patent practice in the jurisdiction.
While the invention has been particularly shown and described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (8)

1. A cloud computing task scheduling method based on a one-dimensional wolf algorithm is characterized by comprising the following steps:
s1, determining the problems to be solved by cloud computing task scheduling as follows: distributing N cloud computing tasks to M virtual machines to minimize the total completion time of the N cloud computing tasks, wherein N and M are natural numbers, each of the N cloud computing tasks is distributed to a combination of scheduling schemes of the corresponding virtual machines in a graying algorithm to construct a graying population, and the size of the graying population is N;
s2, coding the grey wolf population by adopting a one-dimensional real number and initializing the grey wolf population, wherein each grey wolf individual in the grey wolf population is a one-dimensional integer and represents a scheduling scheme from one calculation task to a virtual machine;
s3, calculating the fitness value of the scheduling scheme represented by all individuals in the wolf population by taking the total completion time of the N cloud computing tasks as a fitness function;
s4, judging whether the calculated fitness value or the iteration number meets a preset termination condition or not; if so, taking the population code with the minimum fitness value at the moment as a final cloud computing task scheduling scheme of the N cloud computing tasks, and ending the process; if not, executing step S5;
s5, updating random individuals in the current wolfsbane population by using a preset greedy strategy;
and S6, calculating the fitness value of the scheduling scheme represented by the updated population code, and repeating the steps S4-S6.
2. The method of claim 1, wherein the step of initializing of step S2 comprises:
s21, generating a group parent with the quantity of the individual gray wolfs equal to the task quantity by using a random generation function, wherein the parent is a variable, the dimension of each individual gray wolf in the group parent is 1, and the value range of each individual gray wolf is [1, M ];
s22, using an integer taking function to the wolf individuals to obtain adjacent integer values;
s23, the fitness values of the population codes alpha, beta and delta corresponding to the three task scheduling schemes with the optimal fitness values are all inf, wherein inf represents infinite, and values of the position codes alpha _ pos, beta _ pos and delta _ pos corresponding to the population codes alpha, beta and delta are all set to be a full 0 vector of 1 xN.
3. The method of claim 2, wherein the evolutionary fitness of the population is calculated using a fitness function that is fobj = max (time) i ) I is an element (1, 2,3, \8230;, M) in which M is the number of virtual machines and time i Representing the total time taken to complete all cloud computing tasks on virtual machine i.
4. The method of claim 3, wherein the step of updating the selected individuals in the current population in step S5 is: updating individuals in the population by using population codes alpha, beta and delta corresponding to the three scheduling schemes with optimal fitness values to generate a next generation population, and then randomly updating the virtual machine mapping allocated to the selected task in the original scheduling scheme by using the first wolf individual in the generated next generation population.
5. The method of claim 4, wherein the step S5 of updating the random individuals in the current population comprises the steps of:
s51, calculating the fitness value of the current population parent by using the fitness function;
s52, updating the fitness values of alpha, beta and delta according to the fitness value of the population parent, and respectively updating the corresponding population position codes alpha _ pos, beta _ pos and delta _ pos;
s53, making the next generation population as offset, and initializing the offset population by using the population code of the current parent;
s54, executing a Grey wolf algorithm hunting operation by utilizing the offset, the population size N, the Grey wolf individual value range, the Grey wolf algorithm weight factor a and the position codes of alpha, beta and delta, generating position codes representing candidate task scheduling schemes, and representing the position codes by using candidatePos;
s55, utilizing the value of the first wolf individual in the position code candidate Pos of the candidate task scheduling scheme to greedily replace the mapping of randomly selected task allocation of the offset group, generating a new candidate scheduling scheme, assigning the new candidate scheduling scheme to the offset group, and deleting the first wolf individual of the candidate Pos group;
s56, calculating the fitness value of the offset of the candidate task scheduling scheme by using a fitness function formula, if the obtained fitness value is smaller than the fitness value of the parent population, updating the parent population and the fitness value thereof by using the offset, otherwise, not performing operation;
s57, judging whether candidatePos are empty, if so, ending the process; if not, the process returns to step S55.
6. The method according to claim 5, wherein the weighting factor a is decreased linearly from 2 to 0 as the number of iterations varies in step S54, and the hunting operation is:
calculating the values X of all N wolf individuals according to the wolf population offset i A candidate task scheduling scheme encoded candidates Pos population is composed, where i ∈ (1, 2,3, \8230; \8230, N), the X ∈ (1, 2,3, \8230;, N) i The calculation method comprises the following steps:
s5401, respectively generating 2 [0,1 ] S by using random generation function]Random number r between 1 、r 2
S5402, using A 1 =2ar 1 -a,C 1 =2r 2 Calculating the synergistic coefficient A of the gray wolf algorithm in the stage alpha of surrounding the prey 1 And C 1
S5403, using formula D α =|C 1 ·X α -X | calculating the distance between the current offset population ith candidate gray wolf and the alpha population ith gray wolf, where X represents the value of the offset population ith gray wolf, X a Represents the value of the ith Wei Hui wolf of the alpha population;
s5404, using formula X 1 =X α -A 1 ·D α Calculating candidate solution position X of prey around alpha 1
S5405, respectively generating 2 [0,1 ] S by using random generating function]Random number r between 1 、r 2
S5406, using A 2 =2ar 1 -a,C 2 =2r 2 Calculating the synergistic coefficient A of the gray wolf algorithm in the stage alpha of surrounding the prey 2 And C 2
S5407, using formula D β =|C 2 ·X β -X | calculating the distance between the current offset population ith candidate gray wolf and the beta population ith gray wolf, where X represents the value of the offset population ith gray wolf, X β Represents the value of the ith Wei Hui wolf of the beta population;
s5408, advantageUsing formula X 2 =X β -A 2 ·D β Calculating candidate solution position X of prey around beta 2
S5409, respectively generating 2 [0,1 ] S by using random generation function]Random number r between 1 、r 2
S5410, using A 3 =2ar 1 -a,C 3 =2r 2 Calculating the synergistic coefficient A of the gray wolf algorithm in the stage delta of enclosing prey 3 And C 3
S5411, using formula D δ =|C 3 ·X δ -X | calculating the distance between the current ith dimension candidate gray wolf and the δ population ith dimension gray wolf, where X represents the value of the offset population ith dimension gray wolf, X δ Represents the value of the ith Wei grey wolf of the delta population;
s5412, using formula X 3 =X δ -A 3 ·D δ Calculating candidate solution position X of prey around delta 3
S5413, using formula X i =(X 1 +X 2 +X 3 ) Updating the position value of the offset population in the i-dimensional grey wolf;
s5414, using integer function to X i Rounding to a value of [1,M]An integer in between.
7. An apparatus for implementing a method for cloud computing task scheduling based on one-dimensional grayling algorithm, the apparatus comprising a memory and a processor, the memory storing at least one program, the at least one program being executed by the processor to implement the method for cloud computing task scheduling based on one-dimensional grayling algorithm according to any one of claims 1 to 6.
8. A computer-readable storage medium, wherein at least one program is stored in the storage medium, and the at least one program is executed by a processor to implement the method for cloud computing task scheduling based on one-dimensional wolf's algorithm according to any one of claims 1 to 6.
CN202210921087.0A 2022-08-02 2022-08-02 Cloud computing task scheduling method and device based on one-dimensional grayish wolf algorithm and storage medium Pending CN115145694A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210921087.0A CN115145694A (en) 2022-08-02 2022-08-02 Cloud computing task scheduling method and device based on one-dimensional grayish wolf algorithm and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210921087.0A CN115145694A (en) 2022-08-02 2022-08-02 Cloud computing task scheduling method and device based on one-dimensional grayish wolf algorithm and storage medium

Publications (1)

Publication Number Publication Date
CN115145694A true CN115145694A (en) 2022-10-04

Family

ID=83414158

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210921087.0A Pending CN115145694A (en) 2022-08-02 2022-08-02 Cloud computing task scheduling method and device based on one-dimensional grayish wolf algorithm and storage medium

Country Status (1)

Country Link
CN (1) CN115145694A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109545372A (en) * 2018-11-06 2019-03-29 湖北工业大学 A kind of patient's physiological data feature selection approach based on apart from Greedy strategy
US20210133534A1 (en) * 2019-10-30 2021-05-06 Inner Mongolia Agricultural University Cloud task scheduling method based on phagocytosis-based hybrid particle swarm optimization and genetic algorithm
CN113781002A (en) * 2021-09-18 2021-12-10 北京航空航天大学 Low-cost workflow application migration method based on agent model and multi-population optimization in cloud edge cooperative network
CN114296814A (en) * 2021-12-10 2022-04-08 中国科学院深圳先进技术研究院 Method, system, terminal and storage medium for unloading edge cloud computing tasks

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109545372A (en) * 2018-11-06 2019-03-29 湖北工业大学 A kind of patient's physiological data feature selection approach based on apart from Greedy strategy
US20210133534A1 (en) * 2019-10-30 2021-05-06 Inner Mongolia Agricultural University Cloud task scheduling method based on phagocytosis-based hybrid particle swarm optimization and genetic algorithm
CN113781002A (en) * 2021-09-18 2021-12-10 北京航空航天大学 Low-cost workflow application migration method based on agent model and multi-population optimization in cloud edge cooperative network
CN114296814A (en) * 2021-12-10 2022-04-08 中国科学院深圳先进技术研究院 Method, system, terminal and storage medium for unloading edge cloud computing tasks

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ATIYEH ANSARI等: "A Modified Grey Wolf Optimization for Energy Efficiency and Resource Wastage Balancing in Cloud Data-Centers", 《IEEE》, 31 December 2020 (2020-12-31), pages 392 - 398 *

Similar Documents

Publication Publication Date Title
AlEbrahim et al. Task scheduling for heterogeneous computing systems
KR102499076B1 (en) Graph data-based task scheduling method, device, storage medium and apparatus
US9329867B2 (en) Register allocation for vectors
CN112396172A (en) Method and apparatus for managing power of deep learning accelerator system
CN114026569A (en) Extended convolution using systolic arrays
CN109634742B (en) Time constraint scientific workflow optimization method based on ant colony algorithm
Wesolowski et al. Tram: Optimizing fine-grained communication with topological routing and aggregation of messages
US20240095870A1 (en) Scheduling jobs on graphical processing units
US11294930B2 (en) Resource scaling for distributed database services
CN115408100A (en) Container cluster scheduling method, device, equipment and storage medium
CN114730275A (en) Method and apparatus for vectorized resource scheduling in a distributed computing system using tensor
Alsmady et al. Workflow scheduling in cloud computing using memetic algorithm
Almi'Ani et al. Partitioning-based workflow scheduling in clouds
CN110308965B (en) Rule-based heuristic virtual machine distribution method and system for cloud data center
CN114968554B (en) Workflow cloud scheduling method of whale algorithm based on kernel function mapping mode
CN115145694A (en) Cloud computing task scheduling method and device based on one-dimensional grayish wolf algorithm and storage medium
US12001382B2 (en) Methods, apparatus, and articles of manufacture to generate command lists to be offloaded to accelerator circuitry
Herrmann et al. Memory-aware list scheduling for hybrid platforms
Bonifaci et al. Algorithms for hierarchical and semi-partitioned parallel scheduling
WO2013058396A1 (en) Task allocation device and task allocation method
CN113886090A (en) Memory allocation method and device, equipment and storage medium
CN114661363A (en) Pipeline instruction distribution method, system, equipment and medium
CN114168311A (en) Computing device and processor-implemented method
GB2606684A (en) Allocating computational tasks to computer hardware
CN115878254A (en) Memory allocation method, memory allocation device, computer equipment, storage medium and program product

Legal Events

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