Method for solving computing power resource utilization rate based on genetic algorithm

By applying a resource allocation method based on genetic algorithm on the computing power sharing platform, problems such as idle resources and high energy consumption in the existing technology are solved, and more efficient resource utilization and system performance optimization are achieved.

CN119690678APending Publication Date: 2025-03-25天道金科股份有限公司
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411882940.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

The existing computing power sharing platform has problems in resource allocation, high energy consumption, high technology update costs, security and privacy, as well as real-time and delay problems.

Method used

Using a genetic algorithm-based method, the allocation of computing power resources is optimized through steps such as population initialization, adaptability assessment, genetic operation, and iterative calculation to improve resource utilization and system performance.

Benefits of technology

It improves the utilization rate of computing power resources, optimizes system performance, reduces energy consumption and technology update costs, enhances the efficiency and security of resource allocation, and meets the needs of low latency and real-time processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119690678A_ABST
    Figure CN119690678A_ABST
Patent Text Reader

Abstract

The invention provides a method for solving the computing power resource utilization rate based on a genetic algorithm, and relates to the technical field of computing power resource utilization. Comprising the following steps of S1, performing population initialization, randomly generating a group of initial solutions, and representing a computing power resource allocation scheme by each solution; s2, adaptability evaluation: defining a fitness function to calculate the fitness value of each individual; s3, genetic operation: performing selection operation, crossover operation and mutation operation to generate a new offspring; s4, generating a new-generation population, and selecting the most excellent individuals to form the new-generation population; s5, performing iterative computation, iteratively executing the genetic operation and the new generation population generation step, and continuously updating the population until a termination condition is met; and S6, outputting a result, and identifying an optimal solution or a group of excellent solutions from the current population. By simulating natural selection and genetic mechanisms in the biological evolution process, allocation of computing power resources is optimized, so that the resource utilization rate and the system performance are improved.
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 resource utilization, and in particular to a method for solving computing power resource utilization based on a genetic algorithm. Background Art

[0002] In the current era of cloud computing and big data, the demand for computing resources is growing. However, individuals or small businesses often find it difficult to afford the high hardware investment and maintenance costs. Therefore, computing power sharing and leasing services have emerged to provide a cost-effective solution to meet the computing power needs of different users. However, for computing power sharing platforms, how to solve the problem of computing power resource allocation has become particularly critical.

[0003] At present, the technical solutions for utilizing computing resources of most computing power sharing platforms are basically through the construction and management of data centers, the application of cloud computing services, and the implementation of various optimization algorithms. The advantages of this solution are mainly reflected in: 1. Centralized management: By establishing a large data center, centralized management and scheduling of computing resources can be achieved to improve resource utilization; 2. Resource sharing: Cloud computing platforms allow multiple users to share computing resources, reducing idleness and waste of resources; 3. Elastic Scaling: Dynamically adjust resource allocation according to actual demand, quickly expand resources during peak demand periods and reduce resources during low demand periods, thereby improving computing resource utilization.

[0004] However, the disadvantages are also obvious, such as 1. Energy consumption: Traditional data centers consume huge amounts of energy, especially when processing large amounts of data, power consumption and heat dissipation become major problems; 2. Uneven resource distribution: Although cloud computing can achieve resource sharing, in actual applications, uneven resource distribution may occur, resulting in some resources being idle; 3. High cost of technology updates: With the continuous emergence of new technologies, traditional technical solutions may require frequent updates and maintenance, resulting in higher costs; 4. Security and privacy issues: Data centers centrally store large amounts of data, and once a security incident occurs, it may lead to large-scale data leaks; 5. Real-time and latency issues: For applications that require real-time processing, traditional solutions may not meet low latency requirements, especially in edge computing scenarios. Summary of the invention

[0005] The present application provides a method for solving computing resource utilization based on a genetic algorithm to at least solve the above technical problems existing in the prior art.

