Computing power analysis method, computing power analysis device, and storage medium
By combining simulated annealing algorithm and genetic algorithm, the computing power resource pool information is analyzed and the target scheduling scheme is generated, which solves the problem of poor accuracy of the computing power scheduling scheme and achieves more accurate computing power requirements.
Patent Information
- Application Number
- CN202510704977.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-29
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2045-05-29
AI Technical Summary
In the prior art, the accuracy of the computing power scheduling scheme is poor and cannot meet the computing power needs of users, mainly due to the limitations of a single fixed algorithm optimization method.
Using a combination of simulated annealing algorithm and genetic algorithm, the computing power resource pool information is analyzed through the first optimization target, multiple candidate scheduling schemes are generated, and the process control parameters of the genetic algorithm are constructed based on the second optimization target, and the target scheduling scheme is optimized.
It improves the accuracy of computing power scheduling, can more accurately meet users' computing power needs, and takes into account the comprehensive capabilities of multiple optimization goals.
Smart Images

Figure CN120234121B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a computing power analysis method, a computing power analysis device, and a storage medium. Background Art
[0002] In the process of leasing computing power, it is generally necessary to first build a computing power resource cluster, and then select a computing power resource scheduling plan that meets the computing task requirements according to a certain algorithm to schedule computing power.
[0003] However, the current process of analyzing computing power scheduling plans is generally optimized through a single fixed algorithm. This approach is limited by the limitations of the selected algorithm, resulting in poor accuracy of the analyzed computing power scheduling plans, which cannot meet the user's computing power needs. Summary of the Invention
[0004] The main purpose of this application is to provide a computing power analysis method, computing power analysis equipment and storage medium, aiming to improve the accuracy of computing power scheduling to accurately meet the user's computing power needs.
[0005] To achieve the above objectives, this application proposes a computing power analysis method, which includes:
[0006] Get the computing resource pool information corresponding to the computing task;
[0007] Based on the first optimization goal, using a simulated annealing algorithm to analyze the computing resource pool information to obtain multiple candidate scheduling solutions;
[0008] Constructing process control parameters of a genetic algorithm according to the multiple candidate scheduling solutions, analyzing the multiple candidate scheduling solutions using a genetic algorithm based on a second optimization objective and the process control parameters to obtain a target scheduling solution;
[0009] Execute computing power scheduling according to the target scheduling plan.
[0010] In one embodiment, the step of constructing a process control parameter of a genetic algorithm based on the multiple candidate scheduling schemes includes:
[0011] Determining an initial population in the genetic algorithm according to the multiple candidate scheduling schemes, and adjusting a preset fitness function of the genetic algorithm corresponding to the second optimization objective according to the multiple candidate scheduling schemes to obtain a target fitness function;
[0012] The process control parameters include the initial population and the target fitness function.
[0013] In one embodiment, the first optimization objective includes minimizing scheduling cost and maximizing scheduling speed, and the step of adjusting a preset fitness function of the genetic algorithm corresponding to the second optimization objective according to the multiple candidate scheduling schemes to obtain the target fitness function includes:
[0014] Determine the minimum cost among the scheduling costs corresponding to all candidate scheduling solutions, and determine the maximum speed among the scheduling speeds corresponding to all candidate scheduling solutions;
[0015] determining a cost difference between the minimum cost and a preset minimum cost corresponding to the second optimization objective, and determining a speed difference between the maximum speed and a preset maximum speed corresponding to the second optimization objective;
[0016] The preset fitness function is adjusted according to the cost difference and the speed difference to obtain the target fitness function.
[0017] In one embodiment, the step of analyzing the computing resource pool information using a simulated annealing algorithm based on the first optimization objective to obtain multiple candidate scheduling solutions includes:
[0018] Based on the first optimization objective, using a simulated annealing algorithm to determine the optimal solution between the first scheduling scheme and the second scheduling scheme corresponding to the computing power resource pool information;
[0019] If the iteration termination condition is not met, the current optimal solution is used as the new second scheduling solution, the new scheduling solution in the computing power resource pool information is determined as the new first scheduling solution, and the process returns to the step of determining the optimal solution between the first scheduling solution and the second scheduling solution corresponding to the computing power resource pool information using the simulated annealing algorithm based on the first optimization objective;
[0020] When the iteration end condition is met, the multiple candidate scheduling solutions are determined from a preset number of multiple optimal solutions that are most recently generated before the iteration end condition is met.
[0021] In one embodiment, the step of determining the plurality of candidate scheduling solutions from a preset number of optimal solutions that are most recently generated before the iteration termination condition is satisfied includes:
[0022] Determining a target parameter range allowed for an indicator value corresponding to the scheduling solution according to the first optimization objective;
[0023] Among a preset number of multiple optimal solutions generated most recently before the iteration end condition is satisfied, multiple optimal solutions whose corresponding index values of the first optimization objective are within the target parameter range are used as the multiple candidate scheduling solutions.
[0024] In one embodiment, the step of determining the optimal solution of the first scheduling scheme and the second scheduling scheme corresponding to the computing resource pool information using a simulated annealing algorithm based on the first optimization objective includes:
[0025] Determining whether the first scheduling solution meets the new solution acceptance condition based on the index values of the first optimization objective corresponding to the first scheduling solution and the third scheduling solution, wherein the third scheduling solution is the last scheduling solution that meets the new solution acceptance condition or the initial scheduling solution;
[0026] If the first scheduling scheme satisfies the new solution acceptance condition, determining the first scheduling scheme as the new third scheduling scheme, and determining the optimal solution according to the index values of the first optimization objective corresponding to the first scheduling scheme and the second scheduling scheme respectively;
[0027] When the first scheduling solution does not meet the new solution acceptance condition, the second scheduling solution is determined to be the optimal solution.
[0028] In one embodiment, the first optimization objective includes minimizing scheduling cost and maximizing scheduling speed, the index value includes scheduling cost and scheduling speed, and the step of determining whether the first scheduling solution meets the new solution acceptance condition based on the index values of the first optimization objective corresponding to the first scheduling solution and the third scheduling solution respectively includes:
[0029] If a preset condition is met, determining that the new solution acceptance condition is met, wherein the preset condition includes that the scheduling cost of the first scheduling solution is less than the scheduling cost of the third scheduling solution, or the scheduling speed of the first scheduling solution is greater than the scheduling speed of the third scheduling solution;
[0030] When the preset conditions are not met, the execution optimization objectives of minimizing the scheduling cost and maximizing the scheduling speed are determined according to the number of iterations in the simulated annealing algorithm, and whether the new solution acceptance condition is met is determined according to the Metropolis criterion and based on the execution optimization objectives.
[0031] In one embodiment, the step of determining the execution optimization goal of minimizing scheduling cost and maximizing scheduling speed according to the number of iterations in the simulated annealing algorithm includes:
[0032] The goal with the highest priority between minimizing the scheduling cost and maximizing the scheduling speed is determined as the first goal, and the goal with the lowest priority between minimizing the scheduling cost and maximizing the scheduling speed is determined as the second goal;
[0033] When the number of iterations is greater than or equal to a preset number, determining the first target as the execution optimization target;
[0034] When the number of iterations is less than the preset number, the second target is determined as the execution optimization target.
[0035] In addition, to achieve the above-mentioned purpose, the present application also proposes a computing power analysis device, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the computer program is configured to implement the steps of the computing power analysis method described above.
[0036] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium. A computer program is stored on the storage medium, and when the computer program is executed by the processor, the steps of the computing power analysis method described above are implemented.
[0037] One or more technical solutions proposed in this application have at least the following technical effects: the solution first uses a simulated annealing algorithm and analyzes the computing resource pool information corresponding to the computing task based on the first optimization goal, and constructs the process control parameters of the genetic algorithm for multiple candidate scheduling solutions obtained by analysis. Then, based on the second optimization goal and the process control parameters, the genetic algorithm is used to analyze multiple candidate scheduling solutions to obtain a target scheduling solution for executing computing power scheduling. Based on this analysis, the process of computing power scheduling solution is no longer implemented by a single fixed algorithm, but integrates the simulated annealing algorithm and the genetic algorithm to perform staged and target-based analysis, effectively improving the accuracy of computing power scheduling to accurately meet the user's computing power needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0040] Figure 1 A flowchart of the first embodiment of the computing power analysis method of this application is provided;
[0041] Figure 2 A flowchart of the second embodiment of the computing power analysis method of this application is provided;
[0042] Figure 3 Schematic diagram of the device structure of the hardware operating environment involved in the computing power analysis method in the embodiment of the present application.
[0043] The purpose, features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0044] It should be understood that the specific embodiments described herein are merely used to explain the technical solutions of the present application and are not intended to limit the present application.
[0045] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0046] The main solution of the embodiment of the present application is: obtaining the computing power resource pool information corresponding to the computing power task; based on the first optimization goal, using the simulated annealing algorithm to analyze the computing power resource pool information to obtain multiple candidate scheduling schemes; constructing the process control parameters of the genetic algorithm according to the multiple candidate scheduling schemes, based on the second optimization goal and the process control parameters and using the genetic algorithm to analyze the multiple candidate scheduling schemes to obtain the target scheduling scheme; executing computing power scheduling according to the target scheduling scheme.
[0047] In this embodiment, for ease of description, the following description is made with the computing power analysis device as the execution entity.
[0048] In the existing technology, the process of analyzing the computing power scheduling plan is generally optimized through a single fixed algorithm. This method is limited by the limitations of the selected algorithm, resulting in the analyzed computing power scheduling plan having poor accuracy and unable to meet the user's computing power needs.
[0049] The present application provides the above-mentioned solution, which first uses a simulated annealing algorithm and based on the first optimization goal to analyze the computing resource pool information corresponding to the computing power task, and constructs the process control parameters of the genetic algorithm for multiple candidate scheduling schemes obtained by analysis. Then, based on the second optimization goal and the process control parameters, the genetic algorithm is used to analyze multiple candidate scheduling schemes to obtain the target scheduling scheme for executing computing power scheduling. Based on this analysis, the process of computing power scheduling scheme is no longer implemented by a single fixed algorithm, but integrates the simulated annealing algorithm and the genetic algorithm to perform staged and target-based analysis, effectively improving the accuracy of computing power scheduling to accurately meet the user's computing power needs.
[0050] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, mobile phone, etc., or an electronic device capable of performing the above functions, computing power analysis equipment, etc. The following uses the computing power analysis equipment as an example to illustrate this embodiment and the following embodiments.
[0051] Based on this, the present application embodiment provides a computing power analysis method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the computing power analysis method of this application.
[0052] In this embodiment, the computing power analysis method includes steps S10 to S40:
[0053] Step S10: Obtain computing resource pool information corresponding to the computing task;
[0054] Computing tasks here refer to computing tasks that are required to be performed by computing resources scheduled in subsequent target scheduling plans, such as large-scale artificial intelligence (AI) model training tasks, image generation tasks, video generation tasks, 3D content creation tasks, etc. Computing resources can include cloud containers or virtual machines.
[0055] Obtain computing resource pool information based on the task feature information of the computing task (such as application scenario, computing demand information (such as computing type, required computing performance, performance mode, etc.), data source location distribution, etc.).
[0056] The computing resource pool information may include multiple computing resources that can be used to perform computing tasks and their corresponding resource label information (for example, resource type (supercomputing power or intelligent computing power or general computing power, etc.), resource location information, billing information, communication speed information, computing speed information, etc.).
[0057] The computing resources in the computing resource pool information are all resources that meet the basic computing power requirements of computing tasks.
[0058] Step S20: Based on the first optimization objective, using a simulated annealing algorithm to analyze the computing resource pool information to obtain multiple candidate scheduling solutions;
[0059] The first optimization objective may include one or more optimization objectives. For example, the first optimization objective may include at least one of the following optimization objectives: minimizing dispatching costs, maximizing dispatching speed, optimizing performance, maximizing responsiveness, maximizing safety, etc. The first optimization objective may be a preset fixed objective or a objective selected by the user based on their own needs.
[0060] In the process of analyzing the computing power resource pool information using the simulated annealing algorithm, the scheduling schemes corresponding to the computing power resource pool information are iteratively selected based on the first optimization goal. The last optimal solution obtained when the iterative end condition of the simulated annealing algorithm is met is the scheduling scheme that best matches the first optimization goal among all the analyzed scheduling schemes.
[0061] The simulated annealing algorithm is used to iteratively analyze multiple scheduling schemes in the computing power resource pool information. The schemes can be pre-screened according to certain selection rules, or they can be randomly combined based on multiple computing power resources in the computing power resource pool information during the iteration process.
[0062] The process of analyzing the computing resource pool information using the simulated annealing algorithm here can be the analysis process of the traditional simulated annealing algorithm, or it can be the analysis process of the improved simulated annealing algorithm mentioned in the subsequent embodiments.
[0063] A candidate scheduling solution may include one or more computing resources or a combination of computing resources. Different candidate scheduling solutions may include different computing resources or combinations of computing resources.
[0064] The multiple candidate scheduling solutions may be solutions generated based on the last optimal solution generated during the iterative process of the simulated annealing algorithm, or may be solutions selected from all optimal solutions generated during the iterative process of the simulated annealing algorithm.
[0065] Step S30, constructing process control parameters of a genetic algorithm based on the multiple candidate scheduling solutions, and analyzing the target scheduling solution of the computing resource pool information using a genetic algorithm based on the second optimization objective and the process control parameters;
[0066] The process control parameters may include at least one of the following: population size, crossover probability, mutation probability, selection mechanism, fitness function, termination condition, initial population, etc.
[0067] The second optimization objective may include one or more optimization objectives. For example, the first optimization objective may include at least one of the following optimization objectives: minimizing scheduling costs, maximizing scheduling speed, optimizing performance, maximizing responsiveness, maximizing safety, etc. The second optimization objective may be a pre-set fixed objective or a user-selected objective based on their needs. In this embodiment, the first optimization objective and the second optimization objective are different objectives. In other implementations, the first optimization objective and the second optimization objective may also be the same objective.
[0068] The genetic algorithm is used to iteratively analyze and select multiple candidate scheduling schemes. The last optimal solution obtained when the termination condition of the genetic algorithm is met is the scheduling scheme that best matches the second optimization objective among the multiple candidate scheduling schemes and can be used as the target scheduling scheme.
[0069] Step S40: Execute computing power scheduling according to the target scheduling scheme.
[0070] After determining the target scheduling scheme, the corresponding recommendation information can be output. The demander corresponding to the computing power task can determine whether to apply the target scheduling scheme to execute the computing power task based on the recommendation information and provide feedback. When the feedback information is confirmed, the computing power resources can be scheduled according to the target scheduling scheme to execute the computing power task; when the feedback information includes unconfirmed, the negative feedback information corresponding to the scheme (such as the difference between the scheduling cost and the demand cost, etc.) can be obtained, and the algorithm model corresponding to the simulated annealing algorithm and / or genetic algorithm is adjusted based on the negative feedback information. The simulated annealing algorithm and / or genetic algorithm after the adjustment of the algorithm model returns to execute steps S20 to S40.
[0071] This embodiment provides a computing power analysis method, which first uses a simulated annealing algorithm and, based on a first optimization objective, analyzes the computing power resource pool information corresponding to the computing power task. The process control parameters of the genetic algorithm are constructed using the multiple candidate scheduling schemes obtained by the analysis. Then, based on the second optimization objective and the process control parameters, the genetic algorithm is used to analyze the multiple candidate scheduling schemes to obtain a target scheduling scheme for executing computing power scheduling. Based on this, the process of analyzing the computing power scheduling scheme is no longer implemented by a single fixed algorithm, but rather integrates the simulated annealing algorithm and the genetic algorithm to perform staged and target-based analysis, effectively improving the accuracy of computing power scheduling to accurately meet the user's computing power needs.
[0072] In a feasible implementation manner, the step of constructing the process control parameters of the genetic algorithm according to the multiple candidate scheduling schemes includes:
[0073] Determine the initial population in the genetic algorithm based on the multiple candidate scheduling schemes, adjust the preset fitness function of the genetic algorithm corresponding to the second optimization objective based on the multiple candidate scheduling schemes, and obtain a target fitness function; wherein the process control parameters include the initial population and the target fitness function.
[0074] In this embodiment, among multiple candidate scheduling schemes, the optimal solution generated at the end of the iterative process of the simulated annealing algorithm is determined as the baseline scheduling scheme. The index difference between the index value of the second optimization objective corresponding to the other candidate scheduling schemes and the baseline scheduling scheme is determined, and the set of candidate scheduling schemes with the smallest index difference between the baseline scheduling scheme and the baseline scheduling scheme is used as the initial population. For example, if the second optimization objective is to optimize computational performance, the index difference between the performance index value of each candidate scheduling scheme other than the baseline scheduling scheme and the performance index value of the baseline scheduling scheme can be determined. If the number of individuals in the initial population is set to 4, the first three candidate scheduling schemes with the smallest index difference are used as the initial population together with the baseline scheduling scheme.
[0075] The preset fitness function is a function pre-set in the genetic algorithm for evaluating the quality of each individual in the population. It determines the optimization direction and effect of the genetic algorithm. In this embodiment, the preset fitness function is determined according to the second optimization objective. For example, when the second optimization objective is performance optimization, the preset fitness function can be a calculation model for the performance index value corresponding to each scheduling scheme. Based on the calculation model, the corresponding performance index value can be calculated to reflect the quality of the corresponding scheduling scheme.
[0076] In this embodiment, the model parameters in the preset fitness function can be adjusted according to the index values corresponding to the multiple candidate scheduling schemes and / or the number of the multiple candidate scheduling schemes, and the preset fitness function after the model parameters are adjusted is used as the target fitness function.
[0077] In this embodiment, the first optimization goal includes minimizing the scheduling cost and maximizing the scheduling speed. The scheduling speed here can be considered as the total speed determined by the combination of the communication speed and the computing speed when the corresponding computing resources are used. Based on this, the minimum scheduling cost among all candidate scheduling solutions is determined, and the maximum scheduling speed among all candidate scheduling solutions is determined.
[0078] Determine a cost difference between the minimum cost and a preset minimum cost corresponding to the second optimization objective, and determine a speed difference between the maximum speed and a preset maximum speed corresponding to the second optimization objective; adjust the preset fitness function based on the cost difference and the speed difference to obtain the target fitness function. Wherein, if the second optimization objective is different, the corresponding preset minimum cost and preset maximum speed may be different. Based on this, a first correction value of a model parameter in the preset fitness function may be determined based on the cost difference, a second correction value of the model parameter in the preset fitness function may be determined based on the speed difference, a target correction value may be determined based on the first correction value and the second correction value, and the target fitness function may be obtained after correcting the model parameters in the preset fitness function based on the target correction value.
[0079] In the process of executing the genetic algorithm according to the initial population and the target fitness function, other process-related control parameters involved in the genetic algorithm may be pre-set fixed parameters.
[0080] In this embodiment, through the above method, it can be ensured that the comprehensive capabilities achieved by the target scheduling scheme in the first optimization target and the second optimization target can be effectively improved, further improving the accuracy of computing power scheduling, and more accurately meeting the user computing power requirements represented by the first optimization target and the second optimization target.
[0081] In other embodiments, the mutation probability in the genetic algorithm may also be determined based on a first difference between a maximum scheduling cost and a minimum scheduling cost among multiple candidate scheduling schemes and / or a second difference between a maximum scheduling speed and a minimum scheduling speed among multiple candidate scheduling schemes.
[0082] Based on any of the above embodiments, in the second embodiment of the present application, the same or similar contents as those in the above embodiments can be referred to the above introduction and will not be described in detail later. Figure 2 , step S20 includes:
[0083] Step S21: Based on the first optimization objective, a simulated annealing algorithm is used to determine the optimal solution of the first scheduling scheme and the second scheduling scheme corresponding to the computing resource pool information;
[0084] If the iteration end condition is not met, execute step S22 and then return to execute step S21; if the iteration end condition is met, execute step S23;
[0085] In this embodiment, the first scheduling scheme may be a new solution in the simulated annealing algorithm, the second scheduling scheme may be initially the initial scheduling scheme, and the initial scheduling scheme may be the initial optimal solution in the simulated annealing algorithm. Then, it can be determined whether the new solution acceptance condition of the simulated annealing algorithm is satisfied. When the new solution acceptance condition is satisfied, it is determined whether the first scheduling scheme is the new optimal solution based on the index value of the first optimization objective corresponding to the first scheduling scheme and the index value of the second optimization objective corresponding to the second scheduling scheme. Wherein, based on the second optimization objective, if the index value of the first scheduling scheme is better than the index value of the second scheduling scheme, the first scheduling scheme can be determined as the new optimal solution. If the index value of the second scheduling scheme is better than the index value of the first scheduling scheme, the second scheduling scheme can be maintained as the optimal solution. The new solution acceptance condition can be set with the judgment condition for new solution acceptance commonly used in the simulated annealing algorithm, or it can be determined comprehensively based on the upper index value or lower index value allowed by each optimization objective in the second optimization objective.
[0086] The iteration termination condition is the condition under which the simulated annealing algorithm terminates the iteration during the iterative analysis of each scheduling solution. The iteration termination condition may include the total duration of the iteration being greater than or equal to a preset duration, the number of iterations being greater than or equal to a preset number, or the like.
[0087] Step S22: Using the current optimal solution as a new second scheduling solution, and determining the computing resource pool information corresponding to the new scheduling solution as a new first scheduling solution;
[0088] Here, the new scheduling scheme is a scheduling scheme that is different from both the first scheduling scheme and the second scheduling scheme before the current moment. The new scheduling scheme can be generated by random perturbation based on the simulated annealing algorithm or randomly selected from multiple pre-selected scheduling schemes. Alternatively, multiple scheduling schemes corresponding to the computing resource pool information can be generated in advance, and the generated multiple scheduling schemes are sorted according to the first optimization objective to obtain a preset order. The scheduling scheme ranked first in the preset order is the initial first scheduling scheme, the scheduling scheme ranked second in the preset order is the initial second scheduling scheme, and the scheduling scheme ranked first among all the remaining scheduling schemes after excluding the previous first scheduling scheme and the second scheduling scheme in the preset order is used as the new first scheduling scheme. For example, when the priority of scheduling cost in the first optimization objective is higher than the priority of scheduling speed, the scheduling costs corresponding to the multiple scheduling schemes are sorted from high to low to obtain the preset order. When the priority of scheduling speed in the first optimization objective is higher than the priority of scheduling cost, the scheduling speeds corresponding to the multiple scheduling schemes are sorted from low to high to obtain the preset order.
[0089] Step S23 : determining the plurality of candidate scheduling solutions from a preset number of optimal solutions that are most recently generated before the iteration end condition is satisfied.
[0090] In this embodiment, among the preset number of optimal solutions generated most recently before the iteration end condition is met, the optimal solutions that meet the preset conditions can be selected as multiple candidate scheduling schemes, or all the optimal solutions can be selected as multiple candidate scheduling schemes.
[0091] In this embodiment, the multiple optimal solutions newly generated during the iterative analysis of the simulated annealing algorithm can be considered as the multiple scheduling schemes closest to the first optimization goal. These are used as alternative scheduling schemes and further analyzed through subsequent genetic algorithms to obtain the target scheduling scheme, which is conducive to further improving the accuracy of computing power scheduling.
[0092] In a feasible embodiment, the step of determining the multiple candidate scheduling schemes from the preset number of multiple optimal solutions generated most recently before the iteration end condition is met includes: determining the target parameter range allowed for the index value corresponding to the scheduling scheme based on the first optimization objective; among the preset number of multiple optimal solutions generated most recently before the iteration end condition is met, taking the multiple optimal solutions whose index values corresponding to the first optimization objective are within the target parameter range as the multiple candidate scheduling schemes.
[0093] When the first optimization objective includes minimizing the scheduling cost, the maximum scheduling cost set by the user can be obtained, and the cost interval less than or equal to the maximum scheduling cost can be used as the corresponding target parameter range; and / or, when the first optimization objective includes maximizing the scheduling speed, the minimum scheduling speed set by the user can be obtained, and the speed interval greater than or equal to the minimum scheduling speed can be used as the corresponding target parameter range.
[0094] When the first optimization objective includes minimizing the scheduling cost and maximizing the scheduling speed, the optimal solution is selected as a candidate scheduling scheme when both the scheduling cost and the scheduling speed corresponding to the optimal solution are within the corresponding target parameter range. When one of the scheduling cost and the scheduling speed corresponding to the optimal solution is not within the corresponding target parameter range, it is not selected as a candidate scheduling scheme.
[0095] In this embodiment, the above-mentioned method is helpful to further improve the accuracy of the target scheduling solution obtained subsequently.
[0096] In a feasible embodiment, the step of determining the optimal solution in the first scheduling scheme and the second scheduling scheme corresponding to the computing power resource pool information based on the first optimization objective and using the simulated annealing algorithm includes: determining whether the first scheduling scheme meets the new solution acceptance condition according to the index value of the first optimization objective corresponding to the first scheduling scheme and the third scheduling scheme respectively, and the third scheduling scheme is the previous scheduling scheme or the initial scheduling scheme that meets the new solution acceptance condition; if the first scheduling scheme meets the new solution acceptance condition, determining the first scheduling scheme as the new third scheduling scheme, and determining the optimal solution according to the index value of the first optimization objective corresponding to the first scheduling scheme and the second scheduling scheme respectively; if the first scheduling scheme does not meet the new solution acceptance condition, determining the second scheduling scheme as the optimal solution.
[0097] Among them, when there is no previous scheduling plan that meets the new solution acceptance conditions, the third scheduling plan is the initial scheduling plan; when there is a previous scheduling plan that meets the new solution acceptance conditions, the third scheduling plan is the previous scheduling plan that meets the new solution acceptance conditions.
[0098] When the first optimization goal includes minimizing the scheduling cost, the index value may include the scheduling cost; when the first optimization goal includes maximizing the scheduling speed, the index value includes the scheduling speed.
[0099] In this embodiment, the first optimization objective includes minimizing scheduling cost and maximizing scheduling speed, and the index value includes scheduling cost and scheduling speed. The process for determining whether the first scheduling solution meets the new solution acceptance condition is as follows: if a preset condition is met, determining whether the new solution acceptance condition is met, wherein the preset condition includes that the scheduling cost of the first scheduling solution is less than the scheduling cost of the third scheduling solution, or that the scheduling speed of the first scheduling solution is greater than the scheduling speed of the third scheduling solution; if the preset condition is not met, determining the execution optimization objective of minimizing scheduling cost and maximizing scheduling speed based on the number of iterations in the simulated annealing algorithm, and determining whether the new solution acceptance condition is met based on the Metropolis criterion (known in Chinese as "Meltrov criterion," an acceptance-rejection criterion that searches for the lowest energy state on an energy surface) and the execution optimization objective. Each time the optimal solution is determined can be considered an iteration, and the number of iterations is accumulated. Different execution intervals correspond to different execution optimization objectives. The energy difference between the first and third scheduling solutions can be determined based on the index values of the execution optimization objectives corresponding to the two solutions. Whether the new solution acceptance condition is met is determined based on the energy difference and the Metropolis criterion.
[0100] In this embodiment, the first optimization objective includes minimizing the scheduling cost and maximizing the scheduling speed, and the index value includes the scheduling cost and the scheduling speed. In the process of determining the optimal solution, a first probability can be randomly generated, and a first probability threshold can be generated according to the number of iterations. When the first probability is less than or equal to the first probability threshold and the scheduling cost corresponding to the first scheduling scheme is less than the scheduling cost corresponding to the second scheduling scheme, the first scheduling scheme can be determined to be the optimal solution; when the first probability is greater than the first probability threshold and the scheduling speed corresponding to the first scheduling scheme is greater than the scheduling speed corresponding to the second scheduling scheme, the first scheduling scheme is determined to be the optimal solution; when the first probability is less than or equal to the first probability threshold and the scheduling cost corresponding to the first scheduling scheme is greater than or equal to the scheduling cost corresponding to the second scheduling scheme, the second scheduling scheme is determined to be the optimal solution; when the first probability is greater than the first probability threshold and the scheduling speed corresponding to the first scheduling scheme is less than or equal to the scheduling cost corresponding to the second scheduling scheme, the second scheduling scheme is determined to be the optimal solution.
[0101] In this embodiment, the above approach helps ensure that the target scheduling solution can simultaneously take into account the first and second optimization objectives, further improving the accuracy of computing power scheduling. Specifically, when the first optimization objective includes scheduling cost and scheduling speed, the corresponding execution optimization objective is determined based on the number of executions to determine whether the new solution acceptance condition is met. This allows for phased optimization of different objectives, ensuring that the resulting target scheduling solution can simultaneously meet different optimization objectives, further improving the accuracy of computing power scheduling.
[0102] In other embodiments, when the first optimization objective includes minimizing the scheduling cost, the first scheduling scheme may be determined as the optimal solution when the scheduling cost of the first scheduling scheme is less than the scheduling cost of the second scheduling scheme, otherwise the second scheduling scheme may be determined as the optimal solution; when the first optimization objective includes maximizing the scheduling speed, the first scheduling scheme may be determined as the optimal solution when the scheduling cost of the first scheduling scheme is greater than the scheduling cost of the second scheduling scheme, otherwise the second scheduling scheme may be determined as the optimal solution.
[0103] In a feasible embodiment, the step of determining the execution optimization target in minimizing scheduling cost and maximizing scheduling speed based on the number of iterations in the simulated annealing algorithm includes: determining the target with the highest priority in minimizing scheduling cost and maximizing scheduling speed as the first target, and determining the target with the lowest priority in minimizing scheduling cost and maximizing scheduling speed as the second target; when the number of iterations is greater than or equal to the preset number, determining the first target as the execution optimization target; when the number of iterations is less than the preset number, determining the second target as the execution optimization target.
[0104] Here, the priority between the two objectives in the first optimization objective can be selected by the user.
[0105] Based on this, we can optimize the solution with the lowest priority goal at the beginning of the iteration, and then gradually converge to the solution corresponding to the highest priority goal at the end of the iteration, so as to ensure that the target scheduling solution can accurately meet user needs in terms of both scheduling cost and scheduling speed.
[0106] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the computing power analysis method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0107] Reference Figure 3 The present application provides a computing power analysis device 1, which may include: at least one processor 1001; and a memory 1002, an input / output (I / O) interface 1003, etc., which are communicatively connected to the at least one processor 1001; wherein the memory 1002 stores instructions that can be executed by the at least one processor 1001, and the instructions are executed by the at least one processor 1001 so that the at least one processor 1001 can execute the computing power analysis method in the above-mentioned embodiment 1.
[0108] Reference below Figure 3, which shows a schematic diagram of the structure of a computing power analysis device 1 suitable for implementing an embodiment of the present application. The computing power analysis device 1 in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, etc. and fixed terminals such as digital TVs, desktop computers, etc. Figure 3 The computing power analysis device 1 shown is merely an example and should not impose any limitations on the functions and scope of use of the embodiments of the present application.
[0109] like Figure 3 As shown, computing power analysis device 1 may include a processor 1001 (e.g., a central processing unit (CPU) or graphics processing unit (GPU)), which can execute various appropriate actions and processes based on programs stored in memory 1002. The programs in memory 1002 can be programs in read-only memory (ROM) or programs loaded from a storage device into random access memory (RAM). RAM also stores various programs and data required for the operation of computing power analysis device 1. Processor 1001, memory 1002 (ROM and RAM), and input / output (I / O) interface 1003 are interconnected via a communication bus 1007. Typically, the following systems can be connected to I / O interface 1003: input devices 1004, such as a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, and gyroscope; output devices 1005, such as a liquid crystal display (LCD), speaker, and vibrator; and communication devices 1006. The communication device 1006 can allow the computing power analysis device 1 to communicate with other devices wirelessly or wired to exchange data. Although the figure shows the computing power analysis device 1 with various devices, it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or provided instead.
[0110] In particular, according to the embodiments disclosed in this application, the method flow described in the above embodiments can be implemented as a computer software program. For example, the embodiments disclosed in this application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network via a communication device, or installed from the memory 1002. When the computer program is executed by the processor 1001, the above-mentioned functions defined in the computing power analysis method of the embodiment disclosed in this application are performed.
[0111] The computing power analysis device provided in this application, using the computing power analysis method in the above-mentioned embodiment, can solve the technical problem of how to improve the accuracy of computing power scheduling to accurately meet the user's computing power needs. Compared with the existing technology, the beneficial effects of the computing power analysis device provided in this application are the same as the beneficial effects of the computing power analysis method provided in the above-mentioned embodiment, and the other technical features of the computing power analysis device are the same as those disclosed in the above-mentioned embodiment method, and are not further described here.
[0112] The present application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, and the computer-readable program instructions are used to execute the computing power analysis method in the above-mentioned embodiment.
[0113] The computer-readable storage medium provided herein may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems, or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including, but not limited to, wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0114] The above-mentioned computer-readable storage medium may be included in the computing power analysis device; or it may exist independently without being assembled into the computing power analysis device.
[0115] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the computing power analysis device, the computing power analysis device executes the following process: obtain the computing power resource pool information corresponding to the computing power task; based on the first optimization goal, use the simulated annealing algorithm to analyze the computing power resource pool information to obtain multiple candidate scheduling schemes; construct the process control parameters of the genetic algorithm according to the multiple candidate scheduling schemes, and based on the second optimization goal and the process control parameters and using the genetic algorithm to analyze the multiple candidate scheduling schemes, obtain the target scheduling scheme; and execute computing power scheduling according to the target scheduling scheme.
[0116] Computer program code for performing the operations of the present application may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0117] The computer-readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the aforementioned computing power analysis method. This computer-readable storage medium can address the technical problem of improving the accuracy of computing power scheduling to precisely meet the computing power needs of users. Compared to the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the computing power analysis method provided in the aforementioned embodiments, and are not further elaborated here.
[0118] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code includes one or more executable instructions for realizing the prescribed logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented using a dedicated hardware-based system that performs the prescribed function or operation, or can be implemented using a combination of dedicated hardware and computer instructions.
[0119] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. The modules described in the embodiments of this application can be implemented using software or hardware. The name of a module does not, in some cases, constitute a limitation on the unit itself. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any appropriate manner in any one or more embodiments or examples.
[0120] The above descriptions are merely some embodiments of the present application and are not intended to limit the scope of the present application. Any equivalent structural transformations made within the technical concept of the present application using the contents of the present specification and drawings, or any direct or indirect application in other related technical fields, are included within the scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope of protection of the claims.
Claims
1. A computing power analysis method, characterized in that: The method includes: Get the computing resource pool information corresponding to the computing task; Based on the first optimization objective, using a simulated annealing algorithm to determine the optimal solution between the first scheduling scheme and the second scheduling scheme corresponding to the computing power resource pool information; If the iteration termination condition is not met, the current optimal solution is used as the new second scheduling solution, the new scheduling solution in the computing power resource pool information is determined as the new first scheduling solution, and the process returns to the step of determining the optimal solution between the first scheduling solution and the second scheduling solution corresponding to the computing power resource pool information using the simulated annealing algorithm based on the first optimization objective; When the iteration end condition is met, determining a target parameter range allowed for the index value corresponding to the scheduling solution according to the first optimization objective, and selecting, from a preset number of multiple optimal solutions generated most recently before the iteration end condition is met, multiple optimal solutions whose index values corresponding to the first optimization objective are within the target parameter range as multiple candidate scheduling solutions; constructing process control parameters of a genetic algorithm based on the multiple candidate scheduling schemes, analyzing the multiple candidate scheduling schemes using a genetic algorithm based on a second optimization objective and the process control parameters to obtain a target scheduling scheme, wherein the process control parameters include an initial population, a target fitness function, a mutation probability, and a crossover probability in the genetic algorithm, and the first optimization objective and the second optimization objective are different objectives; Execute computing power scheduling according to the target scheduling plan; Among them, the step of constructing the process control parameters of the genetic algorithm based on the multiple candidate scheduling schemes includes: determining the optimal solution finally generated during the iteration of the simulated annealing algorithm as the benchmark scheduling scheme, determining the index difference between the index values of the second optimization objectives corresponding to other candidate scheduling schemes and the benchmark scheduling scheme, and taking the set number of candidate scheduling schemes with the smallest index difference between the benchmark scheduling scheme and the set number of candidate scheduling schemes as the initial population.
2. The computing power analysis method according to claim 1, wherein: The step of constructing the process control parameters of the genetic algorithm according to the multiple candidate scheduling schemes further includes: The preset fitness function of the genetic algorithm corresponding to the second optimization objective is adjusted according to the multiple candidate scheduling schemes to obtain a target fitness function.
3. The computing power analysis method according to claim 2, wherein: The first optimization objective includes minimizing scheduling cost and maximizing scheduling speed. The step of adjusting the preset fitness function of the genetic algorithm corresponding to the second optimization objective according to the multiple candidate scheduling schemes to obtain the target fitness function includes: Determine the minimum cost among the scheduling costs corresponding to all candidate scheduling solutions, and determine the maximum speed among the scheduling speeds corresponding to all candidate scheduling solutions; determining a cost difference between the minimum cost and a preset minimum cost corresponding to the second optimization objective, and determining a speed difference between the maximum speed and a preset maximum speed corresponding to the second optimization objective; The preset fitness function is adjusted according to the cost difference and the speed difference to obtain the target fitness function.
4. The computing power analysis method according to any one of claims 1 to 3, characterized in that: The step of determining the optimal solution of the first scheduling scheme and the second scheduling scheme corresponding to the computing power resource pool information using a simulated annealing algorithm based on the first optimization objective includes: Determining whether the first scheduling solution meets the new solution acceptance condition based on the index values of the first optimization objective corresponding to the first scheduling solution and the third scheduling solution, wherein the third scheduling solution is the last scheduling solution that meets the new solution acceptance condition or the initial scheduling solution; If the first scheduling scheme satisfies the new solution acceptance condition, determining the first scheduling scheme as the new third scheduling scheme, and determining the optimal solution according to the index values of the first optimization objective corresponding to the first scheduling scheme and the second scheduling scheme respectively; When the first scheduling solution does not meet the new solution acceptance condition, the second scheduling solution is determined to be the optimal solution.
5. The computing power analysis method according to claim 4, wherein: The first optimization objective includes minimizing the scheduling cost and maximizing the scheduling speed, the index value includes the scheduling cost and the scheduling speed, and the step of determining whether the first scheduling solution meets the new solution acceptance condition based on the index values of the first optimization objective corresponding to the first scheduling solution and the third scheduling solution respectively includes: If a preset condition is met, determining that the new solution acceptance condition is met, wherein the preset condition includes that the scheduling cost of the first scheduling solution is less than the scheduling cost of the third scheduling solution, or the scheduling speed of the first scheduling solution is greater than the scheduling speed of the third scheduling solution; When the preset conditions are not met, the execution optimization objectives of minimizing the scheduling cost and maximizing the scheduling speed are determined according to the number of iterations in the simulated annealing algorithm, and whether the new solution acceptance condition is met is determined according to the Metropolis criterion and based on the execution optimization objectives.
6. The computing power analysis method according to claim 5, wherein: The step of determining the execution optimization target of minimizing scheduling cost and maximizing scheduling speed according to the number of iterations in the simulated annealing algorithm includes: The goal with the highest priority between minimizing the scheduling cost and maximizing the scheduling speed is determined as the first goal, and the goal with the lowest priority between minimizing the scheduling cost and maximizing the scheduling speed is determined as the second goal; When the number of iterations is greater than or equal to a preset number, determining the first target as the execution optimization target; When the number of iterations is less than the preset number, the second target is determined as the execution optimization target.
7. A computing power analysis device, characterized in that: The computing power analysis device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the computing power analysis method according to any one of claims 1 to 6.
8. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the computing power analysis method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Distribution method and device of application home service cluster
CN107155215A
Cloud computing resource scheduling method and device, computer equipment and storage medium
CN117539604A