Cloud resource scheduling method and device based on file NSGA-II multi-objective evolutionary algorithm and medium
By constructing a four-dimensional optimization model and closed-loop scheduling framework based on the archive-based NSGA-II multi-objective evolutionary algorithm, the problems of single scheduling perspective and low efficiency in cloud resource scheduling strategies are solved, multi-objective collaborative optimization and real-time resource scheduling are achieved, and the system energy efficiency and application performance are improved.
Patent Information
- Application Number
- CN202510892520.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2025-09-26
AI Technical Summary
Existing cloud resource scheduling strategies have problems such as a single scheduling perspective, low efficiency, and difficulty in achieving multi-objective collaborative optimization. Especially in high-dimensional multi-objective optimization problems, the existing algorithms have a large search space and slow convergence speed, making it difficult to obtain the global optimal solution.
The archive-based NSGA-II multi-objective evolutionary algorithm is adopted to construct a four-dimensional optimization model including energy consumption, resource loss, load balancing and turnaround time. Combined with the external archiving mechanism and dynamic feedback mechanism, a closed-loop scheduling framework is formed through the load predictor module and the virtual machine manager module to achieve real-time optimization of resources.
It enhances the multi-objective collaborative optimization capability, improves the efficiency of searching in high-dimensional solution space, achieves balanced optimization of system energy efficiency and application performance, reduces energy consumption and adapts to load fluctuations, and improves the real-time performance of resource allocation.
Smart Images