[0006] According to a first aspect of the present application, a method for solving computing resource utilization based on a genetic algorithm is provided, comprising the following steps: S1, population initialization, randomly generates a set of initial solutions, each solution represents a computing resource allocation scheme; S2, fitness evaluation, defines the fitness function according to the objective function of computing resource allocation to calculate the fitness value of each individual; S3, genetic operation, performs selection operation, crossover operation, and mutation operation to generate new offspring; S4, generation of a new generation of population. According to the fitness value, the best individuals are selected from the current population and the newly generated offspring to form a new generation of population; S5, iterative calculation, iteratively executing the genetic operation and the new generation population generation step, and continuously updating the population until the termination condition is reached; S6, outputs the results, identifying the optimal solution or a set of excellent solutions from the current population.

[0007] In certain embodiments of the first aspect of the present application, the computing power resource allocation scheme is represented by an ordered code, and a chromosome of length m is allocated to each task i, in which each gene bit represents the resources allocated to task i on the corresponding server j.

[0008] In certain embodiments of the first aspect of the present application, the objective function of computing resource allocation includes maximizing resource utilization, minimizing task completion time, and minimizing energy consumption.

[0009] In certain embodiments of the first aspect of the present application, the fitness function is as follows: U=∑ i,j (CPU i,j +Memory i,j +Storage i,j ) / ∑ j (CPU max,j +Memory max,j +Storage max,j ) Among them, U is the resource utilization, CPU i,j is the number of CPU cores assigned to task i on server j; Memory i,j is the memory size allocated to task i on server j; Storage i,j is the storage space allocated to task i on server j; CPU max,j , Memory max,j , and Storage max,j are the maximum values ​​of the number of CPU cores, memory, and storage space of server j, respectively; T=∑ i W i / (CPU i,j ×Efficiencyi,j ) Where T is the task completion time, W i is the workload of task i, Efficiency i,j is the efficiency of task i on server j; E=∑ j P j ×Load j Where E is the energy consumption, Pj is the energy consumption rate of server j, and Load j is the load of server j; F=w1*U+w2*1 / T+w3*1 / E Among them, F is the fitness value of each individual; w1, w2, and w3 are weight coefficients.

[0010] In certain embodiments of the first aspect of the present application, the selecting operation includes: Roulette selection: First, calculate the fitness value of each individual in the population; calculate the probability of being selected in the roulette according to the individual's fitness value. The higher the fitness value of the individual, the greater the probability of being selected; finally, select individuals for reproduction by simulating roulette; Tournament selection: Randomly select a certain number of individuals for the tournament; among these individuals, select the individuals with the highest fitness as the winners; repeat this process until a sufficient number of winners are selected for crossover and mutation.

[0011] In certain embodiments of the first aspect of the present application, the crossover operation includes: Single-point crossover: Randomly select two parent individuals for crossover, randomly select a crossover point, exchange the genes of the two parent individuals before this point, and generate two new offspring individuals.

[0012] In certain embodiments of the first aspect of the present application, the mutation operation includes: Uniform mutation: randomly select a gene position and randomly change its value with a certain probability.

[0013] In certain embodiments of the first aspect of the present application, the population size is kept constant during the generation of a new generation of population.

[0014] In certain embodiments of the first aspect of the present application, the termination condition includes one of a maximum number of iterations, no further improvement in fitness, and finding a solution that satisfies the condition.

[0015] In certain embodiments of the first aspect of the present application, in step S1, the population size, crossover rate, mutation rate, and termination condition are also set.

[0016] Compared with the prior art, this application has the following beneficial effects: This application optimizes the allocation of computing resources by simulating natural selection and genetic mechanisms in the process of biological evolution to improve resource utilization and system performance. Furthermore, a fitness function is defined according to the objective function of computing resource allocation to accurately obtain the fitness value of each individual.

[0017] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become easily understood. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-limiting manner, wherein: In the drawings, the same or corresponding reference numerals represent the same or corresponding parts.

[0019] Figure 1 A flow chart of the method for solving computing resource utilization based on a genetic algorithm in the present application is shown.

[0020] Figure 2 A schematic diagram showing the cumulative probability of individuals in this application.

