Cloud computing task scheduling method and device, electronic equipment and storage medium
By building a cloud computing task execution time model and scheduling optimization model, and using bacterial foraging algorithm and Q learning algorithm to optimize the scheduling solution, the problem of low resource utilization and computing efficiency in cloud computing is solved, and more efficient resource utilization and Computational performance.
Patent Information
- Application Number
- CN202411337427.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-09-24
AI Technical Summary
How to improve resource utilization and computing efficiency in cloud computing, avoid the inefficiency caused by virtual resources with poor computing power, and the low resource utilization caused by virtual resources with strong computing power, and the low resource utilization caused by virtual resources with strong computing power.
By obtaining cloud scheduling data sets, a cloud computing task execution time model and scheduling optimization model are built, and a bacterial foraging algorithm and Q learning algorithm are used to optimize the scheduling scheme to determine the optimal virtual resources and cloud computing tasks.
It improves resource utilization and computing efficiency, shortens the execution time of cloud computing tasks, and improves user experience.
Smart Images

Figure CN119402556A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of cloud computing technology, and in particular to a cloud computing task scheduling method, device, electronic device and storage medium. Background Art
[0002] A private cloud is built for a single customer, thus providing the most effective control over data, security, and service quality. For example, the municipal government cloud is a large-scale private cloud that carries a large number of systems, websites, materials, information, etc., and needs to be frequently accessed by a large number of users on a daily basis. The efficient operation of these private clouds is particularly important. In the daily operation process, in actual situations, virtual resources with poor computing power may be used to calculate large computing tasks, which has low computing efficiency, resulting in slow response and poor user experience; virtual resources with strong computing power may also be used to calculate small computing tasks, resulting in low resource utilization. Therefore, how to schedule cloud computing tasks to improve resource utilization and computing efficiency is a technical problem that needs to be solved urgently. Summary of the invention
[0003] The embodiments of the present application provide a cloud computing task scheduling method, device, electronic device and storage medium, which are helpful to improve resource utilization and computing efficiency.
[0004] In order to solve the above problems, in a first aspect, an embodiment of the present application provides a cloud computing task scheduling method, comprising:
[0005] Acquire a cloud scheduling dataset, wherein the cloud scheduling dataset includes a cloud computing task dataset and a virtual resource dataset;
[0006] According to the cloud scheduling data set, a cloud computing task execution time model is constructed, wherein the cloud computing task execution time model is used to indicate the expected time for virtual resources in the scheduling scheme to process the cloud computing task;
[0007] According to the cloud computing task execution time model, a cloud computing task scheduling optimization model is constructed, and the cloud computing task scheduling optimization model is used as a fitness function of the bacterial foraging algorithm;
[0008] Determine the initial population of the bacterial foraging algorithm according to the Q learning algorithm and the cloud scheduling data set, wherein the initial population represents the initial solution of the cloud computing task scheduling optimization model;
[0009] The primary population is optimized according to the bacterial foraging algorithm to obtain an optimal solution of the cloud computing task scheduling optimization model, wherein the optimal solution of the cloud computing task scheduling optimization model indicates an optimal scheduling solution;
[0010] The cloud computing tasks in the cloud computing task dataset are scheduled according to the optimal solution of the cloud computing task scheduling optimization model.
[0011] In a second aspect, an embodiment of the present application provides a cloud computing task scheduling device, including:
[0012] A data acquisition module, used to acquire a cloud scheduling data set, wherein the cloud scheduling data set includes a cloud computing task data set and a virtual resource data set;
[0013] A time model building module, used to build a cloud computing task execution time model according to the cloud scheduling data set, wherein the cloud computing task execution time model is used to indicate the expected time for virtual resources in the scheduling scheme to process cloud computing tasks;
[0014] A scheduling module building module, used to build a cloud computing task scheduling optimization model according to the cloud computing task execution time model, and the cloud computing task scheduling optimization model is used as a fitness function of the bacterial foraging algorithm;
[0015] An initial population determination module is used to determine the initial population of the bacterial foraging algorithm according to the Q learning algorithm and the cloud scheduling data set, wherein the initial population represents the initial solution of the cloud computing task scheduling optimization model;
[0016] An optimal solution determination module, used to optimize the primary population according to the bacterial foraging algorithm to obtain an optimal solution of the cloud computing task scheduling optimization model, wherein the optimal solution of the cloud computing task scheduling optimization model indicates an optimal scheduling solution;
[0017] The scheduling module is used to schedule the cloud computing tasks in the cloud computing task data set according to the optimal solution of the cloud computing task scheduling optimization model.
[0018] In a third aspect, an embodiment of the present application further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the cloud computing task scheduling method described in the embodiment of the present application is implemented.
[0019] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the steps of the cloud computing task scheduling method disclosed in the embodiment of the present application.
[0020] The cloud computing task scheduling method, device, electronic device and storage medium provided in the embodiment of the present application construct a cloud computing task execution time model, construct a cloud computing task scheduling optimization model, the cloud computing task scheduling optimization model is used as the fitness function of the bacterial foraging algorithm, the primary population of the bacterial foraging algorithm is determined according to the Q learning algorithm and the cloud scheduling data set, the primary population represents the initial solution of the cloud computing task scheduling optimization model, the primary population is optimized according to the bacterial foraging algorithm, the optimal solution of the cloud computing task scheduling optimization model is obtained, the optimal solution indicates the optimal scheduling scheme, and then the cloud computing tasks in the cloud computing task data set can be scheduled according to the optimal scheduling scheme. By determining the primary population of the bacterial foraging algorithm through the Q learning algorithm and the cloud scheduling data set, a better initial solution can be obtained, and then the initial solution is further optimized based on the bacterial foraging algorithm to obtain the optimal solution of the cloud computing task scheduling optimization model, and scheduling cloud computing tasks according to the optimal solution can improve resource utilization, improve computing efficiency, shorten the execution time of cloud computing tasks, and enhance user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0022] Figure 1 is a flow chart of a cloud computing task scheduling method provided by an embodiment of the present application;
[0023] Figure 2 is a flow chart for determining the primary population according to the Q learning algorithm in an embodiment of the present application;
[0024] Figure 3 is a flow chart of optimizing the primary population according to the bacterial foraging algorithm in an embodiment of the present application;
[0025] Figure 4 It is a structural diagram of a cloud computing task scheduling device provided in an embodiment of the present application;
[0026] Figure 5 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0028] Figure 1 is a flow chart of a cloud computing task scheduling method provided by an embodiment of the present application, such as Figure 1 As shown, the method includes: step 110 to step 160.
[0029] Step 110: Acquire a cloud scheduling dataset, where the cloud scheduling dataset includes a cloud computing task dataset and a virtual resource dataset.
[0030] Among them, the cloud computing task data set includes multiple cloud computing tasks and the number of instructions to be executed included in each cloud computing task. The virtual resource data set includes multiple available virtual machine resources. In cloud computing, virtual machine resources refer to the abstraction of physical computing resources (such as servers, storage devices, network devices, etc.) through software technology to create a virtual computing environment. This virtual computing environment enables multiple virtual machines (Virtual Machines) or containers to run on the same physical device, and each virtual machine or container is regarded as an independent logical entity. Virtual machine resources may include resources such as CPU, memory, disk, and network.
[0031] Obtain all the cloud computing tasks to be scheduled, represent all the cloud computing tasks to be scheduled as a set, and obtain a cloud computing task dataset. The cloud computing task dataset can be represented as ST = {st1, st2, st i …st m}, st i represents the i-th subtask in the cloud computing task dataset, m represents the total number of cloud computing tasks, and i is a positive integer. Get all available virtual machine resources, represent all available virtual machine resources as a set, and get a virtual resource dataset. The virtual resource dataset can be represented as VR = {vr1, vr2, vr j …vr n}, vr j represents the jth virtual resource in the virtual resource data set, n represents the total number of virtual machine resources, and j is a positive integer.
[0032] Step 120: construct a cloud computing task execution time model based on the cloud scheduling data set, wherein the cloud computing task execution time model is used to indicate the expected time for virtual resources in the scheduling scheme to process the cloud computing tasks.
[0033] For each virtual resource in the cloud scheduling data set, the time for the virtual resource to execute each cloud computing task in the scheduling plan is determined, and then the expected time for the virtual resource to process the cloud computing task is obtained based on the time for the virtual resource to execute each cloud computing task. The relationship between the expected time and the time for the virtual resource to execute each cloud computing task is used as the cloud computing task execution time model.
[0034] In one embodiment of the present application, constructing a cloud computing task execution time model according to the cloud scheduling data set includes:
[0035] For each virtual resource, determining an execution time of the virtual resource to process a target cloud computing task, wherein the target cloud computing task is a cloud computing task assigned to the virtual resource;
[0036] The minimum execution time among the execution times corresponding to each virtual resource in the virtual resource data set is used as the expected time.
[0037] Optionally, determining the execution time of the virtual resources processing the target cloud computing task includes: determining the execution time of the virtual resources processing the target cloud computing task based on the number of instructions to be executed of the target cloud computing task and the performance indicator value of the virtual resources.
[0038] For each virtual resource, the execution time of the virtual resource processing the target cloud computing task can be determined according to the number of instructions to be executed of the target cloud computing task and the performance indicator value of the virtual resource. That is, the execution time of the virtual resource processing the target cloud computing task can be determined by the following formula:
[0039]
[0040] Among them, ExeTime(j) represents the virtual resource vr j Processing target cloud computing task execution time, Speed j Represents virtual resources vr j Performance index value, Number i represents the target cloud computing task st i The number of pending instructions, k represents the number of instructions allocated to the virtual resource vr j The number of target cloud computing tasks, st i →vr j , st i ∈ST represents virtual resource vr j All target cloud computing tasks processed, t i,j Represents virtual resources vr j Processing target cloud computing tasks iThe performance index value refers to the number of instructions processed by the virtual resource in a unit of time.
[0041] The minimum execution time among the execution times corresponding to each virtual resource in the virtual resource data set is taken as the expected time. That is, the expected time can be expressed by the following formula:
[0042] Makespan=min{ExeTime(j)|j∈Z,1≤j≤n}
[0043] Wherein, Makespan represents the expected time, and n represents the number of virtual resources in the virtual resource dataset.
[0044] Step 130: construct a cloud computing task scheduling optimization model according to the cloud computing task execution time model, and the cloud computing task scheduling optimization model serves as a fitness function of the bacterial foraging algorithm.
[0045] The cloud computing task scheduling optimization model is used to measure the pros and cons of various scheduling solutions. Optionally, the cloud computing task scheduling optimization model is a fitness function, and the smaller the calculated fitness function value is, the better the scheduling solution is.
[0046] In one embodiment of the present application, constructing a cloud computing task scheduling optimization model according to the cloud computing task execution time model includes:
[0047] Calculating the average of the execution time corresponding to each virtual resource in the virtual resource data set to obtain a mean execution time;
[0048] Determine the execution time standard deviation according to the execution time corresponding to each virtual resource in the virtual resource data set and the execution time mean;
[0049] A cloud computing task scheduling optimization model is constructed according to the expected time and the execution time standard deviation.
[0050] The mean execution time can be determined according to the following formula:
[0051]
[0052] Among them, Load j =ExeTime(j), indicating virtual resource vr j Processing target cloud computing task execution time; Load avg represents the mean execution time of all virtual resources; n represents the number of virtual resources.
[0053] The execution time standard deviation can be determined according to the following formula:
[0054]
[0055] Among them, B L represents the standard deviation of execution time, n represents the number of virtual resources, Load avg Represents the mean execution time.
[0056] The cloud computing task scheduling optimization model can be expressed as follows:
[0057] f(X)=ω1Makepab+ω2B L
[0058] Among them, ω1 and ω2 represent weights, Makepab represents the expected time, and B L represents the standard deviation of the execution time, f(X) represents the optimization index value, that is, the fitness function value, and the optimal solution of the cloud computing task scheduling optimization model minimizes the fitness function value.
[0059] Step 140: Determine the initial population of the bacterial foraging algorithm based on the Q learning algorithm and the cloud scheduling data set, wherein the initial population represents the initial solution of the cloud computing task scheduling optimization model.
[0060] Among them, the Q-Learning algorithm is an algorithm for reinforcement learning. In the absence of prior environmental information, the optimal strategy is solved through continuous trial and error, repeated exploration and learning. The Q-Learning algorithm is based on the idea of dynamic programming and uses a Q function to evaluate the long-term return of each state-action pair (i.e., state-action value) and give the best strategy. The Bacterial Foraging Optimization (BFO) algorithm is a type of intelligent optimization algorithm proposed to simulate the intelligent behavior of Escherichia coli when foraging in the human intestine. It achieves optimization through competition and cooperation between bacterial groups. It is a search technology based on bacterial groups and a newer optimization method formed by simulating the behavior of microorganisms.
[0061] The bacterial foraging algorithm is pre-learned based on the Q-learning algorithm. First, a bacterial population is randomly initialized and generated. Each bacterium in the bacterial population represents a scheduling scheme. The randomly generated bacterial population is optimized through the Q-learning algorithm, and the finally optimized bacterial population is used as the initial population of the bacterial foraging algorithm.
[0062] Step 150, optimizing the primary population according to the bacterial foraging algorithm to obtain an optimal solution of the cloud computing task scheduling optimization model, wherein the optimal solution of the cloud computing task scheduling optimization model indicates an optimal scheduling solution.
[0063] The bacterial foraging algorithm is used to optimize the initial population and determine the optimal solution of the cloud computing task scheduling optimization model.
[0064] Among them, the bacterial foraging algorithm has three typical behavior modes, namely, directional behavior, replication behavior and migration behavior. directional behavior refers to the behavior of bacteria gathering in food-rich areas, including flipping and advancing modes. Flipping refers to the movement of bacteria in any direction for a certain distance; advancing refers to whether the bacteria should continue to move in the current direction by judging whether the fitness function value of the bacteria is improved after flipping. If the fitness function value of the bacteria is improved after flipping, it will move several steps in the current direction until the fitness function value is no longer improved or reaches the predetermined critical value of the number of moving steps. Through directional behavior, bacteria can obtain the ability to continuously search for optimal results. Replication behavior is to select the position and step length of the poorer bacteria to inherit the better bacteria according to the fitness function value of the bacteria. This behavior can speed up the optimization of bacteria. Migration behavior is to disperse bacteria to any position in the search space with a certain probability. This behavior can prevent bacteria from falling into local extreme values. The entire bacterial population forms an efficient and fast optimization mode by continuously repeating these three behaviors to determine the final optimal value. The final optimal value is the optimal task scheduling solution. Among them, the basic process of the bacterial foraging algorithm includes:
[0065] 1) First, initialize the population: set the population size, the number of algorithm executions, etc. Select the fitness function, which is determined according to the actual problem.
[0066] 2) Traverse each bacterial individual and calculate their fitness function values respectively.
[0067] 3) Evaluate the fitness function values of the three operations in the algorithm process. First, the trend evaluation is performed. When the number of executions of the trend operation reaches the predetermined number of the trend operation, the trend operation evaluation ends. Then the copy operation evaluation is performed. When the number of executions of the copy operation reaches the predetermined number of the copy operation, the copy operation evaluation ends. Finally, the dispersal (migration) operation evaluation is performed. When the number of executions of the dispersal operation reaches the predetermined number of the dispersal operation, the dispersal operation evaluation ends. The algorithm evaluation ends only when the number of executions of the trend operation, the copy operation, and the dispersal operation all reach the predetermined number of times (Nc, Nre, and Ned represent the predetermined number of times that the trend operation, the copy operation, and the dispersal operation need to be executed, respectively, and the initial values of i, j, and k are all 0).
[0068] 4) After evaluating the three operations, bacteria that do not meet the conditions will be eliminated. Then the fitness function values of the remaining bacteria are compared, and the bacteria with the largest fitness function value are selected, which is the optimal solution to the problem.
[0069] Step 160: Schedule the cloud computing tasks in the cloud computing task dataset according to the optimal solution of the cloud computing task scheduling optimization model.
[0070] The optimal solution represents the most appropriate scheduling scheme, that is, it gives which virtual resource is used to execute each cloud computing task. When scheduling each cloud computing task, the cloud computing task can be scheduled to the virtual resource corresponding to the cloud computing task in the optimal solution.
[0071] The cloud computing task scheduling method provided in the embodiment of the present application constructs a cloud computing task execution time model, constructs a cloud computing task scheduling optimization model, and uses the cloud computing task scheduling optimization model as the fitness function of the bacterial foraging algorithm. The primary population of the bacterial foraging algorithm is determined according to the Q learning algorithm and the cloud scheduling data set. The primary population represents the initial solution of the cloud computing task scheduling optimization model. The primary population is optimized according to the bacterial foraging algorithm to obtain the optimal solution of the cloud computing task scheduling optimization model. The optimal solution indicates the optimal scheduling scheme, and then the cloud computing tasks in the cloud computing task data set can be scheduled according to the optimal scheduling scheme. By determining the primary population of the bacterial foraging algorithm through the Q learning algorithm and the cloud scheduling data set, a better initial solution can be obtained, and then the initial solution can be further optimized based on the bacterial foraging algorithm to obtain the optimal solution of the cloud computing task scheduling optimization model. The scheduling of cloud computing tasks according to the optimal solution can improve resource utilization, improve computing efficiency, shorten the execution time of cloud computing tasks, and enhance user experience.
[0072] Based on the above technical solution, the initial population of the bacterial foraging algorithm is determined according to the Q learning algorithm and the cloud scheduling data set, including:
[0073] Determine an initial bacterial population according to the cloud scheduling data set, wherein each bacterium in the initial bacterial population represents an initial scheduling scheme;
[0074] Optimizing each bacterium in the initial bacterial population according to a bacterial foraging algorithm to obtain an intermediate bacterial population;
[0075] According to the Q-learning algorithm, the bacteria in the intermediate bacterial population are optimized to obtain a new intermediate bacterial population;
[0076] The process of optimizing the new intermediate bacterial population according to the bacterial foraging algorithm and optimizing according to the Q learning algorithm is iteratively performed until the termination condition of the Q learning algorithm is met, and the finally optimized bacterial population is used as the initial population.
[0077] During the initialization process, the Q learning algorithm parameters and the basic parameters of the bacterial foraging algorithm are initialized first. Among them, the main parameters of the Q learning algorithm are the number of forward steps M and the initial state S; the basic parameters of the bacterial foraging algorithm include the dimension of the search space, the size of the bacterial population, the number of times the bacteria perform directional behavior, the maximum number of steps in one direction during the directional operation, the number of times the bacteria perform replication behavior, the number of times the bacteria perform migration behavior (i.e., the preset number of migrations Ned ), migration probability P ed , the stride length for swimming forward.
[0078] Initialize the bacterial population. According to the cloud scheduling data set, randomly generate bacterial populations in the search space, perform chaos processing on the randomly generated bacterial populations, and obtain the initial bacterial populations.
[0079] Optionally, assuming that the number of virtual resources (i.e., virtual machines) is n (e.g., 10), and the number of cloud computing tasks is m, such a bacterial population can be represented in the form of a matrix, the number of individuals in the bacterial population (i.e., the number of bacteria) is h, and each bacterial individual represents a scheduling scheme. The randomly generated bacterial population or the initial bacterial population can be represented by the following matrix B:
[0080]
[0081] Among them, a row in the matrix B represents a bacterial individual in the bacterial population, and the member x in the bacterial population i,j (i=1, 2, ..., h; j=1, 2, ..., m) is an integer in the range [1, n]. For example, x i,j =p means that the jth cloud computing task is processed by the pth virtual resource.
[0082] Optionally, the randomly generated bacterial population is subjected to chaos processing to obtain an initial bacterial population. All elements of the matrix B are randomly assigned random numbers within (0, 1), and the matrix B is subjected to chaos processing. The chaos processing calculation is performed on all elements in the matrix B using the following formula:
[0083] x n+1 =μx n (1-x n )
[0084] Among them, μ is the control variable, x n+1 It cannot be 0.25, 0.5, 0.75. If it is 0.25, 0.5, 0.75, it needs to be calculated again.
[0085] After determining the initial bacterial population, each bacterium in the initial bacterial population is optimized based on the bacterial foraging algorithm to obtain an intermediate bacterial population, and then the bacteria in the intermediate bacterial population are optimized according to the Q learning algorithm to obtain a new intermediate bacterial population, and the new intermediate bacterial population is used as the initial bacterial population, and the optimization based on the bacterial foraging algorithm and the optimization based on the Q learning algorithm are iteratively executed until the termination condition of the Q learning algorithm is met, and the finally optimized bacterial population is used as the initial population of the bacterial foraging algorithm. Among them, the termination condition of the Q learning algorithm can be that the number of iterations of the Q learning algorithm reaches the number of forward steps M set during initialization.
[0086] On the basis of the above technical solution, each bacterium in the initial bacterial population is optimized according to the bacterial foraging algorithm to obtain an intermediate bacterial population, including: iteratively performing trending operations, copying operations and migration operations on the bacteria in the initial bacterial population until the number of iterations reaches a preset number of migrations to obtain the intermediate bacterial population.
[0087] Among them, the trend operation includes bacterial movement and bacterial swimming.
[0088] When the bacteria are moved according to the following formula, the direction of movement of the bacteria can be expressed by the following formula:
[0089]
[0090] Among them, θ i (j, k, l) represents the bacterium i (i.e., the i-th bacterium) in the j-th approach operation, k-th replication operation, and ,-th migration operation, and C(i) represents the step length of the specified random direction taken during the flipping process. The above formula represents the step length of bacterium i swimming in the direction randomly generated after rotation, and the size is C(i) direction; the element Δ(i) (t=1, 2, ..., m) is a random number distributed in the interval [-1, 1], representing the random direction vector.
[0091] Calculate J(i, j+1, k, l), and let
[0092] J(i,j+1,k,l)=J(i,j,k,l)+J cc (θ i (j+1,k,l),P(j+1,k,l))
[0093] Among them, J(i, j, k, l) represents the consumption of bacteria i in the search and positioning of θi(j, k, l), J cc (θ i (j+1, k, l), P(j+1, k, l)) represents the objective function.
[0094] When performing swimming operations on bacteria, let m = 0. If m < N, let m = m + l, where N represents the number of times the bacteria perform the movement operation, and l represents the number of times the current migration operation is performed.
[0095] If J(i, j+1, k, l) < J last (J last represents the minimum consumption in the search and positioning that has been performed), then let J last = J(i, j+1, k, l) and
[0096]
[0097] Return to perform the next movement operation of bacterium i and use it to calculate the new J(i, j+1, k, l); otherwise, set m=N and process the next direction operation of bacterium.
[0098] When all bacteria have reached the maximum number of iterations of the trending operation, the bacteria are replicated. The bacteria are sorted according to their quality, and the last t / 2 bacteria in the bacterial population are eliminated according to the number of t bacteria in the bacterial population, so as to obtain a bacterial population with only t / 2 bacteria; the bacterial population with only t / 2 bacteria is replicated to obtain a bacterial population with t bacteria.
[0099] When performing migration operations on bacteria in a bacterial population, each bacterium in the bacterial population is assigned a migration probability P. ed are redistributed randomly into the optimization space.
[0100] The above-mentioned trending operation, copying operation and migration operation are iteratively performed on the bacteria in the initial bacterial population. If the number of iterations is less than the preset number of migrations, the above-mentioned trending operation, copying operation and migration operation are iteratively performed again until the number of iterations reaches the preset number of migrations, and the final bacterial population after the trending operation, copying operation and migration operation is used as the intermediate bacterial population.
[0101] On the basis of the above technical solution, the intermediate bacterial population is optimized according to the Q learning algorithm to obtain a new intermediate bacterial population, including: determining the Q value of each bacteria in the intermediate bacterial population according to the Q learning algorithm; and determining the new intermediate bacterial population corresponding to the intermediate bacterial population according to the Q value of each bacteria.
[0102] The Q learning algorithm is an algorithm that selects actions by maximizing the cumulative benefits of the agent's discount, and can autonomously learn the agent's optimal action strategy. Assume that the agent's current state is S, the current action is a, and the set of actions that the agent can choose in the current state S (a bacterium in the bacterial population) is A = {a1, a2, ..., a n}, then the benefit (Q value) obtained by the agent looking one step forward can be defined as:
[0103]
[0104] r(S,a)=F p (S, a)-F0(S, a)
[0105] Among them, r(S, a) represents the immediate benefit of the agent after selecting action strategy a in the current state S; a′ represents the action that the agent can choose in the next state S′; represents the maximum benefit that the agent can obtain by choosing different actions in the next state S′; γ1 (0≤γ1<1) is the discount factor; where F p (S, a) represents the value of the objective function (fitness function) corresponding to the parent individual selecting action a in state S, and F0(S, a) represents the value of the objective function (fitness function) corresponding to the offspring individual selecting action a in state S. The bacterial action can be bacterial movement or bacterial swimming.
[0106] When optimizing the intermediate bacterial population based on the Q-learning algorithm, the Q value of each bacterium (current state S) in the intermediate bacterial population is determined according to the above formula, and based on the Q value, the action that makes the Q value highest is selected and executed. After executing the action, a new state is obtained, that is, new bacteria are obtained. The action that makes the Q value highest is performed on each bacterium to obtain a new intermediate bacterial population.
[0107] In summary, the initial population of the bacterial foraging algorithm is determined based on the Q learning algorithm and the cloud scheduling dataset. Figure 2 The execution shown, that is, the above step 140 includes:
[0108] Step 141, initializing the Q learning algorithm parameters and the basic parameters of the bacterial foraging algorithm.
[0109] Step 142, initializing the bacterial population to obtain an initial bacterial population.
[0110] Step 143, performing a migration operation cycle on the bacterial population, setting l=l+1, l is the control number of the migration operation, which is 0 when initialized.
[0111] Step 144, performing a trending operation on the bacteria in the bacterial population.
[0112] Step 145, determining whether the bacteria have reached the maximum number of iterations of the trend, if so, proceeding to step S146, otherwise returning to step S144.
[0113] Step 146, performing a replication operation on the bacteria in the bacterial population.
[0114] Step 147, migration operation. Each bacterium in the bacterial population migrates with a probability P ed is randomly redistributed into the optimization space, if l <N ed (preset migration times), then return to step S143, otherwise the optimization is terminated to obtain the intermediate bacterial population.
[0115] Step 148, calculate the Q value of the current state S (each bacterium in the intermediate bacterial population).
[0116] Step 149, updating the state S, that is, updating each bacterium to obtain new bacteria, and after updating all bacteria, obtaining a new intermediate bacterial population.
[0117] Step 1410, calculate the total benefit of the Q learning algorithm. The calculation formula of the total benefit is as follows:
[0118] Q(a)=F p (a)-(1-r)f0(a)-r(1-r)F0(a (1) )-…-r m F0(a (m) )
[0119] Where m represents the number of steps the agent looks forward, r represents the benefit after taking action a, and the details can be referred to the above embodiment. p (a) represents the fitness function value, F0(a (m) ) represents the fitness function value looking m steps ahead.
[0120] Step 1411, select the state S corresponding to the maximum total benefit Q value as the initial population of the bacterial foraging algorithm. That is, for each bacterium, select the state with the maximum total benefit Q value as the final optimized bacteria, and use these optimal bacteria as the initial population of the bacterial foraging algorithm.
[0121] The specific process of each step can be referred to the above embodiment and will not be repeated here.
[0122] After determining the initial bacterial population, the bacteria in the bacterial population are optimized based on the bacterial foraging algorithm, and the bacteria in the bacterial population are optimized based on the Q-learning algorithm. The finally optimized bacterial population is used as the first-generation population of the subsequent bacterial foraging algorithm. The first-generation population determined in this way is also a better bacterial population (multiple scheduling schemes), which can further improve the efficiency of subsequent optimization based on the bacterial foraging algorithm.
[0123] On the basis of the above technical solution, the primary population is optimized according to the bacterial foraging algorithm to obtain the optimal solution of the cloud computing task scheduling optimization model, including:
[0124] The improved bacterial foraging algorithm is obtained by replacing the copy operation in the bacterial foraging algorithm with a screening operation based on the maximum deviation similarity criterion; the copy operation splits the bacteria whose fitness function value meets the target condition into two daughter bacteria, and the daughter bacteria have the same position and step length as the bacteria whose fitness function value meets the target condition; the screening operation based on the maximum deviation similarity criterion is used to calculate the deviation between any two bacteria, and screen the bacterial population according to the deviation;
[0125] The primary population is optimized according to the improved bacterial foraging algorithm to obtain the optimal solution of the cloud computing task scheduling optimization model.
[0126] The bacterial foraging algorithm is improved by replacing the copy operation in the bacterial foraging algorithm with a screening operation based on the maximum deviation similarity criterion, thus obtaining an improved bacterial foraging algorithm. Based on the improved bacterial foraging algorithm, the primary population is optimized, that is, the bacteria in the primary population are subjected to the trending operation, the screening operation based on the maximum deviation similarity criterion, and the migration operation, and finally the optimal solution of the cloud computing task scheduling optimization model is obtained.
[0127] On the basis of the above technical solution, the process of screening the bacterial population by the screening operation based on the maximum deviation similarity criterion includes:
[0128] Normalize the bacteria in the bacterial population;
[0129] For the bacterial population after the normalization operation, determining the maximum number of similarity points and the maximum number of deviation points between bacteria other than the global optimal bacteria in the bacterial population and the global optimal bacteria;
[0130] The bacterial population after the normalization operation is screened according to the maximum similarity point number and the maximum deviation point number.
[0131] Among them, the global optimal bacteria refers to the bacteria with the smallest fitness function value in the bacterial population (scheduling scheme).
[0132] After normalizing the bacteria in the bacterial population, the maximum similarity points and maximum deviation points between other bacteria and the global optimal bacteria are calculated with the global optimal bacteria as the center. ij and the maximum number of deviation points m ij The calculation method is as follows:
[0133]
[0134]
[0135] Among them, n ij >n0, n0=[α×m], α(0≤α≤1-m -1 ) is a preset constant, called similarity; 1≤m ij ≤m0, m0=[β×m], β(m -1 ≤β≤1-α) is a preset constant, called deviation.
[0136] After obtaining the maximum similarity points and the maximum deviation points between each bacterium and the global optimal bacterium in the above manner, the bacterial population after the normalization operation is screened based on the maximum similarity points and the maximum deviation points.
[0137] On the basis of the above technical solution, the screening of the bacterial population after the normalization operation according to the maximum similarity point number and the maximum deviation point number may include:
[0138] Determining whether each bacterium meets the preset requirements according to the maximum similarity points and the maximum deviation points, adding the bacteria that meet the preset requirements to the first set, and adding the bacteria that do not meet the preset requirements to the second set;
[0139] Screening out bacteria to be processed in the second set according to the fitness function values of the bacteria in the second set;
[0140] Performing chaos treatment on the bacteria to be treated in the second set;
[0141] Performing cross-sectional processing on the bacteria in the first set;
[0142] The bacteria in the first set that have undergone the vertical and horizontal cross processing, the bacteria in the second set that have undergone the chaos processing, and the global optimal bacteria constitute a new bacterial population.
[0143] Among them, the preset requirements include that the maximum similarity point number is greater than or equal to the similarity point number threshold, and the maximum deviation point number is less than or equal to the deviation point number threshold.
[0144] For each bacterium, determine whether the maximum number of similarity points and the maximum number of deviation points meet the preset requirements, add bacteria that meet the preset requirements to the first set A, and add bacteria that do not meet the preset requirements to the second set B.
[0145] The bacteria in the second set B are sorted from large to small according to the fitness function value, and the first half of the bacteria after sorting are not operated, and the second half of the bacteria are used as the bacteria to be processed, and the bacteria to be processed are subjected to chaotic processing. For example, if there are t bacteria in the second set B, the bacteria with large fitness function values in the first t / 2 are not operated, and the bacteria with small fitness function values in the last t / 2 are subjected to chaotic processing.
[0146] The bacteria in the first set A are subjected to a vertical and horizontal cross processing, wherein the vertical and horizontal cross processing includes a horizontal cross and a vertical cross.
[0147] The formula used for horizontal crossover is as follows:
[0148] M hc (i, d)=r1X(i,d)+(1-r1)X(j,d)+c1(X(i,d)-X(j,d))
[0149] M hc(j,d)=r2X(j,d)+(1-r2)X(i,d)+c2(X(j,d)-X(i,d))
[0150] Where c1, c2 are random numbers on [-1, 1]; r1, r2 are random numbers on [-1, 1]; X(i, d), X(j, d) are the dth dimensions of the parent bacteria X(i), X(j) respectively; M hc (i,d),M hc (j, d) are the d-th dimensional offspring generated by horizontal crossover of X(i, d) and X(j, d).
[0151] The formula used for vertical crossover is as follows:
[0152] M vc (i, d1)=rX(i, d1)+(1-r)X(i, d2)
[0153] Where r is a random number on [0, 1]; Mvc(i, d1) is the offspring bacteria generated by vertical crossover of the d1 and d2 dimensions of bacteria i.
[0154] The bacteria in the first set that have been processed with vertical and horizontal crossover, the bacteria in the second set that have been processed with chaos, and the global optimal bacteria constitute a new bacterial population.
[0155] In summary, the process of optimizing the initial population according to the bacterial foraging algorithm can be referred to Figure 3 The execution shown, that is, the above step 150 includes:
[0156] Step 151, perform a migration operation cycle on the bacterial population, and set l=l+1, where l is the control number of migration operations and is initialized to 0.
[0157] Step 152, performing a screening operation on the bacteria based on the maximum deviation similarity criterion.
[0158] Step 153, performing a trending operation on the bacteria in the bacterial population.
[0159] Step 154, determine whether the bacteria has reached the maximum number of iterations of the trend, if so, proceed to step S155, otherwise return to step S153.
[0160] Step 155, performing a screening operation on the bacteria based on the maximum deviation similarity criterion.
[0161] Step 156, determine whether the number of similar operations with the current maximum deviation is less than the number of similar operations with the maximum deviation in the initialization parameters, that is, determine whether k <N c , k represents the number of similar operations with the current maximum deviation, N c represents the number of similar operations with the maximum deviation. If k <Nc , return to step 153, otherwise execute step 157.
[0162] Step 157, migration operation. After several generations of maximum deviation similarity operations, each bacterium migrates with a probability P de are randomly redistributed into the optimization space. <N de (preset number of migrations), then return to step S151, otherwise the optimization search is terminated and the optimal solution is obtained.
[0163] The specific process of each step can be referred to the above embodiment and will not be repeated here.
[0164] The cloud computing task scheduling method provided in the embodiment of the present application can solve the dilemma that bacteria are easily trapped in local optimality during the optimization process by improving the bacterial foraging algorithm through the maximum deviation similarity criterion, and help the algorithm to find the optimal solution to the greatest extent. Then, cloud computing tasks can be scheduled according to the optimal solution in the future, which can improve resource utilization, effectively avoid peak congestion, reduce idle waste of cloud resources, improve computing efficiency, shorten task execution time, and improve user experience.
[0165] Figure 4 is a schematic diagram of the structure of a cloud computing task scheduling device provided in an embodiment of the present application, such as Figure 4 As shown, the device comprises:
[0166] A data acquisition module 410 is used to acquire a cloud scheduling data set, wherein the cloud scheduling data set includes a cloud computing task data set and a virtual resource data set;
[0167] A time model building module 420 is used to build a cloud computing task execution time model according to the cloud scheduling data set, wherein the cloud computing task execution time model is used to indicate the expected time for virtual resources in the scheduling scheme to process cloud computing tasks;
[0168] A scheduling model building module 430 is used to build a cloud computing task scheduling optimization model according to the cloud computing task execution time model, and the cloud computing task scheduling optimization model is used as a fitness function of the bacterial foraging algorithm;
[0169] An initial population determination module 440 is used to determine the initial population of the bacterial foraging algorithm according to the Q learning algorithm and the cloud scheduling data set, wherein the initial population represents the initial solution of the cloud computing task scheduling optimization model;
[0170] An optimal solution determination module 450 is used to optimize the primary population according to the bacterial foraging algorithm to obtain an optimal solution of the cloud computing task scheduling optimization model, wherein the optimal solution of the cloud computing task scheduling optimization model indicates an optimal scheduling solution;
[0171] The scheduling module 460 is used to schedule the cloud computing tasks in the cloud computing task data set according to the optimal solution of the cloud computing task scheduling optimization model.
[0172] Optionally, the primary population determination module includes:
[0173] A population initialization unit, used to determine an initial bacterial population according to the cloud scheduling data set, wherein each bacterium in the initial bacterial population represents an initial scheduling scheme;
[0174] A first optimization unit is used to optimize each bacterium in the initial bacterial population according to a bacterial foraging algorithm to obtain an intermediate bacterial population;
[0175] The second optimization unit is used to optimize the bacteria in the intermediate bacterial population according to the Q learning algorithm to obtain a new intermediate bacterial population;
[0176] An iterative control unit is used to iteratively execute the process of optimizing the new intermediate bacterial population according to the bacterial foraging algorithm and optimizing according to the Q learning algorithm until the termination condition of the Q learning algorithm is met, and the finally optimized bacterial population is used as the initial population.
[0177] Optionally, the first optimization unit is specifically used for:
[0178] The bacteria in the initial bacterial population are iteratively subjected to trending operations, replication operations and migration operations until the number of iterations reaches a preset number of migrations, thereby obtaining the intermediate bacterial population.
[0179] Optionally, the second optimization unit is specifically used for:
[0180] Determining the Q value of each bacterium in the intermediate bacterial population according to a Q learning algorithm;
[0181] According to the Q value of each bacteria, a new intermediate bacterial population corresponding to the intermediate bacterial population is determined.
[0182] Optionally, the optimal solution determination module includes:
[0183] An algorithm improvement unit is used to replace the copy operation in the bacterial foraging algorithm with a screening operation based on the maximum deviation similarity criterion to obtain an improved bacterial foraging algorithm; the copy operation splits the bacteria whose fitness function value meets the target condition into two daughter bacteria, and the daughter bacteria have the same position and step length as the bacteria whose fitness function value meets the target condition; the screening operation based on the maximum deviation similarity criterion is used to calculate the deviation between any two bacteria, and screen the bacterial population according to the deviation;
[0184] The optimal solution determination unit is used to optimize the primary population according to the improved bacterial foraging algorithm to obtain the optimal solution of the cloud computing task scheduling optimization model.
[0185] Optionally, the process of screening the bacterial population based on the screening operation of the maximum deviation similarity criterion includes:
[0186] Normalize the bacteria in the bacterial population;
[0187] For the bacterial population after the normalization operation, determining the maximum number of similarity points and the maximum number of deviation points between bacteria other than the global optimal bacteria in the bacterial population and the global optimal bacteria;
[0188] The bacterial population after the normalization operation is screened according to the maximum similarity point number and the maximum deviation point number.
[0189] Optionally, screening the bacterial population after the normalization operation according to the maximum similarity point number and the maximum deviation point number includes:
[0190] Determining whether each bacterium meets the preset requirements according to the maximum similarity points and the maximum deviation points, adding the bacteria that meet the preset requirements to the first set, and adding the bacteria that do not meet the preset requirements to the second set;
[0191] Screening out bacteria to be processed in the second set according to the fitness function values of the bacteria in the second set;
[0192] Performing chaos treatment on the bacteria to be treated in the second set;
[0193] Performing cross-sectional processing on the bacteria in the first set;
[0194] The bacteria in the first set that have undergone the vertical and horizontal cross processing, the bacteria in the second set that have undergone the chaos processing, and the global optimal bacteria constitute a new bacterial population.
[0195] Optionally, the time model building module includes:
[0196] an execution time determination unit, configured to determine, for each virtual resource, an execution time for the virtual resource to process a target cloud computing task, wherein the target cloud computing task is a cloud computing task assigned to the virtual resource;
[0197] The expected time determination unit is configured to use the minimum execution time among the execution times corresponding to each virtual resource in the virtual resource data set as the expected time.
[0198] Optionally, the execution time determination unit is specifically used to:
[0199] The execution time of the virtual resource for processing the target cloud computing task is determined according to the number of instructions to be executed of the target cloud computing task and the performance indicator value of the virtual resource.
[0200] Optionally, the scheduling model building module is specifically used to:
[0201] Calculating the average of the execution time corresponding to each virtual resource in the virtual resource data set to obtain a mean execution time;
[0202] Determine the execution time standard deviation according to the execution time corresponding to each virtual resource in the virtual resource data set and the execution time mean;
[0203] A cloud computing task scheduling optimization model is constructed according to the expected time and the execution time standard deviation.
[0204] The cloud computing task scheduling device provided in the embodiment of the present application is used to implement the various steps of the cloud computing task scheduling method described in the embodiment of the present application. The specific implementation methods of each module of the device refer to the corresponding steps and will not be repeated here.
[0205] The cloud computing task scheduling device provided in the embodiment of the present application constructs a cloud computing task execution time model and a cloud computing task scheduling optimization model. The cloud computing task scheduling optimization model is used as the fitness function of the bacterial foraging algorithm. The primary population of the bacterial foraging algorithm is determined according to the Q learning algorithm and the cloud scheduling data set. The primary population represents the initial solution of the cloud computing task scheduling optimization model. The primary population is optimized according to the bacterial foraging algorithm to obtain the optimal solution of the cloud computing task scheduling optimization model. The optimal solution indicates the optimal scheduling scheme, and then the cloud computing tasks in the cloud computing task data set can be scheduled according to the optimal scheduling scheme. By determining the primary population of the bacterial foraging algorithm through the Q learning algorithm and the cloud scheduling data set, a better initial solution can be obtained, and then the initial solution can be further optimized based on the bacterial foraging algorithm to obtain the optimal solution of the cloud computing task scheduling optimization model. The scheduling of cloud computing tasks according to the optimal solution can improve resource utilization, improve computing efficiency, shorten the execution time of cloud computing tasks, and enhance user experience.
[0206] Figure 5 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, such as Figure 5 As shown, the electronic device 500 may include one or more processors 510 and one or more memories 520 connected to the processor 510. The electronic device 500 may also include an input interface 530 and an output interface 540 for communicating with another device or system. The program code executed by the processor 510 may be stored in the memory 520.
[0207] The processor 510 in the electronic device 500 calls the program code stored in the memory 520 to execute the cloud computing task scheduling method in the above embodiment.
[0208] The embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the cloud computing task scheduling method described in the embodiment of the present application are implemented.
[0209] The embodiment of the present application also provides a computer program product, which, when executed by a processor, implements the steps of the cloud computing task scheduling method as described in the embodiment of the present application.
[0210] The above is a detailed introduction to a cloud computing task scheduling method, device, electronic device and storage medium provided in an embodiment of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
[0211] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
Claims
1. A cloud computing task scheduling method, characterized in that: include: Acquire a cloud scheduling dataset, wherein the cloud scheduling dataset includes a cloud computing task dataset and a virtual resource dataset; According to the cloud scheduling data set, a cloud computing task execution time model is constructed, wherein the cloud computing task execution time model is used to indicate the expected time for virtual resources in the scheduling scheme to process the cloud computing task; According to the cloud computing task execution time model, a cloud computing task scheduling optimization model is constructed, and the cloud computing task scheduling optimization model is used as a fitness function of the bacterial foraging algorithm; Determine the initial population of the bacterial foraging algorithm according to the Q learning algorithm and the cloud scheduling data set, wherein the initial population represents the initial solution of the cloud computing task scheduling optimization model; The primary population is optimized according to the bacterial foraging algorithm to obtain an optimal solution of the cloud computing task scheduling optimization model, wherein the optimal solution of the cloud computing task scheduling optimization model indicates an optimal scheduling solution; The cloud computing tasks in the cloud computing task dataset are scheduled according to the optimal solution of the cloud computing task scheduling optimization model.
2. The method according to claim 1, characterized in that Determining the initial population of the bacterial foraging algorithm according to the Q learning algorithm and the cloud scheduling data set includes: Determine an initial bacterial population according to the cloud scheduling data set, wherein each bacterium in the initial bacterial population represents an initial scheduling scheme; Optimizing each bacterium in the initial bacterial population according to a bacterial foraging algorithm to obtain an intermediate bacterial population; According to the Q-learning algorithm, the bacteria in the intermediate bacterial population are optimized to obtain a new intermediate bacterial population; The process of optimizing the new intermediate bacterial population according to the bacterial foraging algorithm and optimizing according to the Q learning algorithm is iteratively performed until the termination condition of the Q learning algorithm is met, and the finally optimized bacterial population is used as the initial population.
3. The method according to claim 2, characterized in that The step of optimizing each bacterium in the initial bacterial population according to the bacterial foraging algorithm to obtain an intermediate bacterial population includes: The bacteria in the initial bacterial population are iteratively subjected to trending operations, replication operations and migration operations until the number of iterations reaches a preset number of migrations, thereby obtaining the intermediate bacterial population.
4. The method according to claim 2, characterized in that: The method of optimizing the intermediate bacterial population according to the Q learning algorithm to obtain a new intermediate bacterial population includes: Determining the Q value of each bacterium in the intermediate bacterial population according to a Q learning algorithm; According to the Q value of each bacteria, a new intermediate bacterial population corresponding to the intermediate bacterial population is determined.
5. The method according to any one of claims 1 to 4, characterized in that: The step of optimizing the primary population according to the bacterial foraging algorithm to obtain an optimal solution for the cloud computing task scheduling optimization model includes: The improved bacterial foraging algorithm is obtained by replacing the copy operation in the bacterial foraging algorithm with a screening operation based on the maximum deviation similarity criterion; the copy operation splits the bacteria whose fitness function value meets the target condition into two daughter bacteria, and the daughter bacteria have the same position and step length as the bacteria whose fitness function value meets the target condition; the screening operation based on the maximum deviation similarity criterion is used to calculate the deviation between any two bacteria, and screen the bacterial population according to the deviation; The primary population is optimized according to the improved bacterial foraging algorithm to obtain the optimal solution of the cloud computing task scheduling optimization model.
6. The method according to claim 5, characterized in that The process of screening the bacterial population by the screening operation based on the maximum deviation similarity criterion includes: Normalize the bacteria in the bacterial population; For the bacterial population after the normalization operation, determining the maximum number of similarity points and the maximum number of deviation points between bacteria other than the global optimal bacteria in the bacterial population and the global optimal bacteria; The bacterial population after the normalization operation is screened according to the maximum similarity point number and the maximum deviation point number.
7. The method according to claim 6, characterized in that The step of screening the bacterial population after the normalization operation according to the maximum similarity point number and the maximum deviation point number comprises: Determining whether each bacterium meets the preset requirements according to the maximum similarity points and the maximum deviation points, adding the bacteria that meet the preset requirements to the first set, and adding the bacteria that do not meet the preset requirements to the second set; Screening out bacteria to be processed in the second set according to the fitness function values of the bacteria in the second set; performing chaos processing on the bacteria to be processed in the second set; Performing cross-sectional processing on the bacteria in the first set; The bacteria in the first set that have undergone the vertical and horizontal cross processing, the bacteria in the second set that have undergone the chaos processing, and the global optimal bacteria constitute a new bacterial population.
8. The method according to any one of claims 1 to 4, characterized in that: The step of constructing a cloud computing task execution time model according to the cloud scheduling data set includes: For each virtual resource, determining an execution time of the virtual resource to process a target cloud computing task, wherein the target cloud computing task is a cloud computing task assigned to the virtual resource; The minimum execution time among the execution times corresponding to each virtual resource in the virtual resource data set is used as the expected time.
9. The method according to claim 8, characterized in that The determining the execution time of the virtual resource processing the target cloud computing task includes: The execution time of the virtual resource for processing the target cloud computing task is determined according to the number of instructions to be executed of the target cloud computing task and the performance indicator value of the virtual resource.
10. The method according to claim 8, characterized in that The step of constructing a cloud computing task scheduling optimization model according to the cloud computing task execution time model includes: Calculating the average of the execution time corresponding to each virtual resource in the virtual resource data set to obtain a mean execution time; Determine the execution time standard deviation according to the execution time corresponding to each virtual resource in the virtual resource data set and the execution time mean; A cloud computing task scheduling optimization model is constructed according to the expected time and the execution time standard deviation.
11. A cloud computing task scheduling device, characterized in that: include: A data acquisition module, used to acquire a cloud scheduling data set, wherein the cloud scheduling data set includes a cloud computing task data set and a virtual resource data set; A time model building module, used to build a cloud computing task execution time model according to the cloud scheduling data set, wherein the cloud computing task execution time model is used to indicate the expected time for virtual resources in the scheduling scheme to process cloud computing tasks; A scheduling module building module, used to build a cloud computing task scheduling optimization model according to the cloud computing task execution time model, and the cloud computing task scheduling optimization model is used as a fitness function of the bacterial foraging algorithm; An initial population determination module is used to determine the initial population of the bacterial foraging algorithm according to the Q learning algorithm and the cloud scheduling data set, wherein the initial population represents the initial solution of the cloud computing task scheduling optimization model; An optimal solution determination module, used to optimize the primary population according to the bacterial foraging algorithm to obtain an optimal solution of the cloud computing task scheduling optimization model, wherein the optimal solution of the cloud computing task scheduling optimization model indicates an optimal scheduling solution; The scheduling module is used to schedule the cloud computing tasks in the cloud computing task data set according to the optimal solution of the cloud computing task scheduling optimization model.
12. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the cloud computing task scheduling method according to any one of claims 1 to 10 is implemented.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the cloud computing task scheduling method described in any one of claims 1 to 10 are implemented.
Citation Information
Patent Citations
Cloud computing resource scheduling system and method
CN104516785A
Artificial intelligence-based task scheduling method and device, equipment and storage medium
CN115794341A
Cloud computing resource scheduling method, system and device based on enhanced Meland spar optimization algorithm, and medium
CN118585341A
Configuration and Usage Pattern of a Cloud Environment Based on Iterative Learning
US20180287864A1