CN112181598A - Cloud computing task scheduling method based on improved genetic algorithm - Google Patents

Cloud computing task scheduling method based on improved genetic algorithm Download PDF

Info

Publication number
CN112181598A
CN112181598A CN202011086788.4A CN202011086788A CN112181598A CN 112181598 A CN112181598 A CN 112181598A CN 202011086788 A CN202011086788 A CN 202011086788A CN 112181598 A CN112181598 A CN 112181598A
Authority
CN
China
Prior art keywords
population
individual
fitness
individuals
chromosome
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.)
Granted
Application number
CN202011086788.4A
Other languages
Chinese (zh)
Other versions
CN112181598B (en
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.)
Inner Mongolia Agricultural University
Original Assignee
Inner Mongolia Agricultural 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 Inner Mongolia Agricultural University filed Critical Inner Mongolia Agricultural University
Priority to CN202011086788.4A priority Critical patent/CN112181598B/en
Publication of CN112181598A publication Critical patent/CN112181598A/en
Application granted granted Critical
Publication of CN112181598B publication Critical patent/CN112181598B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/12Computing arrangements based on biological models using genetic models
    • G06N3/126Evolutionary algorithms, e.g. genetic algorithms or genetic programming
    • 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
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing

Landscapes

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

Abstract

The invention discloses a cloud computing task scheduling method based on an improved genetic algorithm, aiming at the task scheduling problem in a cloud environment, a real number direct coding mode is adopted for coding, and a competition intersection method is utilized for initializing a population; calculating the fitness value of each individual in the population by taking the total cloud task completion time as a fitness function; judging whether a termination condition is met, if so, determining that the code of the chromosome individual with the minimum fitness value in the population is the final cloud task scheduling scheme, otherwise, selecting excellent individuals in the population by using a three-stage selection method, carrying out phagocytosis operation on the population subjected to the selection operation, and carrying out mutation operation on the population subjected to the phagocytosis operation until the fitness value of the individual in the final population meets the termination condition. The cloud computing task scheduling method obviously improves the overall completion time of the cloud task, and has effectiveness in the aspect of cloud computing task scheduling.

Description