[0021] Figure 3 A schematic diagram of the single-point crossover process of the present application is shown.

[0022] Figure 4 A schematic diagram of the double-point crossing process of the present application is shown.

[0023] Figure 5 A schematic diagram of the basic bit variation process of the present application is shown.

[0024] Figure 6 A schematic diagram of the process of reversing mutation in the present application is shown. DETAILED DESCRIPTION

[0025] In order to make the purpose, features, and advantages of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0026] Terminology explanation: Genetic algorithm: A heuristic search algorithm that imitates the process of natural selection and searches among a population of candidate solutions through operations such as selection, crossover (also called recombination), and mutation to find the optimal or near-optimal solution.

[0027] Population: A set of candidate solutions in a genetic algorithm. These solutions are called individuals, and the population evolves through iterations of the algorithm.

[0028] Fitness function: A function used to evaluate the fitness of an individual, usually the objective function of the problem, such as maximizing resource utilization or minimizing task completion time.

[0029] Selection: The process of selecting individuals from the current population for use in producing offspring based on their fitness.

[0030] Crossover: An operation in genetic algorithms that generates new offspring individuals by combining parts of the chromosomes of two parent individuals.

[0031] Mutation: An operation in a genetic algorithm that increases the genetic diversity of a population by randomly changing one or more genes in a chromosome.

[0032] Iteration: The process of repeatedly performing the selection, crossover, and mutation steps in a genetic algorithm until the termination condition is met.

[0033] This embodiment provides a method for solving computing resource utilization based on a genetic algorithm, which includes five parts: problem modeling, coding scheme, genetic operation, fitness function design, and algorithm flow.

[0034] 1. Problem Modeling Problem modeling mainly includes three aspects: 1. Define decision variables: Determine the decision variables in the computing resource allocation problem, such as the number of CPU cores, memory size, storage space, etc. 2. Establish objective function: According to the problem requirements, establish one or more objective functions, such as maximizing resource utilization, minimizing task completion time, minimizing energy consumption, etc. 3. Determine constraints: Clarify the constraints that need to be followed in the resource allocation process, such as the upper and lower limits of resources, the priority of tasks, etc.

[0035] Suppose we have a cloud computing environment and need to allocate computing resources to different user tasks to ensure maximum resource utilization while minimizing task completion time.

[0036] 1. Define decision variables In this example, the decision variables include: x i,j : Whether task i is assigned to server j, where i represents the task number and j represents the server number.

[0037] CPUi,j : The number of CPU cores assigned to task i on server j.

[0038] Memory i,j : The memory size allocated to task i on server j.

[0039] Storage i,j : The storage space allocated to task i on server j.

[0040] 2. Establish the objective function Our objective function includes: Maximize resource utilization: Maximize∑ j (∑ i CPU i,j / CPU max,j +∑ i Memory i,j / Memory max,j +∑ i Storage i,j / Storage max,j )) Among them, CPU max,j , Memory max,j , and Storage max,j are the maximum values ​​of the number of CPU cores, memory and storage space of server j respectively.

[0041] Minimize task completion time: Minimize∑ i T i Among them, T i is the completion time of task i, which can be calculated based on the computational requirements of the task and the allocated resources.

[0042] Minimize energy consumption: Minimize∑ j E j Among them, E j is the energy consumption of server j, which can be calculated based on the server load and energy consumption model.

[0043] 3. Identify constraints Constraints may include: Resource constraints: For each server j, the number of CPU cores, memory, and storage space allocated cannot exceed their maximum values.

[0044] ∑ i CPU i,j ≤CPU max,j ∑i Memory i,j ≤Memory max,j ∑ i Storage i,j ≤Storage max,j Task requirements are met: The resources required by each task i must be met.

[0045] ∑ j CPU i,j ≥CPU req,i ∑ j Memory i,j ≥Memory req,i ∑ j Storage i,j ≥Storage req,i Among them, CPU req,i , Memory req,i and Storage req,i They are the number of CPU cores, memory, and storage space required for task ii.

[0046] Task assignment uniqueness: Each task can only be assigned to one server.