Figure CN120704841A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of cloud resource scheduling, and in particular to a cloud resource scheduling method, device and medium based on an archive-based NSGA-II multi-objective evolutionary algorithm. Background Art
[0002] With the increasing scale of data centers and the diversification of resource requests, efficiently scheduling cloud resources to meet diverse user needs has become a key issue in the development of cloud computing. In recent years, to address cloud resource scheduling, scholars have proposed heuristic algorithms based on greedy strategies, such as the first fit algorithm, the descending first fit algorithm, the best fit algorithm, and the descending best fit algorithm. Although these algorithms demonstrate strong optimization performance for low-dimensional multi-objective optimization problems, the size of the algorithm's search space grows exponentially with the increase in the dimension of the optimization objective, making it difficult to obtain a global optimal solution. Existing cloud resource scheduling strategies still have some problems when dealing with high-dimensional multi-objective optimization problems.
[0003] On the one hand, existing technologies suffer from a single scheduling perspective. Most current scheduling strategies focus on optimizing for benefits or resources, such as minimizing system energy consumption and maximizing resource utilization efficiency, while neglecting optimization from the application perspective. As an on-demand, self-service service model, cloud computing systems are crucial for ensuring the performance of tenant applications. Designing resource scheduling models based solely on a single perspective fails to fully leverage the advantages of cloud computing.
[0004] On the other hand, existing technologies still suffer from inefficient scheduling models. Most existing scheduling models are based on heuristic or evolutionary algorithms. Heuristic algorithms are single-point search algorithms that lack global optimization capabilities and are unsuitable for simultaneous optimization of multiple objectives. While evolutionary algorithms can achieve near-optimal solutions under specific conditions, they lack feedback mechanisms and converge slowly, hindering the real-time performance of cloud resource scheduling problems.
[0005] Chinese patent application CN119902856A discloses a method for placing virtual machines in large-scale Hadoop clusters based on multi-objective optimization. This method uses energy consumption, resource utilization, and file access latency as multiple optimization objectives to achieve efficient allocation of virtual machine resources in large-scale Hadoop clusters. However, the chromosome crossover and mutation operations used in this application are relatively fixed and lack a similar dynamic adjustment mechanism, making it difficult to perform adaptive optimization based on real-time changes during cluster operation. Furthermore, this method is designed only for large-scale Hadoop clusters. Therefore, how to design a cloud resource scheduling method that ensures that the scheduling strategy achieves the goals of low energy consumption, low resource loss, and rapid response for the cloud resource scheduling system while ensuring system load balancing, and that can be optimized and updated in real time through a closed-loop scheduling system, is a technical problem that needs to be solved. Summary of the Invention
[0006] The purpose of the present invention is to provide a cloud resource scheduling method, device and medium based on the archive-based NSGA-II multi-objective evolutionary algorithm. By establishing a multi-objective optimization model, the archive-based NSGA-II multi-objective evolutionary algorithm is used to obtain a scheduling strategy for virtual machine deployment, reduce energy consumption, and dynamically feedback optimization based on real-time status to achieve multi-objective collaborative cloud resource scheduling.
[0007] The purpose of the present invention can be achieved by the following technical solutions:
[0008] According to one aspect of the present invention, a cloud resource scheduling method based on the archive-based NSGA-II multi-objective evolutionary algorithm is provided, and the specific steps include:
[0009] S1. Map the physical machine and the virtual machine, encode them using real number encoding to form a population space; initialize the population, screen them based on CPU utilization and memory utilization, and randomly generate the initial population;
[0010] S2. Using the current population as the parent population, a new population, i.e., the offspring population, is generated through crossover and mutation. A multi-objective optimization function is used to determine whether the current offspring is the global optimal solution. If so, generation of new populations is stopped and the optimal solution is output; otherwise, S3 is executed. The multi-objective optimization function is obtained based on the CPU energy consumption, resource loss, and resource balance of each physical machine, and the turnover time of the virtual machine on the physical machine.
[0011] S3. Merge the current parent population and the child population, perform a fast non-dominated sort on the merged population using the external archive update strategy and truncation mechanism to obtain a non-dominated solution set. Select the non-dominated set with the smallest current level according to the non-dominated sort result and add it to the child population. Execute S2 until the size of the current child population reaches the preset size limit or the global optimal solution is obtained.
[0012] S4. When the size of the current offspring population reaches a preset upper limit, a scheduling result for virtual machine placement is obtained, that is, the first solution in the current offspring non-dominated solution set.
[0013] Furthermore, the expression of the multi-objective optimization function in S2 includes:
[0014]
[0015] Where E is the total CPU energy consumption of the physical machine; E i is the CPU energy consumption of physical machine i; m is the number of physical machines; x i is the first binary variable indicating whether physical machine i is activated, and the value is 1 if activated, otherwise 0; is the energy consumption of physical machine i when the CPU utilization is 100%; is the energy consumption of physical machine i when the CPU utilization is 0%; y ij D is the second binary variable indicating whether virtual machine j is deployed on physical machine i. If virtual machine j is deployed on physical machine i, the value is 1, otherwise it is 0; ij is the CPU utilization of virtual machine j on physical machine i; W is the total resource loss of the physical machine; W i is the resource loss of physical machine i; W i CPU is the CPU resource loss of the physical machine; W i mem is the memory resource loss of physical machine i; C i is the CPU utilization of physical machine i; M i is the memory utilization of physical machine i; L is the total resource balance of the physical machine; L i is the resource balance degree of physical machine i; T is the total turnover time of the virtual machine on the physical machine; T i is the turnaround time of physical machine i; T ij The turnaround time for virtual machine j to be placed on physical machine i; is the waiting time of virtual machine j on physical machine i; represents the computing time of virtual machine j on physical machine i.
[0016] Furthermore, the constraints of the archive-based NSGA-II multi-objective evolutionary algorithm include a constraint on the number of special resources. When each virtual machine runs on a physical machine, the number of special resources used is less than the available number of corresponding resources. The expression is:
[0017]
[0018] Among them, v ji The amount of resource i used by virtual machine j; r i is the available quantity of resource i; V is the set of virtual machines.
[0019] The constraints of the archive-based NSGA-II multi-objective evolutionary algorithm also include affinity constraints. The constraint expression satisfied by the affinity between virtual machines and computing nodes is:
[0020]
[0021] Where a(i,j) is the affinity between virtual machine j and physical machine computing node i, t ij is a third binary variable indicating whether virtual machine j can be deployed on the corresponding computing node physical machine i.
[0022] The constraints of the archive-based NSGA-II multi-objective evolutionary algorithm also include network delay constraints. After deployment, the network delay between virtual machines is less than the maximum acceptable network delay T, which is expressed as:
[0023]
[0024] Where d(i,j) is the network delay between virtual machine j and the corresponding computing node physical machine i, q ij A fourth binary variable indicating whether a connection exists between virtual machine j and the corresponding computing node physical machine i. If so, the value is 1, otherwise it is 0.
[0025] Furthermore, the real number code in S1 uses a decimal sequence to encode the mapping relationship between virtual machines and physical machines. The number of elements in the obtained real number sequence is the number of virtual machines, the subscript of each element is the virtual machine number, and the value of each element is the matching physical machine number.
[0026] Furthermore, the external archive update strategy in S3 specifically includes dividing the solution space into multiple subspaces according to uniformly distributed reference vectors, and allocating reference points to each subspace; calculating the angle between the solution and the reference point, and preferentially retaining the solution with the smallest angle; the archive capacity is fixed at 50% of the population size, and the archive is truncated after each generation of iteration.
[0027] According to another aspect of the present invention, a cloud resource scheduling system for an archive-based NSGA-II multi-objective evolutionary algorithm is provided, the system comprising a global control layer and a local control layer, the global control layer comprising a load predictor module, a physical machine detector module, a virtual machine selector module, and a virtual machine allocator module, the local control layer comprising a virtual machine manager module,
[0028] The global control layer is configured to receive application resource requests from users and control the load predictor module to perform system load prediction. The load predictor module is configured to obtain prediction results for physical resource usage in various dimensions of each physical machine based on historical system load data and current load status, and send these prediction results to the physical machine detector module, the virtual machine selector module, and the virtual machine allocator module, respectively. The physical machine detector module is configured to perform host detection and, based on the received prediction results from the load predictor module, determine whether the current load status of the physical machine is overloaded or underloaded, and send the physical machine load status to the virtual machine selector module. The virtual machine selector module is configured to obtain scheduling results for virtual machine placement, and the archive-based NSGA-II multi-objective evolutionary algorithm and the corresponding objective function model are embedded in the virtual machine selector module. The virtual machine allocator module is configured to monitor the resource utilization of physical machine compute nodes and virtual machines in real time and, based on the virtual machine placement scheduling results and current resource requirements of the virtual machines, send virtual machine adjustment and migration instructions to the virtual machine manager module. The virtual machine manager module is configured to execute virtual machine adjustment and migration operations and send system feedback to the load predictor module, including current resource usage information for each physical machine compute node in the system.
[0029] According to a third aspect of the present invention, an electronic device is provided, comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the method when executing the program.
[0030] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method described above is implemented.
[0031] Compared with the prior art, the present invention has the following beneficial effects:
[0032] (1) Improvement of multi-objective collaborative optimization capabilities: By constructing a four-dimensional optimization model that includes energy consumption, resource loss, load balancing, and turnaround time, the limitations of a single perspective are broken through. The archive-based NSGA-II algorithm is used to simultaneously optimize the objective function, taking into account resource efficiency and service quality, to achieve balanced optimization of system energy efficiency and application performance. When selecting physical machines, the system allocates to physical machines that are already turned on and have surplus resources, and shuts down idle virtual machines to reduce energy consumption, which has significant advantages in terms of energy consumption.
[0033] (2) Enhanced search efficiency in high-dimensional solution space: By introducing an external archiving mechanism, the solution space is divided into subspaces according to uniform reference vectors and reference points are assigned. The solution with the smallest angle with the reference point is retained first, and the archiving capacity is set to 50% of the population size and iteratively truncated. This improves the search capability of the NSGAⅡ algorithm in high-dimensional multi-objective scenarios and effectively overcomes the defects of slow convergence and lack of feedback of traditional evolutionary algorithms.
[0034] (3) Dynamic resource scheduling adaptability optimization: Based on the closed-loop scheduling framework, the load predictor module predicts resource status, the physical machine detector module identifies overloaded / underloaded hosts, and the virtual machine manager module feeds back real-time resource information, forming a "prediction-decision-execution-feedback" dynamic closed loop, improving adaptability to load fluctuations and heterogeneous resource environments, and achieving real-time optimization of resource allocation. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 Flowchart of cloud resource scheduling method based on archive-based NSGA-II multi-objective evolutionary algorithm;
[0036] Figure 2 This is a structural framework diagram of the cloud resource scheduling system based on the archive-based NSGA-II multi-objective evolutionary algorithm;
[0037] Figure 3 This is a comparison chart of energy consumption between the method of this embodiment and the prior art;
[0038] Figure 4 A diagram comparing resource consumption between the method of this embodiment and the prior art;
[0039] Figure 5 A comparison chart of load balancing between the method of this embodiment and the prior art;
[0040] Figure 6 2 is a comparison chart of the turnaround time between the method of this embodiment and the prior art. DETAILED DESCRIPTION
[0041] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.
[0042] like Figure 1 As shown, this embodiment provides a cloud resource scheduling method based on the archive-based NSGA-II multi-objective evolutionary algorithm, and the specific steps include:
[0043] S1. Map the physical machine and the virtual machine, encode them using real number encoding to form a population space; initialize the population, screen them based on CPU utilization and memory utilization, and randomly generate the initial population;
[0044] S2: Use the current population as the parent population, generate a new population, i.e., the offspring population, through crossover and mutation, and determine whether the current offspring is the global optimal solution based on the multi-objective optimization function. If so, stop generating new populations and output the optimal solution; otherwise, execute S3; the multi-objective optimization function is obtained based on the CPU energy consumption, resource loss, and resource balance of each physical machine, and the turnover time of the virtual machine on the physical machine;
[0045] S3. Merge the current parent population and the child population, perform a fast non-dominated sort on the merged population using the external archive update strategy and truncation mechanism to obtain a non-dominated solution set. Select the non-dominated set with the smallest current level according to the non-dominated sort result and add it to the child population. Execute S2 until the size of the current child population reaches the preset size limit or the global optimal solution is obtained.
[0046] S4. When the size of the current offspring population reaches a preset upper limit, a scheduling result for virtual machine placement is obtained, that is, the first solution in the current offspring non-dominated solution set.
[0047] In order to achieve multi-objective optimization coordination while ensuring system load balance, a cloud resource scheduling multi-objective optimization model including energy consumption, resource loss, load balancing and turnaround time is constructed. The model has four optimization objectives: CPU energy consumption, resource energy consumption, load balancing and turnaround time.
[0048] Among them, the CPU energy consumption E of physical machine i in the cloud data center is i , the expression is:
[0049]
[0050] is the energy consumption of physical machine i when the CPU utilization is 100%, is the energy consumption of physical machine i when the CPU utilization is 0%, C i Indicates the CPU usage of physical machine i.
[0051] The resource loss of a physical host, considering only CPU utilization and memory utilization, is divided into two parts, expressed as:
[0052] W i CPU =1-C i ,
[0053] W i mem =1-M i ,
[0054] W i =Wi CPU +W i mem ,
[0055] W i CPU is the CPU resource loss of physical machine i, W i mem is the memory resource loss of physical machine i, W i is the total resource loss of physical machine i, and W i CPU and W i mem sum.
[0056] The difference between the CPU and memory utilization of the physical machine is used as the standard for resource balance. The resource balance of physical machine i is L i Indicates the balance of virtual machine placement, expressed as:
[0057] L i =|C i -M i |,
[0058] C i is the CPU utilization of physical machine i, M i is the memory utilization of physical machine i.
[0059] Calculate the turnaround time of a virtual machine on a physical machine. The expression is:
[0060]
[0061] T ij is the turnaround time for virtual machine j to be placed on physical machine o and run, is the waiting time of virtual machine j on physical machine i, is the computing time of virtual machine j on physical machine i, T i is the turnaround time of physical host i, which is the sum of the turnaround times of all virtual machines on physical host i.
[0062] The obtained multi-objective optimization function expression of the cloud resource scheduling multi-objective optimization model is:
[0063]
[0064] Where E is the total CPU energy consumption of the physical machine; E i is the CPU energy consumption of physical machine i; m is the number of physical machines; x i is the first binary variable indicating whether physical machine i is activated, and the value is 1 if activated, otherwise 0; is the energy consumption of physical machine i when the CPU utilization is 100%; is the energy consumption of physical machine i when the CPU utilization is 0%; y ij D is the second binary variable indicating whether virtual machine j is deployed on physical machine i. If virtual machine j is deployed on physical machine i, the value is 1, otherwise it is 0; ij is the CPU utilization of virtual machine j on physical machine i; W is the total resource loss of the physical machine; W i is the resource loss of physical machine i; W i CPU is the CPU resource loss of the physical machine; W i mem is the memory resource loss of physical machine i; C i is the CPU utilization of physical machine i; M i is the memory utilization of physical machine i; L is the total resource balance of the physical machine; L i is the resource balance degree of physical machine i; T is the total turnover time of the virtual machine on the physical machine; T i is the turnaround time of physical machine i; T ij The turnaround time for virtual machine j to be placed on physical machine i; is the waiting time of virtual machine j on physical machine i; represents the computing time of virtual machine j on physical machine i.
[0065] The constraints of the archive-based NSGA-II multi-objective evolutionary algorithm include the number of special resources. When each virtual machine runs on a physical machine, the number of special resources used is less than the available number of the corresponding resources. The expression is:
[0066]
[0067] Among them, v ji The amount of resource i used by virtual machine j; r i is the available quantity of resource i; V is the set of virtual machines.
[0068] Constraints also include affinity constraints. The affinity constraint expression between virtual machines and computing nodes is:
[0069]
[0070] Where a(i,j) is the affinity between virtual machine j and physical machine computing node i, t ij is a third binary variable indicating whether virtual machine j can be deployed on the corresponding computing node physical machine i.
[0071] The constraints also include network delay constraints. After deployment, the network delay between virtual machines must be less than the maximum acceptable network delay T, which is expressed as:
[0072]
[0073] Where d(i,j) is the network delay between virtual machine j and the corresponding computing node physical machine i, q ij A fourth binary variable indicating whether a connection exists between virtual machine j and the corresponding computing node physical machine i. If so, the value is 1, otherwise it is 0.
[0074] The real number encoding in S1 uses a decimal sequence to encode the mapping between virtual machines and physical machines. The number of elements in the resulting real number sequence is the number of virtual machines, the subscript of each element is the virtual machine number, and the value of each element is the matching physical machine number. Before initializing the population, the physical host list is traversed and sorted from low to high according to CPU utilization and memory utilization, prioritizing physical hosts with low CPU and memory utilization. When randomly generating the initial population, placement strategy solutions that do not include these host numbers are removed to obtain the final initial population. When performing crossover and mutation operations on the population to generate the offspring population, the crossover probability is 0.9 and the mutation probability is 0.1.
[0075] The external archive update strategy in S3 specifically includes dividing the solution space into multiple subspaces based on uniformly distributed reference vectors, assigning reference points to each subspace; calculating the angle between the solution and the reference point, and prioritizing the solution with the smallest angle; the archive capacity is fixed at 50% of the population size, and the archive is truncated after each generation of iteration.
[0076] This embodiment also provides a cloud resource scheduling system based on the NSGA-II multi-objective evolutionary algorithm of the archive, including a global control layer and a local control layer. The global control layer includes a load predictor module, a physical machine detector module, a virtual machine selector module and a virtual machine allocator module. The local control layer includes a virtual machine manager module. Figure 2 The data flow of the system framework is shown.
[0077] When a user sends an application resource request over the network, the request first reaches the global control layer. The global control layer calls the load predictor module to perform system load forecasting. Using the system's historical load data and current load status, it calculates the physical resource usage across various dimensions of the physical machine within a certain time period. It then provides the forecast results to the physical machine detector module, the virtual machine selector module, and the virtual machine allocator module, respectively. After receiving the load predictor's forecast results, the physical machine detector module performs host detection to determine whether the host is currently overloaded or underloaded, and then sends the host's load status to the virtual machine selector module.
[0078] The VM selector module combines the load predictor module's predictions with the physical machine detector module's current load to determine the current and future load conditions of the physical machines. Based on this information, it proposes an optimal resource scheduling plan. The VM allocator module receives the VM allocation plan proposed by the VM selector and, in conjunction with the load predictor module and the physical machine detector module's real-time monitoring of compute node and VM resource utilization, issues VM adjustment and migration instructions to the VM manager module based on the VM's current resource requirements.
[0079] After receiving the instructions, the virtual machine manager module performs virtual machine adjustment and migration operations. It selects appropriate virtual machines to migrate from overloaded hosts and migrates all virtual machines from underloaded hosts and shuts down the host.
[0080] After the virtual machine manager module performs the adjustment and migration operations of the virtual machine, it sends system feedback to the load predictor module, providing the resource usage information of each physical node in the system at the current moment.
[0081] The method of this embodiment is simulated and compared with the random placement strategy Random and the maximum memory remaining strategy MR-Mem (Maximum Residual of Memory). A cloud platform with 8 servers is built to execute the scheduling strategy proposed in this embodiment. Comparative experiments are conducted on different virtual machine placement strategies in terms of energy consumption, resource loss, load balancing, and turnaround time. The experimental results are shown in the figure. Figure 3 、 Figure 4 、 Figure 5 and Figure 6 shown.
[0082] Figure 3 The energy consumption of different strategies at different virtual machine scales is shown in Figure 2. The horizontal axis is the number of virtual machines, and the vertical axis is the energy consumption of the physical machine expressed in logarithmic coordinates. Figure 4 This figure shows the resource loss of different strategies at different virtual machine scales. The horizontal axis is the number of virtual machines, and the vertical axis is the physical machine resource loss expressed in logarithmic coordinates. Figure 5 The load balancing situation of different strategies at different virtual machine scales is shown in Figure 2. The horizontal axis is the number of virtual machines, and the vertical axis is the adaptability of resource balance. Figure 6 The figure shows the turnaround time of different strategies at various virtual machine scales. The horizontal axis is the number of virtual machines and the vertical axis is the turnaround time of each virtual machine. Figure 3 、 Figure 4 and Figure 6In the figure, the solid line curve marked with a circle represents the energy consumption change curve of the Random strategy as the number of virtual machines increases, the dotted line curve marked with an X shape represents the energy consumption change curve of the MR-Mem strategy as the number of virtual machines increases, and the dotted line curve marked with a circle represents the energy consumption change curve of the NSGAⅡ-AVMP strategy proposed in the present invention as the number of virtual machines increases. Figure 5 In the figure, the histograms from left to right respectively represent the NSGAⅡ-AVMP strategy, Random strategy, and MR-Mem strategy proposed in this embodiment.
[0083] from Figure 3 and Figure 4 It can be seen that the MR-Mem strategy has the highest energy consumption and resource loss. This is because the strategy distributes virtual machines evenly to each physical machine by default, which requires turning on all physical machines, resulting in increased energy consumption and resource loss of the physical machines. Although the energy consumption and resource loss of the Random placement strategy are lower than those of the MR-Mem strategy, the randomness of its selection operation results in higher overall energy consumption and resource loss. The NSGAⅡ-AVMP strategy proposed in the present invention has the lowest energy consumption. This is because when selecting physical machines, the NSGAⅡ-AVMP strategy always selects those physical machines that are already turned on and have surplus resources, and turns off idle virtual machines to reduce energy consumption and resource loss. In summary, the NSGAⅡ-AVMP strategy has great advantages in terms of energy consumption and resource loss.
[0084] from Figure 5 It can be seen that the NSGAⅡ-AVMP policy proposed in this example achieves a higher degree of resource balance than the MR-Mem policy, except when the number of virtual machines reaches 200. In all other cases, the NSGAⅡ-AVMP policy's resource balance is lower than that of the Random and MR-Mem policies. The NSGAⅡ-AVMP policy uses resource balance as one of its optimization objectives and considers the balance of CPU and memory resources when placing virtual machines.
[0085] from Figure 6 As can be seen, when the number of VMs is less than 100, the MR-Mem policy achieves the shortest turnaround time. This is because the MR-Mem policy evenly distributes VMs across physical machines, resulting in a smaller number of requests waiting to be processed, thus minimizing tenant request turnaround time. However, as the number of VMs increases, the NSGAⅡ-AVMP policy, which takes tenant request turnaround time into account, gradually gains an advantage.
[0086] If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
Claims
1. A cloud resource scheduling method based on the NSGA-II multi-objective evolutionary algorithm based on archives, characterized in that: The specific steps include: S1. Map the physical machine and the virtual machine, encode them using real number encoding to form a population space; initialize the population, screen them based on CPU utilization and memory utilization, and randomly generate the initial population; S2. Using the current population as the parent population, a new population, i.e., the offspring population, is generated through crossover and mutation. A multi-objective optimization function is used to determine whether the current offspring is the global optimal solution. If so, generation of new populations is stopped and the optimal solution is output; otherwise, S3 is executed. The multi-objective optimization function is obtained based on the CPU energy consumption, resource loss, and resource balance of each physical machine, and the turnover time of the virtual machine on the physical machine. S3. Merge the current parent population and the child population, perform a fast non-dominated sort on the merged population using the external archive update strategy and truncation mechanism to obtain a non-dominated solution set. Select the non-dominated set with the smallest current level according to the non-dominated sort result and add it to the child population. Execute S2 until the size of the current child population reaches the preset size limit or the global optimal solution is obtained. S4. When the size of the current offspring population reaches a preset upper limit, a scheduling result for virtual machine placement is obtained, that is, the first solution in the current offspring non-dominated solution set.
2. The cloud resource scheduling method based on the archive-based NSGA-II multi-objective evolutionary algorithm according to claim 1 is characterized in that: The expression of the multi-objective optimization function in S2 includes: Where E is the total CPU energy consumption of the physical machine; E i is the CPU energy consumption of physical machine i; m is the number of physical machines; x i is the first binary variable indicating whether physical machine i is activated, and the value is 1 if activated, otherwise 0; is the energy consumption of physical machine i when the CPU utilization is 100%; is the energy consumption of physical machine i when the CPU utilization is 0%; y ij D is the second binary variable indicating whether virtual machine j is deployed on physical machine i. If virtual machine j is deployed on physical machine i, the value is 1, otherwise it is 0; ij is the CPU utilization of virtual machine j on physical machine i; W is the total resource loss of the physical machine; W i is the resource loss of physical machine i; W i CPU is the CPU resource loss of the physical machine; W i mem is the memory resource loss of physical machine i; C i is the CPU utilization of physical machine i; M i is the memory utilization of physical machine i; L is the total resource balance of the physical machine; L i is the resource balance degree of physical machine i; T is the total turnover time of the virtual machine on the physical machine; T i is the turnaround time of physical machine i; T ij The turnaround time for virtual machine j to be placed on physical machine i; is the waiting time of virtual machine j on physical machine i; represents the computing time of virtual machine j on physical machine i.
3. The cloud resource scheduling method based on the archive-based NSGA-II multi-objective evolutionary algorithm according to claim 1, characterized in that: The constraints of the archive-based NSGA-II multi-objective evolutionary algorithm include the number of special resources. When each virtual machine runs on a physical machine, the number of special resources used is less than the available number of corresponding resources. The expression is: Among them, v ji The amount of resource i used by virtual machine j; r i is the available quantity of resource i; V is the set of virtual machines.
4. The cloud resource scheduling method based on the archive-based NSGA-II multi-objective evolutionary algorithm according to claim 3 is characterized in that: The constraints of the archive-based NSGA-II multi-objective evolutionary algorithm also include affinity constraints. The constraint expression satisfied by the affinity between virtual machines and computing nodes is: Where a(i,j) is the affinity between virtual machine j and physical machine computing node i, t ij is a third binary variable indicating whether virtual machine j can be deployed on the corresponding computing node physical machine i.
5. The cloud resource scheduling method based on the archive-based NSGA-II multi-objective evolutionary algorithm according to claim 4 is characterized in that: The constraints of the archive-based NSGA-II multi-objective evolutionary algorithm also include network delay constraints. After deployment, the network delay between virtual machines is less than the maximum acceptable network delay T, which is expressed as: Where d(i,j) is the network delay between virtual machine j and the corresponding computing node physical machine i, q ij A fourth binary variable indicating whether a connection exists between virtual machine j and the corresponding computing node physical machine i. If so, the value is 1, otherwise it is 0.
6. The cloud resource scheduling method based on the archive-based NSGA-II multi-objective evolutionary algorithm according to claim 1, characterized in that: The real number code in S1 uses a decimal sequence to encode the mapping relationship between virtual machines and physical machines. The number of elements in the obtained real number sequence is the number of virtual machines, the subscript of each element is the virtual machine number, and the value of each element is the matching physical machine number.
7. The cloud resource scheduling method based on the archive-based NSGA-II multi-objective evolutionary algorithm according to claim 1, characterized in that: The external archive update strategy in S3 specifically includes dividing the solution space into multiple subspaces according to uniformly distributed reference vectors, assigning reference points to each subspace; calculating the angle between the solution and the reference point, and preferentially retaining the solution with the smallest angle; the archive capacity is fixed at 50% of the population size, and the archive is truncated after each generation of iteration.
8. A system for a cloud resource scheduling method using the archive-based NSGA-II multi-objective evolutionary algorithm according to any one of claims 1 to 7, characterized in that: The system includes a global control layer and a local control layer, wherein the global control layer includes a load predictor module, a physical machine detector module, a virtual machine selector module and a virtual machine allocator module, and the local control layer includes a virtual machine manager module. The global control layer is configured to receive application resource requests from users and control the load predictor module to perform system load prediction. The load predictor module is configured to obtain prediction results for physical resource usage in various dimensions of each physical machine based on historical system load data and current load status, and send these prediction results to the physical machine detector module, the virtual machine selector module, and the virtual machine allocator module, respectively. The physical machine detector module is configured to perform host detection and, based on the received prediction results from the load predictor module, determine whether the current load status of the physical machine is overloaded or underloaded, and send the physical machine load status to the virtual machine selector module. The virtual machine selector module is configured to obtain scheduling results for virtual machine placement, and the archive-based NSGA-II multi-objective evolutionary algorithm and the corresponding objective function model are embedded in the virtual machine selector module. The virtual machine allocator module is configured to monitor the resource utilization of physical machine compute nodes and virtual machines in real time and, based on the virtual machine placement scheduling results and current resource requirements of the virtual machines, send virtual machine adjustment and migration instructions to the virtual machine manager module. The virtual machine manager module is configured to execute virtual machine adjustment and migration operations and send system feedback to the load predictor module, including current resource usage information for each physical machine compute node in the system.
9. A cloud resource scheduling device based on the NSGA-II multi-objective evolutionary algorithm of the archive, comprising a memory, a processor, and a program stored in the memory, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 7 is implemented.
10. A storage medium having a program stored thereon, characterized in that: When the program is executed, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Large-scale Hadoop cluster virtual machine placement method based on multi-objective optimization
CN119902856A