Computing power scheduling method and device, computer equipment, storage medium and program product

By encoding multiple computing power scheduling solutions and using genetic algorithms to update individual fitness, the problem of low flexibility in complex environments is solved, and rapid response and improved user experience is achieved when bursts of high loads are encountered.

CN119621339APending Publication Date: 2025-03-14SHENZHEN COMTOP INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411781415.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

Traditional computing power scheduling methods have low flexibility when facing complex and changing environments, and cannot adaptively adjust rules and strategies, resulting in a longer response time and a decrease in user experience when bursts of high loads.

Method used

By acquiring multiple computing power scheduling schemes and encoding them as individuals, the genetic algorithm calculates the fitness of each individual based on the objective function of the computing power scheduling target, and updates the individual through cross and mutant operations until the termination condition is reached, and the individual with the maximum fitness is selected as the target individual.

Benefits of technology

It realizes more flexible computing power scheduling in complex and changing environments, and can respond quickly when bursts of high load, reduce response time and improve user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621339A_ABST
    Figure CN119621339A_ABST
Patent Text Reader

Abstract

The invention relates to a computing power scheduling method and device, computer equipment, a storage medium and a program product. The method comprises the following steps: acquiring a plurality of computing power scheduling schemes and respectively encoding the schemes into individuals; calculating the fitness of each individual to the computing power scheduling target according to the target function of the computing power scheduling target, and updating the corresponding individual according to the fitness of each individual; returning to the step of calculating the fitness of each individual to the computing power scheduling target according to the target function of the computing power scheduling target under the condition that the termination condition is not met, and continuously executing until the termination condition is met, and obtaining a plurality of finally obtained individuals; and screening the individual corresponding to the maximum fitness from the finally obtained individuals as a target individual, and taking the computing power scheduling scheme corresponding to the target individual as a target computing power scheduling scheme. By adopting the method, a complex and changeable environment can be more flexibly faced, and meanwhile, the response time is shortened and the user experience is improved when a high load suddenly occurs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of computing power scheduling, and in particular to a computing power scheduling method, apparatus, computer equipment, storage medium and program product. Background Art

[0002] Computing power scheduling is the process of intelligently allocating computing resources in a computing power network based on real-time task requirements and resource status. It aims to achieve load balancing, efficient resource utilization, and cost optimization by dynamically adjusting resource allocation, thereby ensuring rapid response and high-quality completion of tasks. This process involves not only the optimal use of existing resources, but also the prediction of future resource requirements. Computing power scheduling is widely used in cloud computing, big data processing, machine learning, the Internet of Things, and other fields, and is an indispensable part of modern information technology infrastructure.

[0003] The traditional solution for computing power scheduling is to use containerization, Kubernetes and other technical means to achieve flexible migration and efficient management of tasks between different computing nodes. However, the traditional solution mainly relies on preset rules and policies. When faced with complex and changing environments, these rules and policies cannot be adjusted adaptively, and there is a problem of low flexibility. In addition, when faced with sudden high loads, the traditional solution may take a long time to rebalance resources, resulting in longer response time and reduced user experience.

[0004] How to design a more flexible computing power scheduling method to cope with complex and changing environments, while reducing response time and improving user experience when there are sudden high loads, still needs to be solved. Summary of the invention

[0005] Based on this, it is necessary to provide a computing power scheduling method, device, computer equipment, storage medium and program product that can more flexibly deal with complex and changing environments, while reducing response time and improving user experience when sudden high loads occur, in response to the above technical problems.

[0006] In a first aspect, the present application provides a computing power scheduling method, the method comprising:

[0007] Obtain multiple computing power scheduling schemes and encode them into individuals;

[0008] According to the objective function of the computing power scheduling target, the fitness of each individual for the computing power scheduling target is calculated, and according to the fitness of each individual, the corresponding individual is updated;

[0009] If the termination condition is not met, return to the objective function according to the computing power scheduling target, calculate the fitness of each individual for the computing power scheduling target and continue to execute until the termination condition is met, and finally obtain multiple individuals;