[0047] ∑ j x i,j =1∀ i 2. Coding Scheme The coding scheme mainly includes chromosome representation: design a coding scheme to represent the resource allocation plan of each individual. Commonly used coding methods include binary coding, real number coding and ordered coding.

[0048] For the problem of computing resource allocation, we can use ordered coding to represent the resource allocation plan of each individual. Assuming we have n tasks and m servers, we can assign a chromosome of length m to each task i, where each gene bit represents the resource allocated to task i on the corresponding server j.

[0049] Example of chromosome representation: Assume there are 3 tasks (n=3) and 2 servers (m=2).

[0050] The chromosome of each task can be represented as a vector of length 2, and each element in the vector represents the resource allocation of the task on the corresponding server.

[0051] For example, a possible chromosome representation is: Task 1: [0.5, 0.3] means that Task 1 is allocated 50% of the resources on Server 1 and 30% of the resources on Server 2.

[0052] Task 2: [0.2, 0.6] means that Task 2 is allocated 20% of the resources on Server 1 and 60% of the resources on Server 2.

[0053] Task 3: [0.7, 0.1] means that Task 3 is allocated 70% of resources on Server 1 and 10% of resources on Server 2.

[0054] 3. Genetic Operation Genetic operations mainly include three operations: 1. Selection operation: selection based on the fitness of individuals, such as roulette selection, tournament selection, etc. 2. Crossover operation: perform crossover operation with a certain probability to generate new individuals. 3. Mutation operation: perform mutation operation with a smaller probability to maintain the diversity of the population.

[0055] 1. Select an operation Roulette Selection: First, the fitness of each individual in the population is calculated. Fitness can be based on an objective function, such as resource utilization or task completion time.

[0056] Then, the probability of being selected in the roulette wheel is calculated based on the individual's fitness. The higher the fitness of the individual, the greater the probability of being selected.

[0057] Finally, individuals are selected for reproduction by simulating roulette.

[0058] Tournament Selection: A certain number of individuals are randomly selected for the tournament.

[0059] Among these individuals, the one with the highest fitness is selected as the winner.

[0060] This process is repeated until a sufficient number of winners are selected for crossover and mutation.

[0061] 2. Crossover Operation Single point crossover: Randomly select two parent individuals for crossover.

[0062] A crossover point is randomly selected, and the genes of the two parent individuals before this point are exchanged to generate two new offspring individuals.

[0063] Example: Take two parent individuals P1=[0.5, 0.3, 0.2, 0.6, 0.7, 0.1] and P2=[0.1, 0.4, 0.6, 0.2, 0.3, 0.5] as an example.

[0064] If the intersection point is 3, the offspring are: C1=[0.5,0.3,0.6,0.2,0.7,0.1]C2=[0.1,0.4,0.2,0.6,0.3,0.5].

[0065] 3. Mutation Operation Uniform mutation: randomly select a gene position and randomly change its value with a certain probability.

[0066] Assume that the chromosome of task 1 is selected for mutation and the first gene position is randomly selected. After mutation, it may become: The mutated chromosome: [0.8,0.3].

[0067] 4. Fitness Function Design The fitness function mainly designs the evaluation criteria: based on the objective function and constraints, a fitness function is designed to evaluate the fitness of each individual.

[0068] In the problem of computing resource allocation, designing a comprehensive fitness function requires balancing multiple objectives, including resource utilization, task completion time, and energy consumption.

[0069] Resource utilization (U): Resource utilization refers to the ratio of resources allocated to tasks to total resources. High resource utilization means that resources are used more efficiently.

[0070] Calculation formula: U=∑ i,j (CPU i,j +Memory i,j +Storage i,j ) / ∑ j (CPU max,j +Memory max,j +Storage max,j ) Task completion time (T): Task completion time is the total time required for all tasks to be completed. This is usually inversely proportional to the amount of resources assigned to the task.

[0071] Calculation formula: T=∑ i W i / (CPU i,j ×Efficiency i,j ) Among them, W i is the workload of task i, Efficiency i,j is the efficiency of task i on server j.