Cloud computing task scheduling method based on improved genetic algorithm
Technical Field
The invention relates to the technical field of cloud, in particular to a cloud computing task scheduling method based on an improved genetic algorithm.
Background
Cloud computing is defined as an information technology source and delivery model for enabling convenient, on-demand network access to a shared pool of configurable computing resources (e.g., networks, servers, storage, applications, and services), which can be quickly provisioned and released with minimal administrative effort or service provider interaction. Delivery models for cloud computing fall into three broad categories, software as a service (SaaS), platform as a service (PaaS), and infrastructure as a service (IaaS). With the wide application of cloud computing, the number of cloud users and the amount of cloud tasks are growing faster and faster, so that the cloud environment faces a serious challenge. How to reasonably utilize and allocate various resources provided by a cloud environment, how to effectively schedule massive tasks submitted by users, and how to ensure load balance of a cloud system have become hot issues in the field of cloud computing research. Even under some simple conditions, the optimal scheduling allocation of the cloud task is realized due to the large solution space and the dynamic property of heterogeneous resources, and the method belongs to the NP complete problem. In this type, we cannot get a solution in polynomial time. In a cloud computing environment, a large number of users need resources at the same time, so the scheduling method should be determined as soon as possible.
For the task scheduling problem under the cloud environment, researchers at home and abroad propose a plurality of non-heuristic algorithms and heuristic algorithms. For example, Max-Min algorithm and Min-Min algorithm are a common non-heuristic algorithm, and particle swarm algorithm and genetic algorithm are a common heuristic algorithm. Osman and Laporte define meta-heuristics as an iterative generation process that integrates different concepts to explore and leverage search space to guide subordinate heuristics, and uses learning strategies to construct information to efficiently find optimal solutions. With the gradual maturity of task scheduling algorithms in cloud computing environments, in particular heuristic algorithms, the method is gradually widely applied. Various heuristic intelligent Scheduling algorithms based on improved optimization have appeared, for example, the document "An effective Approach to Genetic Algorithm for Task Scheduling in Cloud Com-typing Environment" proposes An improved single-user job Genetic Algorithm that encourages the formation of solutions by establishing fitness, thereby minimizing execution time and execution cost. The experimental result shows that the algorithm has good performance under the heavy load condition; a task scheduling optimization scheme based on a dynamic scheduling queue and a mixed element heuristic algorithm is provided in the document A novel task scheduling algorithm on dynamic requests and hybrid metal-hybrid algorithms for closed computing environment. The literature provides two mixed element heuristic algorithms, wherein the first one is Fuzzy Logic and Particle Swarm Optimization (FLPSO), the second one is Simulated Annealing and Particle Swarm Optimization (SAPSO), the two mixed element heuristic algorithms are mixed with a dynamic scheduling queue to form a TSDQ-FLPSO algorithm and a TSDQ-SAPSO algorithm, and the two mixed element heuristic algorithms achieve good performance in the aspects of minimizing waiting time and queue length, reducing maximum completion time, maximizing resource utilization rate, minimizing execution cost and improving load balance; document Improved Hybrid systematic organic Search Task-Scheduling Algorithm for Cloud Com-rendering proposes the SA-CLS-SOS Algorithm, which simplifies the symbiont Search Algorithm (SOS), introduces the Chaotic Local Search (CLS) into the simplified SOS to increase the convergence speed, and adds the simulated annealing Algorithm (SA) to the SOS Algorithm to help avoid trapping into local minima. A document A slave based optimization algorithm for task scheduling in closed computing environment provides an ant colony optimization-based cloud task scheduling algorithm (IACO), which can effectively allocate tasks of cloud users to virtual machines in a cloud computing environment.
However, according to the theorem of "no free lunch", one metaheuristic is unlikely to solve all optimization problems optimally, one metaheuristic can provide optimal solutions for small problems, but as the scale of the problem increases, the solutions generated by these algorithms are far from optimal solutions by mixing the metaheuristic with another metaheuristic or a local search method, and by using an enabled heuristic search technique to generate the initial solution, the quality of the solutions obtained by the metaheuristic and the convergence speed can be improved. At present, a cloud computing task scheduling mechanism does not form a unified standard or specification.
Disclosure of Invention
Aiming at the existing problems, the invention aims to provide a cloud computing task scheduling method based on an improved genetic algorithm, which is improved aiming at the problem that the quality of a sample solution cannot be ensured by initializing a population by using a random function in a basic genetic algorithm, and meanwhile, excellent individuals in the population are selected by combining a three-stage selection method, so that the stability and diversity of the population can be effectively maintained, and the damage of a fixed cross factor at the later stage of the algorithm to the excellent individuals is reduced by using a phagocytosis mechanism for phagocytosis operation.
In order to achieve the purpose, the technical scheme adopted by the invention is as follows:
the cloud computing task scheduling method based on the improved genetic algorithm is characterized by comprising the following steps of:
s1, determining a cloud computing task problem: distributing the N cloud tasks with different lengths to the M virtual machines with different individual performances to enable the total completion time of the N cloud tasks to be shortest;
s2, encoding: adopting a real number direct coding mode, wherein each chromosome individual in the population represents a scheduling scheme, and the length of the chromosome is equal to the number of tasks;
s3, initializing population: initializing a population by using a competitive crossing method;
s4, fitness calculation: calculating the fitness value of each chromosome individual in the population by taking the total cloud task completion time as a fitness function;
s5: judging whether a termination condition is met or not according to the fitness calculation result or the iteration times, and if the termination condition is met, determining that the code of the chromosome individual with the minimum fitness value in the population is the final cloud task scheduling scheme;
s6, if the fitness calculation result or the iteration frequency does not meet the termination condition, continuing to sequentially select, phagocytize and mutate the population;
s7: and calculating the fitness value of each chromosome individual in the population after the mutation operation, and repeating the steps S5-S6.
Further, the specific operation of initializing the population by using the competitive crossing method in step S3 includes the following steps,
s31: generating a population A with the individual number of POPSIZE by using a random generation function, wherein the dimension of each chromosome in the population A is N, and the range of gene values on the chromosome is [0, M-1 ];
s32: selecting two individuals in the population A as parents in sequence each time for competition, and comparing the evolutionary adaptability of the two individuals;
s33: performing double-point cross operation on the individual with strong evolution adaptability in the step S32 and the individual generated by the Min-Min algorithm, generating two new filial generation individuals after cross, comparing the evolution adaptability of the two filial generation individuals, and keeping the individual with strong individual evolution adaptability as the individual member of the population B;
s34: randomly generating a new chromosome individual and carrying out double-point crossing operation on the individual with weak evolution adaptability in the step S32, generating two new filial generation individuals after crossing, comparing the evolution adaptability of the two filial generation individuals, and keeping the individual with strong individual evolution adaptability as the individual member of the population B;
s35: and judging whether all the individuals in the population A participate in competitive crossing, if so, selecting the population B as an initial population, and otherwise, repeating the steps S32-S34.
Further, the evolutionary fitness of the individual is calculated by using a fitness function, wherein the fitness function is that a fitness function is fixed as max (time)i) I ∈ (0, 1, 2, 3, … … M-1), wherein, timeiAnd M is the number of the virtual machines, and represents the time taken for all cloud tasks on the virtual machine i to complete.
Further, the specific operation of the double-point crossing operation includes the steps of,
s341: generating a left cross position and a right cross position of two chromosomes participating in double-point cross operation by using a random function, and if the generated two positions are the same, discarding the positions and regenerating new cross positions;
s342: the area between the left and right crossing positions is called a crossing domain;
s343: the crossing domains of the two chromosomes are crossed to form two new chromosome individuals.
Further, the fitness function in step S4 is fitness ═ max (time)i) I ∈ (0, 1, 2, 3, … … M-1), wherein, timeiAnd M is the number of the virtual machines, and represents the time taken for all cloud tasks on the virtual machine i to complete.
Further, the specific operation of the selection operation in the step S6 includes the steps of,
s61: defining the sum of the fitness of all individuals in the population as
Figure BDA0002720627440000051
i belongs to (1, 2, 3.. eta., n), and the average fitness of the population is
Figure BDA0002720627440000052
The random fitness of the population is fram=faveRandom (), wherein f (i) represents the fitness value of the ith chromosome individual;
s62: calculating the average fitness and the random fitness of the population by using the formula in the step S61;
s63: dividing all individuals in the population into three different grades by using the average fitness and the random fitness of the population;
s64: the fitness value f (i) < framSelecting the individuals as excellent individuals, and putting the excellent individuals into the population C for the next operation;
s65: will adapt the value fram<f(i)<faveThe individual of (1) is used as a common individual, and is replaced by a variant individual of the optimal individual in the current population and then is put into the population C, wherein the optimal individual is the individual with the minimum fitness value;
s66: the fitness value f (i) > faveAs disadvantaged individuals, these individuals will be replaced by newly generated individuals, which are randomly generated by a random function, and then the newly generated corresponding individuals are placed into the population C.
Further, the specific operation of performing the phagocytosis operation on the population subjected to the selection operation in step S6 includes the following steps,
s67: making phagocyte gene number partlen ═ N/partNum, wherein partlen represents phagocyte gene number, N represents task number, i.e. length of chromosome, and partNum represents number of gene fragments of chromosome;
s68: the individuals in the population C are treated according to the individual sequence each timeTaking out two parents C as phagocytosis operationiAnd Ci+1
S69: segmenting the parent by using the preset number of gene fragments, namely partNum, wherein each segment contains phagocytosis genes with the number of partlen;
s610: on the basis of one parent, comparing gene segments at corresponding positions of the other parent, phagocytosing a poor gene sequence segment with small adaptability by using a good gene sequence segment with large adaptability, and finally obtaining a new chromosome individual newGene;
s611: judging newGene of newly generated chromosome individual, and if the adaptability of newGene is more than two parents, replacing C with newGeneiAnd generating a new individual to replace Ci+1
S612: otherwise, the parent with high adaptability in the parent is reserved, and the newly generated individual is used for replacing the parent with poor adaptability;
s613: and judging whether all individuals in the population C carry out phagocytosis operation, if so, finishing the phagocytosis operation, otherwise, repeating the steps S610-S612.
Further, in step S6, mutation operation is performed on the population obtained after the phagocytosis operation using the basic mutation, so that the gene on the chromosome is changed with a predetermined probability.
The invention has the beneficial effects that:
the invention provides a cloud computing task scheduling method (C2PGA) based on an improved genetic algorithm, which initializes an initial population of the genetic algorithm by using a competitive crossing method, and avoids the problem that the quality of an initial sample solution cannot be ensured because a population is initialized by using a random function in a basic genetic algorithm, thereby improving the quality of the initial sample solution; excellent individuals in the population are selected by combining a three-stage selection method, so that the stability and diversity of the population can be effectively maintained; the 'phagocytosis mechanism' is used for replacing the cross operation of the basic genetic algorithm, and the damage of the fixed cross factor at the later stage of the algorithm to excellent individuals is reduced. The cloud computing task scheduling method is feasible and effective in the aspect of cloud task scheduling through simulation experiment verification, and can obviously improve the overall completion time of the cloud task.
Drawings
FIG. 1 is a flow chart of cloud computing task scheduling based on improved genetic algorithm in the present invention;
FIG. 2 is a model diagram of cloud computing task scheduling in accordance with the present invention;
FIG. 3 is a schematic diagram of the dual-point crossover operation of the present invention;
FIG. 4 is a randomly initialized population fitness distribution condition in a first simulation experiment of the present invention;
FIG. 5 is a diagram illustrating a population fitness distribution situation of competition cross initialization in a first simulation experiment of the present invention;
FIG. 6 is a graph of performance analysis of different algorithms when the number of cloud computing tasks is different in a second simulation experiment of the present invention;
FIG. 7 is a graph of performance analysis of different algorithms when the number of virtual machines is different in simulation experiment III of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the following further describes the technical solution of the present invention with reference to the drawings and the embodiments.
As shown in fig. 1, the cloud computing task scheduling method based on the improved genetic algorithm includes the following steps:
s1, determining a cloud computing task problem:
the scheduling of the cloud computing task refers to mapping or allocating the task to a specific virtual machine, and the purpose of the scheduling is to reasonably allocate required resources to the cloud task submitted by the cloud user so as to improve the resource utilization rate. The scheduling result is generally embodied as a mapping association relationship between the task and the virtual machine, that is, which task runs on which virtual machine node is determined. Due to the diversity of tasks and virtual machines, it is necessary to figure out how to assign cloud tasks to virtual machines to obtain the shortest execution time. That is, for a given cloud task, we should find the appropriate virtual machine to ensure that the task execution time (excluding data transfer time) gets the minimum, and the model of the cloud computing task scheduling is shown in fig. 2.
For the convenience of simulation studies, the following assumptions were made:
(1) neglecting the influence of factors such as bandwidth, data transmission, communication time between virtual machines and the like, wherein the execution time of one task is equal to the length of the task divided by the execution speed of the virtual machine in which 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;
thus, the cloud task scheduling problem can be described as: the N cloud tasks with different lengths are distributed to the M virtual machines with different performances, so that the total completion time of the N cloud tasks is shortest.
S2, encoding: adopting a real number direct coding mode, wherein each chromosome individual in the population represents a scheduling scheme, and the length of the chromosome is equal to the number of tasks;
specifically, assuming that the number of tasks is N, the number of virtual machine resources is M, the number of the individual gene position of the chromosome represents the number of the tasks, and the value range is 0-N-1; the positive integer value on each gene position represents the number of the virtual machine resource, and the value range is 0-M-1, for example: n is 9, M is 4, and the chromosome is coded as (3,2,0,3,2,1,1,3,2), which means that the 1 st, 4 th, 8 th tasks are allocated to the 4 th virtual machine, the 2 nd, 5 th, 9 th tasks are allocated to the 3 rd virtual machine, the 3 rd tasks are allocated to the 1 st virtual machine, and the 6 th, 7 th tasks are allocated to the 2 nd virtual machine.
S3, initializing population: initializing a population by using a competitive crossing method;
specifically, S31: generating a population A with the chromosome individual number of POPSIZE by using a random generation function, wherein the dimension of each chromosome in the population A is N, and the range of gene values on the chromosomes is [0, M-1 ];
s32: selecting two individuals in the population A as parents in sequence each time for competition, and comparing the evolutionary adaptability of the two individuals;
evolutionary adaptability is from the perspective that genetic algorithms simulate natural evolution, in nature, whether genetic genes of individuals in a population can be evolved in future variable living environments and are continuously inherited to the next generation depends on the degree of adaptability of the individuals to the natural environment.
In the application, the evolution adaptability of the individual is calculated according to the fitness function, and the smaller the fitness value is, the stronger the evolution adaptability of the individual is, and the more dominant the competition is.
The fitness function is that max (time)i) (ii) a i ∈ (0, 12, 3 … … M-1), wherein, timeiAnd M is the number of the virtual machines, and represents the time taken for all cloud tasks on the virtual machine i to complete.
S33: performing double-point cross operation on the individual with strong evolution adaptability in the step S32 and the individual generated by the Min-Min algorithm, generating two new filial generation individuals after cross, comparing the evolution adaptability of the two filial generation individuals, and keeping the individual with strong individual evolution adaptability as the individual member of the population B;
s34: randomly generating a new chromosome individual and carrying out double-point crossing operation on the individual with weak evolution adaptability in the step S32, generating two new filial generation individuals after crossing, comparing the evolution adaptability of the two filial generation individuals, and keeping the individual with strong individual evolution adaptability as the individual member of the population B;
s35: and judging whether all the individuals in the population A participate in competitive crossing, if so, selecting the population B as an initial population, and otherwise, repeating the steps S32-S34.
Wherein the specific operation of the double-point crossing operation comprises the following steps,
s341: generating a left cross position and a right cross position of two chromosomes participating in double-point cross operation by using a random function, and if the generated two positions are the same, discarding the positions and regenerating new cross positions;
s342: the area between the left and right crossing positions is called a crossing domain;
s343: the crossing domains of the two chromosomes are crossed to form two new chromosome individuals. The two-point cross-section diagram is shown in figure 3.
S4, fitness calculation: calculating the fitness value of each chromosome individual in the population by taking the total cloud task completion time as a fitness function;
specifically, the shortest total cloud task completion time is taken as a target in the method, so that the smaller the total cloud task completion time is taken as a fitness function, the more excellent the individual is; therefore, the calculation formula for the fitness function is set as fitness max (time)i) I ∈ (0, 1, 2, 3, … … M-l), wherein, timeiAnd M is the number of the virtual machines, and represents the time taken for all cloud tasks on the virtual machine i to complete. The fitness of the population individuals depends on the virtual machine which takes time to complete all cloud tasks on the population individuals at most, and the smaller the function value fitness, the greater the evolutionary adaptability of the individuals is, namely the smaller the total completion time of the cloud tasks is, the better the individuals are.
S5: judging whether a termination condition is met or not according to the fitness calculation result or the iteration times, and if the termination condition is met, determining that the code of the chromosome individual with the minimum fitness value in the population is the final cloud task scheduling scheme;
specifically, the termination condition is the lowest threshold of the scheduling time of the acceptable task by different cloud user groups or a termination iteration value preset for the scheduling method; when the fitness value of a chromosome individual in the population reaches the minimum threshold value of the cloud user population for the acceptable task scheduling time, the chromosome individual can be considered to meet the termination condition, and at the moment, the code of the chromosome individual is the final cloud task scheduling scheme; or when the iteration times reach a preset termination iteration value, the code of the chromosome individual with the lowest fitness value in the population is the final cloud task scheduling scheme.
S6, if the fitness calculation result or the iteration frequency does not meet the termination condition, continuing to sequentially select, phagocytize and mutate the population;
specifically, excellent individuals in the population are selected by a three-stage selection method;
the basis of the new Darwinian sense is propagation, mutation, competition and selection, so-called 'race selection and survival of fittest' genetic algorithm is a perfect embodiment of the method, the selection operation of the genetic algorithm is simulated in natural operation, only adaptable biological individuals can survive, propagate and transmit excellent genes to the next generation, the roulette selection method is most commonly used in the genetic algorithm, the selection error is large, and the gene transmission of the excellent individual to the next generation cannot be guaranteed, therefore, the invention uses the three-section selection method to select the excellent individuals in the population, in particular,
s61: defining the sum of the fitness of all individuals in the population as
Figure BDA0002720627440000121
i belongs to (1, 2, 3.. eta., n), and the average fitness of the population is
Figure BDA0002720627440000122
The random fitness of the population is fram=faveRandom (), wherein f (i) represents the fitness value of the ith chromosome individual;
s62: calculating the average fitness and the random fitness of the population by using the formula in the step S61;
s63: dividing all individuals in the population into three different grades by using the average fitness and the random fitness of the population;
s64: the fitness value f (i) < framSelecting the individuals as excellent individuals, and putting the excellent individuals into the population C for the next operation;
s65: will adapt the value fram<f(i)<faveThe individual of (2) is used as a common individual, and is replaced by a variant individual of the optimal individual in the current population and then is put into the population C; the optimal individual is the individual with the minimum fitness value; performing mutation operation on the optimal individual to obtain the variant individual of the optimal individual, and performing the specific operation of the mutation operationThe method comprises the following steps:
randomly generating two random integers X, Y, wherein the range of the two random integers is [0, N-1], and if X is equal to Y, re-taking a random number for Y until X is not equal to Y;
assuming that X < Y, the gene sequence between chromosome X and Y loci is altered, the value of loci in X, Y direct gene fragment can be arbitrarily changed within the interval [0, M-1], but it is necessary to take the integer value in the interval [0, M-1], for example: the original value at the X +1 gene position is 2, which may be changed to 4 in the mutation operation, where M-1> ═ 4.
S66: the fitness value f (i) > faveAs disadvantaged individuals, these individuals will be replaced by newly generated individuals, and the newly generated corresponding individuals will then be placed into population C.
Further, carrying out phagocytosis operation on the population subjected to the selection operation;
specifically, S67: making phagocyte gene number partlen ═ N/partNum, wherein partlen represents phagocyte gene number, N represents task number, i.e. length of chromosome, and partNum represents number of gene fragments of chromosome;
s68: taking out individuals in the population C according to the individual sequence, and taking out two parents C as phagocytic operation each timeiAnd Ci+1
S69: segmenting the parent by using the preset number of gene fragments, namely partNum, wherein each segment contains phagocytosis genes with the number of partlen;
s610: on the basis of one parent, comparing gene segments at corresponding positions of the other parent, phagocytosing a poor gene sequence segment with small adaptability by using a good gene sequence segment with large adaptability, and finally obtaining a new chromosome individual newGene;
s611: judging newGene of newly generated chromosome individual, and if the adaptability of newGene is more than two parents, replacing C with newGeneiAnd generating a new individual to replace Ci+1
S612: otherwise, the parent with high adaptability in the parent is reserved, and the newly generated individual is used for replacing the parent with poor adaptability;
s613: and judging whether all individuals in the population C carry out phagocytosis operation, if so, finishing the phagocytosis operation, otherwise, repeating the steps S610-S612.
Further, carrying out mutation operation on the population subjected to phagocytosis operation;
specifically, the method comprises the following steps of performing mutation operation on a population obtained after phagocytosis operation by using basic mutation to change genes on a chromosome with a predetermined probability, wherein the specific operation comprises the following steps:
s614: randomly generating two random integers X, Y, wherein the range of the two random integers is [0, N-1], and if X is equal to Y, re-taking a random number for Y until X is not equal to Y;
s615: assuming that X < Y, the gene sequence between chromosome X and Y loci is altered, the value of loci in X, Y direct gene fragment can be arbitrarily changed within the interval [0, M-1], but it is necessary to take the integer value in the interval [0, M-1], for example: the original value at the X +1 gene position is 2, which may be changed to 4 in the mutation operation, where M-1> ═ 4.
S7: and calculating the fitness of the population after the mutation operation, and repeating the steps S5-S6.
Simulation experiment:
the simulation experiment of the invention utilizes a cloud computing environment task scheduling simulation platform constructed by CloudSim, and utilizes eclipse as a development platform, the MIPS range of a virtual machine is 30-200, and the task length range is 5000-20000. In order to verify the effectiveness of the cloud computing task scheduling method (C2PGA) for improving the genetic algorithm provided in the present invention in cloud task scheduling, the following experiments were performed: the method comprises the following steps of firstly, comparing a random initialization population with population individual fitness distribution of an initialization population in a competitive crossing mode, and verifying the effectiveness of an improved initialization population scheme; experiment two, the number of virtual machines is 8 and is kept unchanged, the number of cloud tasks is increased from 100 to 7000, the performance of the C2PGA scheduling strategy in the total task completion time is verified, and in order to ensure comparability of the experiment, when the number of cloud tasks is increased, data aggregation of cloud tasks of a subsequent experiment includes a cloud task data set of a previous experiment, for example, an experiment with the number of cloud tasks of 300, where 100 cloud tasks are the cloud task data sets used when the number of cloud tasks is 100; experiment three, keeping the number of cloud tasks 1000 unchanged, and verifying whether the C2PGA scheduling policy can continue to maintain advantages in terms of total task completion time from 9 to 23 by the number of virtual machines, and also in order to ensure comparability of the experiment, when the number of virtual machines is increased, the virtual machine resources used in the next experiment always include the virtual machines used in the previous experiment, for example, an experiment of the number of virtual machines 13, where 11 virtual machines are the virtual machines used in the experiment of the number of virtual machines 11.
The parameter settings for experiment one are shown in table 1 below.
TABLE 1 Competition Cross parameters Table
Figure BDA0002720627440000151
The parameter settings for experiment two and experiment three are shown in table 2 below.
Table 2C 2PGA scheduling parameter settings
Figure BDA0002720627440000152
Experiment one: and respectively generating 100 individuals by using a random generation function and the scheme of competing cross-initialization population in the text, and verifying the effectiveness of the proposed scheme of initialization population, wherein the experimental results are shown in the attached figures 4 and 5.
As can be seen from fig. 4, the population generated by the random function has a concentrated distribution of individuals and a low quality of the initial solution, while the initial population generated by using the cross-competition mode in fig. 5 has a more uniform distribution of population, a better quality of solution than that in fig. 4 and a greater number of quality solutions, which proves the effectiveness of generating the initial population by using the cross-competition mode.
Experiment two: on the premise of keeping the number of virtual machines unchanged, the number of cloud tasks is changed, the increased range is from 100 cloud tasks to 7000 cloud tasks, the improved genetic algorithm-based scheduling method (C2PGA) provided by the invention is used for comparing with a standard Genetic Algorithm (GA), a phagocytosis-based improved genetic algorithm (PGA) provided in the document Application resource based on improved genetic algorithm in closed task scheduling and a classical scheduling strategy sequence scheduling, the superiority and inferiority of the algorithm provided by the invention in the aspect of the total completion time of the cloud tasks are verified, the cloud task completion time is expressed in an experiment according to a ratio of 1:1000, and the experimental result is shown in FIG. 6.
As can be seen from fig. 6, the scheduling method based on the improved genetic algorithm (C2PGA) proposed in the present invention has little difference in total task completion time from the standard Genetic Algorithm (GA) and the improved genetic algorithm based on Phagocytosis (PGA) within 1000 cloud tasks, and the scheduling schemes found by these three scheduling algorithms are better than the sequential scheduling policy, and as the number of cloud tasks increases, the total cloud task completion time is longer, and the C2PGA scheduling policy begins to exhibit its advantages, and has less total task completion time compared with other scheduling policies.
Experiment three: the number of cloud tasks is kept, the number of virtual machines is changed from 9 to 23, the scheduling method (C2PGA) based on the improved genetic algorithm provided by the invention is compared with a standard Genetic Algorithm (GA), an improved genetic algorithm (PGA) based on phagocytosis and classical scheduling strategy sequential scheduling, the advantages and disadvantages of the provided algorithm in the aspect of the total completion time of the cloud tasks are verified, the cloud task completion time is represented by an experiment according to a ratio of 1:1000, and the experimental result is shown in figure 7.
As can be seen from fig. 7, as the number of virtual machines increases, the complexity of task scheduling increases, the proposed algorithm can be better than other scheduling strategies in the case of different numbers of virtual machines, and the difference is more obvious as the number of virtual machines is larger.
Experiments I, II and III prove that the cloud computing task scheduling method based on the improved genetic algorithm is effective and can obviously improve the scheduling time of the cloud computing task.
The foregoing shows and describes the general principles, essential features, and advantages of the invention. It will be understood by those skilled in the art that the present invention is not limited to the embodiments described above, which are described in the specification and illustrated only to illustrate the principle of the present invention, but that various changes and modifications may be made therein without departing from the spirit and scope of the present invention, which fall within the scope of the invention as claimed. The scope of the invention is defined by the appended claims and equivalents thereof.

