+

CN118585341B - A cloud computing resource scheduling method, system, device and medium based on enhanced Cougar optimization algorithm - Google Patents

A cloud computing resource scheduling method, system, device and medium based on enhanced Cougar optimization algorithm Download PDF

Info

Publication number
CN118585341B
CN118585341B CN202411046424.1A CN202411046424A CN118585341B CN 118585341 B CN118585341 B CN 118585341B CN 202411046424 A CN202411046424 A CN 202411046424A CN 118585341 B CN118585341 B CN 118585341B
Authority
CN
China
Prior art keywords
sol
individual
population
iter
scheduling
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
CN202411046424.1A
Other languages
Chinese (zh)
Other versions
CN118585341A (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.)
Guizhou University
Original Assignee
Guizhou 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 Guizhou University filed Critical Guizhou University
Priority to CN202411046424.1A priority Critical patent/CN118585341B/en
Publication of CN118585341A publication Critical patent/CN118585341A/en
Application granted granted Critical
Publication of CN118585341B publication Critical patent/CN118585341B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]

Landscapes

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

Abstract

The invention provides a cloud computing resource scheduling method, a system, equipment and a medium based on an enhanced American lion optimization algorithm; the method comprises the following steps: s1, acquiring a cloud task byte size vector, a computing resource vector, a load cost vector and a resource bandwidth vector which are possessed by a virtual machine; then establishing the following objective function which minimizes the total cost; s2, optimizing an objective function by using an enhanced American lion optimization algorithm to obtain an optimal individual; s3, mapping the optimal individuals obtained in the S2 to a binary scheduling matrix, and obtaining a task scheduling strategy through the scheduling matrix so as to perform task scheduling; the invention can reduce the response time of the system and improve the solution precision so as to improve the performance when dealing with the problem of large-scale task scheduling. The rationality of cloud computing task scheduling is further improved, the resource utilization rate can be maximized, and the problems of resource waste or service performance reduction in cloud computing task scheduling are solved.

Description

一种基于增强美洲狮优化算法的云计算资源调度方法、系统、 设备及介质A cloud computing resource scheduling method, system, device and medium based on enhanced Puma optimization algorithm

技术领域Technical Field

本发明涉及云计算下任务调度方法技术领域,涉及一种基于增强美洲狮优化算法的云计算资源调度方法、系统、设备及介质。The present invention relates to the technical field of task scheduling methods under cloud computing, and in particular to a cloud computing resource scheduling method, system, device and medium based on an enhanced Puma optimization algorithm.

背景技术Background Art

云计算技术自21世纪初开始兴起,并逐渐成为现代社会的重要支撑。它通过虚拟化技术、分布式数据存储技术、大规模数据管理技术等技术手段,将计算资源、存储资源和应用程序等服务通过互联网提供给用户,实现了IT与业务的解耦,使IT资源能够按需供给。云计算优化调度用于降低资源的浪费率,防止虚拟机计算资源、存储资源以及资源带宽资源在大规模任务调度下的浪费。Cloud computing technology has been on the rise since the beginning of the 21st century and has gradually become an important support for modern society. It provides computing resources, storage resources, application programs and other services to users through the Internet through virtualization technology, distributed data storage technology, large-scale data management technology and other technical means, realizing the decoupling of IT and business, so that IT resources can be supplied on demand. Cloud computing optimization scheduling is used to reduce the waste rate of resources and prevent the waste of virtual machine computing resources, storage resources and resource bandwidth resources under large-scale task scheduling.

目前,许多任务调度问题普遍使用启发式和元启发式算法来解决。启发式算法是一种基于经验和直觉的搜索和优化算法,通常用于解决复杂的组合优化问题,例如模拟退火算法(Simulated Annealing)、遗传算法(Genetic Algorithm)和蚁群算法(Ant ColonyOptimization)等。但是,这些算法往往难以处理大规模任务调度问题,导致计算机的响应时间过高。另一方面,现有的元启发式算法利用随机探索,例如鲸鱼优化算法(WOA),灰狼优化算法(GWO)和差分进化算法(DE)等处理调度问题时,使其具有更高的相应速度。但是尽管现有的元启发式算法在处理大规模的任务调度问题上有其优势,但大多数元启发式算法在处理大规模任务调度问题时存在探索时间较长,寻优性能不足等问题,因此,现有的基于元启发式算法的云计算任务调度方法需要进一步改进。At present, many task scheduling problems are generally solved using heuristic and meta-heuristic algorithms. Heuristic algorithms are search and optimization algorithms based on experience and intuition, which are usually used to solve complex combinatorial optimization problems, such as simulated annealing, genetic algorithm, and ant colony optimization. However, these algorithms often have difficulty in handling large-scale task scheduling problems, resulting in excessive computer response time. On the other hand, existing meta-heuristic algorithms use random exploration, such as the whale optimization algorithm (WOA), the gray wolf optimization algorithm (GWO), and the differential evolution algorithm (DE) to handle scheduling problems, making them have a higher response speed. However, although the existing meta-heuristic algorithms have their advantages in handling large-scale task scheduling problems, most meta-heuristic algorithms have problems such as long exploration time and insufficient optimization performance when handling large-scale task scheduling problems. Therefore, the existing cloud computing task scheduling methods based on meta-heuristic algorithms need to be further improved.

发明内容Summary of the invention

本发明的目的是解决大规模任务调度中存在的技术问题,特别是引入一种基于增强美洲狮优化算法的云计算资源调度方法、系统、设备及介质。The purpose of the present invention is to solve the technical problems existing in large-scale task scheduling, and in particular to introduce a cloud computing resource scheduling method, system, device and medium based on an enhanced Puma optimization algorithm.

为了实现本发明的上述目的,本发明提供了一种基于增强美洲狮优化算法的云计算资源调度方法,包括以下步骤:In order to achieve the above-mentioned object of the present invention, the present invention provides a cloud computing resource scheduling method based on an enhanced Puma optimization algorithm, comprising the following steps:

S1、获取云任务字节大小向量以及虚拟机具备的计算资源向量、负载成本向量及资源带宽向量,然后建立以下最小化总成本的目标函数:S1. Obtain the cloud task byte size vector and the computing resource vector, load cost vector, and resource bandwidth vector of the virtual machine, and then establish the following objective function that minimizes the total cost:

Fun=min{ω1F12F23F3}(1)Fun=min{ω 1 F 12 F 23 F 3 }(1)

式(1)中,ω12和ω3分别表示函数F1,F2和F3的权重,用来调整目标函数在不同方面优化时的重心;In formula (1), ω 1 , ω 2 and ω 3 represent the weights of functions F 1 , F 2 and F 3 respectively, which are used to adjust the center of gravity of the objective function when optimizing different aspects;

F1表示时间成本函数;F 1 represents the time cost function;

F2表示负载成本函数;F 2 represents the load cost function;

F3表示资源带宽成本函数;F 3 represents the resource bandwidth cost function;

F1表示时间成本函数,并由下式计算: F1 represents the time cost function and is calculated as follows:

式(2)中,T表示任务的数量,K表示计算资源(虚拟机)的数量,ui,j表示第ith个任务在第jth个虚拟机上计算,并且规定每个任务只能在一个虚拟机上计算,即对于每个i∈[1,T]得到En,j表示第jth个虚拟机的计算资源向量,Et,i表示第ith个任务所需要的计算资源向量,F2表示负载成本函数,并由下式计算:In formula (2), T represents the number of tasks, K represents the number of computing resources (virtual machines), ui ,j represents that the ith task is calculated on the jth virtual machine, and it is stipulated that each task can only be calculated on one virtual machine, that is, for each i∈[1,T], we get En,j represents the computing resource vector of the jth virtual machine, Et ,i represents the computing resource vector required by the i -th task, and F2 represents the load cost function, which is calculated by the following formula:

式(3)中,T表示任务的数量,K表示计算资源(虚拟机)的数量,ui,j表示第ith个任务在第jth个虚拟机上计算,并且规定每个任务只能在一个虚拟机上计算,即对于每个i∈[1,T]得到Sn,j表示第jth个虚拟机的负载向量,St,i表示第ith个任务所需要的负载向量,F3表示资源带宽成本函数,并由下式计算:In formula (3), T represents the number of tasks, K represents the number of computing resources (virtual machines), ui ,j represents that the ith task is calculated on the jth virtual machine, and it is stipulated that each task can only be calculated on one virtual machine, that is, for each i∈[1,T], we get Sn ,j represents the load vector of the jth virtual machine, St ,i represents the load vector required by the ith task, and F3 represents the resource bandwidth cost function, which is calculated by the following formula:

式(4)中,T表示任务的数量,K表示计算资源(虚拟机)的数量,ui,j表示第ith个任务在第jth个虚拟机上计算,并且规定每个任务只能在一个虚拟机上计算,即对于每个i∈[1,T]得到Et,i表示第ith个任务所需要的计算资源向量,Cn,j表示第jth个虚拟机的资源带宽向量,Ct,i表示第ith个任务所需要的资源带宽向量,En,j表示第jth个虚拟机的计算资源向量,P表示与价格相关的参数。In formula (4), T represents the number of tasks, K represents the number of computing resources (virtual machines), ui ,j represents that the ith task is calculated on the jth virtual machine, and it is stipulated that each task can only be calculated on one virtual machine, that is, for each i∈[1,T], we get E t,i represents the computing resource vector required for the ith task, C n,j represents the resource bandwidth vector of the j th virtual machine, C t,i represents the resource bandwidth vector required for the ith task, En ,j represents the computing resource vector of the j th virtual machine, and P represents a parameter related to the price.

S2、利用增强的美洲狮优化算法对目标函数进行优化,得到最优个体:S2. Use the enhanced Puma optimization algorithm to optimize the objective function and obtain the optimal individual:

S21、通过公式(5)初始化原始种群,得到初始化后的原始种群Sol:S21. Initialize the original population using formula (5) to obtain the initialized original population Sol:

Soli=lb+rand·(ub-lb)(5)Sol i = lb + rand·(ub-lb) (5)

式(5)中,Soli表示种群Sol中第i个个体的位置信息,ub表示解空间的上界向量,lb表示解空间的下界向量,rand表示生成一个在[0,1]之间的随机数;In formula (5), Sol i represents the position information of the i-th individual in the population Sol, ub represents the upper bound vector of the solution space, lb represents the lower bound vector of the solution space, and rand represents the generation of a random number between [0,1];

S22、初始Iter=1,通过判断Iter和4的关系,如果Iter<4,则执行S23,否则跳转执行S28;其中,Iter表示当前迭代次数;S22, initially Iter=1, by judging the relationship between Iter and 4, if Iter<4, then execute S23, otherwise jump to execute S28; wherein Iter represents the current number of iterations;

S23、通过探索阶段对个体位置进行更新;S23, updating individual positions through the exploration phase;

S24、通过开发阶段对个体位置进行更新;S24, updating individual positions through the development phase;

S25、将种群Sol,Sol*和Sol**合并,并取前Nc个个体,其中,Sol表示初始化后的原始种群,Sol*表示通过探索阶段更新后的新种群,Sol**表示通过开发阶段更新后的新种群;S25. Merge populations Sol, Sol * and Sol ** , and take the first Nc individuals, where Sol represents the original population after initialization, Sol * represents the new population updated through the exploration phase, and Sol ** represents the new population updated through the development phase;

