Resource scheduling method and device, computer equipment, readable storage medium and program product
By introducing a resource scheduling model of simplex and fast non-dominant sorting genetic algorithm, the problem of low accuracy of traditional resource scheduling methods under diversified needs is solved, and more efficient and accurate resource scheduling is achieved.
Patent Information
- Application Number
- CN202411712991.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-03-11
AI Technical Summary
Traditional resource scheduling methods are not very accurate when dealing with diversified needs and cannot meet complex resource scheduling needs.
The resource scheduling model based on simplex method and fast non-dominant sorting genetic algorithm is adopted to obtain requirements by responding to resource scheduling instructions, perform multi-objective function optimization, and generate the optimal resource scheduling scheme.
It improves the accuracy and reliability of resource scheduling, ensures that the resource scheduling plan is more in line with actual needs, and enhances resource utilization efficiency.
Smart Images

Figure CN119597479A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of big data technology, and in particular to a resource scheduling method, apparatus, computer equipment, readable storage medium and program product. Background Art
[0002] With the rapid development of big data, resource scheduling has become increasingly important. For example, cloud resource scheduling in a cloud computing environment directly affects the efficiency of data processing.
[0003] In traditional technology, resources are usually scheduled for each task according to the time sequence of task generation or execution. However, the resource scheduling needs of different enterprises are often complex and changeable. This relatively fixed resource scheduling method cannot meet these diverse needs, resulting in low accuracy of current resource scheduling. Summary of the invention
[0004] Based on this, it is necessary to provide a resource scheduling method, apparatus, computer equipment, computer-readable storage medium and computer program product that can improve the accuracy of resource scheduling in response to the above technical problems.
[0005] In a first aspect, the present application provides a resource scheduling method, comprising: in response to a resource scheduling instruction for a target task queue, obtaining the resource scheduling requirement indicated by the resource scheduling instruction; based on the resource scheduling requirement, performing resource scheduling analysis on the target task queue through a resource scheduling model to obtain a resource scheduling plan for the target task queue; the resource scheduling model is a model trained based on a fast non-dominated sorting genetic algorithm that introduces a simplex method; according to the resource scheduling plan, performing resource scheduling on the target task queue to obtain a resource scheduling result for the target task queue.
[0006] In one of the embodiments, based on resource scheduling requirements, a resource scheduling analysis is performed on a target task queue through a resource scheduling model to obtain a resource scheduling plan for the target task queue, including: determining a resource scheduling indicator that matches the resource scheduling requirements, and a multi-objective function for each resource scheduling indicator; solving the multi-objective function based on the simplex method to obtain a feasible solution to the multi-objective function; adding the feasible solution to an initial population of the multi-objective function generated by a fast non-dominated sorting genetic algorithm to obtain a primary population; iteratively optimizing the primary population until an iteration termination condition is met to obtain an optimal solution to the multi-objective function; and using the optimal solution as the resource scheduling plan for the target task queue.
[0007] In one embodiment, the initial population is iteratively optimized until the iterative termination condition is met to obtain the optimal solution of the multi-objective function, including: based on the elite strategy, the initial population is iteratively optimized until the iterative termination condition is met to obtain the optimal population; based on the simplex method, the optimal population is solved to obtain the optimal solution of the multi-objective function.
[0008] In one embodiment, based on the simplex method, the optimal population is solved to obtain the optimal solution of the multi-objective function, including: based on the fitness value of each population individual in the optimal population, a preset number of target individuals are selected from each population individual as vertices of the simplex method; each vertex is optimized until the optimization stop condition is met to obtain the optimal solution of the multi-objective function.
[0009] In one of the embodiments, the method also includes: obtaining multiple tasks to be scheduled, performing correlation analysis on the multiple tasks to be scheduled, and obtaining the correlation relationship between the tasks to be scheduled; screening out target tasks with correlation relationships from the multiple tasks to be scheduled; respectively obtaining the execution order of each target task, arranging the target tasks in sequence according to the execution order, and obtaining a target task queue.
[0010] In one of the embodiments, the method also includes: establishing a multi-objective scheduling model based on the acquired sample tasks; solving the multi-objective scheduling model by introducing a fast non-dominated sorting genetic algorithm with a simplex method to obtain a solution error; when the solution error is lower than an error threshold, using the multi-objective scheduling model as a resource scheduling model.
[0011] In the second aspect, the present application also provides a resource scheduling device, including: a demand acquisition module, which is used to respond to the resource scheduling instruction for the target task queue and obtain the resource scheduling demand indicated by the resource scheduling instruction; a scheduling analysis module, which is used to perform resource scheduling analysis on the target task queue through a resource scheduling model based on the resource scheduling demand, and obtain a resource scheduling plan for the target task queue; the resource scheduling model is a model trained based on a fast non-dominated sorting genetic algorithm that introduces the simplex method; a resource scheduling module, which is used to perform resource scheduling on the target task queue according to the resource scheduling plan, and obtain a resource scheduling result for the target task queue.
[0012] In a third aspect, the present application also provides a computer device, including a memory and a processor, the memory storing a computer program, and the processor implementing the following steps when executing the computer program: in response to a resource scheduling instruction for a target task queue, obtaining the resource scheduling requirement indicated by the resource scheduling instruction; based on the resource scheduling requirement, performing resource scheduling analysis on the target task queue through a resource scheduling model to obtain a resource scheduling plan for the target task queue; the resource scheduling model is a model trained based on a fast non-dominated sorting genetic algorithm that introduces the simplex method; according to the resource scheduling plan, performing resource scheduling on the target task queue to obtain a resource scheduling result for the target task queue.
[0013] In a fourth aspect, the present application also provides a computer-readable storage medium having a computer program stored thereon, which implements the following steps when the computer program is executed by a processor: in response to a resource scheduling instruction for a target task queue, obtaining a resource scheduling requirement indicated by the resource scheduling instruction; based on the resource scheduling requirement, performing a resource scheduling analysis on the target task queue through a resource scheduling model to obtain a resource scheduling plan for the target task queue; the resource scheduling model is a model trained based on a fast non-dominated sorting genetic algorithm that introduces the simplex method; according to the resource scheduling plan, performing resource scheduling on the target task queue to obtain a resource scheduling result for the target task queue.
[0014] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the following steps when executed by a processor: in response to a resource scheduling instruction for a target task queue, obtain the resource scheduling requirements indicated by the resource scheduling instruction; based on the resource scheduling requirements, perform resource scheduling analysis on the target task queue through a resource scheduling model to obtain a resource scheduling plan for the target task queue; the resource scheduling model is a model trained based on a fast non-dominated sorting genetic algorithm that introduces the simplex method; according to the resource scheduling plan, perform resource scheduling on the target task queue to obtain a resource scheduling result for the target task queue.
[0015] The resource scheduling method, device, computer equipment, computer readable storage medium and computer program product described above, in response to a resource scheduling instruction for a target task queue, first obtain the resource scheduling requirements indicated by the resource scheduling instruction, and then perform resource scheduling analysis on the target task queue based on the resource scheduling requirements through a pre-trained resource scheduling model to obtain a resource scheduling scheme for the target task queue. Finally, according to the resource scheduling scheme, the target task queue is resource scheduled. On the one hand, the present application takes into account the resource scheduling requirements in the resource scheduling process, so that the generated resource scheduling scheme is more in line with the actual situation, and the reliability and accuracy of the resource scheduling scheme are effectively improved. On the other hand, resource scheduling is essentially a multi-objective optimization problem, so in the present application, a fast non-dominated sorting genetic algorithm based on the introduction of the simplex method is selected to train a resource scheduling model. The fast non-dominated sorting genetic algorithm is an evolutionary algorithm that can be used to find the optimal solution set in multiple objective functions, thereby solving multi-objective optimization problems and improving the accuracy of resource scheduling. In addition, the present application also introduces the simplex method to ensure that the feasibility of the solution is maintained in each iteration during the search for the optimal solution, thereby improving the population stability of the fast non-dominated sorting genetic algorithm, and then improving the accuracy of the resource scheduling result. Therefore, the present application can effectively improve the accuracy of resource scheduling. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions 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 related drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 An application environment diagram of a resource scheduling method in an embodiment;
[0018] Figure 2 A schematic diagram of a resource scheduling method in one embodiment;
[0019] Figure 3 A schematic diagram of a process for solving a resource scheduling model in one embodiment;
[0020] Figure 4 A schematic diagram of a process of iterative optimization of a population in one embodiment;
[0021] Figure 5 A schematic diagram of a process flow of solving a problem using the simplex method in one embodiment;
[0022] Figure 6 A schematic diagram of a process of task dependency analysis in one embodiment;
[0023] Figure 7 It is a module relationship diagram in a resource scheduling process in a specific embodiment;
[0024] Figure 8 It is a flowchart of a resource scheduling method in a specific embodiment;
[0025] Fig. 9 is a structural block diagram of a resource scheduling device in one embodiment;
[0026] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0028] The resource scheduling method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and Internet of Things devices. The server 104 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.
[0029] Specifically, the server 104 responds to the resource scheduling instruction for the target task queue initiated by the terminal 102, and first obtains the resource scheduling requirement indicated by the resource scheduling instruction. Based on the resource scheduling requirement, the resource scheduling analysis is performed on the target task queue through the resource scheduling model to obtain the resource scheduling scheme for the target task queue. Finally, according to the generated resource scheduling scheme, the resource scheduling is performed on the target task queue.
[0030] In an exemplary embodiment, Figure 2 As shown, a resource scheduling method is provided, which is applied to Figure 1 The server 104 in FIG. 1 is used as an example to illustrate, including:
[0031] Step S202: In response to a resource scheduling instruction for a target task queue, obtaining a resource scheduling requirement indicated by the resource scheduling instruction.
[0032] Among them, the target task queue is actually a task set, that is, the target task queue contains at least one target task that needs to be resource scheduled. The resource scheduling instruction may refer to an instruction for resource scheduling of the target task queue. Resource scheduling is a process of allocating resources to each target task in the target task queue. In a preferred example, the scheduled resources may refer to cloud resources such as cloud computing services. Resource scheduling requirements refer to the requirements for resource scheduling of the target task queue, which may include but are not limited to the user's quality requirements for resources and the resource provider's performance requirements for resources. In other words, in addition to taking into account the user's diverse needs for the scheduled resources, this embodiment also takes into account the performance requirements of the resource provider for the provided resources, thereby ensuring the comprehensiveness and accuracy of the resource scheduling requirements, thereby improving the reliability and accuracy of the entire resource scheduling.
[0033] For example, when the server receives a terminal request to schedule resources for a target task queue, it can first parse the resource scheduling instruction to obtain the user's quality requirements for the scheduled resources and the resource provider's performance requirements for the provided resources carried in the resource scheduling instruction, so as to perform subsequent resource scheduling analysis based on these resource scheduling requirements.
[0034] In one example, the server can also obtain a set of schedulable resources, which can be a set of virtual machines that can provide cloud computing services to users. It should be noted that in actual applications, the number of these virtual machines is limited and the configurations are different, and the configuration of the virtual machines will affect the resource quality requirements of the user to a certain extent. Therefore, the user's quality requirements for resources and the resource provider's performance requirements for resources are closely related. Resource scheduling based on the resource requirements of both parties can further improve the reliability and accuracy of resource scheduling.
[0035] Step S204, based on the resource scheduling requirements, a resource scheduling analysis is performed on the target task queue through a resource scheduling model to obtain a resource scheduling solution for the target task queue; the resource scheduling model is a model trained based on a fast non-dominated sorting genetic algorithm that introduces a simplex method.
[0036] It should be noted that the resource scheduling in this embodiment is a multi-objective optimization problem, and the optimization goal is how to consume less resources while meeting the resource scheduling needs of all parties. The fast non-dominated sorting genetic algorithm (NSGA-II) is a multi-objective optimization algorithm. The core idea of NSGA-II is to sort the population using the dominance relationship to find the optimal solution set for the multi-objective optimization problem. The algorithm can sort the solutions in the population according to the non-dominated relationship without any prior knowledge, so as to obtain the optimal solution set. Compared with the traditional genetic algorithm, NSGA-II has better convergence and higher solution efficiency. Considering that NSGA-II is easily affected by the initial population, the final solution result is not stable. Therefore, the simplex method is introduced in this embodiment. The simplex method is an algorithm for solving linear programming problems. The basic idea is to first find a vertex in the feasible domain of the linear programming problem, which is called a feasible solution, and then determine whether the solution is optimal according to certain rules. If it is not the optimal solution, it is converted to another vertex adjacent to it, and the objective function value is made better. This process is repeated until the optimal solution is found. In this embodiment, the simplex method is added to the solution process of the fast non-dominated sorting genetic algorithm to effectively improve the overall stability of the algorithm, thereby improving the reliability and accuracy of the resource scheduling solution.
[0037] Exemplarily, after obtaining the resource scheduling requirements, the server can input the resource scheduling requirements into a resource scheduling model pre-trained based on a fast non-dominated sorting genetic algorithm that introduces the simplex method, and perform resource scheduling analysis on the target task queue through the resource scheduling model, thereby obtaining the optimal resource scheduling solution for the target task queue. The resource scheduling solution may include resource analysis information for each target task in the target task queue, such as resource number, resource quantity, resource configuration, etc.
[0038] Step S206: perform resource scheduling on the target task queue according to the resource scheduling solution to obtain a resource scheduling result of the target task queue.
[0039] The resource scheduling results can be used to characterize the implementation effect of the resource scheduling solution, including but not limited to task execution time, total resources consumed, delay rate, cost, etc.
[0040] Exemplarily, after the server obtains the resource scheduling plan output by the resource scheduling model, it can allocate corresponding resources to each target task in the target task queue according to the resource scheduling plan, and record the resource scheduling results during the execution of each target task, which is conducive to the subsequent optimization of the resource scheduling model.
[0041] In this embodiment, in response to the resource scheduling instruction for the target task queue, the resource scheduling requirement indicated by the resource scheduling instruction is first obtained, and then based on the resource scheduling requirement, the target task queue is subjected to resource scheduling analysis through a pre-trained resource scheduling model to obtain a resource scheduling scheme for the target task queue. Finally, according to the resource scheduling scheme, the target task queue is subjected to resource scheduling. On the one hand, this embodiment takes into account the resource scheduling requirement in the resource scheduling process, so that the generated resource scheduling scheme is more in line with the actual situation, and the reliability and accuracy of the resource scheduling scheme are effectively improved. On the other hand, resource scheduling is essentially a multi-objective optimization problem, so in this embodiment, a fast non-dominated sorting genetic algorithm based on the introduction of the simplex method is selected to train a resource scheduling model. The fast non-dominated sorting genetic algorithm is an evolutionary algorithm that can be used to find the optimal solution set in multiple objective functions, thereby solving multi-objective optimization problems and improving the accuracy of resource scheduling. In addition, this embodiment also introduces the simplex method to ensure that the feasibility of the solution is maintained in each iteration during the search for the optimal solution, thereby improving the population stability of the fast non-dominated sorting genetic algorithm, and then improving the accuracy of the resource scheduling result. Therefore, this embodiment can effectively improve the accuracy of resource scheduling.
[0042] In an exemplary embodiment, Figure 3 As shown, based on the resource scheduling requirements, the resource scheduling model is used to perform resource scheduling analysis on the target task queue, and a resource scheduling solution for the target task queue is obtained, including:
[0043] Step S302: Determine resource scheduling indicators that match resource scheduling requirements and multi-objective functions for each resource scheduling indicator.
[0044] The resource scheduling index can be understood as an index corresponding to the resource scheduling demand. A multi-objective function usually includes two or more objective functions. In this embodiment, each resource scheduling index can have a corresponding objective function, which together constitute this multi-objective function. It is necessary to find the optimal solution to meet the requirements of these objectives.
[0045] In one example, in response to the user's quality requirements for resources, the corresponding resource scheduling indicators may include but are not limited to the total task execution time, delay rate, resource scheduling cost, etc. The total task execution time refers to the response time after all target tasks are completed. This indicator can directly reflect the response speed of resources or cloud computing services. The delay rate refers to the total delay ratio of all target tasks during the execution process. This indicator is related to user experience and service quality. Its calculation formula can be: R = (T 实际 / T 期望 )*100%, R represents the total delay ratio, T 实际 Indicates the actual total delay time, T期望 Represents the expected total delay time. The resource scheduling cost can be determined by the resource price per unit time, such as the rental price, and the total task execution time.
[0046] In one example, for the resource provider's performance requirements for resources, the corresponding resource scheduling indicators may include but are not limited to service reliability, resource utilization, etc. Service reliability is a benefit indicator that indicates the ability to complete task execution within a certain time frame. Its calculation formula can be: Q=N 正确 / N 总 , Q represents service reliability, N 正确 Represents the number of tasks executed correctly, N 总 Indicates the total number of executed tasks. Resource utilization is used to indicate whether resources are fully utilized.
[0047] It should be noted that the resource scheduling index is not limited to the above-mentioned index. In practical applications, appropriate resource scheduling indexes can be defined according to actual needs, and this embodiment does not impose any limitation on this.
[0048] For example, after obtaining resource scheduling requirements, the server can create resource scheduling indicators that match these resource scheduling requirements. Each resource scheduling indicator can have a corresponding objective function, and each objective function together constitutes a multi-objective function. Solving the multi-objective function is actually to find the optimal solution by analyzing the relationship between the objective functions and obtain a practical solution under the constraints of resource consumption.
[0049] Step S304, solving the multi-objective function based on the simplex method to obtain a feasible solution of the multi-objective function.
[0050] Among them, a feasible solution is a solution obtained by solving the multi-objective function using the simplex method.
[0051] Exemplarily, before solving, the target to be optimized corresponding to each objective function can be genetically encoded by the NSGA-II algorithm. Genetic encoding is to convert the target to be optimized into a binary string or other forms of encoding, thereby obtaining a set of gene sequences for operation in the algorithm. Then, the initial population composed of these gene sequences is randomly generated by the NSGA-II algorithm. Then, the simplex method is used for solving. The simplex method can convert the multi-objective function into multiple single-objective optimization problems and solve them. When solving a single-objective optimization problem, other single-objective optimization problems are used as constraints to obtain multiple stable feasible solutions.
[0052] Step S306, adding the feasible solution to the initial population of the multi-objective function generated by the fast non-dominated sorting genetic algorithm to obtain the initial population.
[0053] The initial population is the starting point of the algorithm. A group of initial individuals are generated by random methods or other methods. These individuals represent potential solutions to the optimization problem. The initial population provides a diverse starting point for the algorithm, ensuring that the algorithm can start searching from multiple different solutions and generate a new generation of populations through operations such as crossover and mutation in the subsequent iteration process, gradually approaching the optimal solution.
[0054] For example, after the simplex method calculates multiple feasible solutions, these feasible solutions can also be converted into gene sequence form and automatically added to the initial population generated by the NSGA-II algorithm to obtain a primary population. This can not only increase the diversity of the primary population, but also effectively improve the overall stability of the primary population, providing the algorithm with a wider solution exploration space.
[0055] In one example, in subsequent iterations, feasible solutions generated by the simplex method can be added to the population of each generation to guide the evolutionary direction of the entire population.
[0056] Step S308, iteratively optimize the initial population until the iteration termination condition is met to obtain the optimal solution of the multi-objective function.
[0057] Among them, iterative optimization can be understood as the process of performing operations such as selection, crossover and mutation on the initial population, continuously optimizing the new population until an optimal population is obtained. The iterative termination condition is a predefined condition for stopping the iterative optimization of the population. For example, it can be to set a maximum iteration value, or to set a parent-child population objective function threshold value. If either of the two conditions is met, the iterative termination condition is considered to be met. The parent-child population objective function threshold value can be understood as the limit value of the objective function difference between the parent population and the child population. If it does not exceed this value, it can be considered that the iterative termination condition is met. Its expression can be: ,in, represents the objective function value of the offspring population, represents the objective function value of the parent population, Represents the threshold value of the parent-child population objective function. Of course, in practical applications, other iteration termination conditions can be set according to actual conditions. The optimal solution refers to the Pareto optimal solution set of the multi-objective function, which can be understood as the optimal resource scheduling for each resource scheduling indicator.
[0058] For example, after obtaining the initial population, the algorithm will continuously optimize the population by performing operations such as selection, crossover and mutation on the initial population until the maximum iteration value is reached, or the threshold value of the parent-child population objective function is met, then the population iteration is stopped to obtain an optimal population, that is, the optimal solution.
[0059] Step S310: Using the optimal solution as the resource scheduling solution for the target task queue.
[0060] Exemplarily, after the resource scheduling model outputs the Pareto optimal solution set of the multi-objective function, the server can use the Pareto optimal solution set as the resource scheduling solution for the target task queue and perform resource scheduling accordingly.
[0061] In this embodiment, the feasible solution obtained by the simplex method is added to the initial population generated by the NSGA-II algorithm to form a primary population, and then the population is iteratively optimized. This not only increases the diversity of the primary population, but also effectively improves the overall stability of the primary population, provides a wider solution exploration space for the algorithm, and further improves the reliability of the resource scheduling model.
[0062] In an exemplary embodiment, Figure 4 As shown, the initial population is iteratively optimized until the iteration termination condition is met, and the optimal solution of the multi-objective function is obtained, including:
[0063] Step S402, based on the elite strategy, iteratively optimize the initial population until the iteration termination condition is met to obtain the optimal population.
[0064] Among them, the elite strategy is a strategy that aims to retain the best individuals in the population to improve the algorithm's search efficiency. In each generation of the population, in addition to selection, crossover, and mutation operations, the elite strategy will directly copy the best individual in the current population to the next generation of the population. In this way, the next generation of the population contains at least one individual that is the same as the best individual in the current population, thereby ensuring the algorithm's search efficiency. The optimal population refers to a population generated after selection, crossover, and mutation operations.
[0065] For example, the NSGA-II algorithm will perform selection, crossover and mutation operations on the initial population based on the elite strategy until the iteration termination condition is met to obtain the optimal population. It should be noted that the selection operation is to select excellent individuals in the population according to the fitness function. The crossover operation is to perform genetic recombination on the selected individuals to generate new individuals. The mutation operation is to perform random mutations on the generated individuals to increase the diversity of the population. Finally, the elite retention is to copy the best individuals in the current population directly to the next generation population. Finally, an optimal population can be obtained.
[0066] In one example, an evolutionary adaptive factor can also be introduced in the solution process. The essence of the evolutionary adaptive factor is to give a larger mutation and crossover probability in the early stage of the algorithm, so as to improve the ability of the population to globally optimize in the entire solution space. As the number of iterations increases, the proportion of Pareto optimal solutions in the entire population also increases. At this time, the probability of crossover mutation is dynamically adjusted through the adaptive factor, so as to avoid oscillation or non-convergence in the late stage of population iteration and improve the local convergence ability of the algorithm.
[0067] In one example, the expression of the evolutionary adaptive factor can be: G i =i / N, where G i represents the evolutionary adaptive factor, i represents the current iteration number, and N represents the maximum iteration number.
[0068] The adaptive crossover probability of the i-th generation is:
[0069]
[0070] No. The adaptive mutation probability of each generation is:
[0071]
[0072] Among them, the initial crossover probability can be , the initial mutation probability can be .
[0073] Step S404, based on the simplex method, solving the optimal population, and obtaining the optimal solution of the multi-objective function.
[0074] For example, when the NSGA-Ⅱ algorithm converges to the vicinity of the optimal population, it is easy to have a slow local convergence speed. At this time, the optimal population solution efficiency is low, which will directly affect the overall efficiency of the algorithm. As one of the simplest and most effective algorithms for solving linear programming problems, the simplex method has the advantages of low algorithm complexity, fast solution speed, and high result accuracy. Therefore, in this embodiment, the simplex method is used to solve the optimal population output by the NSGA-Ⅱ algorithm, thereby obtaining the Pareto optimal solution set, which improves the computational efficiency of the entire resource scheduling model, thereby improving the efficiency of resource scheduling.
[0075] In this embodiment, the population is continuously optimized through the elite strategy, and the simplex method is used for solving, which effectively improves the efficiency of resource scheduling.
[0076] In an exemplary embodiment, Figure 5 As shown, based on the simplex method, the optimal population is solved and the optimal solution of the multi-objective function is obtained, including:
[0077] Step S502, based on the fitness value of each individual in the optimal population, a preset number of target individuals are selected from the individuals in each population as vertices of the simplex method.
[0078] Among them, the population individuals are the individuals in the optimal population, which can be understood as the solution of the objective function. The fitness value is the degree of adaptation of an individual in a certain environment, which can be used to determine the survival probability and reproduction probability of an individual in the evolutionary process. The higher the fitness value of an individual, the higher the probability of its survival and reproduction. The fitness value is an indicator for evaluating the quality of an individual. By comparing the fitness values, better individuals can be selected for further evolution. The fitness value can be calculated by the fitness function, also known as the evaluation function, and the fitness function can be the objective function value directly. The preset number is the number of vertices set in advance, and the target individual can be the population individual whose fitness value is ranked in the front preset number in the optimal population. In the simplex method, vertices refer to points on the boundary of the feasible domain, which correspond to basic feasible solutions.
[0079] Exemplarily, the process of solving the problem by the simplex method is to first select the individuals in the optimal population whose fitness values are ranked in the front of a preset number as the vertices of the simplex method. From a geometric point of view, the simplex method is a process of iterating from one vertex of the feasible domain to another vertex. The feasible domain is a multi-faceted convex set. If the optimal solution exists, it can be found in the vertex of the feasible region. Therefore, the basic idea of the simplex method is to first find a vertex of the feasible domain, and then gradually improve this solution through an iterative process until the optimal solution is found.
[0080] Step S504, performing vertex optimization on each vertex until the optimization stop condition is met, and obtaining the optimal solution of the multi-objective function.
[0081] The optimization stop condition refers to the condition for stopping the vertex optimization. In this embodiment, the root mean square error is selected as the optimization stop condition.
[0082] In one example, the calculation formula of the root mean square error can be:
[0083]
[0084] Among them, m represents the preset number, i represents the i-th vertex, represents the fitness value of the i-th vertex, Represents the fitness value of the reflection point, Represents the root mean square error threshold.
[0085] Exemplarily, the target individual with the highest fitness is taken as the optimal vertex, the target individual with the second highest fitness is taken as the suboptimal vertex, and the target individual with the lowest fitness is taken as the worst vertex. The coordinates of all vertices are averaged to calculate an average position point as the overall centroid. And the point with the smallest difference from the centroid is taken as the reflection point. Evaluate the fitness value of the reflection point. If the fitness value of the reflection point is better than the worst vertex, it means that the reflection direction is in the direction of the optimal solution. Then you can try to move further in the reflection direction to generate an extension point. Similarly, evaluate the fitness value of the extension point. If the extension point is better, replace the worst vertex with the extension point. Otherwise, keep the reflection point as the new worst vertex. If the fitness value of the reflection point is not better than the worst vertex, you need to reselect the reflection point. In addition, there may be a situation where the fitness value of the reflection point is better than the worst vertex, but not ideal, then a contraction operation can be performed. That is, find a new position between the reflection point and the centroid called a contraction point. Evaluate the fitness value of the contraction point, and decide whether to replace the worst vertex based on the result. Evaluate whether the optimal solution of the current simplex satisfies the optimization termination condition. If so, terminate the iteration and output the optimal solution. If not, proceed to the next round of iteration.
[0086] In one example, the parameters of the expansion operation and the contraction operation can both be empirical values, for example, the expansion parameter can be 2, and the contraction parameter can be 0.5.
[0087] In this embodiment, the simplex method is used to solve the problem, which not only improves the solving speed, but also improves the accuracy of the solving result, thereby improving the efficiency and accuracy of resource scheduling.
[0088] In an exemplary embodiment, Figure 6 As shown, the resource scheduling method also includes:
[0089] Step S602: Acquire multiple tasks to be scheduled, perform correlation analysis on the multiple tasks to be scheduled, and obtain correlation relationships between the tasks to be scheduled.
[0090] Among them, the tasks to be scheduled refer to the tasks that need resource scheduling. Association analysis can be understood as the process of analyzing the association relationship between the tasks to be scheduled, and the association relationship can be understood as the dependency relationship. This is because in practical applications, there are strict dependencies and execution orders between tasks. If resource scheduling is performed directly according to the results of algorithm calculation, it may disrupt the original task logic. Therefore, in this embodiment, the dependency relationship and execution order between tasks will be analyzed, and the optimal resource scheduling solution will be obtained under the premise of ensuring the established task logic, so as to further improve the comprehensiveness, reliability and accuracy of the entire resource scheduling.
[0091] Exemplarily, the server may further perform dependency analysis on multiple tasks to be scheduled, thereby obtaining the dependency relationships between the tasks to be scheduled.
[0092] Step S604: Filter out target tasks with associated relationships from multiple tasks to be scheduled.
[0093] Among them, each target task refers to each task to be scheduled that has a dependency relationship.
[0094] Exemplarily, the server can screen out target tasks that have dependencies with each other through association analysis.
[0095] Step S606, respectively obtain the execution order of each target task, arrange the target tasks in sequence according to the execution order, and obtain a target task queue.
[0096] Among them, the execution order refers to the order in which the target tasks are executed. Since there is a certain dependency relationship between the target tasks, that is to say, the execution of a certain target task may require the execution of other target tasks to be triggered, or the execution of this target task may trigger the execution of other target tasks. In short, there will be a certain execution order between these target tasks.
[0097] Exemplarily, after acquiring each target task, the server may acquire the execution order of each target task, and arrange each target task in sequence according to the execution order, thereby obtaining a target task queue for subsequent resource scheduling.
[0098] It is understandable that there may be multiple target task queues, and a schedulable resource such as a virtual machine may be independently responsible for at least one target task queue.
[0099] In this embodiment, by analyzing the dependency relationship and execution order between tasks, the optimal resource scheduling solution is obtained while ensuring the established task logic, thereby further improving the comprehensiveness, reliability and accuracy of the entire resource scheduling.
[0100] In an exemplary embodiment, the training process of the resource scheduling model also includes: establishing a multi-objective scheduling model based on the acquired sample tasks; solving the multi-objective scheduling model by introducing a fast non-dominated sorting genetic algorithm with a simplex method to obtain a solution error; when the solution error is lower than an error threshold, using the multi-objective scheduling model as a resource scheduling model.
[0101] The sample task may refer to a task used to train a resource scheduling model. The multi-objective scheduling model may be an initial multi-objective function model, which includes a multi-objective function to be solved. The solution error refers to the error of the solution result of the multi-objective scheduling model. The error threshold is a threshold set for the solution error. If it is lower than the threshold, it means that the calculation result of the multi-objective function model is accurate enough and training can be stopped. If it is not lower than the threshold, optimization needs to be continued.
[0102] Exemplarily, after performing resource scheduling, the server can pre-build a resource scheduling model. That is, a multi-objective function model is constructed using sample tasks. The multi-objective function model is solved using a fast non-dominated sorting genetic algorithm that introduces the simplex method. The specific solution process can refer to the above content and will not be repeated here. When the solution error of the multi-objective function model is lower than the error threshold, the resource scheduling model is output.
[0103] In this embodiment, a fast non-dominated sorting genetic algorithm with the simplex method is introduced to solve the multi-objective scheduling model and continuously optimize the model, thereby obtaining a more accurate resource scheduling model, thereby improving the accuracy of the resource scheduling model and thus improving the accuracy of resource scheduling.
[0104] In a specific embodiment, Figure 7 As shown, the server is a cloud server and the scheduling resource is a cloud resource. The resource scheduling method may include the following modules: a construction module for constructing a multi-objective function; a dependency acquisition module for analyzing the dependency relationship and execution order between the tasks to be scheduled; an indicator analysis module for analyzing the resource scheduling indicators that match the resource scheduling requirements; a gene encoding module for genetically encoding each objective function to form a gene sequence; a calculation module for solving the multi-objective function to obtain a Pareto optimal solution set; an evaluation module for evaluating the fitness of the Pareto optimal solution set to determine whether it is a Pareto optimal solution set. The resource scheduling module is used to schedule cloud resources for the target task queue.
[0105] like Figure 8 As shown, the specific process of the resource scheduling method includes:
[0106] S1: The cloud server performs dependency analysis on multiple tasks to be scheduled, and selects target tasks with dependencies. According to the execution order of each target task, the target tasks are arranged in sequence to obtain a target task queue.
[0107] S2: The cloud server responds to the cloud resource scheduling instruction for the target task queue and obtains the cloud resource scheduling requirements indicated by the cloud resource scheduling instruction, namely, the user's quality requirements for cloud resources and the resource provider's performance requirements for cloud resources.
[0108] S3: Determine cloud resource scheduling indicators that match cloud resource scheduling requirements, and multi-objective functions for each cloud resource scheduling indicator.
[0109] S4: Generate the initial population of multi-objective functions through the NSGA-II algorithm.
[0110] S5: Obtain feasible solutions to multi-objective functions using the simplex method.
[0111] S6: Add the feasible solution to the initial population to obtain the initial population.
[0112] S7: Based on the elite strategy, the initial population is selected, adaptively crossover and mutated to continue generating new populations. And the feasible solutions will be synchronously retained in each generation of populations.
[0113] S8: Determine whether the iteration termination condition is met. If not, return to step S7.
[0114] S9: If satisfied, the solution is obtained by the simplex method, and based on the fitness value of each individual in the optimal population, a preset number of target individuals are selected from each population as vertices of the simplex method. Each vertex is expanded or contracted.
[0115] S10: Determine whether the vertex optimization stop condition is met. If not, return to step S9.
[0116] S11, if satisfied, output the Pareto optimal solution set of the multi-objective function, and use the Pareto optimal solution set as the cloud resource scheduling solution for the target task queue.
[0117] S12, performing cloud resource scheduling on the target task queue according to the cloud resource scheduling scheme to obtain a cloud resource scheduling result of the target task queue.
[0118] In this embodiment, in response to the cloud resource scheduling instruction for the target task queue, the cloud resource scheduling requirements indicated by the resource scheduling instruction are first obtained, and then based on the cloud resource scheduling requirements, the cloud resource scheduling analysis is performed on the target task queue through the pre-trained cloud resource scheduling model to obtain the cloud resource scheduling scheme for the target task queue. Finally, according to the cloud resource scheduling scheme, the cloud resource scheduling is performed on the target task queue. On the one hand, this embodiment takes into account the cloud resource scheduling requirements in the cloud resource scheduling process, so that the generated cloud resource scheduling scheme is more in line with the actual situation, and the reliability and accuracy of the cloud resource scheduling scheme are effectively improved. On the other hand, cloud resource scheduling is essentially a multi-objective optimization problem, so in this embodiment, a fast non-dominated sorting genetic algorithm based on the introduction of the simplex method is selected to train a cloud resource scheduling model. The fast non-dominated sorting genetic algorithm is an evolutionary algorithm that can be used to find the optimal solution set in multiple objective functions, thereby solving multi-objective optimization problems and improving the accuracy of cloud resource scheduling. In addition, this embodiment also introduces the simplex method to ensure that the feasibility of the solution is maintained in each iteration during the search for the optimal solution, thereby improving the population stability of the fast non-dominated sorting genetic algorithm, and then improving the accuracy of the cloud resource scheduling results. Therefore, this embodiment can effectively improve the accuracy of cloud resource scheduling.
[0119] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0120] Based on the same inventive concept, the embodiment of the present application also provides a resource scheduling device for implementing the resource scheduling method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more resource scheduling device embodiments provided below can refer to the limitations of the resource scheduling method above, and will not be repeated here.
[0121] In an exemplary embodiment, Fig. 9As shown, a resource scheduling device is provided, including: a demand acquisition module 902, used to respond to a resource scheduling instruction for a target task queue and obtain the resource scheduling demand indicated by the resource scheduling instruction; a scheduling analysis module 904, used to perform resource scheduling analysis on the target task queue through a resource scheduling model based on the resource scheduling demand, and obtain a resource scheduling plan for the target task queue; the resource scheduling model is a model trained based on a fast non-dominated sorting genetic algorithm that introduces the simplex method; a resource scheduling module 906, used to perform resource scheduling on the target task queue according to the resource scheduling plan, and obtain a resource scheduling result for the target task queue.
[0122] In one of the embodiments, the scheduling analysis module 904 is also used to: determine resource scheduling indicators that match the resource scheduling requirements, and multi-objective functions for each resource scheduling indicator; solve the multi-objective function based on the simplex method to obtain a feasible solution to the multi-objective function; add the feasible solution to the initial population of the multi-objective function generated by the fast non-dominated sorting genetic algorithm to obtain a first-generation population; iteratively optimize the first-generation population until the iteration termination condition is met to obtain the optimal solution of the multi-objective function; and use the optimal solution as the resource scheduling solution for the target task queue.
[0123] In one embodiment, the scheduling analysis module 904 is also used to: iteratively optimize the initial population based on the elite strategy until the iteration termination condition is met to obtain the optimal population; solve the optimal population based on the simplex method to obtain the optimal solution of the multi-objective function.
[0124] In one embodiment, the scheduling analysis module 904 is also used to: based on the fitness value of each population individual in the optimal population, select a preset number of target individuals from each population individual as vertices of the simplex method; perform vertex optimization on each vertex until the optimization stop condition is met to obtain the optimal solution of the multi-objective function.
[0125] In one of the embodiments, the device is also used to: obtain multiple tasks to be scheduled, perform correlation analysis on the multiple tasks to be scheduled, and obtain the correlation relationship between the tasks to be scheduled; screen out the target tasks with correlation relationship from the multiple tasks to be scheduled; obtain the execution order of each target task respectively, arrange the target tasks in sequence according to the execution order, and obtain a target task queue.
[0126] In one of the embodiments, the device is also used to: establish a multi-objective scheduling model based on the acquired sample tasks; solve the multi-objective scheduling model by introducing a fast non-dominated sorting genetic algorithm with a simplex method to obtain a solution error; when the solution error is lower than an error threshold, use the multi-objective scheduling model as a resource scheduling model.
[0127] Each module in the resource scheduling device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0128] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig.10 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store resource scheduling data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a resource scheduling method is implemented.
[0129] Those skilled in the art will understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0130] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: in response to a resource scheduling instruction for a target task queue, obtaining a resource scheduling requirement indicated by the resource scheduling instruction; based on the resource scheduling requirement, performing resource scheduling analysis on the target task queue through a resource scheduling model to obtain a resource scheduling plan for the target task queue; the resource scheduling model is a model trained based on a fast non-dominated sorting genetic algorithm that introduces a simplex method; and performing resource scheduling on the target task queue according to the resource scheduling plan to obtain a resource scheduling result for the target task queue.
[0131] In one embodiment, when the processor executes the computer program, the following steps are also implemented: determining resource scheduling indicators that match the resource scheduling requirements, and multi-objective functions for each resource scheduling indicator; solving the multi-objective function based on the simplex method to obtain a feasible solution to the multi-objective function; adding the feasible solution to the initial population of the multi-objective function generated by the fast non-dominated sorting genetic algorithm to obtain a primary population; iteratively optimizing the primary population until the iteration termination condition is met to obtain the optimal solution of the multi-objective function; and using the optimal solution as the resource scheduling solution for the target task queue.
[0132] In one embodiment, when the processor executes the computer program, the following steps are also implemented: based on the elite strategy, the initial population is iteratively optimized until the iteration termination condition is met to obtain the optimal population; based on the simplex method, the optimal population is solved to obtain the optimal solution of the multi-objective function.
[0133] In one embodiment, when the processor executes the computer program, the following steps are also implemented: based on the fitness value of each population individual in the optimal population, a preset number of target individuals are selected from each population individual as vertices of the simplex method; each vertex is optimized until the optimization stop condition is met to obtain the optimal solution of the multi-objective function.
[0134] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining multiple tasks to be scheduled, performing correlation analysis on the multiple tasks to be scheduled, and obtaining the correlation relationship between the tasks to be scheduled; from the multiple tasks to be scheduled, screening out the target tasks with the correlation relationship; respectively obtaining the execution order of each target task, arranging the target tasks in sequence according to the execution order, and obtaining the target task queue.
[0135] In one embodiment, the processor further implements the following steps when executing the computer program: establishing a multi-objective scheduling model based on the acquired sample tasks; solving the multi-objective scheduling model by introducing a fast non-dominated sorting genetic algorithm with a simplex method to obtain a solution error; when the solution error is lower than an error threshold, using the multi-objective scheduling model as a resource scheduling model.
[0136] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: in response to a resource scheduling instruction for a target task queue, a resource scheduling requirement indicated by the resource scheduling instruction is obtained; based on the resource scheduling requirement, a resource scheduling analysis is performed on the target task queue through a resource scheduling model to obtain a resource scheduling plan for the target task queue; the resource scheduling model is a model trained based on a fast non-dominated sorting genetic algorithm that introduces a simplex method; according to the resource scheduling plan, resources are scheduled on the target task queue to obtain a resource scheduling result for the target task queue.
[0137] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: determining resource scheduling indicators that match the resource scheduling requirements, and multi-objective functions for each resource scheduling indicator; solving the multi-objective function based on the simplex method to obtain a feasible solution to the multi-objective function; adding the feasible solution to the initial population of the multi-objective function generated by the fast non-dominated sorting genetic algorithm to obtain a primary population; iteratively optimizing the primary population until the iteration termination condition is met to obtain the optimal solution of the multi-objective function; and using the optimal solution as the resource scheduling solution for the target task queue.
[0138] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: based on the elite strategy, the initial population is iteratively optimized until the iteration termination condition is met to obtain the optimal population; based on the simplex method, the optimal population is solved to obtain the optimal solution of the multi-objective function.
[0139] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: based on the fitness value of each population individual in the optimal population, a preset number of target individuals are selected from each population individual as vertices of the simplex method; each vertex is optimized until the optimization stop condition is met to obtain the optimal solution of the multi-objective function.
[0140] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining multiple tasks to be scheduled, performing correlation analysis on the multiple tasks to be scheduled, and obtaining the correlation relationship between the tasks to be scheduled; from the multiple tasks to be scheduled, screening out the target tasks with the correlation relationship; respectively obtaining the execution order of each target task, arranging the target tasks in sequence according to the execution order, and obtaining the target task queue.
[0141] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: based on the acquired sample tasks, a multi-objective scheduling model is established; by introducing a fast non-dominated sorting genetic algorithm with the simplex method, the multi-objective scheduling model is solved to obtain a solution error; when the solution error is lower than an error threshold, the multi-objective scheduling model is used as a resource scheduling model.
[0142] In one embodiment, a computer program product is provided, including a computer program, which implements the following steps when executed by a processor: in response to a resource scheduling instruction for a target task queue, obtaining a resource scheduling requirement indicated by the resource scheduling instruction; based on the resource scheduling requirement, performing a resource scheduling analysis on the target task queue through a resource scheduling model to obtain a resource scheduling solution for the target task queue; the resource scheduling model is a model trained based on a fast non-dominated sorting genetic algorithm that introduces a simplex method; and performing resource scheduling on the target task queue according to the resource scheduling solution to obtain a resource scheduling result for the target task queue.
[0143] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: determining resource scheduling indicators that match the resource scheduling requirements, and multi-objective functions for each resource scheduling indicator; solving the multi-objective function based on the simplex method to obtain a feasible solution to the multi-objective function; adding the feasible solution to the initial population of the multi-objective function generated by the fast non-dominated sorting genetic algorithm to obtain a primary population; iteratively optimizing the primary population until the iteration termination condition is met to obtain the optimal solution of the multi-objective function; and using the optimal solution as the resource scheduling solution for the target task queue.
[0144] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: based on the elite strategy, the initial population is iteratively optimized until the iteration termination condition is met to obtain the optimal population; based on the simplex method, the optimal population is solved to obtain the optimal solution of the multi-objective function.
[0145] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: based on the fitness value of each population individual in the optimal population, a preset number of target individuals are selected from each population individual as vertices of the simplex method; each vertex is optimized until the optimization stop condition is met to obtain the optimal solution of the multi-objective function.
[0146] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining multiple tasks to be scheduled, performing correlation analysis on the multiple tasks to be scheduled, and obtaining the correlation relationship between the tasks to be scheduled; from the multiple tasks to be scheduled, screening out the target tasks with the correlation relationship; respectively obtaining the execution order of each target task, arranging the target tasks in sequence according to the execution order, and obtaining the target task queue.
[0147] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: based on the acquired sample tasks, a multi-objective scheduling model is established; by introducing a fast non-dominated sorting genetic algorithm with the simplex method, the multi-objective scheduling model is solved to obtain a solution error; when the solution error is lower than an error threshold, the multi-objective scheduling model is used as a resource scheduling model.
[0148] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0149] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0150] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0151] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A resource scheduling method, characterized in that: The method comprises: In response to a resource scheduling instruction for a target task queue, obtaining a resource scheduling requirement indicated by the resource scheduling instruction; Based on the resource scheduling requirements, a resource scheduling analysis is performed on the target task queue through a resource scheduling model to obtain a resource scheduling solution for the target task queue; the resource scheduling model is a model trained based on a fast non-dominated sorting genetic algorithm that introduces a simplex method; According to the resource scheduling scheme, resources are scheduled for the target task queue to obtain a resource scheduling result for the target task queue.
2. The method according to claim 1, characterized in that The step of performing resource scheduling analysis on the target task queue based on the resource scheduling requirement through a resource scheduling model to obtain a resource scheduling solution for the target task queue includes: Determine resource scheduling indicators that match the resource scheduling requirements, and a multi-objective function for each of the resource scheduling indicators; Solving the multi-objective function based on the simplex method to obtain a feasible solution to the multi-objective function; Adding the feasible solution to the initial population of the multi-objective function generated by the fast non-dominated sorting genetic algorithm to obtain an initial population; Iteratively optimizing the initial population until an iteration termination condition is met to obtain an optimal solution to the multi-objective function; The optimal solution is used as the resource scheduling solution for the target task queue.
3. The method according to claim 2, characterized in that The iterative optimization of the initial population until an iteration termination condition is satisfied to obtain an optimal solution of the multi-objective function includes: Based on the elite strategy, the initial population is iteratively optimized until the iteration termination condition is met to obtain the optimal population; Based on the simplex method, the optimal population is solved to obtain the optimal solution of the multi-objective function.
4. The method according to claim 3, characterized in that The method of solving the optimal population based on the simplex method to obtain the optimal solution of the multi-objective function includes: Based on the fitness value of each individual in the optimal population, a preset number of target individuals are selected from each individual in the population as vertices of the simplex method; Vertex optimization is performed on each of the vertices until an optimization stop condition is met, thereby obtaining an optimal solution to the multi-objective function.
5. The method according to claim 1, characterized in that The method further comprises: Acquire multiple tasks to be scheduled, perform correlation analysis on the multiple tasks to be scheduled, and obtain correlation relationships between the tasks to be scheduled; Filtering out target tasks with associated relationships from the multiple tasks to be scheduled; The execution order of each target task is obtained respectively, and the target tasks are arranged in sequence according to the execution order to obtain a target task queue.
6. The method according to claim 1, characterized in that The method further comprises: Based on the acquired sample tasks, a multi-objective scheduling model is established; The multi-objective scheduling model is solved by introducing a fast non-dominated sorting genetic algorithm of the simplex method to obtain a solution error; When the solution error is lower than an error threshold, the multi-objective scheduling model is used as the resource scheduling model.
7. A resource scheduling device, characterized in that: The device comprises: A demand acquisition module, configured to respond to a resource scheduling instruction for a target task queue and acquire a resource scheduling demand indicated by the resource scheduling instruction; A scheduling analysis module, configured to perform resource scheduling analysis on the target task queue based on the resource scheduling requirements through a resource scheduling model to obtain a resource scheduling solution for the target task queue; the resource scheduling model is a model obtained by training a fast non-dominated sorting genetic algorithm that introduces a simplex method; The resource scheduling module is used to perform resource scheduling on the target task queue according to the resource scheduling scheme to obtain the resource scheduling result of the target task queue.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.