CN112181598B - 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
CN112181598B
CN112181598B CN202011086788.4A CN202011086788A CN112181598B CN 112181598 B CN112181598 B CN 112181598B CN 202011086788 A CN202011086788 A CN 202011086788A CN 112181598 B CN112181598 B CN 112181598B
Authority
CN
China
Prior art keywords
population
individual
individuals
fitness
cloud
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.)
Active
Application number
CN202011086788.4A
Other languages
Chinese (zh)
Other versions
CN112181598A (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)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biophysics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Physiology (AREA)
  • Genetics & Genomics (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (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 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) that can be rapidly 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 distribute 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 problem is completely solved by NP. 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 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 task scheduling algorithms are 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-publishing Environment" proposes An improved single-user job Genetic Algorithm, which encourages the formation of solutions by establishing fitness, thereby minimizing the 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 error Search Task-Scheduling Algorithm for Cloud Com-pointing proposes the SA-CLS-SOS Algorithm, which simplifies the symbiont Search Algorithm (SOS), introduces Chaotic Local Search (CLS) into the simplified SOS to increase 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 "no free lunch" one metaheuristic is not possible 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 a mixture of 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 solution 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 a 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, sequentially carrying out selection, phagocytosis and mutation on the population;
s7: and (5) 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 an 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 the gene value 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 individuals with strong evolution adaptability in the step S32 and the individuals 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 individuals with strong individual evolution adaptability as individual members 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 an 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 using a fitness function, which is fitness = max (time) i ) I ∈ (0,1,2,3, … … M-1), where time i And 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), where time i And 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 fitness of all individuals in the population as
Figure BDA0002720627440000051
i belongs to (1,2,3,.., n), and the average fitness of the population is
Figure BDA0002720627440000052
The random fitness of the population is f ram =f ave Random () where 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) < f ram Selecting the individuals as excellent individuals, and putting the excellent individuals into the population C for the next operation;
s65: will adapt the value f ram <f(i)<f ave The 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: let the fitness value f (i) > f ave As 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: let the phagocyte number partlen = N/partNum, wherein, partlen represents the phagocyte factor, N represents the number of tasks, i.e. the length of chromosome, and partNum represents the number of gene fragments of chromosome;
s68: taking out two parents C as phagocytic operation each time from individuals in the population C according to the individual sequence i And C i+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: comparing gene segments at corresponding positions of one parent with those of the other parent, phagocytosing a poor gene sequence segment with a good gene sequence segment with high adaptability and having low adaptability to obtain 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 newGene i And generating a new individual to replace C i+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 (C2 PGA) 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 in a simulation experiment III of the present invention when the number of virtual machines is different.
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 resources of the virtual machine is M, the number of the individual gene position of the chromosome represents the number of the tasks, and the numeric area 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 =9, m =4, and the chromosome is coded as (3,2,0,3,2,1,1,3,2), indicating that the 1 st, 4 th, and 8 th tasks are allocated to the 4 th virtual machine, the 2 nd, 5 th, and 9 th tasks are allocated to the 3 rd virtual machine, the 3 rd task is allocated to the 1 st virtual machine, and the 6 th and 7 th tasks are allocated to the 2 nd virtual machine.
S3, initializing a 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 chromosome is [0,M-1];
s32: selecting two individuals in the population A as parent bodies 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 fitness = max (time) i ) (ii) a i is an element of (0, 12,3 … … M-1), wherein, time i And 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 individuals with strong evolution adaptability in the step S32 and the individuals 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 individuals with strong individual evolution adaptability as individual members 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 an 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 shorter the total cloud task completion time is, the more excellent the individual is; therefore, the calculation formula of the fitness function is set to fitness = max (time) i ) I ∈ (0,1,2,3, … … M-l), where, time i And 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 times do 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,.., n), and the average fitness of the population is
Figure BDA0002720627440000122
The random fitness of the population is f ram =f ave Random () where 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) < f ram Selecting the individuals as excellent individuals, and putting the excellent individuals into the population C for the next operation;
s65: will adapt the value f ram <f(i)<f ave The 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; carrying out mutation operation on the optimal individual to obtain a mutation individual of the optimal individual, wherein the specific operation steps of the mutation operation are as follows:
randomly generating two random integers X, Y, wherein the range is [0,N-1], and if X = Y, re-taking a random number for Y until X ≠ Y;
assuming that X < Y, the gene sequence between chromosome X and Y loci is changed, the value of loci in the X, Y direct gene fragment can be arbitrarily changed within the interval [0,M-1], but it is necessary to take an integer value in the interval [0,M-1], for example: the original value at position X +1 is 2, which can be changed to 4 in the mutation operation, where M-1> =4.
S66: let the fitness value f (i) > f ave As disadvantaged individuals, these individuals will be replaced by newly generated individuals, and then the newly generated corresponding individuals will be replacedThe population is placed in population C.
Further, carrying out phagocytosis operation on the population subjected to the selection operation;
specifically, S67: let the phagocyte number partlen = N/partNum, wherein, partlen represents the phagocyte factor, N represents the number of tasks, i.e. the length of chromosome, and partNum represents the 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 time i And C i+1
S69: segmenting the parent body by utilizing the preset number of gene segments, namely partNum, wherein the number of phagocytic genes contained in each segment is 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 newGene i And generating a new individual to replace C i+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 is [0,N-1], and if X = Y, re-taking a random number for Y until X ≠ Y;
s615: assuming that X < Y, the gene sequence between chromosome X and Y loci is changed, the value of loci in the X, Y direct gene fragment can be arbitrarily changed within the interval [0,M-1], but it is necessary to take an integer value in the interval [0,M-1], for example: the original value at the X +1 gene position is 2, and can be changed to 4 in the mutation operation, wherein M-1> =4.
S7: and (5) 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 (C2 PGA) 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-reference Table
Figure BDA0002720627440000151
The parameter settings for experiment two and experiment three are shown in table 2 below.
Table 2 c2pga 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, changing the number of cloud tasks, wherein the increased range is from 100 cloud tasks to 7000 cloud tasks, comparing the scheduling method (C2 PGA) based on the improved genetic algorithm provided by the present invention with a standard Genetic Algorithm (GA), and a phagocytosis-based improved genetic algorithm (PGA) and a classical scheduling policy sequence scheduling provided in the document "Application resource based on improved genetic algorithm in closed task scheduling", to verify the superiority and inferiority of the algorithm provided by the present invention in terms of the total completion time of cloud tasks, wherein an experiment shows the cloud task completion time according to 1.
As can be seen from fig. 6, the scheduling method based on the improved genetic algorithm (C2 PGA) proposed in the present invention has little difference in total task completion time from the standard Genetic Algorithm (GA) and the phagocytosis-based improved genetic algorithm (PGA) within 1000 cloud tasks, and 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, the range is from 9 to 23, the scheduling method (C2 PGA) based on the improved genetic algorithm, the standard Genetic Algorithm (GA), the phagocytic improved genetic algorithm (PGA) and the classical scheduling strategy are compared in sequence, the advantages and disadvantages of the algorithm in terms of the total cloud task completion time are verified, the cloud task completion time is represented according to an experiment according to the following formula 1.
As can be seen from fig. 7, as the number of virtual machines increases, the complexity of task scheduling increases, and the proposed algorithm can be better than other scheduling strategies under 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, principal 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 (7)

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, coding: 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 a 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, sequentially carrying out selection, phagocytosis and mutation on the population;
s7: calculating the fitness value of each chromosome individual in the population after the mutation operation, and repeating the steps S5-S6;
step S3 the specific operation of initializing the population by using the competitive crossing method includes the following steps,
s31: generating a population A with an 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 the gene value 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 individuals with strong evolution adaptability in the step S32 and the individuals 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 individuals with strong individual evolution adaptability as individual members of the population B;
s34: randomly generating a new chromosome individual, carrying out double-point crossing operation on the new chromosome individual and 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 an 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.
2. The improved genetic algorithm-based cloud computing task scheduling method of claim 1, wherein the evolutionary fitness of an individual is calculated using a fitness function, wherein the fitness function is fitness = max (time) i ) I ∈ (0,1,2,3, … … M-1, where time i And M is the number of the virtual machines, and represents the time taken for all cloud tasks on the virtual machine i to complete.
3. The improved genetic algorithm-based cloud computing task scheduling method according to claim 1, 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 the 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.
4. The cloud computing task scheduling method based on the improved genetic algorithm as claimed in claim 1, wherein the fitness function in step S4 is fitness = max (time) i ) I ∈ (0,1,2,3, … … M-1), where time i And M is the number of the virtual machines, and represents the time taken for all cloud tasks on the virtual machine i to complete.
5. The cloud computing task scheduling method based on the improved genetic algorithm according to claim 4, wherein the specific operation of the operation selected in the step S6 comprises the following steps,
s61: defining the sum of fitness of all individuals in the population as
Figure FDA0003930427660000031
i belongs to (1,2,3,.., n), and the average fitness of the population is
Figure FDA0003930427660000032
The random fitness of the population is f ram =f ave Random () where 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) < f ram Selecting the individuals as excellent individuals, and putting the excellent individuals into the population C for the next operation;
s65: will adapt the value f ram <f(i)<f ave The 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) > f ave As 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.
6. The method for scheduling cloud computing tasks based on improved genetic algorithms according to claim 5, 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: let the phagocyte number partlen = N/partNum, wherein, partlen represents the phagocyte factor, N represents the number of tasks, i.e. the length of chromosome, and partNum represents the number of gene fragments of chromosome;
s68: taking out two parents C as phagocytic operation each time from individuals in the population C according to the individual sequence i And C i+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 newly generated individual newGene, and if the adaptability is more than two parents, replacing C with newGene i And generating a new individual to replace C i+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.
7. The method for scheduling cloud computing tasks based on improved genetic algorithms of claim 6, wherein in step S6, mutation operations are performed on the population obtained after the phagocytosis operation by using basic bit variation, so that genes on chromosomes 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 CN112181598A (en) 2021-01-05
CN112181598B true 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)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113326917A (en) * 2021-04-29 2021-08-31 开放智能机器(上海)有限公司 Method and system for automatically optimizing operator based on genetic algorithm
CN113222096B (en) * 2021-04-30 2022-11-11 桂林理工大学 Improved particle swarm algorithm for cloud computing task scheduling
CN114528088B (en) * 2022-04-25 2022-07-12 北京航天驭星科技有限公司 Satellite detection task processing method and device, electronic equipment and storage medium
CN115185655B (en) * 2022-06-23 2023-05-12 郑州轻工业大学 Cloud computing platform task scheduling method based on gene frequency improvement