[0072] Energy consumption (E): Energy consumption refers to the energy consumed when the server is running. Energy consumption is proportional to the load of the server.

[0073] Calculation formula: E=∑ j P j ×Load j Where Pj is the energy consumption rate of server j, Load j is the load of server j.

[0074] Comprehensive fitness function The comprehensive fitness function F can be designed as the weighted sum of these three objectives, where the weight of each objective reflects its importance in the overall objective: F=w1*U+w2*1 / T+w3*1 / E w1, w2, and w3 are weight coefficients that need to be determined based on the needs of the specific problem. If resource utilization is the most important goal, then w1 can be set to a larger value.

[0075] 5. Algorithm Process Please refer to Figure 1 The specific algorithm flow of the method for solving computing resource utilization based on genetic algorithm includes the following steps: S1, population initialization, randomly generate a set of initial solutions, each solution represents a computing resource allocation scheme; as described in the coding scheme, the computing resource allocation scheme is represented by ordered coding, and each task i is assigned a chromosome of length m, where each gene bit represents the resource allocated to task i on the corresponding server j. At the same time, the population size, crossover rate, mutation rate, and termination condition are also set.

[0076] S2, fitness evaluation, defines the fitness function according to the objective function of computing resource allocation to calculate the fitness value of each individual.

[0077] The objective functions of computing resource allocation include maximizing resource utilization, minimizing task completion time, and minimizing energy consumption.

[0078] The fitness function is as follows: U=∑ i,j (CPU i,j +Memory i,j +Storage i,j ) / ∑ j (CPU max,j+Memory max,j +Storage max,j ) Among them, U is the resource utilization, CPU i,j is the number of CPU cores assigned to task i on server j; Memory i,j is the memory size allocated to task i on server j; Storage i,j is the storage space allocated to task i on server j; CPU max,j , Memory max,j , and Storage max,j are the maximum values ​​of the number of CPU cores, memory, and storage space of server j, respectively; T=∑ i W i / (CPU i,j ×Efficiency i,j ) Where T is the task completion time, W i is the workload of task i, Efficiency i,j is the efficiency of task i on server j; E=∑ j P j ×Load j Where E is the energy consumption, Pj is the energy consumption rate of server j, and Load j is the load of server j; F=w1*U+w2*1 / T+w3*1 / E Among them, F is the fitness value of each individual; w1, w2, and w3 are weight coefficients, which need to be determined according to the needs of the specific problem. If resource utilization is the most important goal, then w1 can be set to a larger value.

[0079] The weights can be adjusted dynamically. According to the real-time monitoring of system performance and resource usage, the weights of resource utilization, task completion time and energy consumption can be adjusted dynamically to adapt to different optimization goals and environmental changes.

[0080] S3, genetic operation, performing selection operation, crossover operation, and mutation operation to generate new offspring. For details of the selection operation, crossover operation, and mutation operation, please refer to the genetic operation section above.

[0081] S4, the generation of a new generation of population. According to the fitness value, the best individuals are selected from the current population and the newly generated offspring to form a new generation of population.

[0082] It is worth mentioning that during the generation of a new generation of population, the population size is kept constant.

[0083] S5, iterative calculation, iteratively executing the genetic operation and the new generation population generation step, and continuously updating the population until the termination condition is reached; the termination condition includes one of the maximum number of iterations, the fitness no longer improving, and finding a solution that meets the condition.

[0084] S6, outputs the results, identifying the optimal solution or a set of excellent solutions from the current population.

[0085] To make the objectives, technical solutions and advantages of the embodiments of the present invention more clear, further description is given below in conjunction with the accompanying drawings.

[0086] First, determine the feasible solution domain and encoding method according to the specific problem, and use a numerical string or a character string to represent each feasible solution in the feasible solution domain; Construct a fitness function to measure each solution, which is a non-negative function; Determine the size of the population, the methods of selection, crossover and mutation, the probability of crossover and mutation, and determine the termination condition (which can be a certain threshold or a specified number of generations of evolution).