S26、计算种群Sol*和Sol**的最优个体适应度同时Iter=Iter+1;S26. Calculate the optimal individual fitness of populations Sol * and Sol ** and At the same time, Iter = Iter + 1;

S27、分别计算第Iter次迭代时探索阶段的得分和开发阶段的得分 S27, calculate the score of the exploration phase at the Iter iteration and development stage scores

S28、如果Iter≤MaxIter则执行S29,否则执行步骤S33;其中,MaxIter表示最大迭代次数,且MaxIter≥4;S28. If Iter≤MaxIter, execute S29, otherwise execute step S33; wherein MaxIter represents the maximum number of iterations, and MaxIter≥4;

S29、通过探索阶段对个体位置进行更新,此处的个体即步骤S25的前Nc个个体;S29, updating the individual positions through the exploration phase, where the individuals here are the first Nc individuals in step S25;

S30、通过开发阶段对个体位置进行更新,此处的个体即步骤S25的前Nc个个体;S30, updating the individual positions through the development phase, where the individuals here are the first Nc individuals in step S25;

S31、对进行更新;S31, yes and Make updates;

S32、Iter=Iter+1,返回S28;S32, Iter=Iter+1, return to S28;

S33、选择最后一次迭代时种群Sol*中目标函数值最小的个体作为调度方法;S33, selecting the individual with the smallest objective function value in the population Sol * at the last iteration as the scheduling method;

进一步地,所述S23的具体步骤为:Furthermore, the specific steps of S23 are:

S231、通过以下公式计算第ith个个体的第jth个维度上的新位置:S231. Calculate the new position of the i- th individual in the j- th dimension by the following formula:

式(6)中,ub表示解空间的上界向量,lb表示解空间的下界向量,N为一个随机数,并且N=2·rand-1,rand为0至1之间的随机数,Dim表示问题的维度,Difa,b为两个不同随机解Sola,N和Solb,N之间的差值(Sola,N、Solb,N具体是通过从种群Sol随机抽取得到的两个个体),Gap1由以下公式计算:In formula (6), ub represents the upper bound vector of the solution space, lb represents the lower bound vector of the solution space, N is a random number, and N = 2 rand-1, rand is a random number between 0 and 1, Dim represents the dimension of the problem, Dif a,b is the difference between two different random solutions Sol a,N and Sol b,N (Sol a,N and Sol b,N are specifically two individuals randomly drawn from the population Sol), and Gap 1 is calculated by the following formula:

Gap1=Difa,b-Difc,d(7)Gap 1 = Dif a,b -Dif c,d (7)

式(7)中,Difc,d表示两个不同于Sola,N或Solb,N的随机两个不同解Solc,N和Sold,N之间的差值(Solc,N、Sold,N具体是通过从种群Sol随机抽取得到的两个个体),Gap2由下列公式给出:In formula (7), Dif c,d represents the difference between two random solutions Sol c,N and Sol d,N that are different from Sol a,N or Sol b,N ( Sol c,N and Sol d,N are specifically two individuals randomly drawn from the population Sol), and Gap 2 is given by the following formula:

Gap2=Difc,d-Dife,f(8)Gap 2 = Dif c,d - Dif e,f (8)

式(8)中,Dife,f为两个不同于Sola,N,Solb,N,Solc,N或Sold,N随机解Sole,N与Solf,N之间的差值(Sole,N、Solf,N具体是通过从种群Sol随机抽取得到的两个个体);通过下列公式,得到新种群Sol*,Sol*={Solinew},Solinew的求解公式如下:In formula (8), Dife ,f is the difference between two random solutions Sol e,N and Sol f, N that are different from Sol a,N , Sol b,N , Sol c,N or Sol d,N (Sol e,N and Sol f,N are specifically two individuals randomly drawn from the population Sol); the new population Sol * is obtained by the following formula, Sol * = {Sol inew }, and the solution formula for Sol inew is as follows:

式(9)中,Solinew表示新种群Sol*中的第ith个个体,表示新种群Sol*的第ith个个体的jth个维度上的新位置,Soli表示初始化后的原始种群的ith个个体,表示通过式(6)新生成的ith个个体的适应度值,Solicost表示初始化后的原始种群Sol的ith个个体的适应度值。In formula (9), Sol inew represents the i th individual in the new population Sol * , represents the new position of the i th individual of the new population Sol * on the j th dimension, Sol i represents the i th individual of the original population after initialization, represents the fitness value of the i th individual newly generated by formula (6), and Sol icost represents the fitness value of the i th individual of the initialized original population Sol.

进一步地,所述S24的具体步骤为:Furthermore, the specific steps of S24 are:

S241、通过以下公式计算第ith个个体的第jth个维度上的新位置:S241. Calculate the new position of the i- th individual in the j- th dimension by the following formula:

式(10)中,表示新种群Sol**中的第ith个个体,Solinew表示种群Sol*中的第i个个体,Solr1和Solr2为种群Sol*中两个随机的不同解,ε和L*为优化开始之间设置的参数,δ表示0或者1的一个随机数,Solmale表示种群Sol*中的最优个体,exp表示以e为底的指数函数,mean表示平均值函数,rand表示0至1之间的一个随机数,Solall表示种群Sol*中的所有个体,Nc表示种群Sol*中的个体数量,randn表示问题维度中符合正态分布的随机数,Solnn由以下公式计算:In formula (10), represents the ith individual in the new population Sol ** , Sol inew represents the ith individual in the population Sol * , Sol r1 and Sol r2 are two random different solutions in the population Sol * , ε and L * are parameters set before the optimization starts, δ represents a random number of 0 or 1, Sol male represents the optimal individual in the population Sol * , exp represents an exponential function with e as the base, mean represents the mean value function, rand represents a random number between 0 and 1, Sol all represents all individuals in the population Sol * , Nc represents the number of individuals in the population Sol * , randn represents a random number that conforms to the normal distribution in the problem dimension, and Sol nn is calculated by the following formula:

Solnn=(Q1·P·Solinew)+Q2·(1-P)·Solmale(11)Sol nn =(Q 1 ·P·Sol inew )+Q 2 ·(1-P)·Sol male (11)

式(11)中,P为一个随机数,Solinew表示种群Sol*中的第i个个体,Solmale表示种群Sol*中的最优个体,Q1由以下公式计算:In formula (11), P is a random number, Sol inew represents the i-th individual in the population Sol * , Sol male represents the best individual in the population Sol * , and Q 1 is calculated by the following formula:

式(12)中,Iter表示当前迭代次数,MaxIter表示总的迭代次数,exp表示以e为底指数函数,randn表示问题维度中符合正态分布的随机数,Q2由以下公式计算:In formula (12), Iter represents the current number of iterations, MaxIter represents the total number of iterations, exp represents the exponential function with e as the base, randn represents the random number that conforms to the normal distribution in the problem dimension, and Q2 is calculated by the following formula:

Q2=randn·(randn)2·cos((2·rand)·randn) (13)Q 2 = randn·(randn) 2 ·cos((2·rand)·randn) (13)

式(13)中,cos表示余弦函数,randn表示问题维度中符合正态分布的随机数,rand表示0至1之间的一个随机数;In formula (13), cos represents the cosine function, randn represents a random number that conforms to the normal distribution in the problem dimension, and rand represents a random number between 0 and 1;

进一步地,所述S25的具体步骤为:Furthermore, the specific steps of S25 are:

S251、通过以下公式将三个种群合并并取前Nc个个体:S251. Merge the three populations and take the first Nc individuals using the following formula:

Solnew=[Sol Sol* Sol**] (14)Sol new = [Sol Sol * Sol ** ] (14)

式(14)中,Sol表示初始化后的原始种群,Sol*表示通过探索阶段更新后的新种群,Sol**表示通过开发阶段更新后的新种群,然后通过以下公式进行排序:In formula (14), Sol represents the original population after initialization, Sol * represents the new population updated through the exploration phase, and Sol ** represents the new population updated through the development phase, which is then sorted using the following formula:

[~,index]=sort(Solnewcost) (15)[~,index]=sort(Sol newcost ) (15)

式(15)中,[~,index]表示对Solnew升序排序之后的表示,sort表示升序函数,Solnewcost表示种群Solnew的适应度矩阵,index表示将Solnewcost按升序排序之后的下标,通过下列公式得到新种群:In formula (15), [~, index] represents the representation after Sol new is sorted in ascending order, sort represents the ascending function, Sol newcost represents the fitness matrix of the population Sol new , and index represents the subscript after Sol newcost is sorted in ascending order. The new population is obtained by the following formula:

Solnew=Solnew(index(1:Nc)) (16)Sol new =Sol new (index(1:Nc)) (16)

式(16)中,index表示将Solnewcost按升序排序之后的下标,Nc表示种群的数量;Solnew(index(1:Nc))表示取种群Solnew的前Nc个个体;In formula (16), index represents the subscript after Sol newcost is sorted in ascending order, Nc represents the number of populations; Sol new (index(1:Nc)) means taking the first Nc individuals of the population Sol new ;

进一步地,所述S26的具体步骤为:Furthermore, the specific steps of S26 are:

S261、通过以下公式计算种群Sol*和Sol**的最优适应度个体 S261. Calculate the optimal fitness individuals of populations Sol * and Sol ** by the following formula: and

式(17),表示取最小值函数,Sol*.cost和Sol**.cost分别表示种群Sol*和Sol**的适应度向量,同时,Iter=Iter+1;Formula (17), It represents the minimum function, Sol * .cost and Sol ** .cost represent the fitness vectors of populations Sol * and Sol ** respectively, and Iter = Iter + 1;

进一步地,所述S27的具体步骤为:Furthermore, the specific steps of S27 are:

S271、通过以下公式更新第Iter次迭代时探索阶段的得分和开发阶段的得分 S271, update the score of the exploration phase at the Iter iteration by the following formula and development stage scores

式(18)中,PF1和PF2是优化之前设置的参数并被初始为PF1=PF2=0.5,f1Exploration和f2Exploration由以下公式计算:In formula (18), PF 1 and PF 2 are parameters set before optimization and are initially set to PF 1 =PF 2 =0.5. f1 Exploration and f2 Exploration are calculated by the following formulas:

式(19)中,Gaptime,Gap1 time,Gap2 time和Gap3 time是四个初值为1的数,PF1和PF2是优化之前设置的参数并被初始为PF1=PF2=0.5,由下列公式计算:In formula (19), Gap time , Gap 1 time , Gap 2 time and Gap 3 time are four numbers with initial values of 1, PF 1 and PF 2 are parameters set before optimization and are initially set to PF 1 = PF 2 = 0.5, and Calculated by the following formula:

式(20)中,是初始化后的原始种群Sol中的最优个体的适应度值, 分别表示前三次迭代过程中种群Sol*的最优适应度值,f1Exploitation和f2Exploitation由下式计算:In formula (20), is the fitness value of the best individual in the initialized original population Sol, and They represent the optimal fitness values of the population Sol * during the first three iterations. f1 Exploitation and f2 Exploitation are calculated by the following formulas:

式(21)中,PF1和PF2是优化之前设置的参数并被初始为PF1=PF2=0.5,Gaptime,Gap1 time,Gap2 time和Gap3 time是四个初值为1的数,由下列公式计算:In formula (21), PF 1 and PF 2 are parameters set before optimization and are initialized to PF 1 =PF 2 =0.5, Gap time , Gap 1 time , Gap 2 time and Gap 3 time are four numbers with initial values of 1, and Calculated by the following formula:

式(22)中,分别表示前三次迭代过程中种群Sol**的最优适应度值;是初始化后的原始种群Sol中的最优个体的适应度值;In formula (22), and They represent the optimal fitness values of the population Sol ** during the first three iterations; It is the fitness value of the best individual in the initialized original population Sol;

进一步地,所述S31的具体步骤为:Furthermore, the specific steps of S31 are:

S311、通过以下公式进行更新:S311, through the following formula and To update:

式(23)中,分别表示第Iterth次迭代过程中探索和开发阶段的得分,由以下公式计算:In formula (23), and Respectively represent the scores of the exploration and development phases during the Iter th iteration, and Calculated by the following formula:

式(24)中,为向上取整符号;分别表示Iterth次迭代时探索和开发阶段的得分,由以下式子计算:In formula (24), is the rounding symbol; and Respectively represent the scores of the exploration and development phases at the Iter th iteration, and Calculated by the following formula:

式(25)中,Kc由下列公式计算:In formula (25), Kc is calculated by the following formula:

式(26)中,{|costold-costnew|}exploit和{|costold-costnew|}explore分别表示为通过开发和探索阶段更新之前适应度值和通过更新之后适应度值差值的绝对值,min表示取最小值函数,由以下等式计算:In formula (26), {|cost old -cost new |} exploit and {|cost old -cost new |} explore represent the absolute value of the difference between the fitness value before and after the update in the development and exploration phases, respectively. min represents the minimum value function. and Calculated by the following equation:

式(27)中,分别表示未通过开发阶段更新之前最优适应度和通过开发阶段更新之后最优适应度,分别表示未通过探索阶段更新之前最优适应度和通过探索阶段更新之后最优适应度,表示通过式(10)更新个体的次数,表示通过式(9)选择探索阶段更新后个体的次数,PF1是优化之前设置的参数并被初始为PF1=0.5,由下列公式计算:In formula (27), and They represent the optimal fitness before and after the development phase respectively. and They represent the optimal fitness before the exploration phase and the optimal fitness after the exploration phase respectively. represents the number of times the individual is updated through formula (10), represents the number of individuals updated in the exploration phase selected by formula (9), PF 1 is the parameter set before optimization and is initially set to PF 1 = 0.5, and Calculated by the following formula:

式(28)中,分别是第Iterth次更新之前开发阶段和探索阶段当前解的最好适应度值,分别是第(Iter+1)th次开发阶段和探索阶段最好解的适应度值,分别是第(Iter+2)th次开发阶段和探索阶段最好解的适应度值,分别是第Iterth次更新之后开发阶段和探索阶段当前解的最好适应度值,分别是第(Iter+1)th次开发阶段和探索阶段最好解的适应度值,分别是第(Iter+2)th次选择之后开发阶段和探索阶段最好解的适应度值,是迭代过程中通过开发阶段第Iterth次迭代到(Iter+1)th次迭代选择通过开发阶段更新之后个体的次数,是迭代过程中通过探索阶段第Iterth次迭代到(Iter+1)th次迭代选择通过探索阶段更新之后个体的次数,是迭代过程中通过开发阶段第(Iter+1)th次迭代到(Iter+2)th次迭代选择通过开发阶段更新之后个体的次数,是迭代过程中通过探索阶段第(Iter+1)th次迭代到(Iter+2)th次迭代选择通过探索阶段更新之后个体的次数,是迭代过程中通过开发阶段第(Iter+2)th次迭代到(Iter+3)th次迭代选择通过开发阶段更新之后个体的次数,是迭代过程中通过探索阶段第(Iter+2)th次迭代到(Iter+3)th次迭代选择通过探索阶段更新之后个体的次数,PF2是优化之前设置的参数并被初始为PF2=0.5,由以下公式计算:In formula (28), and are the best fitness values of the current solution in the development phase and exploration phase before the Iter th update, respectively. and are the fitness values of the best solutions in the (Iter+1) th development phase and exploration phase, respectively. and are the fitness values of the best solutions in the (Iter+2) th development phase and exploration phase, respectively. and are the best fitness values of the current solution in the development phase and exploration phase after the Iter th update, respectively. and are the fitness values of the best solutions in the (Iter+1) th development phase and exploration phase, respectively. and are the fitness values of the best solutions in the development phase and exploration phase after the (Iter+2) th selection, respectively. It is the number of individuals updated in the development phase from the Iter th iteration to the (Iter+1) th iteration in the iteration process. It is the number of individuals updated in the exploration phase from the Iter th iteration to the (Iter+1) th iteration during the iteration process. is the number of individuals updated in the development phase from the (Iter+1) th iteration to the (Iter+2) th iteration in the iteration process. is the number of individuals updated through the exploration phase from the (Iter+1) th iteration to the (Iter+2) th iteration in the iterative process. is the number of individuals updated in the development phase from the (Iter+2) th iteration to the (Iter+3) th iteration in the iteration process. is the number of individuals selected from the exploration phase from the (Iter+2) th iteration to the (Iter+3) th iteration in the iterative process after being updated in the exploration phase. PF 2 is the parameter set before optimization and is initially set to PF 2 = 0.5. and Calculated by the following formula:

式(29)中,PF3为优化之前设置的参数并被初始为PF3=0.3;In formula (29), PF 3 is the parameter set before optimization and is initially set to PF 3 = 0.3;

S3、将S2中获取的最优个体映射到二进制的调度矩阵,从而进行任务调度;S3, mapping the optimal individuals obtained in S2 to a binary scheduling matrix to perform task scheduling;

二进制的调度矩阵表示为:The binary scheduling matrix is represented as:

其中,矩阵U为调度矩阵;Among them, matrix U is the scheduling matrix;

ui,j表示第ith任务在第jth个计算资源上运行,并且规定每一个任务只能在一个虚拟机上计算,即对于每个i∈[1,T]得到调度矩阵的第一行代表第一个任务,其第一行第jth列有数值1(一行至少有一个数值1);则表示第一个任务在第jth个计算资源上运行。u i,j indicates that the ith task runs on the jth computing resource, and it is stipulated that each task can only be calculated on one virtual machine, that is, for each i∈[1,T], we get The first row of the scheduling matrix represents the first task, and the jth column of the first row has a value of 1 (a row has at least one value 1); this means that the first task runs on the jth computing resource.

进一步地,所述初始化种群Sol还包括:采用Sinusoidal混沌映射对初始化后的种群进行更新:Furthermore, the initialization of the population Sol also includes: updating the initialized population using a Sinusoidal chaotic map:

式(30)中,α为控制参数,初始α=2.3;In formula (30), α is the control parameter, and the initial α=2.3;

sin表示正弦函数;sin represents the sine function;

Soli表示初始化后的原始种群Sol中的第i个个体;Sol i represents the i-th individual in the initialized original population Sol;

表示通过Sinusoidal混沌映射更新之后的个体。 Represents the individual after being updated by the Sinusoidal chaotic map.

通过在算法中加入Sinusoidal混沌映射初始化方法,一方面提升了种群的多样性,从而降低了任务调度初始策略中所有策略的平均总成本。另一方面加快了最优解的搜索速度,从而提高了得到任务调度策略的效率。By adding the Sinusoidal chaotic map initialization method to the algorithm, on the one hand, the diversity of the population is improved, thereby reducing the average total cost of all strategies in the initial task scheduling strategy. On the other hand, the search speed for the optimal solution is accelerated, thereby improving the efficiency of obtaining the task scheduling strategy.

进一步地,在所述开发阶段对个体位置进行更新引入中间点样本学习策略对开发阶段进行改善,具体为以下公式:Furthermore, in the development stage, the individual positions are updated and an intermediate point sample learning strategy is introduced to improve the development stage, which is specifically the following formula:

式(31)中,表示原开发阶段更新的新个体;具体表达式为步骤S241的式(10)。In formula (31), Represents the new individual updated in the original development stage; the specific expression is formula (10) in step S241.

Solmid表示通过中间点样本学习策略产生的个体并由以下式子表示:Sol mid represents the individual generated by the midpoint sample learning strategy and is represented by the following formula:

式(32)中,表示更新后的种群Sol**按其适应度值升序排序之后的种群中第Rm个个体,Temp表示更新后的种群Sol**按其适应度值升序排序之后的种群,Rm由以下公式计算:In formula (32), represents the R mth individual in the updated population Sol ** after it is sorted in ascending order by its fitness value, Temp represents the updated population Sol ** after it is sorted in ascending order by its fitness value, and R m is calculated by the following formula:

式(33)中,i表示第i个个体,表示向上取整函数,rand表示区间为[0,1]之间的一个随机数;In formula (33), i represents the i-th individual, represents the upward rounding function, and rand represents a random number between the interval [0,1];

由于中位数不会受到极端值的影响,而且也可以评判一批数据的优劣程度,在任务调度过程中,中间点带有最优解的相关信息,通过在算法开发阶段加入中间点样本学习策略,加快任务调度过程中寻找最优解的收敛速度,降低了云计算任务调度的响应时间。Since the median is not affected by extreme values and can also judge the quality of a batch of data, the middle point carries relevant information about the optimal solution during the task scheduling process. By adding the middle point sample learning strategy during the algorithm development phase, the convergence speed of finding the optimal solution in the task scheduling process is accelerated, thereby reducing the response time of cloud computing task scheduling.

进一步地,所述最优个体映射到二进制的调度矩阵,是采用随机S-T形转移函数将最优个体变成二进制矩阵以此进行任务调度,具体表现为以下公式:Furthermore, the optimal individual is mapped to a binary scheduling matrix by using a random S-T transfer function to convert the optimal individual into a binary matrix for task scheduling, which is specifically expressed as the following formula:

式(34)中,abs表示取绝对值函数,tan表示正切函数,Solmale表示迭代过程中的最优个体,Matrixnew表示通过随机S-T形转移函数转换之后的矩阵;In formula (34), abs represents the absolute value function, tan represents the tangent function, Sol male represents the optimal individual in the iterative process, and Matrix new represents the matrix after transformation by the random ST transfer function;

单一或传统的转移函数会使用大量的转换时间时间,导致任务调度时计算资源的浪费。采用一种随机的S-T形转移函数,通过上述步骤能降低任务调度过程中最优解转换为最优调度方法时间,进而降低计算机系统调度时的响应时间。A single or traditional transfer function will use a lot of conversion time, resulting in a waste of computing resources during task scheduling. Using a random S-T transfer function, the time for converting the optimal solution to the optimal scheduling method during task scheduling can be reduced through the above steps, thereby reducing the response time of the computer system during scheduling.

本发明还提出一种基于多策略美洲狮优化算法的云任务调度系统,The present invention also proposes a cloud task scheduling system based on a multi-strategy Cougar optimization algorithm.

进一步地,所述系统包括:Furthermore, the system comprises:

数据采集模块:获取云任务字节大小向量以及虚拟机具备的计算资源向量、负载成本向量及资源带宽向量;Data collection module: obtains the cloud task byte size vector and the computing resource vector, load cost vector and resource bandwidth vector of the virtual machine;

任务调度模块:通过增强的美洲狮优化算法对建立的最小化总成本的目标函数进行优化,得到最优个体;然后将最优个体映射到二进制的调度矩阵,通过调度矩阵得到任务调度策略,从而进行任务调度;Task scheduling module: The objective function of minimizing the total cost is optimized by using the enhanced Puma optimization algorithm to obtain the optimal individual. The optimal individual is then mapped to a binary scheduling matrix, and the task scheduling strategy is obtained through the scheduling matrix to perform task scheduling.