[0010] An individual with the maximum fitness is selected from the multiple individuals finally obtained as the target individual, and the computing power scheduling plan corresponding to the target individual is used as the target computing power scheduling plan.

[0011] In one embodiment, the individual is a string encoded in binary form; and updating the corresponding individual according to the fitness of each individual includes:

[0012] Screen out individuals whose fitness is not less than the preset fitness and use them as parent individuals;

[0013] When there are multiple parent individuals, for any two parent individuals, a crossover operation is performed between the two parent individuals according to the character positions specified in the parent individuals to obtain two child individuals, and a new individual is formed based on the obtained child individuals.

[0014] In one embodiment, forming a new individual based on the obtained offspring individuals comprises:

[0015] Perform mutation operation on the characters to be mutated in the offspring individuals, and use the offspring individuals after the mutation operation as new individuals;

[0016] The mutation operation is used to change the original binary number 1 into the binary number 0, and is used to change the original binary number 0 into the binary number 1.

[0017] In one embodiment, before performing the mutation operation on the characters to be mutated in the offspring individuals, the method further includes:

[0018] The mutation probability and the position of the character to be mutated are obtained, and the character to be mutated in the offspring individual is determined according to the mutation probability and the position of the character to be mutated.

[0019] In one embodiment, the method further comprises:

[0020] Determine the objective function of computing power scheduling target based on computing power resource information and computing power demand information;

[0021] Among them, the computing power resource information includes at least one of the computing amount, storage capacity or network delay time of the computing power equipment that can be used; wherein the computing power demand information includes at least one of the target computing amount, target storage capacity or target network delay time.

[0022] In one embodiment, obtaining multiple computing power scheduling schemes and encoding them into individuals respectively includes:

[0023] Obtain multiple computing power scheduling solutions;

[0024] Encode each computing power scheduling scheme as an individual represented by a binary string or a real number vector.

[0025] In a second aspect, the present application provides a computing power scheduling device, the device comprising:

[0026] The acquisition module is used to obtain multiple computing power scheduling schemes and encode them into individuals.

[0027] A processing module, used to calculate the fitness of each individual for the computing power scheduling target according to the objective function of the computing power scheduling target, and update the corresponding individual according to the fitness of each individual;

[0028] The processing module is further configured to, if the termination condition is not met, return to the objective function according to the computing power scheduling target, calculate the fitness of each individual for the computing power scheduling target and continue to execute the step until the termination condition is met, thereby obtaining the multiple individuals finally obtained;

[0029] The acquisition module is further used to select an individual with the maximum fitness from the multiple individuals finally obtained as a target individual, and use the computing power scheduling plan corresponding to the target individual as the target computing power scheduling plan.

[0030] In a third aspect, the present application provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method described in the first aspect are implemented.

[0031] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method described in the first aspect.

[0032] In a fifth aspect, the present application provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of the method described in the first aspect.

[0033] The above-mentioned computing power scheduling method, device, computer equipment, storage medium and program product. In terms of resource allocation, the method provided in this embodiment executes multiple computing power scheduling schemes and encodes them into individuals respectively, generates an objective function according to the computing power scheduling target, and then determines the fitness of each individual for the objective function, and updates the corresponding individuals according to the fitness of each individual. After multiple iterations, the individual corresponding to the maximum fitness is selected as the target individual. In this way, it can accurately adapt to the computing power scheduling target (or computing power scheduling demand), find the most suitable computing power resource combination (that is, the computing power scheduling scheme corresponding to the target individual), and can reduce the response time and improve the user experience in the event of sudden high load. In addition, the method provided in this embodiment has strong adjustment ability and higher flexibility in a dynamic environment, which is specifically reflected in the ability to formulate different computing power scheduling targets, and it is easy to adjust and improve the computing power scheduling strategy according to actual conditions, and adapt to complex scenarios such as multi-tenant environments and heterogeneous computing power resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] 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.