[0087] In this process, the crossover operation is the main optimization operation, and the mutation operation can be seen as a disturbance to the population. According to the specific problem, we construct a fitness function and optimize the extreme value (either the maximum value or the minimum value).

[0088] Let's further analyze the algorithm execution steps: Take a simple example, for example, we need to find the function y=x1 2 +x2 2 +x3 3 +x4 4 The maximum value between [1,30]. We can easily know that when x1=x2=x3=x4=30, the function can reach its maximum value.

[0089] 1. We can construct a class YC, which contains all the operation methods: init(): includes the maximum and minimum values ​​of the independent variables, population size, crossover rate, mutation rate and reproduction generations; evaluate(): evaluates the function value of the individual as a fitness function, which is the value of function y in this case; selectBest(): selects the best individual in the current generation population as historical record; selection(): select individuals from the previous generation population according to probability until a new generation is formed; crossoperate(): implements cross operation; mutation(): implements mutation operation; YC_main(): implements the loop of the entire algorithm.

[0090] 2. The initialization method accepts the incoming parameters, including the maximum value, minimum value, population size, crossover rate, mutation rate and number of generations. Through these parameters, a population list pop is randomly generated as the first generation population. Each chromosome in it is a dictionary with two contents, namely the Gene class containing the gene and the fitness function value fitness.

[0091] 3. The fitness function is used in the evaluate() method to calculate the function value, which is defined as follows: y=x1 2 +x2 2 +x3 3 +x4 4 .

[0092] 4. In the selectBest() method, the best individual in the first generation needs to be retained as a record. Its definition is as follows: s_inds = sorted(pop, key = itemgetter("fitness"), reverse = True). Sort the entire population from large to small according to the fitness function, and return the individual with the maximum value.

[0093] 5. In the selection() method, individuals are selected from the previous generation population according to probability until a new generation is formed. We need individuals with large fitness function values ​​to be selected with a high probability, so we can use the roulette selection method. The steps of this method are as follows: a. Calculate the fitness of each individual. f(x i ), i=1,2,3,...,M; b. Calculate the probability of each individual being selected into the next generation population: P(x i )=f(x i ) / ; c. Please refer to Figure 2 , calculate the cumulative probability of each individual: Q i =f(x i ) / ; d. Generate a random number r between [0,1]; The individuals in the cumulative probability interval where e and r are located are selected. It can be assumed that the individuals with greater fitness have a greater probability of being selected; f. Repeat steps d and e for a total of M times.

[0094] Here we select offspring from the population according to probability. Individuals with large fitness functions are more likely to be selected for the next generation. Finally, we sort the regenerated new generation population from small to large according to fitness to facilitate the subsequent crossover operation.

[0095] 1. Crossoperate() refers to exchanging the gene fragments of two individuals at a certain point or points. Commonly used methods include single-point crossover and double-point crossover. Its process is as follows Figure 3 and Figure 4 shown.

[0096] from Figure 3 and Figure 4 It can be seen that both single-point crossover and double-point crossover have greatly changed the original gene sequence, which is an important means to achieve optimization.

[0097] 2. The mutation operation of the mutation() method is a low-probability event in the genetic process. However, when the population is small, only the crossover operation cannot produce excellent offspring. At this time, mutation is very important. Appropriate mutation can even produce better offspring. There are many ways to mutate. The conventional mutations include basic bit mutation and reversal mutation. Its process is as follows: Figure 5 and Figure 6 shown.

[0098] 8. Finally, the whole process is connected in series through YC_main(). The new population selectpop generated by the selection() method is arranged from small to large in terms of fitness, and the two individuals with large fitness can be preferentially selected for subsequent crossover operations; and the population size must be an even number. We set all the parameters. Here, the crossover probability is 0.8, the mutation probability is 0.1, and a total of 1000 generations are run, with a population size of 100 in each generation.

[0099] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution of this application can be achieved, and this document is not limited here.