Claims (8)

1. The cloud computing task scheduling method based on the improved genetic algorithm is characterized by comprising the following steps of:
s1, determining a cloud computing task problem: distributing the N cloud tasks with different lengths to the M virtual machines with different individual performances to enable the total completion time of the N cloud tasks to be shortest;
s2, encoding: adopting a real number direct coding mode, wherein each chromosome individual in the population represents a scheduling scheme, and the length of the chromosome is equal to the number of tasks;
s3, initializing population: initializing a population by using a competitive crossing method;
s4, fitness calculation: calculating the fitness value of each chromosome individual in the population by taking the total cloud task completion time as a fitness function;
s5: judging whether a termination condition is met or not according to the fitness calculation result or the iteration times, and if the termination condition is met, determining that the code of the chromosome individual with the minimum fitness value in the population is the final cloud task scheduling scheme;
s6, if the fitness calculation result or the iteration frequency does not meet the termination condition, continuing to sequentially select, phagocytize and mutate the population;
s7: and calculating the fitness value of each chromosome individual in the population after the mutation operation, and repeating the steps S5-S6.
2. The improved genetic algorithm-based cloud computing task scheduling method according to claim 1, wherein the specific operation of initializing the population by using the competitive crossing method in step S3 comprises the following steps,
s31: generating a population A with the individual number of POPSIZE by using a random generation function, wherein the dimension of each chromosome in the population A is N, and the range of gene values on the chromosome is [0, M-1 ];
s32: selecting two individuals in the population A as parents in sequence each time for competition, and comparing the evolutionary adaptability of the two individuals;
s33: performing double-point cross operation on the individual with strong evolution adaptability in the step S32 and the individual generated by the Min-Min algorithm, generating two new filial generation individuals after cross, comparing the evolution adaptability of the two filial generation individuals, and keeping the individual with strong individual evolution adaptability as the individual member of the population B;
s34: randomly generating a new chromosome individual and carrying out double-point crossing operation on the individual with weak evolution adaptability in the step S32, generating two new filial generation individuals after crossing, comparing the evolution adaptability of the two filial generation individuals, and keeping the individual with strong individual evolution adaptability as the individual member of the population B;
s35: and judging whether all the individuals in the population A participate in competitive crossing, if so, selecting the population B as an initial population, and otherwise, repeating the steps S32-S34.
3. The improved genetic algorithm-based cloud computing task scheduling method of claim 2, wherein the evolutionary fitness of the individual is calculated by using a fitness function, wherein the fitness function is fitness max (time)i) I ∈ (0, 1, 2, 3, … … M-1), wherein, timeiAnd M is the number of the virtual machines, and represents the time taken for all cloud tasks on the virtual machine i to complete.
4. The improved genetic algorithm-based cloud computing task scheduling method according to claim 2, wherein the specific operation of the double-point cross operation comprises the following steps,
s341: generating a left cross position and a right cross position of two chromosomes participating in double-point cross operation by using a random function, and if the generated two positions are the same, discarding the positions and regenerating new cross positions;
s342: the area between the left and right crossing positions is called a crossing domain;
s343: the crossing domains of the two chromosomes are crossed to form two new chromosome individuals.
5. The improved genetic algorithm-based cloud computing task scheduling method of claim 2, wherein the fitness function in step S4 is fitness max (time)i) I ∈ (0, 1, 2, 3, … … M-1), wherein, timeiAnd M is the number of the virtual machines, and represents the time taken for all cloud tasks on the virtual machine i to complete.
6. The improved genetic algorithm-based cloud computing task scheduling method according to claim 5, wherein the specific operation of selecting the operation in step S6 comprises the following steps,
s61: defining the sum of the fitness of all individuals in the population as
Figure FDA0002720627430000031
Figure FDA0002720627430000032
The average fitness of the population is
Figure FDA0002720627430000033
The random fitness of the population is fram=faveRandom (), wherein f (i) represents the fitness value of the ith chromosome individual;
s62: calculating the average fitness and the random fitness of the population by using the formula in the step S61;
s63: dividing all individuals in the population into three different grades by using the average fitness and the random fitness of the population;
s64: the fitness value f (i) < framSelecting the individuals as excellent individuals, and putting the excellent individuals into the population C for the next operation;
s65: will adapt the value fram<f(i)<faveThe individual of (1) is used as a common individual, and is replaced by a variant individual of the optimal individual in the current populationAfter generation, putting the population C, wherein the optimal individual is the individual with the minimum fitness value;
s66: the fitness value f (i) > faveAs disadvantaged individuals, these individuals will be replaced by newly generated individuals, which are randomly generated by a random function, and then the newly generated corresponding individuals are placed into the population C.
7. The improved genetic algorithm-based cloud computing task scheduling method of claim 6, wherein the specific operation of performing the phagocytic operation on the population subjected to the selection operation in step S6 comprises the following steps,
s67: making phagocyte gene number partlen ═ N/partNum, wherein partlen represents phagocyte gene number, N represents task number, i.e. length of chromosome, and partNum represents number of gene fragments of chromosome;
s68: taking out individuals in the population C according to the individual sequence, and taking out two parents C as phagocytic operation each timeiAnd Ci+1
S69: segmenting the parent by using the preset number of gene fragments, namely partNum, wherein each segment contains phagocytosis genes with the number of partlen;
s610: on the basis of one parent, comparing gene segments at corresponding positions of the other parent, phagocytosing a poor gene sequence segment with small adaptability by using a good gene sequence segment with large adaptability, and finally obtaining a new chromosome individual newGene;
s611: judging newGene of newly generated chromosome individual, and if the adaptability of newGene is more than two parents, replacing C with newGeneiAnd generating a new individual to replace Ci+1
S612: otherwise, the parent with high adaptability in the parent is reserved, and the newly generated individual is used for replacing the parent with poor adaptability;
s613: and judging whether all individuals in the population C carry out phagocytosis operation, if so, finishing the phagocytosis operation, otherwise, repeating the steps S610-S612.
8. The method for scheduling cloud computing tasks according to claim 7, wherein the mutation operation is performed on the population obtained after the phagocytosis operation by using the basic mutation in step S6, so that the genes on the chromosome are changed with a predetermined probability.
CN202011086788.4A 2020-10-12 2020-10-12 Cloud computing task scheduling method based on improved genetic algorithm Active CN112181598B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011086788.4A CN112181598B (en) 2020-10-12 2020-10-12 Cloud computing task scheduling method based on improved genetic algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011086788.4A CN112181598B (en) 2020-10-12 2020-10-12 Cloud computing task scheduling method based on improved genetic algorithm