[0035] Figure 1 This is an application environment diagram of a computing power scheduling method in an embodiment;

[0036] Figure 2 1 is a flow chart of a computing power scheduling method in one embodiment;

[0037] Figure 3 A schematic diagram of a portion of the flow chart of a computing power scheduling method in one embodiment;

[0038] Figure 4 is a structural block diagram of a computing power scheduling device in one embodiment;

[0039] Figure 5 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0040] 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.

[0041] The computing power scheduling method provided in the embodiment of the present application can be applied to Figure 1In 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. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The head-mounted device can be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The server 104 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.

[0042] In an exemplary embodiment, Figure 2 As shown, a computing power scheduling method is provided, which is applied to Figure 1 The server 104 in the example is used as an example to illustrate the method, which includes the following steps 201 to 204. Among them:

[0043] Step 201, obtain multiple computing power scheduling schemes and encode them into individuals respectively.

[0044] Among them, computing power scheduling refers to the strategies and methods for allocating and managing computing resources to ensure efficient resource utilization and optimal task execution. Computational Power Scheduling or Computing Resource Scheduling refers to the process of dynamically allocating computing resources to achieve optimal system performance and resource utilization efficiency based on factors such as task priority, resource requirements, and real-time load in a computer cluster, data center, or cloud computing environment. It is similar to power scheduling, which achieves a balance between demand and supply of computing power through precise allocation and scheduling of computing power.

[0045] Encoding the computing power scheduling scheme as an individual may be encoding each computing power scheduling scheme as an individual represented by a binary string or a real number vector. That is, a binary string is used to represent which computing power resource each task is assigned to, or a real number vector is used to represent the allocation ratio of each task on different computing power resources. Specifically, multiple computing power scheduling schemes are obtained. Each computing power scheduling scheme is encoded as an individual represented by a binary string or a real number vector. Encoding the computing power scheduling scheme as an individual represented by a binary string, for example, encoding the computing power scheduling scheme as "01000 1000000100", indicating that Pod1 is assigned to node 2, Pod2 is assigned to node 1, and Pod3 is assigned to node 3. In Kubernetes, Pod is the smallest deployable computing unit, which contains one or more containers.

[0046] After encoding multiple computing power scheduling schemes into individuals, multiple individuals can be obtained. A group of initial individuals are randomly selected based on multiple individuals to form an initial population. The size of the initial population is usually determined according to the complexity of the problem and the computing resources. The initial population should have a certain degree of diversity to increase the possibility of the algorithm finding the optimal solution.

[0047] Step 202, according to the objective function of the computing power scheduling target, calculate the fitness of each individual for the computing power scheduling target, and update the corresponding individual according to the fitness of each individual.

[0048] Among them, the computing power scheduling target can be understood as the computing power demand. The computing power scheduling target is, for example, one or more of the targets such as minimizing task execution time, maximizing processor (Central Processing Unit, referred to as CPU) utilization, and minimizing energy consumption. According to the computing power scheduling target, an objective function is determined. For example, minimizing task execution time can be used as the objective function, or comprehensively considering indicators such as task execution time and processor utilization, and combining them into a comprehensive indicator as the objective function.

[0049] In one embodiment, available computing resources are described, such as servers, processors, memory, network bandwidth, etc. The computing resources can be abstracted into a set of parameters, such as computing power, storage capacity, network latency, etc. The computing scheduling target is determined based on the computing power requirements and resource conditions. For example, the objective function can be to minimize task execution time, maximize CPU utilization, minimize energy consumption, etc.

[0050] Optionally, the objective function of the computing power scheduling target is determined based on the computing power resource information and the computing power demand information. The computing power resource information includes at least one of the computing power amount, storage capacity, or network delay duration of the computing power equipment that can be used. The computing power demand information includes at least one of the target computing power amount, target storage capacity, or target network delay duration.