Citations (5)

* 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
CN109800071A (en) * 2019-01-03 2019-05-24 华南理工大学 A kind of cloud computing method for scheduling task based on improved adaptive GA-IAGA
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

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107301473B (en) * 2017-06-12 2018-06-15 合肥工业大学 Similar parallel machine based on improved adaptive GA-IAGA batch dispatching method and system
CN108829501B (en) * 2018-05-18 2021-09-24 天津科技大学 Batch processing scientific workflow task scheduling algorithm based on improved genetic algorithm
CN110389819B (en) * 2019-06-24 2022-06-21 华中科技大学 Method and system for scheduling calculation intensive batch processing tasks

Patent Citations (5)

* 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
CN109800071A (en) * 2019-01-03 2019-05-24 华南理工大学 A kind of cloud computing method for scheduling task based on improved adaptive GA-IAGA
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
基于云计算人物调度的遗传粒子群优化算法;王晴等;《计算机科学与应用》;20180930;第1-6页 *
改进遗传算法在云任务调度中的应用研究;付学良等;《内蒙古农业大学学报(自然科学版)》;20200430;第1-11页 *

Also Published As

Publication number Publication date
CN112181598A (en) 2021-01-05

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
Ghanavati et al. An energy aware task scheduling model using ant-mating optimization in fog computing environment
CN112380008B (en) Multi-user fine-grained task unloading scheduling method for mobile edge computing application
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
CN114330715A (en) Intelligent ammunition co-evolution task allocation method
CN113472671B (en) Method, device and computer readable storage medium for determining multicast route
CN112256413A (en) Scheduling method and device for edge computing task based on Internet of things
CN114741955A (en) Multi-objective optimization task scheduling method based on security cloud
CN116225649A (en) Fine-granularity electric power task cloud edge collaborative optimization scheduling method
Qiao et al. A novel approach for service function chain embedding in cloud datacenter networks
Sun et al. A joint learning and game-theoretic approach to multi-dimensional resource management in fog radio access networks
Shome et al. Deep Q-learning for 5G network slicing with diverse resource stipulations and dynamic data traffic
CN112884368B (en) Multi-target scheduling method and system for minimizing delivery time and delay of high-end equipment
CN112737726A (en) Static and dynamic combined TDMA time slot allocation method
CN110505681B (en) Non-orthogonal multiple access scene user pairing method based on genetic method
CN111290853B (en) Cloud data center scheduling method based on self-adaptive improved genetic algorithm
CN110366253A (en) Method for channel allocation, equipment and storage medium based on cognition wireless network
Salimi et al. Task scheduling for computational grids using NSGA II with fuzzy variance based crossover
CN112308195B (en) Method for solving DCOPs by simulating local cost
CN114371915A (en) Manufacturing enterprise data space system task scheduling method based on decomposition strategy
CN110321208B (en) Evolutionary computing method for solving cloud task scheduling
Zhou A heuristic task scheduling strategy for intelligent manufacturing in the big data-driven fog computing environment

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