Publications (2)

Publication Number Publication Date
CN112181598A true CN112181598A (en) 2021-01-05
CN112181598B CN112181598B (en) 2022-12-09

Family

ID=73951030

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011086788.4A Active CN112181598B (en) 2020-10-12 2020-10-12 Cloud computing task scheduling method based on improved genetic algorithm

Country Status (1)

Country Link
CN (1) CN112181598B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112199172A (en) * 2020-09-25 2021-01-08 桂林理工大学 Hybrid task scheduling method for heterogeneous multi-core processor
CN113222096A (en) * 2021-04-30 2021-08-06 桂林理工大学 Improved particle swarm algorithm for cloud computing task scheduling
CN113326917A (en) * 2021-04-29 2021-08-31 开放智能机器(上海)有限公司 Method and system for automatically optimizing operator based on genetic algorithm
CN114528088A (en) * 2022-04-25 2022-05-24 北京航天驭星科技有限公司 Satellite detection task processing method and device, electronic equipment and storage medium
CN115185655A (en) * 2022-06-23 2022-10-14 郑州轻工业大学 Genetic task scheduling method based on gene frequency improvement
CN115730432A (en) * 2022-11-09 2023-03-03 国网湖南省电力有限公司 Scheduling method, system, equipment and storage medium for data processing tasks of Internet of things

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103902375A (en) * 2014-04-11 2014-07-02 北京工业大学 Cloud task scheduling method based on improved genetic algorithm
CN108829501A (en) * 2018-05-18 2018-11-16 天津科技大学 A kind of batch processing scientific workflow task scheduling algorithm based on improved adaptive GA-IAGA
US20180356803A1 (en) * 2017-06-12 2018-12-13 Hefei University Of Technology Method and system for batch scheduling uniform parallel machines with different capacities based on improved genetic algorithm
CN109800071A (en) * 2019-01-03 2019-05-24 华南理工大学 A kind of cloud computing method for scheduling task based on improved adaptive GA-IAGA
CN110389819A (en) * 2019-06-24 2019-10-29 华中科技大学 A kind of dispatching method and system of computation-intensive batch processing task
CN110851272A (en) * 2019-10-30 2020-02-28 内蒙古农业大学 Cloud task scheduling method based on phagocytic particle swarm genetic hybrid algorithm
CN110968428A (en) * 2019-12-10 2020-04-07 浙江工业大学 Cloud workflow virtual machine configuration and task scheduling collaborative optimization method
CN111026534A (en) * 2019-12-10 2020-04-17 浙江工业大学 Workflow execution optimization method based on multi-population genetic algorithm in cloud computing environment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103902375A (en) * 2014-04-11 2014-07-02 北京工业大学 Cloud task scheduling method based on improved genetic algorithm
US20180356803A1 (en) * 2017-06-12 2018-12-13 Hefei University Of Technology Method and system for batch scheduling uniform parallel machines with different capacities based on improved genetic algorithm
CN108829501A (en) * 2018-05-18 2018-11-16 天津科技大学 A kind of batch processing scientific workflow task scheduling algorithm based on improved adaptive GA-IAGA
CN109800071A (en) * 2019-01-03 2019-05-24 华南理工大学 A kind of cloud computing method for scheduling task based on improved adaptive GA-IAGA
CN110389819A (en) * 2019-06-24 2019-10-29 华中科技大学 A kind of dispatching method and system of computation-intensive batch processing task
CN110851272A (en) * 2019-10-30 2020-02-28 内蒙古农业大学 Cloud task scheduling method based on phagocytic particle swarm genetic hybrid algorithm
CN110968428A (en) * 2019-12-10 2020-04-07 浙江工业大学 Cloud workflow virtual machine configuration and task scheduling collaborative optimization method
CN111026534A (en) * 2019-12-10 2020-04-17 浙江工业大学 Workflow execution optimization method based on multi-population genetic algorithm in cloud computing environment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
付学良等: "改进遗传算法在云任务调度中的应用研究", 《内蒙古农业大学学报(自然科学版)》 *
王晴等: "基于云计算人物调度的遗传粒子群优化算法", 《计算机科学与应用》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112199172A (en) * 2020-09-25 2021-01-08 桂林理工大学 Hybrid task scheduling method for heterogeneous multi-core processor
CN113326917A (en) * 2021-04-29 2021-08-31 开放智能机器(上海)有限公司 Method and system for automatically optimizing operator based on genetic algorithm
CN113222096A (en) * 2021-04-30 2021-08-06 桂林理工大学 Improved particle swarm algorithm for cloud computing task scheduling
CN114528088A (en) * 2022-04-25 2022-05-24 北京航天驭星科技有限公司 Satellite detection task processing method and device, electronic equipment and storage medium
CN115185655A (en) * 2022-06-23 2022-10-14 郑州轻工业大学 Genetic task scheduling method based on gene frequency improvement
CN115730432A (en) * 2022-11-09 2023-03-03 国网湖南省电力有限公司 Scheduling method, system, equipment and storage medium for data processing tasks of Internet of things
CN115730432B (en) * 2022-11-09 2024-05-28 国网湖南省电力有限公司 Scheduling method and system of data processing task of Internet of things, equipment and storage medium