[0051] The fitness of an individual for the computing power scheduling target can be understood as the fitness of the individual for the objective function. The fitness reflects the pros and cons of the computing power scheduling scheme represented by the individual. For example, for each individual, simulation or emulation is performed to evaluate its performance, simulating the execution process of the computing power scheduling scheme corresponding to the individual in executing the task, and calculating the corresponding indicators. The corresponding indicators may include task completion time and resource utilization, etc. When calculating the fitness, the indicator value obtained by the evaluation is converted into fitness according to the objective function and the corresponding indicators. The specific calculation method can be selected according to the nature of the indicator and the characteristics of the problem. For example, the indicators include task completion time and resource utilization, the weight of task completion time is w1, and the weight of resource utilization is w2. Fitness = w1*task completion time + w2*resource utilization.

[0052] As an example, if the goal is to minimize the task execution time, the fitness value can be the inverse of the task execution time.

[0053] According to the fitness of each individual, the corresponding individual is updated. For example, individuals with fitness greater than a preset fitness are selected from multiple individuals as parent individuals, and then child individuals are generated based on the parent individuals. After the corresponding individuals are updated to child individuals, the update of the corresponding individuals is completed.

[0054] Step 203, when the termination condition is not met, return to the objective function according to the computing power scheduling target, calculate the fitness of each individual for the computing power scheduling target and continue to execute until the termination condition is met to obtain the final multiple individuals.

[0055] The termination condition may be reaching a preset number of iterations, finding an optimal solution that meets certain accuracy requirements, or the value of the objective function no longer being significantly improved.

[0056] If the termination condition is not met, step 202 is repeatedly performed. If the termination condition is met, multiple individuals are finally obtained. It can also be understood that if the termination condition is not met, the individuals in the initial population are repeatedly updated until the termination condition is met, and the target population is obtained, and the target population includes the multiple individuals finally obtained.

[0057] Step 204, selecting an individual with the maximum fitness from the multiple individuals finally obtained as a target individual, and using the computing power scheduling plan corresponding to the target individual as the target computing power scheduling plan.

[0058] When the termination condition is reached, the individual with the highest fitness is selected from the target population as the target individual, that is, the target computing power scheduling scheme. This target computing power scheduling scheme can be used for actual computing power resource allocation to improve system performance and resource utilization. Among them, there may be one or more individuals with the highest fitness.

[0059] In the above-mentioned computing power scheduling method, in terms of resource allocation, the method provided in this embodiment executes multiple computing power scheduling schemes, which are encoded as individuals respectively, generates an objective function according to the computing power scheduling target, and then determines the fitness of each individual for the objective function. According to the fitness of each individual, the corresponding individual is updated. After multiple iterations, the individual with the maximum fitness is selected as the target individual. In this way, it can accurately adapt to the computing power scheduling target (or computing power scheduling demand), find the most suitable computing power resource combination (that is, the computing power scheduling scheme corresponding to the target individual), and can reduce the response time and improve the user experience in the event of sudden high load. In addition, the method provided in this embodiment has strong adjustment ability and higher flexibility in a dynamic environment, which is specifically reflected in the ability to formulate different computing power scheduling targets, and it is easy to adjust and improve the computing power scheduling strategy according to actual conditions, and adapt to complex scenarios such as multi-tenant environments and heterogeneous computing power resources.

[0060] In an exemplary embodiment, Figure 3 As shown, the individual is a string encoded in binary form. Step 202 includes steps 301 to 302. Among them:

[0061] Step 301, screen out individuals whose fitness is not less than a preset fitness and use them as parent individuals.

[0062] Individuals with fitness greater than or equal to the preset fitness are selected and used as parent individuals. Parent individuals are used to generate the next generation of individuals. Individuals with fitness greater than or equal to the preset fitness are selected to retain excellent computing power scheduling solutions and eliminate poor computing power scheduling solutions.

[0063] Step 302, when there are multiple parent individuals, for any two parent individuals, according to the character positions specified in the parent individuals, a crossover operation is performed between the two parent individuals to obtain two child individuals, and a new individual is formed based on the obtained child individuals.