[0100] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0101] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for solving computing resource utilization based on genetic algorithm, characterized in that: The following steps are involved: S1, population initialization, randomly generates a set of initial solutions, each solution represents a computing resource allocation scheme; S2, fitness evaluation, defines the fitness function according to the objective function of computing resource allocation to calculate the fitness value of each individual; S3, genetic operation, performs selection operation, crossover operation, and mutation operation to generate new offspring; S4, generation of a new generation of population. According to the fitness value, the best individuals are selected from the current population and the newly generated offspring to form a new generation of population; S5, iterative calculation, iteratively executing the genetic operation and the new generation population generation step, and continuously updating the population until the termination condition is reached; S6, outputs the results, identifying the optimal solution or a set of excellent solutions from the current population.

2. The method for solving computing resource utilization based on genetic algorithm according to claim 1, characterized in that: The computing power resource allocation scheme is represented by ordered coding, and a chromosome of length m is allocated to each task i, in which each gene bit represents the resources allocated to task i on the corresponding server j.

3. The method for solving computing resource utilization based on genetic algorithm according to claim 1, characterized in that: The objective functions of computing resource allocation include maximizing resource utilization, minimizing task completion time, and minimizing energy consumption.

4. The method for solving computing resource utilization based on genetic algorithm according to claim 3 is characterized in that: The fitness function is as follows: U=∑ i,j (CPU i,j +Memory i,j +Storage i,j ) / ∑ j (CPU max,j +Memory max,j +Storage max,j ) Among them, U is the resource utilization, CPU i,j is the number of CPU cores assigned to task i on server j; Memory i,j is the memory size allocated to task i on server j; Storage i,j is the storage space allocated to task i on server j; CPU max,j , Memory max,j , and Storage max,j are the maximum values ​​of the number of CPU cores, memory, and storage space of server j, respectively; T=∑ i W i / (CPU i,j ×Efficiency i,j ) Where T is the task completion time, W i is the workload of task i, Efficiency i,j is the efficiency of task i on server j; E=∑ j P j ×Load j Where E is the energy consumption, Pj is the energy consumption rate of server j, and Load j is the load of server j; F=w1*U+w2*1 / T+w3*1 / E Among them, F is the fitness value of each individual; w1, w2, and w3 are weight coefficients.

5. The method for solving computing resource utilization based on genetic algorithm according to claim 1, characterized in that: The selection operation includes: Roulette selection: First, calculate the fitness value of each individual in the population; calculate the probability of being selected in the roulette according to the individual's fitness value. The higher the fitness value of the individual, the greater the probability of being selected; finally, select individuals for reproduction by simulating roulette; Tournament selection: Randomly select a certain number of individuals for the tournament; among these individuals, select the individuals with the highest fitness as the winners; repeat this process until a sufficient number of winners are selected for crossover and mutation.

6. The method for solving computing resource utilization based on genetic algorithm according to claim 1, characterized in that: The crossover operation includes: Single-point crossover: Randomly select two parent individuals for crossover, randomly select a crossover point, exchange the genes of the two parent individuals before this point, and generate two new offspring individuals.

7. The method for solving computing resource utilization based on genetic algorithm according to claim 1, characterized in that: The mutation operation includes: Uniform mutation: randomly select a gene position and randomly change its value with a certain probability.

8. The method for solving computing resource utilization based on genetic algorithm according to claim 1, characterized in that: During the generation of a new generation of population, the population size is kept constant.

9. The method for solving computing resource utilization based on genetic algorithm according to claim 1, characterized in that: The termination condition includes one of the maximum number of iterations, no more improvement in fitness, and finding a solution that meets the condition.

10. The method for solving computing resource utilization based on genetic algorithm according to claim 1, characterized in that: In step S1, the population size, crossover rate, mutation rate, and termination conditions are also set.

Citation Information

Cited By

  • Online entrusted witness system based on block chain technology

    CN119919250A

  • Supply chain configuration optimization method and system based on multi-source driven population genetic algorithm

    CN120782181A

  • Water conservancy and hydropower construction resource scheduling method and system

    CN121660396A

  • A water conservancy and hydropower construction resource scheduling method and system

    CN121660396B