二进制的调度矩阵表示为:The binary scheduling matrix is represented as:

其中,矩阵U为调度矩阵;Among them, matrix U is the scheduling matrix;

ui,j表示第ith任务在第jth个计算资源上运行,并且规定每一个任务只能在一个虚拟机上计算,即对于每个i∈[1,T]得到调度矩阵的第一行代表第一个任务,其第一行第jth列有数值1(一行至少有一个数值1);则表示第一个任务在第jth个计算资源上运行。u i,j indicates that the ith task runs on the jth computing resource, and it is stipulated that each task can only be calculated on one virtual machine, that is, for each i∈[1,T], we get The first row of the scheduling matrix represents the first task, and the jth column of the first row has a value of 1 (a row has at least one value 1); this means that the first task runs on the jth computing resource.

所述最小化总成本的目标函数为:The objective function of minimizing the total cost is:

Fun=min{ω1F12F23F3}(1)Fun=min{ω 1 F 12 F 23 F 3 }(1)

式(1)中,ω12和ω3分别表示函数F1,F2和F3的权重,用来调整目标函数在不同方面优化时的重心;In formula (1), ω 1 , ω 2 and ω 3 represent the weights of functions F 1 , F 2 and F 3 respectively, which are used to adjust the center of gravity of the objective function when optimizing different aspects;

F1表示时间成本函数;F 1 represents the time cost function;

F2表示负载成本函数;F 2 represents the load cost function;

F3表示资源带宽成本函数;F 3 represents the resource bandwidth cost function;

所述通过增强的美洲狮优化算法对建立的最小化总成本的目标函数进行优化,得到最优个体,包括:The objective function of minimizing the total cost is optimized by the enhanced Cougar optimization algorithm to obtain the optimal individual, including:

S21、通过公式(5)初始化原始种群,得到初始化后的原始种群Sol:S21. Initialize the original population using formula (5) to obtain the initialized original population Sol:

Soli=lb+rand·(ub-lb)(5)Sol i = lb + rand·(ub-lb) (5)

式(5)中,Soli表示种群Sol中第i个个体的位置信息;In formula (5), Sol i represents the location information of the i-th individual in the population Sol;

ub表示解空间的上界向量;ub represents the upper bound vector of the solution space;

lb表示解空间的下界向量;lb represents the lower bound vector of the solution space;

rand表示生成一个在[0,1]之间的随机数;rand means generating a random number between [0,1];

S22、初始Iter=1,通过判断Iter和4的关系,如果Iter<4,则执行S23,否则跳转执行S28;其中,Iter表示当前迭代次数;S22, initially Iter=1, by judging the relationship between Iter and 4, if Iter<4, then execute S23, otherwise jump to execute S28; wherein Iter represents the current number of iterations;

S23、通过探索阶段对个体位置进行更新;S23, updating individual positions through the exploration phase;

S24、通过开发阶段对个体位置进行更新;S24, updating individual positions through the development phase;

S25、将种群Sol,Sol*和Sol**合并,并取前Nc个个体;其中,Sol表示初始化后的原始种群,Sol*表示通过探索阶段更新后的新种群,Sol**表示通过开发阶段更新后的新种群;S25. Merge the populations Sol, Sol * and Sol ** , and take the first Nc individuals; where Sol represents the original population after initialization, Sol * represents the new population updated through the exploration phase, and Sol ** represents the new population updated through the development phase;

S26、计算种群Sol*和Sol**的最优个体适应度同时Iter=Iter+1;S26. Calculate the optimal individual fitness of populations Sol * and Sol ** and At the same time, Iter = Iter + 1;

S27、分别计算第Iter次迭代时探索阶段的得分和开发阶段的得分 S27, calculate the score of the exploration phase at the Iter iteration and development stage scores

S28、如果Iter≤MaxIter则执行S29,否则执行步骤S33;其中,MaxIter表示最大迭代次数,且MaxIter≥4;S28. If Iter≤MaxIter, execute S29, otherwise execute step S33; wherein MaxIter represents the maximum number of iterations, and MaxIter≥4;

S29、通过探索阶段对个体位置进行更新,此处的个体即步骤S25的前Nc个个体;S29, updating the individual positions through the exploration phase, where the individuals here are the first Nc individuals in step S25;

S30、通过开发阶段对个体位置进行更新,此处的个体即步骤S25的前Nc个个体;S30, updating the individual positions through the development phase, where the individuals here are the first Nc individuals in step S25;

S31、对进行更新;S31, yes and Make updates;

S32、Iter=Iter+1,返回S28;S32, Iter=Iter+1, return to S28;

S33、选择最后一次迭代时种群Sol*中目标函数值最小的个体作为调度方法。S33. Select the individual with the smallest objective function value in the population Sol * at the last iteration as the scheduling method.

进一步地,所述初始化种群Sol还包括:采用Sinusoidal混沌映射对初始化后的种群进行更新:Furthermore, the initialization of the population Sol also includes: updating the initialized population using a Sinusoidal chaotic map:

式(30)中,α为控制参数,初始α=2.3;In formula (30), α is the control parameter, and the initial α=2.3;

sin表示正弦函数;sin represents the sine function;

Soli表示初始化后的原始种群Sol中的第i个个体;Sol i represents the i-th individual in the initialized original population Sol;

表示通过Sinusoidal混沌映射更新之后的个体。 Represents the individual after being updated by the Sinusoidal chaotic map.

进一步地,在所述开发阶段对个体位置进行更新引入中间点样本学习策略对开发阶段进行改善,具体为以下公式:Furthermore, in the development stage, the individual positions are updated and an intermediate point sample learning strategy is introduced to improve the development stage, which is specifically the following formula:

式(31)中,Solmidnew表示引入中间点样本学习策略后开发阶段更新的新个体;In formula (31), Sol midnew represents the new individual updated in the development phase after the introduction of the midpoint sample learning strategy;

表示原开发阶段更新的新个体;具体表达式为步骤S241的式(10)。 Represents the new individual updated in the original development stage; the specific expression is formula (10) in step S241.

Solmid表示通过中间点样本学习策略产生的个体并由以下式子表示:Sol mid represents the individual generated by the midpoint sample learning strategy and is represented by the following formula:

式(32)中,Temp表示更新后的种群Sol**按其适应度值升序排序之后的种群,Rm由以下公式计算:In formula (32), Temp represents the updated population Sol ** after being sorted in ascending order of its fitness value, and Rm is calculated by the following formula:

式(33)中,i表示第i个个体,表示向上取整函数,rand表示区间为[0,1]之间的一个随机数。In formula (33), i represents the i-th individual, It represents the rounding function, and rand represents a random number between the interval [0,1].

进一步地,所述最优个体映射到二进制的调度矩阵,是采用随机S-T形转移函数将最优个体变成二进制矩阵以此进行任务调度,具体表现为以下公式:Furthermore, the optimal individual is mapped to a binary scheduling matrix by using a random S-T transfer function to convert the optimal individual into a binary matrix for task scheduling, which is specifically expressed as the following formula:

式(34)中,abs表示取绝对值函数,tan表示正切函数,Solmale表示迭代过程中的最优个体,Matrixnew表示通过随机S-T形转移函数转换之后的矩阵。In formula (34), abs represents the absolute value function, tan represents the tangent function, Sol male represents the optimal individual in the iterative process, and Matrix new represents the matrix after transformation by the random ST transfer function.

本发明还提出一种计算机设备,所述处理器执行存储器存储的程序时,实现基于多策略美洲狮优化算法的云任务调度方法方法。The present invention also proposes a computer device, wherein when the processor executes the program stored in the memory, a cloud task scheduling method based on the multi-strategy Cougar optimization algorithm is implemented.

本发明还提出一种可读存储介质,存储有程序,所述程序被处理器执行时,实现基于多策略美洲狮优化算法的云任务调度方法。The present invention also proposes a readable storage medium storing a program, which, when executed by a processor, implements a cloud task scheduling method based on a multi-strategy Cougar optimization algorithm.

综上所述,由于采用了上述技术方案,本发明提出的本任务调度方法通过引入先进的优化算法得到调度策略,显著减少了任务调度时的时间成本。这种优化不仅降低了计算机系统的响应时间,还通过在开发阶段加入中间点样本学习策略,加强了解空间的搜索范围,从而提高了最优解的精度。这种方法特别适用于大规模任务调度问题,能够有效提升云计算任务调度的合理性,最大化资源利用率,有效减少资源浪费和业务性能下降的问题。同时,通过优化任务执行流程和资源分配,本方法还能提升硬件运算效率,提高硬件处理速度,从而在整体上提升系统性能。In summary, due to the adoption of the above technical solutions, the task scheduling method proposed in the present invention obtains a scheduling strategy by introducing an advanced optimization algorithm, which significantly reduces the time cost of task scheduling. This optimization not only reduces the response time of the computer system, but also enhances the search range of the understanding space by adding an intermediate point sample learning strategy in the development stage, thereby improving the accuracy of the optimal solution. This method is particularly suitable for large-scale task scheduling problems, and can effectively improve the rationality of cloud computing task scheduling, maximize resource utilization, and effectively reduce resource waste and business performance degradation. At the same time, by optimizing the task execution process and resource allocation, this method can also improve hardware computing efficiency and hardware processing speed, thereby improving system performance as a whole.

本发明的附加方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本发明的实践了解到。Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

本发明的上述和/或附加的方面和优点从结合下面附图对实施例的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

图1是本发明基于增强美洲狮优化算法SMRSTPO的任务调度流程示意图。FIG1 is a schematic diagram of a task scheduling process based on the enhanced Puma optimization algorithm SMRSTPO of the present invention.

图2是本发明基于增强美洲狮优化算法SMRSTPO与其他优化算法任务调度对比图。FIG. 2 is a comparison diagram of task scheduling based on the enhanced Puma optimization algorithm SMRSTPO of the present invention and other optimization algorithms.

具体实施方式DETAILED DESCRIPTION

下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本发明,而不能理解为对本发明的限制。Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.

随着云计算的兴起,任务的规模也随之不断上升,现有的任务调度方法往往面临过陷入次优任务调度的问题。其根本原因在于算法的探索和利用性能较弱,无法快速并有效的找到最优任务调度方法,所选取的任务调度方法效率低下,导致了系统在进行大规模任务调度时浪费资源等问题。With the rise of cloud computing, the scale of tasks has also continued to rise. Existing task scheduling methods often face the problem of falling into suboptimal task scheduling. The fundamental reason is that the algorithm's exploration and utilization performance is weak, and it is impossible to quickly and effectively find the optimal task scheduling method. The selected task scheduling method is inefficient, resulting in problems such as wasting resources when the system performs large-scale task scheduling.

为了缓解存在的这些问题,本文提出了一种基于增强美洲狮优化算法的云计算资源调度方法SMRSTPO,如图1所示,具体包括以下步骤:In order to alleviate these problems, this paper proposes a cloud computing resource scheduling method SMRSTPO based on the enhanced Puma optimization algorithm, as shown in Figure 1, which specifically includes the following steps:

S1、获取云任务(Task)字节大小向量以及虚拟机(VM)具备的计算资源向量、负载成本向量及资源带宽向量;然后建立以下最小化总成本的目标函数;S1. Obtain the cloud task (Task) byte size vector and the computing resource vector, load cost vector and resource bandwidth vector of the virtual machine (VM); then establish the following objective function that minimizes the total cost;

S2、利用增强的美洲狮优化算法对目标函数进行优化,得到最优个体;S2, using the enhanced Puma optimization algorithm to optimize the objective function and obtain the optimal individual;

S3、将S2中获取的最优个体(最优解)映射到二进制的调度矩阵,通过调度矩阵得到任务调度策略,从而进行任务调度;S3, mapping the optimal individual (optimal solution) obtained in S2 to a binary scheduling matrix, obtaining the task scheduling strategy through the scheduling matrix, and thus performing task scheduling;

二进制的调度矩阵表示为:The binary scheduling matrix is represented as:

其中,矩阵U为调度矩阵;Among them, matrix U is the scheduling matrix;

ui,j表示第ith任务在第jth个计算资源上运行,并且规定每一个任务只能在一个虚拟机上计算,即对于每个i∈[1,T]得到调度矩阵的第一行代表第一个任务,其第一行第jth列有数值1(一行至少有一个数值1);则表示第一个任务在第jth个计算资源上运行;例如:调度矩阵U的第一行中只有u1,2的值为1,说明将第一个任务分配到第二个计算资源上运行;调度矩阵U的第二行中有u2,2、u2,5的值为1,说明将第二个任务分配到第二个计算资源和第五个计算资源上运行。因此,由调度矩阵U的ui,j值可得知具体的任务调度策略,从而实现任务调度。u i,j indicates that the ith task runs on the jth computing resource, and it is stipulated that each task can only be calculated on one virtual machine, that is, for each i∈[1,T], we get The first row of the scheduling matrix represents the first task. If the value of the jth column in the first row is 1 (there is at least one value 1 in a row), it means that the first task runs on the jth computing resource. For example, if only the value of u 1,2 in the first row of the scheduling matrix U is 1, it means that the first task is assigned to run on the second computing resource. If the values of u 2,2 and u 2,5 in the second row of the scheduling matrix U are 1, it means that the second task is assigned to run on the second computing resource and the fifth computing resource. Therefore, the specific task scheduling strategy can be obtained from the u i,j value of the scheduling matrix U, thereby realizing task scheduling.

进一步地,所述步骤S1建立的最小化总成本的目标函数如下:Furthermore, the objective function of minimizing the total cost established in step S1 is as follows:

Fun=min{ω1F12F23F3}(1)Fun=min{ω 1 F 12 F 23 F 3 }(1)

式(1)中,ω12和ω3分别表示函数F1,F2和F3的权重,用来调整目标函数在不同方面优化时的重心,F1表示时间成本函数,F2表示负载成本函数,F3表示资源带宽成本函数;In formula (1), ω 1 , ω 2 and ω 3 represent the weights of functions F 1 , F 2 and F 3 respectively, which are used to adjust the center of gravity of the objective function when optimizing different aspects. F 1 represents the time cost function, F 2 represents the load cost function, and F 3 represents the resource bandwidth cost function.

F1表示时间成本函数,并由下式计算: F1 represents the time cost function and is calculated as follows:

式(2)中,T表示任务的数量,K表示计算资源(虚拟机)的数量,ui,j表示第ith个任务在第jth个虚拟机上计算,并且规定每个任务只能在一个虚拟机上计算,即对于每个i∈[1,T]得到En,j表示第jth个虚拟机的计算资源向量,Et,i表示第ith个任务所需要的计算资源向量,F2表示负载成本函数,并由下式计算:In formula (2), T represents the number of tasks, K represents the number of computing resources (virtual machines), ui ,j represents that the ith task is calculated on the jth virtual machine, and it is stipulated that each task can only be calculated on one virtual machine, that is, for each i∈[1,T], we get En,j represents the computing resource vector of the jth virtual machine, Et ,i represents the computing resource vector required by the i -th task, and F2 represents the load cost function, which is calculated by the following formula:

式(3)中,T表示任务的数量,K表示计算资源(虚拟机)的数量,ui,j表示第ith个任务在第jth个虚拟机上计算,并且规定每个任务只能在一个虚拟机上计算,即对于每个i∈[1,T]得到Sn,j表示第jth个虚拟机的负载向量,St,i表示第ith个任务所需要的负载向量,F3表示资源带宽成本函数,并由下式计算:In formula (3), T represents the number of tasks, K represents the number of computing resources (virtual machines), ui ,j represents that the ith task is calculated on the jth virtual machine, and it is stipulated that each task can only be calculated on one virtual machine, that is, for each i∈[1,T], we get Sn ,j represents the load vector of the jth virtual machine, St ,i represents the load vector required by the ith task, and F3 represents the resource bandwidth cost function, which is calculated by the following formula:

式(4)中,T表示任务的数量,K表示计算资源(虚拟机)的数量,ui,j表示第ith个任务在第jth个虚拟机上计算,并且规定每个任务只能在一个虚拟机上计算,即对于每个i∈[1,T]得到Et,i表示第ith个任务所需要的计算资源向量,Cn,j表示第jth个虚拟机的资源带宽向量,Ct,i表示第ith个任务所需要的资源带宽向量,En,j表示第jth个虚拟机的计算资源向量,P表示与价格相关的参数。In formula (4), T represents the number of tasks, K represents the number of computing resources (virtual machines), ui ,j represents that the ith task is calculated on the jth virtual machine, and it is stipulated that each task can only be calculated on one virtual machine, that is, for each i∈[1,T], we get E t,i represents the computing resource vector required for the ith task, C n,j represents the resource bandwidth vector of the j th virtual machine, C t,i represents the resource bandwidth vector required for the ith task, En ,j represents the computing resource vector of the j th virtual machine, and P represents a parameter related to the price.

进一步地,所述S2利用增强的美洲狮优化算法对云任务调度方法进行优化,得到最优任务调度策略的具体步骤为:Furthermore, the S2 optimizes the cloud task scheduling method using the enhanced Puma optimization algorithm, and the specific steps of obtaining the optimal task scheduling strategy are:

S21、通过公式(5)初始化原始种群,得到初始化后的原始种群Sol:S21. Initialize the original population using formula (5) to obtain the initialized original population Sol:

Soli=lb+rand·(ub-lb)(5)Sol i = lb + rand·(ub-lb) (5)

式(5)中,Soli表示种群Sol中第i个个体的位置信息;In formula (5), Sol i represents the location information of the i-th individual in the population Sol;

ub表示解空间的上界向量;ub represents the upper bound vector of the solution space;

lb表示解空间的下界向量;lb represents the lower bound vector of the solution space;

rand表示生成一个在[0,1]之间的随机数;rand means generating a random number between [0,1];

S22、初始Iter=1,通过判断Iter和4的关系,如果Iter<4,则执行S23,否则跳转执行S28;其中,Iter表示当前迭代次数;S22, initially Iter=1, by judging the relationship between Iter and 4, if Iter<4, then execute S23, otherwise jump to execute S28; wherein Iter represents the current number of iterations;

S23、通过探索阶段对个体位置进行更新;S23, updating individual positions through the exploration phase;

S24、通过开发阶段对个体位置进行更新;S24, updating individual positions through the development phase;

S25、将种群Sol,Sol*和Sol**合并,并取前Nc个个体;其中,Sol表示初始化后的原始种群,Sol*表示通过探索阶段更新后的新种群,Sol**表示通过开发阶段更新后的新种群;S25. Merge the populations Sol, Sol * and Sol ** , and take the first Nc individuals; where Sol represents the original population after initialization, Sol * represents the new population updated through the exploration phase, and Sol ** represents the new population updated through the development phase;

S26、计算种群Sol*和Sol**的最优个体适应度同时Iter=Iter+1;S26. Calculate the optimal individual fitness of populations Sol * and Sol ** and At the same time, Iter = Iter + 1;

S27、分别计算第Iter次迭代时探索阶段的得分和开发阶段的得分 S27, calculate the score of the exploration phase at the Iter iteration and development stage scores

S28、如果Iter≤MaxIter则执行S29,否则执行步骤S33;其中,MaxIter表示最大迭代次数,且MaxIter≥4;S28. If Iter≤MaxIter, execute S29, otherwise execute step S33; wherein MaxIter represents the maximum number of iterations, and MaxIter≥4;

S29、通过探索阶段对个体位置进行更新,此处的个体即步骤S25的前Nc个个体;S29, updating the individual positions through the exploration phase, where the individuals here are the first Nc individuals in step S25;

S30、通过开发阶段对个体位置进行更新,此处的个体即步骤S25的前Nc个个体;S30, updating the individual positions through the development phase, where the individuals here are the first Nc individuals in step S25;

S31、对进行更新;S31, yes and Make updates;

S32、Iter=Iter+1,返回S28;S32, Iter=Iter+1, return to S28;

S33、选择最后一次迭代时种群Sol*中目标函数值最小的个体作为调度方法。S33. Select the individual with the smallest objective function value in the population Sol * at the last iteration as the scheduling method.

进一步地,所述S23的具体步骤为:Furthermore, the specific steps of S23 are:

S231、通过以下公式计算第ith个个体的第jth个维度上的新位置:S231. Calculate the new position of the i- th individual in the j- th dimension by the following formula:

式(6)中,ub表示解空间的上界向量,lb表示解空间的下界向量,N为一个随机数,并且N=2·rand-1,rand为0至1之间的随机数,Dim表示问题的维度,Difa,b为两个不同随机解Sola,N和Solb,N之间的差值(Sola,N、Solb,N具体是通过从种群Sol随机抽取得到的两个个体),Gap1由以下公式计算:In formula (6), ub represents the upper bound vector of the solution space, lb represents the lower bound vector of the solution space, N is a random number, and N = 2 rand-1, rand is a random number between 0 and 1, Dim represents the dimension of the problem, Dif a,b is the difference between two different random solutions Sol a,N and Sol b,N (Sol a,N and Sol b,N are specifically two individuals randomly drawn from the population Sol), and Gap 1 is calculated by the following formula:

Gap1=Difa,b-Difc,d (7)Gap 1 = Dif a,b -Dif c,d (7)

式(7)中,Difc,d表示两个不同于Sola,N或Solb,N的随机两个不同解Solc,N和Sold,N之间的差值(Solc,N、Sold,N具体是通过从种群Sol随机抽取得到的两个个体),Gap2由下列公式给出:In formula (7), Dif c,d represents the difference between two random solutions Sol c,N and Sol d,N that are different from Sol a,N or Sol b,N ( Sol c,N and Sol d,N are specifically two individuals randomly drawn from the population Sol), and Gap 2 is given by the following formula:

Gap2=Difc,d-Dife,f(8)Gap 2 = Dif c,d - Dif e,f (8)

式(8)中,Dife,f为两个不同于Sola,N,Solb,N,Solc,N或Sold,N随机解Sole,N与Solf,N之间的差值(Sole,N、Solf,N具体是通过从种群Sol随机抽取得到的两个个体);通过下列公式,得到新种群Sol*,Sol*={Solinew},Solinew的求解公式如下:In formula (8), Dife ,f is the difference between two random solutions Sol e,N and Sol f, N that are different from Sol a,N , Sol b,N , Sol c,N or Sol d,N (Sol e,N and Sol f,N are specifically two individuals randomly drawn from the population Sol); the new population Sol * is obtained by the following formula, Sol * = {Sol inew }, and the solution formula for Sol inew is as follows:

式(9)中,Solinew表示新种群Sol*中的第ith个个体,表示新种群Sol*的第ith个个体的jth个维度上的新位置,Soli表示初始化后的原始种群的ith个个体,表示通过式(6)新生成的ith个个体的适应度值,Solicost表示初始化后的原始种群Sol的ith个个体的适应度值。In formula (9), Sol inew represents the i th individual in the new population Sol * , represents the new position of the i th individual of the new population Sol * on the j th dimension, Sol i represents the i th individual of the original population after initialization, represents the fitness value of the i th individual newly generated by formula (6), and Sol icost represents the fitness value of the i th individual of the initialized original population Sol.

进一步地,所述S24的具体步骤为:Furthermore, the specific steps of S24 are:

S241、通过以下公式计算第ith个个体的第jth个维度上的新位置:S241. Calculate the new position of the i- th individual in the j- th dimension by the following formula:

式(10)中,表示新种群Sol**中的第ith个个体,Solinew表示种群Sol*中的第i个个体,Solr1和Solr2为种群Sol*中两个随机的不同解,ε和L*为优化开始之间设置的参数,δ表示0或者1的一个随机数,Solmale表示种群Sol*中的最优个体,exp表示以e为底的指数函数,mean表示平均值函数,rand表示0至1之间的一个随机数,Solall表示种群Sol*中的所有个体,Nc表示种群Sol*中的个体数量,randn表示问题维度中符合正态分布的随机数,Solnn由以下公式计算:In formula (10), represents the ith individual in the new population Sol ** , Sol inew represents the ith individual in the population Sol * , Sol r1 and Sol r2 are two random different solutions in the population Sol * , ε and L * are parameters set before the optimization starts, δ represents a random number of 0 or 1, Sol male represents the optimal individual in the population Sol * , exp represents an exponential function with e as the base, mean represents the mean value function, rand represents a random number between 0 and 1, Sol all represents all individuals in the population Sol * , Nc represents the number of individuals in the population Sol * , randn represents a random number that conforms to the normal distribution in the problem dimension, and Sol nn is calculated by the following formula:

Solnn=(Q1·P·Solinew)+Q2·(1-P)·Solmale(11)Sol nn =(Q 1 ·P·Sol inew )+Q 2 ·(1-P)·Sol male (11)

式(11)中,P为一个随机数,Solinew表示种群Sol*中的第i个个体,Solmale表示种群Sol*中的最优个体,Q1由以下公式计算:In formula (11), P is a random number, Sol inew represents the i-th individual in the population Sol * , Sol male represents the best individual in the population Sol * , and Q 1 is calculated by the following formula:

式(12)中,Iter表示当前迭代次数,MaxIter表示总的迭代次数,exp表示以e为底指数函数,randn表示问题维度中符合正态分布的随机数,Q2由以下公式计算:In formula (12), Iter represents the current number of iterations, MaxIter represents the total number of iterations, exp represents the exponential function with e as the base, randn represents the random number that conforms to the normal distribution in the problem dimension, and Q2 is calculated by the following formula:

Q2=randn·(randn)2·cos((2·rand)·randn) (13)Q 2 = randn·(randn) 2 ·cos((2·rand)·randn) (13)

式(13)中,cos表示余弦函数,randn表示问题维度中符合正态分布的随机数,rand表示0至1之间的一个随机数;In formula (13), cos represents the cosine function, randn represents a random number that conforms to the normal distribution in the problem dimension, and rand represents a random number between 0 and 1;

进一步地,所述S25的具体步骤为:Furthermore, the specific steps of S25 are:

S251、通过以下公式将三个种群合并并取前Nc个个体:S251. Merge the three populations and take the first Nc individuals using the following formula:

Solnew=[Sol Sol* Sol**] (14)Sol new = [Sol Sol * Sol ** ] (14)

式(14)中,Sol表示初始化后的原始种群,Sol*表示通过探索阶段更新后的新种群,Sol**表示通过开发阶段更新后的新种群,然后通过以下公式进行排序:In formula (14), Sol represents the original population after initialization, Sol * represents the new population updated through the exploration phase, and Sol ** represents the new population updated through the development phase, which is then sorted using the following formula:

[~,index]=sort(Solnewcost) (15)[~,index]=sort(Sol newcost ) (15)

式(15)中,[~,index]表示对Solnew升序排序之后的表示,sort表示升序函数,Solnewcost表示种群Solnew的适应度矩阵,index表示将Solnewcost按升序排序之后的下标,通过下列公式得到新种群:In formula (15), [~, index] represents the representation after Sol new is sorted in ascending order, sort represents the ascending function, Sol newcost represents the fitness matrix of the population Sol new , and index represents the subscript after Sol newcost is sorted in ascending order. The new population is obtained by the following formula:

Solnew=Solnew(index(1:Nc)) (16)Sol new =Sol new (index(1:Nc)) (16)

式(16)中,index表示将Solnewcost按升序排序之后的下标,Nc表示种群的数量;Solnew(index(1:Nc))表示取种群Solnew的前Nc个个体;In formula (16), index represents the subscript after Sol newcost is sorted in ascending order, Nc represents the number of populations; Sol new (index(1:Nc)) means taking the first Nc individuals of the population Sol new ;

进一步地,所述S26的具体步骤为:Furthermore, the specific steps of S26 are:

S261、通过以下公式计算种群Sol*和Sol**的最优适应度个体 S261. Calculate the optimal fitness individuals of populations Sol * and Sol ** by the following formula: and

式(17),表示取最小值函数,Sol*.cost和Sol**.cost分别表示种群Sol*和Sol**的适应度向量,同时,Iter=Iter+1;Formula (17), It represents the minimum function, Sol * .cost and Sol ** .cost represent the fitness vectors of populations Sol * and Sol ** respectively, and Iter = Iter + 1;

进一步地,所述S27的具体步骤为:Furthermore, the specific steps of S27 are:

S271、通过以下公式更新第Iter次迭代时探索阶段的得分和开发阶段的得分 S271. Update the score of the exploration phase at the Iter iteration using the following formula: and development stage scores

式(18)中,PF1和PF2是优化之前设置的参数并被初始为PF1=PF2=0.5,f1Exploration和f2Exploration由以下公式计算:In formula (18), PF 1 and PF 2 are parameters set before optimization and are initially set to PF 1 =PF 2 =0.5. f1 Exploration and f2 Exploration are calculated by the following formulas:

式(19)中,Gaptime,Gap1 time,Gap2 time和Gap3 time是四个初值为1的数,PF1和PF2是优化之前设置的参数并被初始为PF1=PF2=0.5,由下列公式计算:In formula (19), Gap time , Gap 1 time , Gap 2 time and Gap 3 time are four numbers with initial values of 1, PF 1 and PF 2 are parameters set before optimization and are initially set to PF 1 = PF 2 = 0.5, and Calculated by the following formula:

式(20)中,是初始化后的原始种群Sol中的最优个体的适应度值, 分别表示前三次迭代过程中种群Sol*的最优适应度值,f1Exploitation和f2Exploitation由下式计算:In formula (20), is the fitness value of the best individual in the initialized original population Sol, and They represent the optimal fitness values of the population Sol * during the first three iterations. f1 Exploitation and f2 Exploitation are calculated by the following formulas:

式(21)中,PF1和PF2是优化之前设置的参数并被初始为PF1=PF2=0.5,Gaptime,Gap1 time,Gap2 time和Gap3 time是四个初值为1的数,由下列公式计算:In formula (21), PF 1 and PF 2 are parameters set before optimization and are initialized to PF 1 =PF 2 =0.5, Gap time , Gap 1 time , Gap 2 time and Gap 3 time are four numbers with initial values of 1, and Calculated by the following formula:

式(22)中,分别表示前三次迭代过程中种群Sol**的最优适应度值;是初始化后的原始种群Sol中的最优个体的适应度值;In formula (22), and They represent the optimal fitness values of the population Sol ** during the first three iterations; It is the fitness value of the best individual in the initialized original population Sol;

进一步地,所述S31的具体步骤为:Furthermore, the specific steps of S31 are:

S311、通过以下公式进行更新:S311, through the following formula and To update:

式(23)中,分别表示第Iterth次迭代过程中探索和开发阶段的得分,由以下公式计算:In formula (23), and Respectively represent the scores of the exploration and development phases during the Iter th iteration, and Calculated by the following formula:

式(24)中,为向上取整符号;分别表示Iterth次迭代时探索和开发阶段的得分,由以下式子计算:In formula (24), is the rounding symbol; and Respectively represent the scores of the exploration and development phases at the Iter th iteration, and Calculated by the following formula:

式(25)中,Kc由下列公式计算:In formula (25), Kc is calculated by the following formula:

式(26)中,{|costold-costnew|}exploit和{|costold-costnew|}explore分别表示为通过开发和探索阶段更新之前适应度值和通过更新之后适应度值差值的绝对值,min表示取最小值函数,由以下等式计算:In formula (26), {|cost old -cost new |} exploit and {|cost old -cost new |} explore represent the absolute value of the difference between the fitness value before and after the update in the development and exploration phases, respectively. min represents the minimum value function. and Calculated by the following equation:

式(27)中,分别表示未通过开发阶段更新之前最优适应度和通过开发阶段更新之后最优适应度,分别表示未通过探索阶段更新之前最优适应度和通过探索阶段更新之后最优适应度,表示通过式(10)更新个体的次数,表示通过式(9)选择探索阶段更新后个体的次数,PF1是优化之前设置的参数并被初始为PF1=0.5,由下列公式计算:In formula (27), and They represent the optimal fitness before and after the development phase respectively. and They represent the optimal fitness before the exploration phase and the optimal fitness after the exploration phase respectively. represents the number of times the individual is updated through formula (10), represents the number of individuals updated in the exploration phase selected by formula (9), PF 1 is the parameter set before optimization and is initially set to PF 1 = 0.5, and Calculated by the following formula:

式(28)中,分别是第Iterth次更新之前开发阶段和探索阶段当前解的最好适应度值,分别是第(Iter+1)th次开发阶段和探索阶段最好解的适应度值,分别是第(Iter+2)th次开发阶段和探索阶段最好解的适应度值,分别是第Iterth次更新之后开发阶段和探索阶段当前解的最好适应度值,分别是第(Iter+1)th次开发阶段和探索阶段最好解的适应度值,分别是第(Iter+2)th次选择之后开发阶段和探索阶段最好解的适应度值,是迭代过程中通过开发阶段第Iterth次迭代到(Iter+1)th次迭代选择通过开发阶段更新之后个体的次数,是迭代过程中通过探索阶段第Iterth次迭代到(Iter+1)th次迭代选择通过探索阶段更新之后个体的次数,是迭代过程中通过开发阶段第(Iter+1)th次迭代到(Iter+2)th次迭代选择通过开发阶段更新之后个体的次数,是迭代过程中通过探索阶段第(Iter+1)th次迭代到(Iter+2)th次迭代选择通过探索阶段更新之后个体的次数,是迭代过程中通过开发阶段第(Iter+2)th次迭代到(Iter+3)th次迭代选择通过开发阶段更新之后个体的次数,是迭代过程中通过探索阶段第(Iter+2)th次迭代到(Iter+3)th次迭代选择通过探索阶段更新之后个体的次数,PF2是优化之前设置的参数并被初始为PF2=0.5,由以下公式计算:In formula (28), and are the best fitness values of the current solution in the development phase and exploration phase before the Iter th update, respectively. and are the fitness values of the best solutions in the (Iter+1) th development phase and exploration phase, respectively. and are the fitness values of the best solutions in the (Iter+2) th development phase and exploration phase, respectively. and are the best fitness values of the current solution in the development phase and exploration phase after the Iter th update, respectively. and are the fitness values of the best solutions in the (Iter+1) th development phase and exploration phase, respectively. and are the fitness values of the best solutions in the development phase and exploration phase after the (Iter+2) th selection, respectively. It is the number of individuals updated in the development phase from the Iter th iteration to the (Iter+1) th iteration in the iteration process. It is the number of individuals updated in the exploration phase from the Iter th iteration to the (Iter+1) th iteration during the iteration process. is the number of individuals updated in the development phase from the (Iter+1) th iteration to the (Iter+2) th iteration in the iteration process. is the number of individuals updated through the exploration phase from the (Iter+1) th iteration to the (Iter+2) th iteration in the iterative process. is the number of individuals updated in the development phase from the (Iter+2) th iteration to the (Iter+3) th iteration in the iteration process. is the number of individuals selected from the exploration phase from the (Iter+2) th iteration to the (Iter+3) th iteration in the iterative process after being updated in the exploration phase. PF 2 is the parameter set before optimization and is initially set to PF 2 = 0.5. and Calculated by the following formula:

式(29)中,PF3为优化之前设置的参数并被初始为PF3=0.3;In formula (29), PF 3 is the parameter set before optimization and is initially set to PF 3 = 0.3;

进一步地,引入Sinusoidal混沌映射对初始化后的原始种群进行更新,表现为以下公式:Furthermore, the Sinusoidal chaotic map is introduced to update the initialized original population, which is expressed as the following formula:

式(30)中,α为控制参数,初始α=2.3,sin表示正弦函数,Soli表示初始化后的原始种群Sol中的第i个个体,表示通过Sinusoidal混沌映射更新之后的个体;In formula (30), α is the control parameter, the initial α = 2.3, sin represents the sine function, Sol i represents the i-th individual in the initialized original population Sol, Represents the individual after updating through the Sinusoidal chaotic mapping;

通过在算法中加入Sinusoidal混沌映射初始化方法,一方面提升了种群的多样性,从而降低了任务调度初始策略中所有策略的平均总成本。另一方面加快了最优解的搜索速度,从而提高了得到任务调度策略的效率。By adding the Sinusoidal chaotic map initialization method to the algorithm, on the one hand, the diversity of the population is improved, thereby reducing the average total cost of all strategies in the initial task scheduling strategy. On the other hand, the search speed for the optimal solution is accelerated, thereby improving the efficiency of obtaining the task scheduling strategy.

进一步地,引入中间点样本学习策略对开发阶段进行改善,具体为以下公式:Furthermore, the intermediate point sample learning strategy is introduced to improve the development stage, which is specifically the following formula:

式(31)中,表示原开发阶段更新的新个体,Solmid表示通过中间点样本学习策略产生的个体并由以下式子表示:In formula (31), represents the new individual updated in the original development stage, and Sol mid represents the individual generated by the midpoint sample learning strategy and is represented by the following formula:

式(32)中,Temp表示更新后的种群Sol**按其适应度值升序排序之后的种群,Rm由以下公式计算:In formula (32), Temp represents the updated population Sol ** after being sorted in ascending order of its fitness value, and Rm is calculated by the following formula:

式(33)中,i表示第i个个体,表示向上取整函数,rand表示区间为[0,1]之间的一个随机数;In formula (33), i represents the i-th individual, represents the upward rounding function, and rand represents a random number between the interval [0,1];

由于中位数不会受到极端值的影响,而且也可以评判一批数据的优劣程度,在任务调度过程中,中间点带有最优解的相关信息,通过在算法开发阶段加入中间点样本学习策略,加快任务调度过程中寻找最优解的收敛速度,降低了云计算任务调度的响应时间。Since the median is not affected by extreme values and can also judge the quality of a batch of data, the middle point carries relevant information about the optimal solution during the task scheduling process. By adding the middle point sample learning strategy during the algorithm development phase, the convergence speed of finding the optimal solution in the task scheduling process is accelerated, thereby reducing the response time of cloud computing task scheduling.

进一步地,所述最优个体(最优解)映射到二进制的调度矩阵,是采用随机S-T形转移函数将最优个体变成二进制矩阵以此进行任务调度,具体表现为以下公式:Furthermore, the optimal individual (optimal solution) is mapped to a binary scheduling matrix by using a random S-T transfer function to convert the optimal individual into a binary matrix for task scheduling, which is specifically expressed as the following formula:

式(34)中,abs表示取绝对值函数,tan表示正切函数,Solmale表示迭代过程中的最优个体,Matrixnew表示通过随机S-T形转移函数转换之后的矩阵;In formula (34), abs represents the absolute value function, tan represents the tangent function, Sol male represents the optimal individual in the iterative process, and Matrix new represents the matrix after transformation by the random ST transfer function;

除了采用提出的随机S-T转移函数得到的二进制的调度矩阵,还可采用一般的s形转移函数,t形转移函数,v形转移函数等。但单一或传统的转移函数会使用大量的转换时间时间,导致任务调度时计算资源的浪费。采用一种随机的S-T形转移函数,通过上述步骤能降低任务调度过程中最优解转换为最优调度方法时间,进而降低计算机系统调度时的响应时间。In addition to the binary scheduling matrix obtained by adopting the proposed random S-T transfer function, general S-shaped transfer function, T-shaped transfer function, V-shaped transfer function, etc. can also be used. However, a single or traditional transfer function will use a lot of conversion time, resulting in a waste of computing resources during task scheduling. Using a random S-T transfer function, the time for converting the optimal solution into the optimal scheduling method during task scheduling can be reduced through the above steps, thereby reducing the response time of the computer system during scheduling.

SMRSTPO算法伪代码如下:The pseudo code of the SMRSTPO algorithm is as follows:

为了进一步说明SMRSTPO的技术效果,因此进行了仿真实验。我们分析了所提出的SMRSTPO解决云资源调度问题的性能,并将其与蚁群优化算法(ACO)、粒子群优化算法(PSO)、鲸鱼优化算法(WOA)、美洲狮优化算法(PO)和改进的鲸鱼优化算法(IWC)进行了比较。计算任务和虚拟机参数说明如表1所示。采用负荷成本、时间成本(即资源带宽成本)、价格成本和总成本作为性能分析指标。实验条件设置为种群规模为50,最大迭代次数为100。In order to further illustrate the technical effect of SMRSTPO, simulation experiments are conducted. We analyze the performance of the proposed SMRSTPO in solving the cloud resource scheduling problem and compare it with the ant colony optimization algorithm (ACO), particle swarm optimization algorithm (PSO), whale optimization algorithm (WOA), puma optimization algorithm (PO) and improved whale optimization algorithm (IWC). The description of the computing tasks and virtual machine parameters is shown in Table 1. Load cost, time cost (i.e., resource bandwidth cost), price cost and total cost are used as performance analysis indicators. The experimental conditions are set to a population size of 50 and a maximum number of iterations of 100.

我们用100个计算任务测试了SMRSTPO处理任务调度的能力。图2显示了模拟结果。从图2(a)中可以清楚地看到,与PSO、WOA、ACO相比,SMRSTPO的总成本降低了20%以上,可见SMRSTPO具有较强的优化能力。此外,与功能强大的IWC相比,SMRSTPO的总成本也降低了约1%,这进一步表明SMRSTPO具有更精确的解决方案。从图2(b)可以看出,在价格成本上始终优于ACO、PSO、PO和WOA,并且在第60次迭代之后,SMRSTPO在价格成本上与IWC不相上下。从图2(c)可以看出,虽然在时间优化上,SMRSTPO虽然略逊于WOA,但相比较于其他算法,也有较强的优化性能。从图2(d)可以看出,在负载性能方面,SMRSTPO远低于ACO、PSO、WOA和PO,说明SMRSTPO具有较强的搜索能力。We tested the ability of SMRSTPO to handle task scheduling with 100 computing tasks. Figure 2 shows the simulation results. It can be clearly seen from Figure 2(a) that the total cost of SMRSTPO is reduced by more than 20% compared with PSO, WOA, and ACO, which shows that SMRSTPO has strong optimization ability. In addition, compared with the powerful IWC, the total cost of SMRSTPO is also reduced by about 1%, which further shows that SMRSTPO has a more accurate solution. As can be seen from Figure 2(b), it is always better than ACO, PSO, PO, and WOA in price cost, and after the 60th iteration, SMRSTPO is comparable to IWC in price cost. As can be seen from Figure 2(c), although SMRSTPO is slightly inferior to WOA in time optimization, it also has strong optimization performance compared with other algorithms. As can be seen from Figure 2(d), in terms of load performance, SMRSTPO is much lower than ACO, PSO, WOA, and PO, indicating that SMRSTPO has strong search ability.

表1虚拟机和计算任务参数Table 1. Virtual machine and computing task parameters

参数parameter 虚拟机范围Virtual Machine Scope 任务范围Scope of Tasks 计算资源向量EnComputational resource vector En [200,500][200,500] [10,50][10,50] 负载成本向量SnLoad cost vector Sn [100,500][100,500] [50,100][50,100] 资源带宽向量CnResource bandwidth vector Cn [100,250][100,250] [20,50][20,50]

Claims (8)