[0064] The selected parent individuals are crossovered to generate new offspring individuals. The crossover operation simulates the gene recombination process in biological evolution. By exchanging some genes of the parent individuals, offspring individuals with new characteristics are generated. Specifically, according to the character positions specified in the parent individuals, a crossover operation is performed between two parent individuals to obtain two offspring individuals, and new individuals are formed based on the obtained offspring individuals. In the case of multiple parent individuals, such as 2N parent individuals (N is a natural number greater than 1), two offspring individuals are generated based on every two parent individuals, and finally 2N offspring individuals can be obtained.

[0065] The crossover operation can be single-point crossover, multi-point crossover, or uniform crossover.

[0066] The parent individual is a string encoded in binary form, and a crossover operation is performed on the parent individual. The crossover operation is described by taking a single-point crossover (there are also multi-point crossover and uniform crossover) as an example.

[0067] Assume that a simple binary encoding method is used to represent the computing power scheduling scheme. There are two parent individuals. There are 5 nodes (node ​​1-node 5) and 3 Pods (Pod1, Pod2 and Pod3) in the cluster. The encoding rules are as described above. Every 5 binary digits correspond to the scheduling allocation of a Pod (from left to right, each digit corresponds to node 1 to node 5, 1 means allocation to the corresponding node, and 0 means no allocation).

[0068] The encoding of parent individual 1 is: "01000 10000 00100", which means that Pod1 is allocated to node 2, Pod2 is allocated to node 1, and Pod3 is allocated to node 3.

[0069] The encoding of parent individual 2 is: "10000 01000 00010", which means that Pod1 is allocated to node 1, Pod2 is allocated to node 2, and Pod3 is allocated to node 5.

[0070] The character position is randomly selected after the 10th position (that is, between the encoding of the first Pod and the encoding of the second Pod).

[0071] After the crossover operation, the two offspring individuals generated are as follows:

[0072] Child individual 1: "01000 01000 00010". The first half comes from parent individual 1, and the second half comes from parent individual 2, which means that Pod1 is still allocated to node 2, Pod2 is allocated to node 2, and Pod3 is allocated to node 5).

[0073] Child individual 2: "10000 10000 00100". The first half is taken from parent individual 2, and the second half is taken from parent individual 1. That is, Pod 1 is allocated to node 1, Pod 2 is allocated to node 1, and Pod 3 is allocated to node 3.

[0074] In one embodiment, the step of forming a new individual based on two offspring individuals includes:

[0075] Step 1: Perform a mutation operation on the characters to be mutated in the offspring individuals, and use the offspring individuals after the mutation operation as new individuals.

[0076] The mutation operation is used to change the original binary number 1 into the binary number 0, and is used to change the original binary number 0 into the binary number 1.

[0077] Before performing a mutation operation, it is necessary to obtain the mutation probability and the position of the character to be mutated, and determine the character to be mutated in the offspring individual according to the mutation probability and the position of the character to be mutated.

[0078] Take basic bit mutation as an example.

[0079] Assume that binary coding rules are used to represent the computing power scheduling plan, and each 5-bit binary number corresponds to the scheduling allocation of a Pod. Set each bit from left to right to correspond to nodes 1 to 5, 1 means allocation to the corresponding node, and 0 means no allocation.

[0080] The code of a current offspring individual is: "01000 10000 00100", which means that Pod1 is assigned to Node 2, Pod2 is assigned to Node 1, and Pod3 is assigned to Node 3.

[0081] Set the mutation probability to 0.05 (this probability is usually small in practice, and is only used for convenience of example), and use a random function to determine the bit to be mutated (i.e., determine the character to be mutated). Assume that after random selection, the 3rd bit (corresponding to the 3rd bit in the Pod1 allocation code, i.e., the allocation indication bit corresponding to node 3), the 8th bit (corresponding to the 3rd bit in the Pod2 allocation code, corresponding to the allocation indication bit of node 3), and the 13th bit (corresponding to the 3rd bit in the Pod3 allocation code, corresponding to the allocation indication bit of node 3) are determined to be mutated.

