Task scheduling method, device, equipment and computer storage medium for cloud platform
By applying firework algorithms to perform task scheduling on cloud computing platforms, the problem of high energy consumption of cloud platforms is solved, efficient task scheduling and low-energy cloud platforms are realized, and resource utilization and user experience are improved.
Patent Information
- Application Number
- CN202110902966.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-06
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2041-08-06
AI Technical Summary
Among the existing cloud computing task scheduling methods, the cloud platform consumes a high energy consumption, resulting in low resource utilization and poor user experience.
The firework algorithm is used for task scheduling. By obtaining multiple initial scheduling schemes, calculating fitness values, classification types, performing firework explosion operations and iterative calculations, the target scheduling scheme is obtained to ensure the accuracy of the fitness values and the optimization of energy consumption.
It realizes efficient task scheduling in heterogeneous cloud platforms, reduces cloud platform energy consumption, and improves resource utilization and user experience.
Smart Images

Figure CN113791879B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of cloud computing, and in particular relates to a task scheduling method, device, equipment and computer storage medium for a cloud platform. Background Art
[0002] With the continuous development of cloud computing, more and more people are using cloud computing. When a large number of users make task requests at the same time, it will bring great challenges to the resource allocation of cloud computing. Reasonable task scheduling methods can maximize the execution efficiency of cloud platform computing resources and have important research value.
[0003] Chinese patent CN111679907A, a cloud computing task scheduling method, the method adopts a reverse learning method to obtain a merged cell population, increase the diversity of the cell population, ensure that the population can be effectively and evenly distributed in the interval range, and then use the squid algorithm to iteratively calculate the obtained merged cell population, so that the cells explore in the new merged cell population space, increase the probability of the cells finding the optimal solution, until the maximum number of iterations is met to obtain the optimal scheduling plan, and then use the optimal scheduling plan to allocate M independent and indivisible subtasks, effectively reducing the shortcomings of the lack of diversity of the cell population caused by the existing method, increasing the diversity of the cell population, balancing the load, and reducing waiting time.
[0004] However, the existing cloud computing task scheduling methods have high energy consumption on cloud platforms. Summary of the invention
[0005] In order to solve the technical problem of high energy consumption of cloud platform during task scheduling in the prior art, the present invention provides a task scheduling method, device, equipment and computer storage medium for a cloud platform.
[0006] The technical problem to be solved by the present invention is achieved through the following technical solutions:
[0007] In a first aspect, the present invention provides a task scheduling method for a cloud platform, comprising:
[0008] Acquire multiple initial scheduling schemes, each of the multiple initial scheduling schemes comprising: an identifier of a virtual machine that executes each task to be executed;
[0009] For each initial scheduling scheme, determine the fitness value of the initial scheduling scheme according to the duration of execution of the initial scheduling scheme by each physical machine;
[0010] Determine the type of each initial scheduling solution according to the fitness values of all initial scheduling solutions and the average of the fitness values of all initial scheduling solutions;
[0011] According to the type of each of the initial scheduling plans, a fireworks explosion operation is performed to obtain a scheduling plan after the explosion;
[0012] Determine the next generation initial scheduling plan based on all the scheduling plans after the explosion;
[0013] The initial scheduling scheme is updated to the next-generation initial scheduling scheme, and the execution of each initial scheduling scheme is returned to determine the fitness value of the initial scheduling scheme according to the execution time of the initial scheduling scheme on each physical machine, until the iteration stop condition is met, and the target scheduling scheme is determined to be the next-generation initial scheduling scheme with the smallest fitness value.
[0014] Optionally, for each initial scheduling scheme, determining the fitness value of the initial scheduling scheme according to the duration for each physical machine to execute the initial scheduling scheme includes:
[0015] The fitness value f(X) of each initial scheduling scheme X is obtained according to the following formula:
[0016]
[0017]
[0018]
[0019] Among them, pmTime j vmTime is the time required for the jth physical machine to execute the initial scheduling scheme X. i,j is the time required for the i-th virtual machine created on physical machine j to execute the corresponding task, is the complexity of the task assigned to the i-th virtual machine, VM i,j (mips) is the task processing capability of the ith virtual machine on the jth physical machine, and X is the initial scheduling scheme.
[0020] Optionally, performing a fireworks explosion operation according to the type of each of the initial scheduling plans to obtain a scheduling plan after the explosion includes:
[0021] Determining the explosion quantity of each of the initial scheduling solutions;
[0022] Determining the explosion range of each of the initial scheduling plans according to the type of each of the initial scheduling plans;
[0023] According to the explosion quantity and explosion amplitude of each of the initial scheduling plans, an explosion operation and a mutation operation are performed on each of the initial scheduling plans to obtain a scheduling plan after the explosion.
[0024] Optionally, the types include: a first type, a second type, and a third type; and determining the type of each initial scheduling scheme according to the fitness values of all initial scheduling schemes and the average of the fitness values of all initial scheduling schemes includes:
[0025] Determine that the type of the initial scheduling scheme with the smallest fitness value among all the initial scheduling schemes is the first type;
[0026] Determine that among the initial scheduling plans except the core fireworks type, the type of the initial scheduling plan whose fitness value is less than or equal to the average fitness value of all the initial scheduling plans is the second type;
[0027] It is determined that among the initial scheduling plans except the core fireworks type, the type of the initial scheduling plan whose fitness value is greater than the average fitness value of all the initial scheduling plans is the third type.
[0028] Optionally, determining the explosion amplitude of each of the initial scheduling schemes according to the type of each of the initial scheduling schemes includes:
[0029] If the number of current iterations is 1, and the type of the initial scheduling scheme is the second type; or if the number of current iterations is not 1, the initial scheduling scheme is not the initial scheduling scheme of the first type in the previous iteration, and the type of the initial scheduling scheme is the second type, then the explosion amplitude of the initial scheduling scheme is obtained according to the following formula:
[0030]
[0031] Among them, B i represents the explosion magnitude of each dimension of the initial scheduling scheme of the second type i; X i represents the position vector of the initial scheduling solution of the i-th second type; X best Represents the position vector of the initial scheduling solution with the smallest fitness value among all initial scheduling solutions; R (i,best) Indicates the distance between the current individual firework and the core firework; b min The value of is a non-zero constant; B min Indicates the minimum explosion amplitude value of each dimension;
[0032] If the number of the current iteration is not 1, the explosion amplitude of the initial scheduling scheme of the first type in the previous iteration of the current iteration is calculated according to the following formula:
[0033]
[0034] Among them, B best (t+1) is the explosion amplitude of the initial scheduling scheme in the t+1th iteration, B best(t) is the explosion amplitude of the initial scheduling scheme in the tth iteration, f(X) is the fitness value of the initial scheduling scheme in the t+1th iteration, and f(X best ) is the fitness value of the initial scheduling scheme in the tth iteration, α is a constant greater than 0, and β is a constant less than 0.
[0035] If the number of current iterations is 1, and the type of the initial scheduling scheme is the first type or the third type; or, if the number of current iterations is not 1, and the initial scheduling scheme is not the first type of initial scheduling scheme in the previous iteration of the current iteration, the type of the initial scheduling scheme is the first type or the third type; the explosion amplitude of the initial scheduling scheme is obtained according to the following formula:
[0036]
[0037] Among them, B i is the explosion amplitude of the initial scheduling plan of the third type i; B is the explosion range parameter; Y min represents the minimum fitness value among all the initial scheduling solutions; f(x i ) is the fitness value of the initial scheduling scheme of the i-th third type; ε is a constant.
[0038] Optionally, performing explosion operation and mutation operation on each of the initial scheduling schemes according to the explosion quantity and explosion amplitude of each of the initial scheduling schemes to obtain the scheduling scheme after explosion includes:
[0039] According to the explosion quantity and explosion amplitude of each of the initial scheduling plans, an explosion operation is performed on each of the initial scheduling plans to obtain a scheduling plan after the explosion;
[0040] For each type, obtaining a target post-explosion scheduling plan from the post-explosion scheduling plans of the type; performing Gaussian mutation operations on the target post-explosion scheduling plans respectively to obtain a mutated target post-explosion scheduling plan;
[0041] The target post-explosion scheduling plan in the first post-explosion scheduling plan is updated to be the mutated target post-explosion scheduling plan, so as to obtain the post-explosion scheduling plan.
[0042] Optionally, determining the next generation initial scheduling scheme according to all the scheduling schemes after the explosion includes:
[0043] Determine the fitness values of all scheduling schemes after the explosion;
[0044] According to the fitness values of all the scheduling schemes after the explosion, the probability value of each scheduling scheme after the explosion being selected is determined;
[0045] According to the probability values of all the exploded scheduling schemes being selected, the next generation of initial scheduling schemes is determined.
[0046] In a second aspect, the present invention provides a task scheduling device for a cloud platform, comprising:
[0047] An acquisition module is used to acquire a plurality of initial scheduling schemes, each of which includes: an identifier of a virtual machine that executes each task to be executed;
[0048] A fireworks processing module, for determining, for each initial scheduling scheme, a fitness value of the initial scheduling scheme according to the duration of execution of the initial scheduling scheme by each physical machine;
[0049] Determine the type of each initial scheduling solution according to the fitness values of all initial scheduling solutions and the average of the fitness values of all initial scheduling solutions;
[0050] According to the type of each of the initial scheduling plans, a fireworks explosion operation is performed to obtain a scheduling plan after the explosion;
[0051] Determine the next generation initial scheduling plan based on all the scheduling plans after the explosion;
[0052] The initial scheduling scheme is updated to the next-generation initial scheduling scheme, and the execution of each initial scheduling scheme is returned to determine the fitness value of the initial scheduling scheme according to the execution time of the initial scheduling scheme on each physical machine, until the iteration stop condition is met, and the target scheduling scheme is determined to be the next-generation initial scheduling scheme with the smallest fitness value.
[0053] Optionally, the fireworks processing module is specifically used for:
[0054] The fitness value f(X) of each initial scheduling scheme X is obtained according to the following formula:
[0055]
[0056]
[0057]
[0058] Among them, pmTime j vmTime is the time required for the jth physical machine to execute the initial scheduling scheme X. i,j is the time required for the i-th virtual machine created on physical machine j to execute the corresponding task, is the complexity of the task assigned to the i-th virtual machine, VM i,j (mips) is the task processing capability of the ith virtual machine on the jth physical machine, and X is the initial scheduling scheme.
[0059] Optionally, the fireworks processing module is specifically used for:
[0060] Determine the explosion quantity of each of the initial scheduling schemes; determine the explosion amplitude of each of the initial scheduling schemes according to the type of each of the initial scheduling schemes; perform explosion operation and mutation operation on each of the initial scheduling schemes according to the explosion quantity and explosion amplitude of each of the initial scheduling schemes to obtain the exploded scheduling scheme.
[0061] Optionally, the types include: a first type, a second type and a third type; the fireworks processing module is specifically used for:
[0062] Determine that the type of the initial scheduling scheme with the smallest fitness value among all the initial scheduling schemes is the first type;
[0063] Determine that among the initial scheduling plans except the core fireworks type, the type of the initial scheduling plan whose fitness value is less than or equal to the average fitness value of all the initial scheduling plans is the second type;
[0064] It is determined that among the initial scheduling plans except the core fireworks type, the type of the initial scheduling plan whose fitness value is greater than the average fitness value of all the initial scheduling plans is the third type.
[0065] Optionally, the fireworks processing module is specifically used for:
[0066] If the number of current iterations is 1, and the type of the initial scheduling scheme is the second type; or if the number of current iterations is not 1, the initial scheduling scheme is not the initial scheduling scheme of the first type in the previous iteration, and the type of the initial scheduling scheme is the second type, then the explosion amplitude of the initial scheduling scheme is obtained according to the following formula:
[0067]
[0068] Among them, B i represents the explosion magnitude of each dimension of the initial scheduling scheme of the second type i; X i represents the position vector of the initial scheduling solution of the i-th second type; X best Represents the position vector of the initial scheduling solution with the smallest fitness value among all initial scheduling solutions; R (i,best) Indicates the distance between the current individual firework and the core firework; b min The value of is a non-zero constant; B min Indicates the minimum explosion amplitude value of each dimension;
[0069] If the number of the current iteration is not 1, the explosion amplitude of the initial scheduling scheme of the first type in the previous iteration of the current iteration is calculated according to the following formula:
[0070]
[0071] Among them, B best (t+1) is the explosion amplitude of the initial scheduling scheme in the t+1th iteration, B best (t) is the explosion amplitude of the initial scheduling scheme in the tth iteration, f(X) is the fitness value of the initial scheduling scheme in the t+1th iteration, and f(X best ) is the fitness value of the initial scheduling scheme in the tth iteration, α is a constant greater than 0, and β is a constant less than 0.
[0072] If the number of current iterations is 1, and the type of the initial scheduling scheme is the first type or the third type; or, if the number of current iterations is not 1, and the initial scheduling scheme is not the first type of initial scheduling scheme in the previous iteration of the current iteration, the type of the initial scheduling scheme is the first type or the third type; the explosion amplitude of the initial scheduling scheme is obtained according to the following formula:
[0073]
[0074] Among them, B i is the explosion amplitude of the initial scheduling plan of the third type i; B is the explosion range parameter; Y min represents the minimum fitness value among all the initial scheduling solutions; f(x i ) is the fitness value of the initial scheduling scheme of the i-th third type; ε is a constant.
[0075] Optionally, the fireworks processing module is specifically used for:
[0076] According to the explosion quantity and explosion amplitude of each of the initial scheduling plans, an explosion operation is performed on each of the initial scheduling plans to obtain a scheduling plan after the explosion;
[0077] For each type, obtaining a target post-explosion scheduling plan from the post-explosion scheduling plans of the type; performing Gaussian mutation operations on the target post-explosion scheduling plans respectively to obtain a mutated target post-explosion scheduling plan;
[0078] The target post-explosion scheduling plan in the first post-explosion scheduling plan is updated to be the mutated target post-explosion scheduling plan, so as to obtain the post-explosion scheduling plan.
[0079] Optionally, the fireworks processing module is specifically used for:
[0080] Determine the fitness values of all scheduling schemes after the explosion;
[0081] According to the fitness values of all the scheduling schemes after the explosion, the probability value of each scheduling scheme after the explosion being selected is determined;
[0082] According to the probability values of all the exploded scheduling schemes being selected, the next generation of initial scheduling schemes is determined.
[0083] In a third aspect, the present invention provides a task scheduling device for a cloud platform, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0084] Memory, used to store computer programs;
[0085] The processor is used to implement the method steps described in the first aspect when executing the program stored in the memory.
[0086] In a fourth aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in the first aspect are implemented.
[0087] Beneficial effects of the present invention:
[0088] When a new task needs to be executed, the new task may be one task or multiple tasks at the same time. Based on the fireworks algorithm, the cloud platform fully considers the execution time of different physical machines for possible scheduling schemes, calculates the fitness values of different scheduling schemes, classifies them according to the fitness values, explodes different types of scheduling schemes, and iterates the fireworks population to obtain the target scheduling scheme. The calculation of the fitness value fully considers the differences between different physical machines, so that the scheme can be applied in heterogeneous cloud platforms and ensures the accuracy of the target scheduling scheme. In addition, the cloud platform has low energy consumption, improves resource utilization, and improves user experience by scheduling tasks with the goal of minimizing the energy consumption of heterogeneous cloud platforms. BRIEF DESCRIPTION OF THE DRAWINGS
[0089] Figure 1 It is a flowchart of a task scheduling method for a cloud platform provided by an embodiment of the present invention;
[0090] Figure 2 It is a structural diagram of a task scheduling device for a cloud platform provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0091] The present invention is further described in detail below with reference to specific embodiments, but the embodiments of the present invention are not limited thereto.
[0092] The following describes the architecture of a task scheduling system for a cloud platform applied by the task scheduling method for a cloud platform provided in an embodiment of the present invention. The task scheduling system for a cloud platform includes: a task scheduling device for a cloud platform and a physical machine.
[0093] The physical machine is a server, and there may be one or more physical machines. One or more virtual machines run on each physical machine.
[0094] Among them, the task scheduling device of the cloud platform is used to allocate a corresponding processing virtual machine to the task to be executed when receiving the task to be executed, thereby solving the task scheduling problem of the cloud platform.
[0095] The task scheduling device of the cloud platform may be a computer or a server, which is not limited in the present invention.
[0096] Swarm intelligence algorithms perform well in solving task scheduling problems. The fireworks algorithm is an emerging swarm intelligence algorithm. Its good explosion mechanism and mutation strategy effectively improve the diversity of the fireworks population. It is more thorough when searching within the scope space and has good optimization performance, which gives the algorithm a clear advantage in solving task scheduling problems.
[0097] The task scheduling method of the cloud platform provided by the embodiment of the present invention, when there is a new task to be executed, the new task may be one task or multiple tasks at the same time. Based on the fireworks algorithm, the cloud platform fully considers the duration of different physical machines to execute the scheduling scheme for possible scheduling schemes, calculates the fitness values of different scheduling schemes, classifies them according to the fitness values, explodes different types of scheduling schemes, and iteratively calculates the fireworks population to obtain the target scheduling scheme. The calculation of the fitness value fully considers the differences between different physical machines, so that the scheme can be applied in heterogeneous cloud platforms and ensures the accuracy of the target scheduling scheme. In addition, the cloud platform has low energy consumption, improves resource utilization, and improves user experience by scheduling tasks with the goal of minimizing the energy consumption of heterogeneous cloud platforms.
[0098] See also Figure 1 , Figure 1 is a flowchart of a task scheduling method for a cloud platform provided by an embodiment of the present invention, such as Figure 1 As shown, the method of this embodiment is executed by a computer or a server, for example, it can be executed by a task scheduling device of a cloud platform in a task scheduling system of a cloud platform in the above embodiment. The method provided in this embodiment includes the following steps:
[0099] S101. Obtain multiple initial scheduling schemes.
[0100] Each of the multiple initial scheduling schemes includes: an identifier of a virtual machine that executes each task to be executed.
[0101] In this embodiment, the fireworks algorithm is improved so that it is applied in the task scheduling process of cloud computing. It can be understood that each firework in the fireworks algorithm is equivalent to a scheduling scheme in the embodiment of the present invention.
[0102] When a scheduling task is received, the fireworks population is initialized based on the fireworks algorithm. The initialization process is to determine multiple initial fireworks, where, in this embodiment, the initial scheduling scheme can be expressed as initial fireworks, and the multiple initial scheduling schemes obtained are the initial fireworks population. The process of obtaining multiple initial scheduling schemes is the initialization of the fireworks population.
[0103] Optionally, the initial scheduling scheme (equivalent to the position vector of each firework) can be determined based on the number of initial scheduling schemes (equivalent to the number of fireworks in the initial fireworks population), the number of virtual machines, and the number of tasks to be executed.
[0104] The position vector of each firework can be represented by Xi. The dimension length of each position vector Xi can be determined according to the number of tasks to be performed.
[0105] Exemplarily, the position vector of each firework can be represented by the dimension length of Xi, which is the number of tasks to be executed, and each dimension represents a task. The value of each dimension is the identifier of the virtual machine, indicating that the task represented by the dimension corresponds to the virtual machine executed. The identifier of the virtual machine can be in digital form. Assume that Xi is (1, 2, 5), which means that there are 3 tasks in total, among which the first task is executed by virtual machine No. 1, the second task is executed by virtual machine No. 2, and the third task is executed by virtual machine No. 5.
[0106] Optionally, the initial scheduling scheme may be assigned a value by random assignment.
[0107] Optionally, you can set the number of iterations when initializing the fireworks.
[0108] S102 . For each initial scheduling solution, determine the fitness value of the initial scheduling solution according to the duration of each physical machine executing the initial scheduling solution.
[0109] S103: Determine the type of each initial scheduling solution according to the fitness values of all initial scheduling solutions and the average value of the fitness values of all initial scheduling solutions.
[0110] S104, performing fireworks explosion operations according to the type of each initial scheduling plan to obtain a scheduling plan after the explosion.
[0111] Different types of initial scheduling plans have different corresponding fireworks explosion operations. For each initial scheduling plan, according to the type of the initial scheduling plan, determine how to explode the initial scheduling plan, so as to obtain the spark scheduling plan corresponding to the initial scheduling plan. After the fireworks explosion operation, the corresponding post-explosion scheduling plan is obtained.
[0112] The scheduling plan after the explosion includes an initial scheduling plan and a spark scheduling plan obtained by performing an explosion according to the initial scheduling plan.
[0113] S105. Determine the next generation initial scheduling plan based on all the scheduling plans after the explosion.
[0114] Optionally, the number of next generation initial scheduling solutions is the same as the number of initial scheduling solutions.
[0115] S106: Determine whether the iteration stop condition is met.
[0116] If yes, continue to execute S107. If no, continue to execute S108.
[0117] S107. Determine the target scheduling scheme as the next generation initial scheduling scheme with the smallest fitness value.
[0118] S108, updating the initial scheduling scheme to the next generation initial scheduling scheme, and returning to execute S102.
[0119] The initial scheduling scheme is updated to the next-generation initial scheduling scheme, and the fitness value of the initial scheduling scheme is determined according to the execution time of each physical machine for each initial scheduling scheme, until the iteration stop condition is met, and the target scheduling scheme is determined to be the next-generation initial scheduling scheme with the smallest fitness value.
[0120] Optionally, the iteration stopping condition may be that the number of iterations reaches a preset iteration threshold.
[0121] Among them, the preset iteration threshold can be set during the fireworks initialization process.
[0122] In this embodiment, when a new task needs to be executed, the new task may be one task or multiple tasks at the same time. Based on the fireworks algorithm, the cloud platform fully considers the duration of different physical machines to execute the scheduling schemes for possible scheduling schemes, calculates the fitness values of different scheduling schemes, classifies them according to the fitness values, explodes different types of scheduling schemes, and iteratively calculates the fireworks population to obtain the target scheduling scheme. The calculation of the fitness value fully considers the differences between different physical machines, so that the scheme can be applied in heterogeneous cloud platforms and ensures the accuracy of the target scheduling scheme. In addition, the cloud platform has low energy consumption, improves resource utilization, and improves user experience by scheduling tasks with the goal of minimizing the energy consumption of heterogeneous cloud platforms.
[0123] Optional, in Figure 1 On the basis of the illustrated embodiment, further, S102 can be implemented by the following steps:
[0124] The fitness value of each initial scheduling scheme X is obtained according to the following formula (1):
[0125]
[0126] Among them, pmTime j vmTime is the time required for the jth physical machine to execute the initial scheduling scheme X. i,j is the time required for the i-th virtual machine created on physical machine j to execute the corresponding task, is the complexity of the task assigned to the i-th virtual machine, VM i,j (mips) is the task processing capability of the ith virtual machine on the jth physical machine, and X is the initial scheduling scheme.
[0127] Optionally, based on the above embodiment, S104 may be further implemented by the following steps:
[0128] S1041. Determine the explosion quantity of each initial scheduling solution.
[0129] S1042. Determine the explosion range of each initial scheduling plan according to the type of each initial scheduling plan.
[0130] S1043. Perform explosion operation and mutation operation on each initial scheduling plan according to the explosion quantity and explosion amplitude of each initial scheduling plan to obtain a scheduling plan after explosion.
[0131] Optionally, based on the above embodiment, further, the types in the above embodiment may include but are not limited to: the first type, the second type and the third type. Accordingly, S103 may be implemented by the following steps:
[0132] S1031. Determine the type of the initial scheduling scheme with the smallest fitness value among all initial scheduling schemes as the first type.
[0133] Among them, the first type of initial scheduling plan can also be called core fireworks.
[0134] S1032: Determine that among the initial scheduling plans other than the core fireworks type, the type of the initial scheduling plan whose fitness value is less than or equal to the average fitness value of all the initial scheduling plans is the second type.
[0135] Among them, the second type of initial scheduling plan can also be called high-quality fireworks.
[0136] S1033. Determine that among the initial scheduling plans other than the core fireworks type, the type of the initial scheduling plan whose fitness value is greater than the average fitness value of all the initial scheduling plans is the third type.
[0137] Among them, the third type of initial scheduling plan can also be called general fireworks.
[0138] In this embodiment, the initial scheduling schemes are divided into three types, and the type of the initial scheduling scheme is determined according to the fitness value, so that different types of initial scheduling schemes can be processed separately.
[0139] Optionally, based on the above embodiment, S1042 can be further implemented by the following steps:
[0140] If the number of current iterations is 1, and the type of the initial scheduling scheme is the second type; or if the number of current iterations is not 1, the initial scheduling scheme is not the first type of initial scheduling scheme in the previous iteration, and the type of the initial scheduling scheme is the second type, then the explosion amplitude of the initial scheduling scheme is obtained according to the following formula:
[0141]
[0142] Among them, B i represents the explosion magnitude of each dimension of the initial scheduling scheme of the second type i; X i represents the position vector of the initial scheduling solution of the i-th second type; X best Represents the position vector of the initial scheduling solution with the smallest fitness value among all initial scheduling solutions; R (i,best) Indicates the distance between the current individual firework and the core firework; b min The value of is a non-zero constant; B min Indicates the minimum explosion amplitude value of each dimension;
[0143] If the number of current iterations is not 1, the explosion amplitude of the initial scheduling scheme of the first type in the previous iteration of the current iteration is calculated according to the following formula:
[0144]
[0145] Among them, B best (t+1) is the explosion amplitude of the initial scheduling scheme in the t+1th iteration, B best (t) is the explosion amplitude of the initial scheduling scheme in the tth iteration, f(X) is the fitness value of the initial scheduling scheme in the t+1th iteration, and f(X best ) is the fitness value of the initial scheduling scheme in the tth iteration, α is a constant greater than 0, and β is a constant less than 0.
[0146] If the number of current iterations is 1, and the type of the initial scheduling scheme is the first type or the third type; or, if the number of current iterations is not 1, and the initial scheduling scheme is not the first type of initial scheduling scheme in the previous iteration of the current iteration, the type of the initial scheduling scheme is the first type or the third type; the explosion amplitude of the initial scheduling scheme is obtained according to the following formula:
[0147]
[0148] Among them, B i is the explosion amplitude of the initial scheduling plan of the third type i; B is the explosion range parameter; Y min represents the minimum fitness value among all the initial scheduling solutions; f(x i ) is the fitness value of the initial scheduling scheme of the i-th third type; ε is a constant.
[0149] In this embodiment, for the first iteration, the explosion amplitude of the second type of initial scheduling solution is obtained according to formula (2). The explosion amplitudes of the first type and the third type of initial scheduling solutions are obtained according to formula (4).
[0150] After the first iteration, for each subsequent iteration, the explosion amplitude of the first type of initial scheduling scheme in the previous iteration of the current iteration is calculated using the above formula (3). Otherwise, the explosion amplitude of the second type of initial scheduling scheme is obtained according to formula (2), and the explosion amplitude of the first and third types of initial scheduling schemes is obtained according to formula (4).
[0151] Optionally, based on the above embodiment, S1043 may be further implemented by the following steps:
[0152] S10431. Perform explosion operation on each initial scheduling plan according to the explosion quantity and explosion amplitude of each initial scheduling plan to obtain a scheduling plan after explosion.
[0153] S10432. For each type, obtain a scheduling plan after the target explosion from the scheduling plan after the type explosion; perform Gaussian mutation operation on the scheduling plan after the target explosion to obtain a mutated scheduling plan after the target explosion.
[0154] S10433. Update the target post-explosion scheduling plan in the first post-explosion scheduling plan to the mutated target post-explosion scheduling plan, and obtain the post-explosion scheduling plan.
[0155] Optionally, based on the above embodiment, S105 may be further implemented by the following steps:
[0156] S1051, determining the fitness values of all scheduling schemes after the explosion;
[0157] S1052, determining the probability value of each post-explosion scheduling scheme being selected according to the fitness values of all post-explosion scheduling schemes;
[0158] S1053. Determine the next generation initial scheduling plan according to the probability values of all scheduling plans after the explosion being selected.
[0159] The following example illustrates how to improve the Fireworks algorithm and apply it to task scheduling in cloud computing.
[0160] Step 1: Initialize the fireworks population.
[0161] Among them, step 1 corresponds to the above Figure 1 S101 in the illustrated embodiment.
[0162] Assume the number of fireworks is N, the number of virtual machines is K, the number of tasks to be executed is M, the position vector of each firework is represented by Xi, the dimension length of the vector is determined by the number of tasks T, and when assigning values to the initial fireworks population, a random assignment method is used. The size of the value is determined by the number of virtual machines executing the task, and the size is an integer between 0 and K-1. Set the number of iterations of the algorithm to num.
[0163] Step 2: According to the fitness function, calculate the fitness value of each firework individual in the firework population.
[0164] Among them, step 2 corresponds to the above Figure 1 S102 in the illustrated embodiment.
[0165] Calculate the fitness value of each firework individual in the firework population, and calculate the average fitness value of all firework individuals.
[0166] The fitness value of each firework in the firework population is calculated. The fitness value can be obtained by the following formula (5):
[0167] f(X) = totalTime(X) Formula (5)
[0168] Among them, totalTime(X) represents the maximum time spent by each type of physical machine to execute the cloud task assigned to it according to the current task allocation method. X represents a possible task scheduling scheme, which is encoded by real number direct encoding. The value of each dimension represents the virtual machine number assigned to the current task. When the task execution time is equal, the optimal individual selects the allocation method with a larger static power consumption of the physical machine.
[0169] Step 3: Classify the fireworks population.
[0170] Among them, step 3 corresponds to the above Figure 1 S103 in the illustrated embodiment.
[0171] The fireworks population is classified into three categories according to the fitness value. First, the fireworks individual with the smallest fitness value is obtained from the fireworks population, which is called the core fireworks. Among the remaining fireworks individuals, the fireworks with a fitness value not greater than the population average are called high-quality fireworks. The fireworks with a fitness value greater than the population average are called general fireworks.
[0172] Step 4: Calculate the explosion quantity S and explosion amplitude B of each firework according to the updated formula.
[0173] Among them, step 4 corresponds to S1041 and S1042 in the above embodiment.
[0174] Design a new method for calculating the explosion amplitude. According to the classified fireworks population, different types of fireworks populations have different explosion amplitudes. For high-quality fireworks, the explosion amplitude calculation formula is obtained according to formula (6) as follows:
[0175]
[0176] Among them, B i The vector representing the explosion amplitude of firework i in each dimension; X i represents the position vector of firework i; X best Represents the position vector of the fireworks individual with the smallest fitness value in the fireworks population; R (i,best) Indicates the distance between the current individual firework and the core firework; b min The value of is a non-zero constant; B min Indicates the minimum explosion amplitude value of each dimension;
[0177] For the core fireworks, if an individual with a smaller fitness value can be found in the current group of fireworks, the explosion amplitude of the core fireworks will be increased, otherwise, the explosion amplitude of the core fireworks will be reduced. The explosion amplitude calculation formula (7) of the core fireworks is as follows:
[0178]
[0179] Among them, f represents the fitness function; X represents the individual in the fireworks population whose fitness function value is better than the core fireworks; the two parameters α and β are used to increase and decrease the explosion amplitude respectively;
[0180] For general fireworks, the original algorithm is still used, and the calculation formula is as follows:
[0181]
[0182] Among them, B i is the explosion amplitude of the i-th firework; B is an important parameter used to control the explosion range; Y min Indicates the fitness value of the individual with the lowest fitness value in the current fireworks group; f(x i ) is the fitness value of the current firework individual; ε is a very small constant to prevent division by zero.
[0183] According to the following formula (9), determine the fireworks
[0184]
[0185] Among them, S i represents the number of sparks that the i-th firework can produce; Y max Indicates the fitness value of the worst individual in the current fireworks group; f(x i ) represents the fitness value of the current firework individual; m is a constant, which is mainly used to adaptively control the number of sparks that the current individual can generate; N represents the initial population size; ε is a very small constant to prevent division by zero.
[0186] Step 5: Perform displacement operation on the fireworks population, and select one firework individual from each of the three types of fireworks to perform Gaussian mutation operation, and then map the firework individuals that jump out of the scope into the scope using the set rules.
[0187] Among them, step 5 corresponds to the above Figure 1 S1043 in the illustrated embodiment.
[0188] According to the following formula (10), the fireworks population is displaced:
[0189]
[0190] Among them, rand(0,B i ) is a randomly generated number within the explosion range of the current firework; Represents the k-th dimension value of the i-th firework individual; Indicates the value of the current k-th dimension after the displacement operation. When displacing, all dimensions of the firework individual are moved by a fixed size.
[0191] The direction of the explosion amplitude in each dimension of the fireworks algorithm is the same, which is not conducive to the diversity of the population. In order to avoid this situation, for non-high-quality fireworks, a new displacement formula is used, and the displacement formula is updated to the following operation of formula (11).
[0192]
[0193] A shift operation is performed on each dimension of all fireworks, where U represents a random number uniformly distributed in the interval [-1, 1].
[0194] Furthermore, in order to enrich the diversity of fireworks populations, the Gaussian mutation strategy was optimized, and a firework individual was randomly selected from each of the three different types of fireworks groups to perform Gaussian mutation operations.
[0195] Step 6: Calculate the fitness values of all firework individuals in the population.
[0196] Among them, step 6 corresponds to S1051 in the above embodiment.
[0197] Step 7: Based on the fitness values of all individual fireworks, calculate the probability of each firework being selected.
[0198] Among them, step 7 corresponds to S1052 in the above embodiment.
[0199] In order to reduce the computational complexity and optimize the fireworks population offspring selection strategy, the probability of each fireworks individual being selected in the new selection strategy is calculated using the formula (12) as follows:
[0200]
[0201] Among them, P(X i ) represents the probability of the i-th firework being selected; j∈K means that the j-th firework belongs to the firework population K, and the firework population K is the set of all individual fireworks.
[0202] Step 8: Select the next generation of fireworks population.
[0203] Among them, step 8 corresponds to S1053 in the above embodiment.
[0204] The individual with the best fitness directly enters the next cycle and is selected as the firework in the next generation of fireworks population. The other N-1 individuals are selected according to the probability calculated by formula (12).
[0205] Step 9: Update the initial fireworks population to the next generation fireworks population, and return to step 2 until the iteration stop condition is met, and determine that the target scheduling plan is the next generation initial scheduling plan with the smallest fitness value.
[0206] Among them, step 9 corresponds to S106-S108 in the above embodiment.
[0207] Determine whether the iteration stop condition is met. If so, return to step 2; if not, output the optimal task scheduling sequence.
[0208] See also Figure 2 , Figure 2 A schematic diagram of a task scheduling device for a cloud platform is provided in accordance with an embodiment of the present invention. Figure 2 As shown, the device of this embodiment includes:
[0209] The acquisition module 201 is used to acquire multiple initial scheduling schemes, each of which includes: an identifier of a virtual machine that executes each task to be executed;
[0210] The fireworks processing module 202 is used to determine the fitness value of each initial scheduling scheme according to the duration of each physical machine executing the initial scheduling scheme;
[0211] Determine the type of each initial scheduling solution according to the fitness values of all initial scheduling solutions and the average of the fitness values of all initial scheduling solutions;
[0212] According to the type of each initial scheduling plan, fireworks explosion operation is performed to obtain the scheduling plan after the explosion;
[0213] Determine the next generation initial scheduling plan based on all the scheduling plans after the explosion;
[0214] Update the initial scheduling plan to the next generation of initial fireworks, return to execute each initial scheduling plan, and determine the fitness value of the initial scheduling plan according to the execution time of the initial scheduling plan on each physical machine until the iteration stop condition is met, and determine that the target scheduling plan is the next generation of initial scheduling plan with the smallest fitness value.
[0215] Optionally, the fireworks processing module 202 is specifically used for:
[0216] The fitness value f(X) of each initial scheduling scheme X is obtained according to the following formula:
[0217]
[0218]
[0219]
[0220] Among them, pmTime j vmTime is the time required for the jth physical machine to execute the initial scheduling scheme X. i,j is the time required for the i-th virtual machine created on physical machine j to execute the corresponding task, is the complexity of the task assigned to the i-th virtual machine, VM i,j (mips) is the task processing capability of the ith virtual machine on the jth physical machine, and X is the initial scheduling scheme.
[0221] Optionally, the fireworks processing module 202 is specifically used for:
[0222] Determine the number of explosions for each initial scheduling solution.
[0223] According to the type of each initial scheduling plan, determine the explosion range of each initial scheduling plan;
[0224] According to the explosion quantity and explosion amplitude of each initial scheduling plan, explosion operation and mutation operation are performed on each initial scheduling plan to obtain the scheduling plan after explosion.
[0225] Optionally, the types include: a first type, a second type, and a third type; the fireworks processing module 202 is specifically used for:
[0226] Determine that the type of the initial scheduling scheme with the smallest fitness value among all the initial scheduling schemes is the first type;
[0227] Determine that among the initial scheduling plans except the core fireworks type, the type of the initial scheduling plan whose fitness value is less than or equal to the average fitness value of all the initial scheduling plans is the second type;
[0228] It is determined that among the initial scheduling plans except the core fireworks type, the type of the initial scheduling plan whose fitness value is greater than the average fitness value of all the initial scheduling plans is the third type.
[0229] Optionally, the fireworks processing module 202 is specifically used for:
[0230] If the number of current iterations is 1, and the type of the initial scheduling scheme is the second type; or if the number of current iterations is not 1, the initial scheduling scheme is not the first type of initial scheduling scheme in the previous iteration, and the type of the initial scheduling scheme is the second type, then the explosion amplitude of the initial scheduling scheme is obtained according to the following formula:
[0231]
[0232] Among them, B i represents the explosion magnitude of each dimension of the initial scheduling scheme of the second type i; X i represents the position vector of the initial scheduling solution of the i-th second type; X best Represents the position vector of the initial scheduling solution with the smallest fitness value among all initial scheduling solutions; R (i,best) Indicates the distance between the current individual firework and the core firework; b min The value of is a non-zero constant; B min Indicates the minimum explosion amplitude value of each dimension;
[0233] If the number of current iterations is not 1, the explosion amplitude of the initial scheduling scheme of the first type in the previous iteration of the current iteration is calculated according to the following formula:
[0234]
[0235] Among them, B best (t+1) is the explosion amplitude of the initial scheduling scheme in the t+1th iteration, B best (t) is the explosion amplitude of the initial scheduling scheme in the tth iteration, f(X) is the fitness value of the initial scheduling scheme in the t+1th iteration, and f(X best ) is the fitness value of the initial scheduling scheme in the tth iteration, α is a constant greater than 0, and β is a constant less than 0.
[0236] If the number of current iterations is 1, and the type of the initial scheduling scheme is the first type or the third type; or, if the number of current iterations is not 1, and the initial scheduling scheme is not the first type of initial scheduling scheme in the previous iteration of the current iteration, the type of the initial scheduling scheme is the first type or the third type; the explosion amplitude of the initial scheduling scheme is obtained according to the following formula:
[0237]
[0238] Among them, B i is the explosion amplitude of the initial scheduling plan of the third type i; B is the explosion range parameter; Y min represents the minimum fitness value among all the initial scheduling solutions; f(x i ) is the fitness value of the initial scheduling scheme of the i-th third type; ε is a constant.
[0239] Optionally, the fireworks processing module 202 is specifically used for:
[0240] According to the explosion quantity and explosion amplitude of each initial scheduling plan, each initial scheduling plan is subjected to explosion operation to obtain the scheduling plan after explosion;
[0241] For each type, obtain the scheduling plan after the target explosion from the scheduling plan after the type explosion; perform Gaussian mutation operation on the scheduling plan after the target explosion to obtain the mutated scheduling plan after the target explosion;
[0242] The target post-explosion scheduling plan in the first post-explosion scheduling plan is updated to be the mutated target post-explosion scheduling plan, so as to obtain the post-explosion scheduling plan.
[0243] Optionally, the fireworks processing module 202 is specifically used for:
[0244] Determine the fitness values of all scheduling schemes after the explosion;
[0245] According to the fitness values of all the scheduling schemes after the explosion, the probability value of each scheduling scheme after the explosion being selected is determined;
[0246] According to the probability values of all the exploded scheduling schemes being selected, the next generation of initial scheduling schemes is determined.
[0247] An embodiment of the present invention provides a task scheduling device for a cloud platform, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus;
[0248] Memory, used to store computer programs;
[0249] The processor is used to implement the steps of the above method embodiment when executing the program stored in the memory.
[0250] An embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of the above method embodiment are implemented.
[0251] In the description of the present invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0252] Although the present application is described herein in conjunction with various embodiments, in the process of implementing the claimed application, those skilled in the art may understand and implement other variations of the disclosed embodiments by viewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "one" or "an" does not exclude multiple situations. A single processor or other unit may implement several functions listed in a claim. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.
[0253] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, devices (equipment), or computer program products. Therefore, the present application may adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware, which are collectively referred to as "modules" or "systems" herein. Moreover, the present application may adopt the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program codes. The computer program is stored / distributed in a suitable medium, provided together with other hardware or as a part of hardware, or may adopt other distribution forms, such as by Internet or other wired or wireless telecommunication systems.
[0254] The present application is described with reference to the flowcharts and / or block diagrams of the methods, apparatuses (devices) and computer program products of the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0255] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0256] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0257] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the scope of protection of the present invention.
Claims
1. A task scheduling method for a cloud platform, characterized in that: include: Acquire multiple initial scheduling schemes, each of the multiple initial scheduling schemes comprising: an identifier of a virtual machine that executes each task to be executed; For each initial scheduling scheme, determine the fitness value of the initial scheduling scheme according to the duration of execution of the initial scheduling scheme by each physical machine; Determine the type of each initial scheduling solution according to the fitness values of all initial scheduling solutions and the average of the fitness values of all initial scheduling solutions; According to the type of each of the initial scheduling plans, a fireworks explosion operation is performed to obtain a scheduling plan after the explosion; Determine the next generation initial scheduling plan based on all the scheduling plans after the explosion; The initial scheduling scheme is updated to the next-generation initial scheduling scheme, and the fitness value of the initial scheduling scheme is determined according to the execution time of each physical machine for each initial scheduling scheme, until the iteration stop condition is met, and the target scheduling scheme is determined to be the next-generation initial scheduling scheme with the smallest fitness value; The step of determining the fitness value of each initial scheduling scheme according to the duration of execution of the initial scheduling scheme by each physical machine for each initial scheduling scheme includes: The fitness value f(X) of each initial scheduling scheme X is obtained according to the following formula: Among them, pmTime j vmTime is the time required for the jth physical machine to execute the initial scheduling scheme X. i,j is the time required for the i-th virtual machine created on physical machine j to execute the corresponding task, is the complexity of the task assigned to the i-th virtual machine, VM i,j (mips) is the task processing capability of the ith virtual machine on the jth physical machine, and X is the initial scheduling scheme; The method of performing fireworks explosion operations according to the type of each of the initial scheduling plans to obtain a scheduling plan after the explosion includes: Determining the explosion quantity of each of the initial scheduling solutions; Determining the explosion range of each of the initial scheduling plans according to the type of each of the initial scheduling plans; According to the explosion quantity and explosion amplitude of each of the initial scheduling plans, an explosion operation and a mutation operation are performed on each of the initial scheduling plans to obtain a scheduling plan after the explosion.
2. The method according to claim 1, characterized in that The types include: a first type, a second type and a third type; the type of each initial scheduling scheme is determined according to the fitness values of all initial scheduling schemes and the average of the fitness values of all initial scheduling schemes, including: Determine that the type of the initial scheduling scheme with the smallest fitness value among all the initial scheduling schemes is the first type; Determine that among the initial scheduling plans except the core fireworks type, the type of the initial scheduling plan whose fitness value is less than or equal to the average fitness value of all the initial scheduling plans is the second type; It is determined that among the initial scheduling plans except the core fireworks type, the type of the initial scheduling plan whose fitness value is greater than the average fitness value of all the initial scheduling plans is the third type.
3. The method according to claim 2, characterized in that The step of determining the explosion range of each of the initial scheduling schemes according to the type of each of the initial scheduling schemes comprises: If the number of current iterations is 1, and the type of the initial scheduling scheme is the second type; or if the number of current iterations is not 1, the initial scheduling scheme is not the initial scheduling scheme of the first type in the previous iteration, and the type of the initial scheduling scheme is the second type, then the explosion amplitude of the initial scheduling scheme is obtained according to the following formula: Among them, B i represents the explosion magnitude of each dimension of the initial scheduling scheme of the second type i; X i represents the position vector of the initial scheduling solution of the i-th second type; X best Represents the position vector of the initial scheduling solution with the smallest fitness value among all initial scheduling solutions; R (i,best ) indicates the distance between the current individual firework and the core firework; b min The value of is a non-zero constant; B min Indicates the minimum explosion amplitude value of each dimension; If the number of the current iteration is not 1, the explosion amplitude of the initial scheduling scheme of the first type in the previous iteration of the current iteration is calculated according to the following formula: Among them, B best (t+1) is the explosion amplitude of the initial scheduling scheme in the t+1th iteration, B best (t) is the explosion amplitude of the initial scheduling scheme in the tth iteration, f(X) is the fitness value of the initial scheduling scheme in the t+1th iteration, and f(X best ) is the fitness value of the initial scheduling scheme in the tth iteration, α is a constant greater than 0, and β is a constant less than 0; If the number of current iterations is 1, and the type of the initial scheduling scheme is the first type or the third type; or, if the number of current iterations is not 1, and the initial scheduling scheme is not the first type of initial scheduling scheme in the previous iteration of the current iteration, the type of the initial scheduling scheme is the first type or the third type; the explosion amplitude of the initial scheduling scheme is obtained according to the following formula: Among them, B i is the explosion amplitude of the initial scheduling plan of the third type i; B is the explosion range parameter; Y min represents the minimum fitness value among the fitness values of all initial scheduling schemes; f(xi) is the fitness value of the i-th initial scheduling scheme of the third type; ε is a constant.
4. The method according to claim 2 or 3, characterized in that: The step of performing explosion operation and mutation operation on each of the initial scheduling plans according to the explosion quantity and explosion amplitude of each of the initial scheduling plans to obtain the scheduling plan after explosion includes: According to the explosion quantity and explosion amplitude of each of the initial scheduling plans, an explosion operation is performed on each of the initial scheduling plans to obtain a scheduling plan after the explosion; For each type, obtaining a target post-explosion scheduling plan from the post-explosion scheduling plans of the type; performing Gaussian mutation operations on the target post-explosion scheduling plans respectively to obtain a mutated target post-explosion scheduling plan; The target post-explosion scheduling plan in the first post-explosion scheduling plan is updated to be the mutated target post-explosion scheduling plan, so as to obtain the post-explosion scheduling plan.
5. The method according to claim 1, characterized in that The next generation of initial scheduling schemes is determined based on all the scheduling schemes after the explosion, including: Determine the fitness values of all scheduling schemes after the explosion; According to the fitness values of all the scheduling schemes after the explosion, the probability value of each scheduling scheme after the explosion being selected is determined; According to the probability values of all the exploded scheduling schemes being selected, the next generation of initial scheduling schemes is determined.
6. A task scheduling device for a cloud platform, characterized in that: include: An acquisition module, used to acquire a plurality of initial scheduling schemes, each of the plurality of initial scheduling schemes comprising: an identifier of a virtual machine that executes each task to be executed; A fireworks processing module, for determining, for each initial scheduling scheme, a fitness value of the initial scheduling scheme according to the duration of execution of the initial scheduling scheme by each physical machine; Determine the type of each initial scheduling solution according to the fitness values of all initial scheduling solutions and the average of the fitness values of all initial scheduling solutions; According to the type of each of the initial scheduling plans, a fireworks explosion operation is performed to obtain a scheduling plan after the explosion; Determine the next generation initial scheduling plan based on all the scheduling plans after the explosion; The initial scheduling scheme is updated to the next-generation initial scheduling scheme, and the fitness value of the initial scheduling scheme is determined according to the execution time of each physical machine for each initial scheduling scheme, until the iteration stop condition is met, and the target scheduling scheme is determined to be the next-generation initial scheduling scheme with the smallest fitness value; The fireworks processing module determines, for each initial scheduling scheme, a fitness value of the initial scheduling scheme according to the duration of execution of the initial scheduling scheme by each physical machine, including: The fitness value f(X) of each initial scheduling scheme X is obtained according to the following formula: Among them, pmTime j vmTime is the time required for the jth physical machine to execute the initial scheduling scheme X. i,j is the time required for the i-th virtual machine created on physical machine j to execute the corresponding task, is the complexity of the task assigned to the i-th virtual machine, VM i,j (mips) is the task processing capability of the ith virtual machine on the jth physical machine, and X is the initial scheduling scheme; The fireworks processing module performs fireworks explosion operations according to the type of each of the initial scheduling plans to obtain a scheduling plan after the explosion, including: Determining the explosion quantity of each of the initial scheduling solutions; Determining the explosion range of each of the initial scheduling plans according to the type of each of the initial scheduling plans; According to the explosion quantity and explosion amplitude of each of the initial scheduling plans, an explosion operation and a mutation operation are performed on each of the initial scheduling plans to obtain a scheduling plan after the explosion.
7. A task scheduling device for a cloud platform, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 5 when executing a program stored in a memory.
8. A computer storage medium, characterized in that The computer storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Cloud computing task scheduling method
CN111679907A
A cloud platform resource constrained remote sensing big data rapid processing task scheduling method
CN109684088A
Multi-target task scheduling method and system
CN110489229A