1. The cloud computing resource scheduling method based on the enhanced American lion optimization algorithm is characterized by comprising the following steps of:
s1, acquiring a cloud task byte size vector, a computing resource vector, a load cost vector and a resource bandwidth vector of a virtual machine, and then establishing the following objective function for minimizing total cost:
Fun=min{ω1F12F23F3}(1)
In formula (1), ω 12 and ω 3 represent weights of the functions F 1,F2 and F 3, respectively;
F 1 represents a time cost function;
f 2 represents a load cost function;
F 3 represents a resource bandwidth cost function;
S2, optimizing an objective function by using an enhanced American lion optimization algorithm to obtain an optimal individual:
S21, initializing an original population through a formula (5) to obtain an initialized original population Sol:
Soli=lb+rand·(ub-lb)(5)
In the formula (5), sol i represents the position information of the ith individual in the population Sol;
ub represents the upper bound vector of the solution space;
lb represents the lower bound vector of the solution space;
rand means generating a random number between 0, 1;
s22, the initial Iter=1, if Iter is less than 4, S23 is executed by judging the relation between Iter and 4, otherwise, S28 is executed in a jumping manner; wherein Iter represents the current iteration number;
s23, updating the individual position through an exploration stage;
S24, updating the individual position through a development stage;
S25, combining the population Sol, sol * and Sol **, and taking the first Nc individuals; where Sol represents the original population after initialization, sol * represents the new population after updating by the exploration phase, sol ** represents the new population after updating by the development phase;
s26, calculating the optimal individual fitness of the populations Sol * and Sol ** AndMeanwhile, iter=iter+1;
s27, respectively calculating scores of exploration phases in the Iter iteration And score of development stage
S28, executing S29 if Iter is not more than MaxIter, otherwise executing step S33; wherein MaxIter represents the maximum iteration number and MaxIter is not less than 4;
s29, updating the individual position through the exploration phase;
s30, updating the individual position through a development stage;
S31, pair AndUpdating;
S32, iter=iter+1, returning to S28;
S33, selecting an individual with the smallest objective function value in the population Sol * at the last iteration as a scheduling method;
S3, mapping the optimal individuals obtained in the S2 to a binary scheduling matrix, and obtaining a task scheduling strategy through the scheduling matrix so as to perform task scheduling;
The binary scheduling matrix is expressed as:
Wherein the matrix U is a scheduling matrix;
T, K are the number of rows and columns of the matrix U respectively;
u i,j denotes that the i th task runs on the j th computing resource and specifies that each task can only be computed on one virtual machine;
The optimal individual is mapped to a binary scheduling matrix, and the optimal individual is changed into the binary matrix by adopting a random S-T-shaped transfer function so as to perform task scheduling, wherein the optimal individual is expressed by the following formula:
In equation (34), abs represents an absolute function, tan represents a tangent function, sol male represents an optimal individual in the iterative process, and Matrix new represents a Matrix after conversion by a random S-T transfer function.
2. The cloud computing resource scheduling method based on the enhanced american lion optimization algorithm as claimed in claim 1, wherein said initializing the original population further comprises: and updating the initialized population by adopting Sinusoidal chaotic mapping:
in the formula (30), alpha is a control parameter;
sin represents a sine function;
Sol i represents the ith individual in the initialized original population Sol;
Representing the individual after updating by Sinusoidal chaotic map.
3. The cloud computing resource scheduling method based on the enhanced american lion optimization algorithm according to claim 1, wherein updating the individual location in the development phase introduces a mid-point sample learning strategy to improve the development phase, specifically the following formula:
In the formula (31), sol midnew represents a new individual updated in the development stage after the introduction of the intermediate point sample learning strategy;
representing new individuals updated at the original development stage;
Sol mid represents the individual generated by the mid-point sample learning strategy and is represented by the following equation:
In the formula (32), the amino acid sequence of the compound, Representing the R m th individual in the population after the updated population Sol ** is sorted in ascending order of fitness value, R m is calculated by the following formula:
in the formula (33), i represents the ith individual, Representing an upward rounding function, rand represents a random number between intervals 0, 1.
4. A cloud computing resource scheduling system based on an enhanced american lion optimization algorithm, the system comprising:
And a data acquisition module: acquiring a cloud task byte size vector, a computing resource vector, a load cost vector and a resource bandwidth vector which are provided by a virtual machine;
Task scheduling module: optimizing the established objective function of the minimum total cost through an enhanced American lion optimization algorithm to obtain an optimal individual; mapping the optimal individuals to a binary scheduling matrix, and obtaining a task scheduling strategy through the scheduling matrix so as to perform task scheduling;
The binary scheduling matrix is expressed as:
Wherein the matrix U is a scheduling matrix;
T, K are the number of rows and columns of the matrix U respectively;
u i,j denotes that the i th task runs on the j th computing resource and specifies that each task can only be computed on one virtual machine, the objective function to minimize the total cost is:
Fun=min{ω1F12F23F3}(1)
In formula (1), ω 12 and ω 3 represent weights of the functions F 1,F2 and F 3, respectively;
F 1 represents a time cost function;
f 2 represents a load cost function;
F 3 represents a resource bandwidth cost function;
The optimization of the objective function of the minimum total cost established by the enhanced American lion optimization algorithm to obtain the optimal individual comprises the following steps:
S21, initializing an original population through a formula (5) to obtain an initialized original population Sol:
Soli=lb+rand·(ub-lb)(5)
in the formula (5), sol i represents the position information of the ith individual in the population Sol, ub represents the upper bound vector of the solution space, lb represents the lower bound vector of the solution space, and rand represents the generation of a random number between [0,1 ];
s22, the initial Iter=1, if Iter is less than 4, S23 is executed by judging the relation between Iter and 4, otherwise, S28 is executed in a jumping manner; wherein Iter represents the current iteration number;
s23, updating the individual position through an exploration stage;
S24, updating the individual position through a development stage;
S25, merging the population Sol, sol * and Sol **, and taking the first Nc individuals, wherein Sol represents an initialized original population, sol * represents a new population updated by an exploration phase, and Sol ** represents a new population updated by a development phase;
s26, calculating the optimal individual fitness of the populations Sol * and Sol ** AndMeanwhile, iter=iter+1;
s27, respectively calculating scores of exploration phases in the Iter iteration And score of development stage
S28, executing S29 if Iter is not more than MaxIter, otherwise executing step S33; wherein MaxIter represents the maximum iteration number and MaxIter is not less than 4;
s29, updating the individual position through the exploration phase;
s30, updating the individual position through a development stage;
S31, pair AndUpdating;
S32, iter=iter+1, returning to S28;
S33, selecting an individual with the smallest objective function value in the population Sol * at the last iteration as a scheduling method;
The optimal individual is mapped to a binary scheduling matrix, and the optimal individual is changed into the binary matrix by adopting a random S-T-shaped transfer function so as to perform task scheduling, wherein the optimal individual is expressed by the following formula:
In equation (34), abs represents an absolute function, tan represents a tangent function, sol male represents an optimal individual in the iterative process, and Matrix new represents a Matrix after conversion by a random S-T transfer function.
5. The cloud computing resource scheduling system based on the enhanced american lion optimization algorithm of claim 4, wherein said initializing the original population further comprises: and updating the initialized population by adopting Sinusoidal chaotic mapping:
in the formula (30), alpha is a control parameter;
sin represents a sine function;
Sol i represents the ith individual in the initialized original population Sol;
Sol i new represents the individual after updating by Sinusoidal chaotic map.
6. The cloud computing resource scheduling system based on the enhanced american lion optimization algorithm as claimed in claim 4, wherein updating the individual location during the development phase introduces a mid-point sample learning strategy to improve the development phase, specifically the following formula:
In the formula (31), Representing new individuals updated at the original development stage;
Sol mid represents the individual generated by the mid-point sample learning strategy and is represented by the following equation:
In equation (32), temp represents the population after the updated population Sol ** is sorted in ascending order of its fitness value, and R m is calculated by the following equation:
in the formula (33), i represents the ith individual, Representing an upward rounding function, rand represents a random number between intervals 0, 1.
7. A computer device comprising a processor and a memory for storing a program executable by the processor, wherein the processor implements the method of claim 1 when executing the program stored in the memory.
8. A readable storage medium storing a program, which when executed by a processor, implements the method of claim 1.
CN202411046424.1A 2024-08-01 2024-08-01 A cloud computing resource scheduling method, system, device and medium based on enhanced Cougar optimization algorithm Active CN118585341B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411046424.1A CN118585341B (en) 2024-08-01 2024-08-01 A cloud computing resource scheduling method, system, device and medium based on enhanced Cougar optimization algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411046424.1A CN118585341B (en) 2024-08-01 2024-08-01 A cloud computing resource scheduling method, system, device and medium based on enhanced Cougar optimization algorithm

Publications (2)

Publication Number Publication Date
CN118585341A CN118585341A (en) 2024-09-03
CN118585341B true CN118585341B (en) 2024-10-01

Family

ID=92526036

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411046424.1A Active CN118585341B (en) 2024-08-01 2024-08-01 A cloud computing resource scheduling method, system, device and medium based on enhanced Cougar optimization algorithm

Country Status (1)

Country Link
CN (1) CN118585341B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118779197B (en) * 2024-09-05 2025-02-14 山东省计算中心(国家超级计算济南中心) A method for analyzing job resource consumption patterns based on BWO and clustering algorithm
CN119003135B (en) * 2024-10-21 2024-12-27 贵州大学 Cloud task model method of high-precision artificial neural network optimization algorithm
CN119292754B (en) * 2024-12-12 2025-02-25 贵州大学 Cloud computing task scheduling method based on improved hiking optimization algorithm
CN120085996A (en) * 2025-05-06 2025-06-03 贵州大学 A cloud-edge-device task scheduling method based on multi-strategy artificial lemming algorithm

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113448687A (en) * 2021-06-24 2021-09-28 山东大学 Hyper-heuristic task scheduling method and system based on reinforcement learning in cloud environment
CN116954815A (en) * 2022-11-16 2023-10-27 腾讯科技(深圳)有限公司 Resource scheduling method and device, computer equipment, computer-readable storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11159609B2 (en) * 2020-03-27 2021-10-26 Intel Corporation Method, system and product to implement deterministic on-boarding and scheduling of virtualized workloads for edge computing
CN118210603A (en) * 2024-03-08 2024-06-18 贵州大学 A cloud resource scheduling method based on enhanced growth optimizer

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113448687A (en) * 2021-06-24 2021-09-28 山东大学 Hyper-heuristic task scheduling method and system based on reinforcement learning in cloud environment
CN116954815A (en) * 2022-11-16 2023-10-27 腾讯科技(深圳)有限公司 Resource scheduling method and device, computer equipment, computer-readable storage medium

Also Published As

Publication number Publication date
CN118585341A (en) 2024-09-03

Similar Documents

Publication Publication Date Title
CN118585341B (en) A cloud computing resource scheduling method, system, device and medium based on enhanced Cougar optimization algorithm
Ali et al. Alignment-free protein interaction network comparison
WO2017120128A1 (en) Systems and methods for adaptive local alignment for graph genomes
CN106845642B (en) A kind of adaptive multi-target evolution method of belt restraining cloud workflow schedule
CN111343259B (en) Cloud task scheduling method, server and storage medium based on binary coding
Xu et al. Multiobjective multifactorial immune algorithm for multiobjective multitask optimization problems
CN119292754B (en) Cloud computing task scheduling method based on improved hiking optimization algorithm
CN114281690B (en) Method for carrying out packet ambiguity test on software
CN116579370A (en) An Improved Harris Eagle Algorithm for Cloud Computing Task Scheduling
CN117032902A (en) Cloud task scheduling method for improving discrete particle swarm algorithm based on load
CN111258743A (en) Cloud task scheduling method, device, equipment and storage medium based on discrete coding
CN114064235A (en) Multi-task teaching and learning optimization method, system and device
Dai et al. Feature selection of high-dimensional biomedical data using improved SFLA for disease diagnosis
CN113347255A (en) Edge server site selection deployment model and solving method thereof
CN111338765B (en) Virtual machine deployment method, device, equipment and storage medium based on cat group algorithm
Wang et al. A novel memetic algorithm based on decomposition for multiobjective flexible job shop scheduling problem
CN115470927A (en) A method, terminal and storage medium for automatically extracting surrogate models
Santander‐Jiménez et al. A hybrid approach to parallelize a fast non‐dominated sorting genetic algorithm for phylogenetic inference
Ju et al. nGIA: A novel greedy incremental alignment based algorithm for gene sequence clustering
CN108427773A (en) A kind of distributed knowledge collection of illustrative plates embedding grammar
Weerapurage et al. Parallel vertex cover: A case study in dynamic load balancing
CN107516020A (en) Method, device, equipment and storage medium for determining the importance of sequence sites
CN110689320A (en) Large-scale multi-target project scheduling method based on co-evolution algorithm
Li et al. MiCS-P: Parallel mutual-information computation of big categorical data on spark
Hsieh et al. Predicting microRNA precursors with a generalized Gaussian components based density estimation algorithm

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
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载