[0082] After the mutation operation, the code of the offspring individual becomes: "01100 10100 00110". It can be seen that the original 0 in the third position becomes 1, the 0 in the eighth position becomes 1, and the 0 in the thirteenth position becomes 1. This changes the allocation of Pod1, Pod2, and Pod3 to Node 3, giving the computing power scheduling solution new features, that is, a new scheduling strategy has emerged.

[0083] The method provided in this embodiment uses a genetic algorithm to form parent individuals and offspring individuals, and updates individuals in the initial population based on the offspring individuals. Through the genetic algorithm, parallel computing can be easily achieved to improve the execution efficiency of computing power scheduling. In the computing power network, multiple computing nodes can be used to perform genetic algorithm calculations at the same time to speed up the search process. Genetic algorithms can be flexibly adjusted and expanded according to different problem requirements. For example, different computing power scheduling problems and optimization goals can be adapted by changing the encoding method, fitness function, genetic operation, etc. The genetic algorithm has a certain degree of adaptability and can automatically adjust the search strategy according to the characteristics of the problem and the situation during the search process. For example, during the search process, if the solution quality of a certain area is found to be high, the search intensity of the area can be increased. If it is found that the algorithm falls into a local optimum, the parameters of the genetic operation can be adjusted to increase the diversity of the population. At the same time, the genetic algorithm has a global search capability, avoids falling into a local optimal solution, and can also generate innovative scheduling strategies.

[0084] To facilitate understanding, the computing power scheduling scheme described above is further described below with a more specific embodiment.

[0085] The first step is to obtain multiple computing power scheduling schemes and encode them into individuals.

[0086] Assume that there are 5 nodes in the Kubernetes cluster, marked as Node 1, Node 2, Node 3, Node 4, and Node 5, and now there are 3 Pods (Pod1, Pod2, and Pod3) that need to be scheduled and allocated. Use a binary string to encode the computing power scheduling plan, and stipulate that every 5 binary digits correspond to the scheduling and allocation of a Pod. For example: For the allocation code of Pod1, each bit from left to right corresponds to Node 1 to Node 5. If a bit is 1, it means that the computing power scheduling plan is scheduled to the corresponding node, and if it is 0, it means that it is not allocated to the node. For example, "01000" means that Pod1 is scheduled to Node 2. For Pod2, assume that its code is "10000", which means that Pod2 is scheduled to Node 1. For Pod3, the code is "00100", which means that Pod3 is scheduled to Node 3.

[0087] Then the code of an individual in the entire population (representing a computing power scheduling solution) can be expressed as "010001000000100". This binary string can clearly show which node the three Pods are specifically allocated to.

[0088] The second step is to initialize the population. In the context of computing power scheduling (taking computing power scheduling in Kubernetes as an example), the population refers to a group of individuals, each of which represents a possible computing power resource allocation plan (computing power scheduling plan), and the initial population is the total number of such individuals randomly generated at the beginning. Specifically, computing power scheduling is a collection of scheduling plans.

[0089] In the third step, the objective function is to minimize the average task completion time.