Also Published As

Publication number Publication date
CN112181598B (en) 2022-12-09

Similar Documents

Publication Publication Date Title
CN112181598B (en) Cloud computing task scheduling method based on improved genetic algorithm
CN110851272B (en) Cloud task scheduling method based on phagocytic particle swarm genetic hybrid algorithm
CN112380008B (en) Multi-user fine-grained task unloading scheduling method for mobile edge computing application
CN110717300B (en) Edge calculation task allocation method for real-time online monitoring service of power internet of things
Nikravan et al. A genetic algorithm for process scheduling in distributed operating systems considering load balancing
CN111953547B (en) Heterogeneous base station overlapping grouping and resource allocation method and device based on service
CN112187510B (en) Virtual network function placement method based on genetic algorithm and electronic device
CN114741955A (en) Multi-objective optimization task scheduling method based on security cloud
CN114330715A (en) Intelligent ammunition co-evolution task allocation method
CN113472671B (en) Method, device and computer readable storage medium for determining multicast route
Gao et al. A particle swarm optimization with lévy flight for service caching and task offloading in edge-cloud computing
CN112256413A (en) Scheduling method and device for edge computing task based on Internet of things
Qiao et al. A novel approach for service function chain embedding in cloud datacenter networks
Shome et al. Deep Q-learning for 5G network slicing with diverse resource stipulations and dynamic data traffic
CN116208567A (en) Method and system for flow scheduling of SDN network resources of cross-domain data center
Sun et al. A joint learning and game-theoretic approach to multi-dimensional resource management in fog radio access networks
CN111290853B (en) Cloud data center scheduling method based on self-adaptive improved genetic algorithm
CN116566891A (en) Delay-sensitive service function chain parallel route optimization method, device and medium
Salimi et al. Task scheduling for computational grids using NSGA II with fuzzy variance based crossover
CN110366253A (en) Method for channel allocation, equipment and storage medium based on cognition wireless network
CN113596138B (en) Heterogeneous information center network cache allocation method based on deep reinforcement learning
CN112905307B (en) Multi-target cloud workflow scheduling method based on lean and rich optimization algorithm
Robbi et al. A modified genetic algorithm for resource allocation in cognitive radio networks
CN112308195B (en) Method for solving DCOPs by simulating local cost
CN114371915A (en) Manufacturing enterprise data space system task scheduling method based on decomposition strategy

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
GR01 Patent grant
GR01 Patent grant