[0090] Assume that there are n Pods in the cluster, and the task completion time of each Podi is recorded as Ti (this time can be obtained by recording the time from the creation of the Pod to the successful end of the operation, for example, by extracting the corresponding timestamp from Kubernetes' own monitoring system or related log records to calculate the difference). The objective function F of the average task completion time can be expressed as F=(T1+T2+...+Tn) / n.

[0091] When performing fitness evaluation, for each individual (i.e., a Pod scheduling scheme), the Pod will be assigned to the corresponding node to run according to the scheduling scheme, and then the task completion time of all Pods will be counted, and then the value of the average task completion time F will be calculated. The smaller the value, the better the scheduling scheme corresponding to this individual, and the higher its fitness value (which can be set to 1 / F) will be.

[0092] The fourth step is to select individuals whose fitness is not less than the preset fitness and use them as parent individuals. In the case of multiple parent individuals, for any two parent individuals, according to the specified character positions in the individuals, a crossover operation is performed between the two parent individuals to obtain two child individuals. New individuals are formed based on the obtained child individuals. A mutation operation is performed on the characters to be mutated in the child individuals, and the child individuals after the mutation operation are used as new individuals.

[0093] In the fifth step, repeatedly execute the first to fourth steps until the termination condition is reached, and select the individual with the maximum fitness from the multiple individuals finally obtained as the target individual, and use the computing power scheduling plan corresponding to the target individual as the target computing power scheduling plan.

[0094] The termination condition may be to find the optimal solution that meets certain accuracy requirements.

[0095] Examples of accuracy requirements are as follows.

[0096] Suppose we set the accuracy requirement that the relative error of the average task completion time must be less than 5%. For example, the optimal average task completion time of a cluster may be around 10 seconds. During the iteration of the genetic algorithm, the average task completion time corresponding to the individuals in the population varies greatly at the beginning. The average task completion time under the computing power scheduling scheme corresponding to some individuals may reach 20 seconds or even more. However, with the continuous repetition of fitness evaluation, selection, crossover and mutation operations, the population is constantly evolving and optimizing. If after a certain iteration, the average task completion time corresponding to the best individual in the current population is 10.2 seconds, the relative error is calculated as: (10.2-10) / 10*100%=2%. If the accuracy requirement of less than 5% is met, then the scheduling scheme corresponding to this individual can be used as the final result and the algorithm can be terminated because it is close enough to the optimal situation we estimated.

[0097] 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.

[0098] Based on the same inventive concept, the embodiment of the present application also provides a computing power scheduling device for implementing the computing power 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 computing power scheduling device embodiments provided below can refer to the limitations of the computing power scheduling method above, and will not be repeated here.

[0099] In an exemplary embodiment, Figure 4 As shown, a computing power scheduling device 40 is provided, including: an acquisition module 41 and a processing module 42, wherein:

[0100] The acquisition module 41 is used to acquire multiple computing power scheduling schemes and encode them into individuals respectively.

[0101] The processing module 42 is used to calculate the fitness of each individual for the computing power scheduling target according to the objective function of the computing power scheduling target, and update the corresponding individual according to the fitness of each individual.

[0102] The processing module 42 is also used to return to the objective function according to the computing power scheduling target when the termination condition is not met, calculate the fitness of each individual for the computing power scheduling target and continue to execute until the termination condition is met to obtain the final multiple individuals.

[0103] The acquisition module 41 is further used to select an individual with the maximum fitness from the multiple individuals finally obtained as a target individual, and use the computing power scheduling plan corresponding to the target individual as the target computing power scheduling plan.

[0104] In one embodiment, the individual is a string encoded in binary form; the processing module 42 is used to: screen out individuals whose fitness is not less than a preset fitness and use them as parent individuals; when there are multiple parent individuals, for any two parent individuals, according to the character positions specified in the parent individuals, a crossover operation is performed between the two parent individuals to obtain two child individuals, and a new individual is formed based on the obtained child individuals.

[0105] In one embodiment, the processing module 42 is used to: perform a mutation operation on the characters to be mutated in the offspring individuals, and use the offspring individuals after the mutation operation as new individuals; wherein the mutation operation is used to change the original binary number 1 into the binary number 0, and to change the original binary number 0 into the binary number 1.

[0106] In one embodiment, the processing module 42 is used to obtain the mutation probability and the position of the character to be mutated, and determine the character to be mutated in the offspring individual according to the mutation probability and the position of the character to be mutated.

[0107] In one embodiment, the processing module 42 is used to: determine the objective function of the computing power scheduling target based on the computing power resource information and the computing power demand information; wherein the computing power resource information includes at least one of the computing amount, storage capacity or network delay time of the computing power equipment that can be used; wherein the computing power demand information includes at least one of the target computing amount, target storage capacity or target network delay time.

[0108] In one embodiment, the acquisition module 41 is used to: acquire multiple computing power scheduling schemes; and encode each computing power scheduling scheme into an individual represented by a binary string or a real number vector.

[0109] Each module in the computing power scheduling device 40 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.

[0110] 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. Figure 5 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. Among them, 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. Among them, 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 a computing power scheduling scheme. 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, the computing power scheduling method provided in any of the above embodiments is implemented.

[0111] Those skilled in the art will understand that Figure 5 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.

[0112] 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 computing power scheduling method provided in any of the above embodiments is implemented.

[0113] In one embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements the steps of the computing power scheduling method provided in any of the above embodiments.

[0114] 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.

[0115] 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.

[0116] 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 computing power scheduling method, characterized in that: The method comprises: Obtain multiple computing power scheduling schemes and encode them into individuals; According to the objective function of the computing power scheduling target, the fitness of each individual for the computing power scheduling target is calculated, and according to the fitness of each individual, the corresponding individual is updated; If the termination condition is not met, return to the objective function according to the computing power scheduling target, calculate the fitness of each individual for the computing power scheduling target and continue to execute until the termination condition is met, and finally obtain multiple individuals; An individual with the maximum fitness is selected from the multiple individuals finally obtained as the target individual, and the computing power scheduling plan corresponding to the target individual is used as the target computing power scheduling plan.

2. The method according to claim 1, characterized in that The individual is a string encoded in binary form; and updating the corresponding individual according to the fitness of each individual includes: Screen out individuals whose fitness is not less than the preset fitness and use them as parent individuals; When there are multiple parent individuals, for any two parent individuals, a crossover operation is performed between the two parent individuals according to the character positions specified in the parent individuals to obtain two child individuals, and a new individual is formed based on the obtained child individuals.

3. The method according to claim 2, characterized in that The step of forming a new individual based on the obtained offspring individuals comprises: Perform mutation operation on the characters to be mutated in the offspring individuals, and use the offspring individuals after the mutation operation as new individuals; The mutation operation is used to change the original binary number 1 into the binary number 0, and is used to change the original binary number 0 into the binary number 1.

4. The method according to claim 3, characterized in that Before performing the mutation operation on the characters to be mutated in the offspring individuals, the method further includes: The mutation probability and the position of the character to be mutated are obtained, and the character to be mutated in the offspring individual is determined according to the mutation probability and the position of the character to be mutated.

5. The method according to claim 1, characterized in that The method further comprises: Determine the objective function of computing power scheduling target based on computing power resource information and computing power demand information; Among them, the computing power resource information includes at least one of the computing amount, storage capacity or network delay time of the computing power equipment that can be used; wherein the computing power demand information includes at least one of the target computing amount, target storage capacity or target network delay time.

6. The method according to claim 1, characterized in that The obtaining of multiple computing power scheduling schemes and encoding them into individuals respectively includes: Obtain multiple computing power scheduling solutions; Encode each computing power scheduling scheme as an individual represented by a binary string or a real number vector.

7. A computing power scheduling device, characterized in that: The device comprises: An acquisition module is used to acquire multiple computing power scheduling schemes and encode them into individuals; A processing module, used to calculate the fitness of each individual for the computing power scheduling target according to the objective function of the computing power scheduling target, and update the corresponding individual according to the fitness of each individual; The processing module is further configured to, if the termination condition is not met, return to the objective function according to the computing power scheduling target, calculate the fitness of each individual for the computing power scheduling target and continue to execute the step until the termination condition is met, thereby obtaining the multiple individuals finally obtained; The acquisition module is further used to select an individual with the maximum fitness from the multiple individuals finally obtained as a target individual, and use the computing power scheduling plan corresponding to the target individual as the target computing power scheduling plan.

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.