Cloud host load balancing method and device, computer equipment, readable storage medium and program product

By monitoring the resource load information of cloud host nodes in real time, determining the weighted mean square variance function and constraint function, and using a differential evolution algorithm to calculate the optimal load balancing solution, the problem of unbalanced resource allocation in cloud computing clusters is solved, and the balance of resource allocation and business performance are improved.

CN119645643APending Publication Date: 2025-03-18CHINA TELECOM CLOUD TECH CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

Due to unbalanced resource allocation in cloud computing clusters, uneven equipment load will affect business performance and increase the probability of equipment failure and usage costs.

Method used

By monitoring the resource load information of cloud host nodes in real time, obtaining the distribution, resource capacity and load information of the virtual machine, determining the weighted mean square variance function and constraint function, using the differential evolution algorithm for iterative calculation, determining the optimal load balancing scheme, and adjusting the distribution of the virtual machine.

Benefits of technology

It improves the balance of resource allocation, reduces the problem of uneven load of equipment, improves business performance, and reduces the probability of equipment failure and usage costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119645643A_ABST
    Figure CN119645643A_ABST
Patent Text Reader

Abstract

The invention relates to a cloud host load balancing method and device, equipment, a medium and a product, and relates to the technical field of cloud computing. The method comprises the following steps: monitoring first load information of resources of each cloud host node included in a cloud platform in real time; when the first load information of the resources of any cloud host node is greater than a preset load threshold value, determining the distribution condition, resource capacity and second load information of the virtual machines of each cloud host node according to the first load information; determining a weighted mean square error function and a constraint function according to the total number of the cloud host nodes, the distribution condition of the virtual machines, the resource capacity, the second load information and a preset weight factor of each resource; carrying out iterative calculation by adopting a differential evolution algorithm according to the weighted mean square error function and the constraint function, and determining an optimal load balancing scheme; and adjusting the distribution condition of the virtual machines of each cloud host node according to the optimal load balancing scheme. By adopting the method, the balance of resource allocation can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing technology, and in particular to a cloud host load balancing method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art

[0002] At present, the scale of infrastructure (servers and related equipment) required for cloud computing is increasing day by day. With the expansion of clusters and changes in the services on each cloud host, there will be serious imbalance in resource distribution in the entire cluster. That is, some devices are busy with services, while some devices are very idle, which greatly affects the performance of the services, increases the probability of equipment failure, and thus increases the cost of use. In related technologies, the resource allocation method of cloud hosts is mainly based on the resource scheduling problem of the current cloud computing platform, which is usually achieved by monitoring load balancing logs and detecting response time. The resource allocation algorithm considers relatively simple situations, so there is a problem of low balance in resource allocation. Summary of the invention

[0003] Based on this, it is necessary to provide a cloud host load balancing method, apparatus, computer equipment, computer-readable storage medium and computer program product that can improve the balance of resource allocation in response to the above technical problems.

[0004] In a first aspect, the present application provides a cloud host load balancing method, comprising:

[0005] Real-time monitoring of first load information of resources of each cloud host node included in the cloud platform; the resources include multiple types;

[0006] When the first load information of the resources of any of the cloud host nodes is greater than a preset load threshold, obtaining the distribution of virtual machines, resource capacity and second load information of each of the cloud host nodes; the second load information is the load information of the resources of each of the virtual machines;

[0007] Determine a weighted mean square error function and a constraint function according to the total number of the cloud host nodes, the distribution of the virtual machines, the resource capacity, the second load information, and a preset weight factor of each resource;

[0008] Using a differential evolution algorithm to perform iterative calculations according to the weighted mean square error function and the constraint function until a preset iterative calculation end condition is met, thereby determining an optimal load balancing solution;

[0009] According to the optimal load balancing solution, the distribution of the virtual machines of each cloud host node is adjusted.

[0010] In one embodiment, determining the weighted mean square error function and the constraint function according to the total number of the cloud host nodes, the distribution of the virtual machines, the resource capacity, the second load information and the preset weight factor of each resource includes:

[0011] Determine, according to each of the second load information, the demand and usage quantity of each of the virtual machines for each of the resources;

[0012] Determining a constraint function according to the resource capacity, the demand and the usage quantity;

[0013] A weighted mean square error function is determined according to the total number of the cloud host nodes, the resource capacity, the usage quantity and the preset weight factor.

[0014] In one embodiment, determining a weighted mean square error function according to the total number of cloud host nodes, the resource capacity, the usage quantity and the preset weight factor includes:

[0015] Determine the average allocation of each resource in each cloud host according to the total number of cloud host nodes, the resource capacity, and the usage quantity;

[0016] A weighted mean square error function is determined according to the average allocation, the total number of cloud host nodes, the resource capacity, the usage quantity and the preset weight factor.

[0017] In one embodiment, the differential evolution algorithm is used to perform iterative calculation according to the weighted mean square error function and the constraint function until a preset iterative calculation end condition is met to determine the optimal load balancing solution, including:

[0018] Randomly generate an initial population including a plurality of initial balancing schemes; the initial balancing schemes represent usage of each resource by all the virtual machines on each of the cloud host nodes;

[0019] According to the weighted mean square error function, determining an initial optimal balancing scheme with the minimum fitness from all the initial balancing schemes;

[0020] According to the initial population and the constraint function, the differential evolution operation is iteratively performed until the preset iterative calculation end condition is met, thereby obtaining an optimal load balancing solution.

[0021] In one embodiment, the iterative differential evolution operation is performed according to the initial population and the constraint function until a preset iterative calculation end condition is met to obtain an optimal load balancing solution, including:

[0022] Performing a differential evolution operation according to the initial population and the constraint function to obtain a plurality of candidate equilibrium solutions;

[0023] In the case that there is a target candidate balancing scheme whose fitness is less than or equal to the fitness of the initial optimal balancing scheme among the multiple candidate balancing schemes, the target candidate balancing scheme is used as a new initial optimal balancing scheme, and the step of performing a differential evolution operation according to the initial population and the constraint function is returned until the preset iterative calculation end condition is met, and the target optimal balancing scheme obtained when the preset iterative calculation end condition is met is used as the optimal load balancing scheme.

[0024] In one embodiment, the differential evolution operation is performed according to the initial population and the constraint function to obtain multiple candidate equilibrium solutions, including:

[0025] According to the initial population, a plurality of difference vectors are obtained;

[0026] Obtaining a corresponding mutation vector according to each of the differential vectors and a preset mutation factor;

[0027] A cross operation is performed on the multiple initial equalization schemes and the multiple mutation vectors to obtain multiple initial candidate equalization schemes, and the initial candidate equalization schemes that satisfy the constraint function are used as candidate equalization schemes.

[0028] In a second aspect, the present application also provides a cloud host load balancing device, including:

[0029] A cloud host monitoring module, used for real-time monitoring of first load information of resources of each cloud host node included in the cloud platform; the resources include multiple types;

[0030] A load determination module, configured to obtain the distribution of virtual machines, resource capacity and second load information of each of the cloud host nodes when the first load information of the resources of any of the cloud host nodes is greater than a preset load threshold; the second load information is the load information of the resources of each of the virtual machines;

[0031] A function construction module, used to determine a weighted mean square error function and a constraint function according to the total number of the cloud host nodes, the distribution of the virtual machines, the resource capacity, the second load information and a preset weight factor of each resource;

[0032] A scheme selection module, used to use a differential evolution algorithm to perform iterative calculation according to the weighted mean square error function and the constraint function until a preset iterative calculation end condition is met, so as to determine an optimal load balancing scheme;

[0033] The load balancing module is used to adjust the distribution of the virtual machines of each cloud host node according to the optimal load balancing solution.

[0034] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0035] Real-time monitoring of first load information of resources of each cloud host node included in the cloud platform; the resources include multiple types;

[0036] When the first load information of the resources of any of the cloud host nodes is greater than a preset load threshold, obtaining the distribution of virtual machines, resource capacity and second load information of each of the cloud host nodes; the second load information is the load information of the resources of each of the virtual machines;

[0037] Determine a weighted mean square error function and a constraint function according to the total number of the cloud host nodes, the distribution of the virtual machines, the resource capacity, the second load information, and a preset weight factor of each resource;

[0038] Using a differential evolution algorithm to perform iterative calculations according to the weighted mean square error function and the constraint function until a preset iterative calculation end condition is met, thereby determining an optimal load balancing solution;

[0039] According to the optimal load balancing solution, the distribution of the virtual machines of each cloud host node is adjusted.

[0040] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0041] Real-time monitoring of first load information of resources of each cloud host node included in the cloud platform; the resources include multiple types;

[0042] When the first load information of the resources of any of the cloud host nodes is greater than a preset load threshold, obtaining the distribution of virtual machines, resource capacity and second load information of each of the cloud host nodes; the second load information is the load information of the resources of each of the virtual machines;

[0043] Determine a weighted mean square error function and a constraint function according to the total number of the cloud host nodes, the distribution of the virtual machines, the resource capacity, the second load information, and a preset weight factor of each resource;

[0044] Using a differential evolution algorithm to perform iterative calculations according to the weighted mean square error function and the constraint function until a preset iterative calculation end condition is met, thereby determining an optimal load balancing solution;

[0045] According to the optimal load balancing solution, the distribution of the virtual machines of each cloud host node is adjusted.

[0046] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0047] Real-time monitoring of first load information of resources of each cloud host node included in the cloud platform; the resources include multiple types;

[0048] When the first load information of the resources of any of the cloud host nodes is greater than a preset load threshold, obtaining the distribution of virtual machines, resource capacity and second load information of each of the cloud host nodes; the second load information is the load information of the resources of each of the virtual machines;

[0049] Determine a weighted mean square error function and a constraint function according to the total number of the cloud host nodes, the distribution of the virtual machines, the resource capacity, the second load information, and a preset weight factor of each resource;

[0050] Using a differential evolution algorithm to perform iterative calculations according to the weighted mean square error function and the constraint function until a preset iterative calculation end condition is met, thereby determining an optimal load balancing solution;

[0051] According to the optimal load balancing solution, the distribution of the virtual machines of each cloud host node is adjusted.

[0052] The cloud host load balancing method, device, computer equipment, computer readable storage medium and computer program product monitor the first load information of the resources of each cloud host node included in the cloud platform in real time, wherein the resources include multiple types, monitor the load of the cloud host node in real time, and take corresponding measures in time. Further, when the first load information of the resources of any cloud host node is greater than the preset load threshold, the distribution of the virtual machines of each cloud host node, the resource capacity and the second load information are obtained, wherein the second load information is the load information of the resources of each virtual machine. When the cloud platform is overloaded, the performance parameters of the cloud host nodes at a deeper level and the load conditions of more detailed are obtained to provide data support for load balancing. According to the total number of cloud host nodes, the distribution of the virtual machines, the resource capacity, the second load information and the preset weight factor of each resource, the weighted mean square error function and the constraint function are determined; the differential evolution algorithm is used to perform iterative calculations according to the weighted mean square error function and the constraint function until the preset iterative calculation end condition is met, and the optimal load balancing scheme is determined; according to the optimal load balancing scheme, the distribution of the virtual machines of each cloud host node is adjusted. Based on the multi-dimensional load information of the cloud platform, the differential evolution algorithm is adopted to take into account the weight differences of different types of resources to obtain the optimal load balancing solution that best suits the current load situation of the cloud platform, thereby improving the balance of resource allocation. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0054] Figure 1 This is an application environment diagram of a cloud host load balancing method in an embodiment;

[0055] Figure 2 A schematic diagram of a flow chart of a cloud host load balancing method in one embodiment;

[0056] Figure 3 A schematic flow chart of the steps of constructing a weighted mean square error function in one embodiment;

[0057] Figure 4 A schematic diagram of a flow chart of steps for determining an optimal load balancing solution in an embodiment;

[0058] Figure 5A schematic diagram of a flow chart of a cloud host automatic load balancing method based on a weighted differential evolution algorithm in an embodiment;

[0059] Figure 6 A schematic diagram of the load situation of a cloud computing environment before load balancing is performed in one embodiment;

[0060] Figure 7 A schematic diagram of the cost change of each generation of population during the population iteration process in one embodiment;

[0061] Figure 8 A schematic diagram of the load situation of a cloud computing environment after load balancing is performed in one embodiment;

[0062] Fig. 9 It is a structural block diagram of a cloud host load balancing device in one embodiment;

[0063] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

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

[0065] The cloud host load balancing method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown, the application environment includes: a cloud platform 102, a control center 104, a cloud host node 106 and a virtual machine 108. The cloud platform 102 includes n cloud host nodes 106, and each cloud host node includes at least one virtual machine 108. The cloud platform 102 communicates with the control center 104 through a network. The control center 104 can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services. The control center 104 monitors the first load information of the resources of each cloud host node 106 included in the cloud platform 102 in real time; wherein the resources include multiple types; when the first load information of the resources of any cloud host node 106 is greater than a preset load threshold, the control center 104 obtains the distribution, resource capacity and second load information of the virtual machines 108 of each cloud host node 106; wherein the second load information is the load information of the resources of each virtual machine 108; the control center 104 also determines the weighted mean square error function and the constraint function according to the total number of cloud host nodes 106, the distribution of virtual machines 108, the resource capacity, the second load information and the preset weight factor of each resource; further, the control center 104 uses a differential evolution algorithm to perform iterative calculations according to the weighted mean square error function and the constraint function until the preset iterative calculation end condition is met, and determines the optimal load balancing solution; and according to the optimal load balancing solution, the distribution of the virtual machines 108 of each cloud host node 106 is adjusted.

[0066] In an exemplary embodiment, Figure 2 As shown, a cloud host load balancing method is provided, which is applied to Figure 1 The control center 104 in FIG. 1 is taken as an example to illustrate, and the following steps S202 to S210 are included. Among them:

[0067] Step S202: monitor first load information of resources of each cloud host node included in the cloud platform in real time.

[0068] Among them, the cloud platform can be a computing resource-based service provider based on the Internet, allowing users to store and manage data in the cloud, run applications, etc. The cloud platform provides on-demand, scalable computing resources and services, and users can obtain and release resources at any time as needed; the cloud host node can be a virtual server instance created through virtualization technology in a cloud computing environment.

[0069] Among them, resources include various types, such as CPU (Central Processing Unit), memory, storage and network resources. The allocation of the above resources on each cloud host node affects the stability of the entire system.

[0070] The first load information may be the values ​​of various resources loaded on each cloud host node.

[0071] Optionally, the control center monitors first load information of various resources loaded on each cloud host node included in the cloud platform in real time to grasp the load conditions of each cloud host node of the cloud platform.

[0072] Step S204, when the first load information of the resources of any cloud host node is greater than a preset load threshold, the distribution of virtual machines, resource capacity and second load information of each cloud host node are obtained.

[0073] The preset threshold may be a maximum load value of a cloud host node for any type of resource.

[0074] The second load information is the load information of the resources of each virtual machine. The virtual machine can be a logical computing unit running on a cloud host node, each virtual machine can simulate an independent computer environment, has its own operating system, application and resource configuration, and users can run different applications on multiple virtual machines.

[0075] The distribution of virtual machines may be the number of virtual machines deployed on each cloud host node included in the cloud platform. The resources allocated to each cloud host node are the sum of the resources corresponding to all virtual machines on the cloud host node.

[0076] The resource capacity may be the capacity of each cloud host node for each resource.

[0077] Optionally, when the control center detects that the first load information of the resources of any cloud host node is greater than a preset threshold, it indicates that the resources of the current cloud platform need to be adjusted to avoid affecting the stability of the system. The cloud platform is monitored in real time to obtain the distribution, resource capacity and second load information of the virtual machines of each cloud host node.

[0078] Step S206, determining a weighted mean square error function and a constraint function according to the total number of cloud host nodes, the distribution of virtual machines, resource capacity, the second load information and a preset weight factor of each resource.

[0079] The preset weight factor may be a corresponding weight set according to the importance of each resource.

[0080] Among them, the weighted mean square error function can characterize the resource allocation deviation of different types of resources between different cloud host nodes.

[0081] The constraint function may be a constraint condition that needs to be satisfied when performing resource balancing among various cloud host nodes.

[0082] Optionally, the control center determines the weighted mean square error function and the constraint function based on the total number of cloud host nodes, the distribution of virtual machines on each cloud host node, the resource capacity of each cloud host node for each resource, the second load information of each virtual machine and the preset weight factor corresponding to each resource.

[0083] Step S208, using a differential evolution algorithm to perform iterative calculations according to a weighted mean square error function and a constraint function until a preset iterative calculation termination condition is met, thereby determining an optimal load balancing solution.

[0084] Among them, the differential evolution algorithm can be a heuristic algorithm for optimization problems. It is a type of evolutionary algorithm, mainly used to solve continuous space (DifferentialEvolution, DE) is a simple structure, a wide range of applications, adaptive global evolutionary algorithm, by simulating the variation and crossover process between individuals in a group, through iterations to gradually find the optimal solution to the problem, the DE algorithm has a simple principle, few control parameters and easy adjustment, strong global search capability, and fast convergence speed.

[0085] The preset iterative calculation termination condition may be that a maximum number of iterations is reached or a weighted mean square error function value reaches a preset threshold.

[0086] Among them, the optimal load balancing solution may be a load balancing solution that satisfies the constraint function and can make the first load information of all cloud host nodes lower than or equal to a preset load threshold.

[0087] Optionally, the control center adopts a differential evolution algorithm, takes the weighted mean square error function as the fitness function, and generates a new load balancing solution by iterative calculation through the differential evolution algorithm until the preset iterative calculation end condition is met, thereby determining the optimal load balancing solution that meets the constraint function.

[0088] Step S210: adjusting the distribution of virtual machines of each cloud host node according to the optimal load balancing solution.

[0089] Optionally, the control center adjusts the distribution of virtual machines in each cloud host node according to the optimal load balancing solution obtained. The adjustment method can adopt methods such as hot migration to reasonably migrate virtual machines in the cluster of cloud host nodes. In the future, the load balancing effect of the cloud platform can be evaluated through the weighted mean square error function, and the algorithm parameters and the weights of various resources can be adjusted according to the monitoring results to adapt to the changing load requirements.

[0090] In the above cloud host load balancing method, by real-time monitoring of the first load information of the resources of each cloud host node included in the cloud platform, wherein the resources include multiple types, the load of the cloud host node is monitored in real time, so as to facilitate timely taking corresponding measures. Further, when the first load information of the resources of any cloud host node is greater than the preset load threshold, the distribution of the virtual machines of each cloud host node, the resource capacity and the second load information are determined according to the first load information of each cloud host node, wherein the second load information is the load information of the resources of each virtual machine, and when the cloud platform is overloaded, the performance parameters of the cloud host node at a deeper level and the load conditions of more detailed levels are obtained to provide data support for load balancing. According to the total number of cloud host nodes, the distribution of the virtual machines, the resource capacity, the second load information and the preset weight factor of each resource, the weighted mean square error function and the constraint function are determined; the differential evolution algorithm is used to perform iterative calculation according to the weighted mean square error function and the constraint function until the preset iterative calculation end condition is met, and the optimal load balancing scheme is determined; according to the optimal load balancing scheme, the distribution of the virtual machines of each cloud host node is adjusted. Based on the multi-dimensional load information of the cloud platform, the differential evolution algorithm is adopted to take into account the weight differences of different types of resources to obtain the optimal load balancing solution that best suits the current load situation of the cloud platform, thereby improving the balance of resource allocation.

[0091] In an exemplary embodiment, Figure 3 As shown, step S206 determines the weighted mean square error function and the constraint function according to the total number of cloud host nodes, the distribution of virtual machines, resource capacity, the second load information and the preset weight factor of each resource, including the following steps S302 to S306. Wherein:

[0092] Step S302: Determine the demand and usage quantity of each virtual machine for each resource according to each second load information.

[0093] The demand may be the quantity of various resources required for the virtual machine to perform computing tasks, such as the required memory size, CPU performance size, and storage space size.

[0094] The usage quantity may be the quantity of various resources currently used by the virtual machine, such as the specific conditions of the currently occupied CPU, occupied memory, and occupied storage space.

[0095] Optionally, the control center determines the demand and usage of each virtual machine for each resource according to the second load information corresponding to the load condition of each virtual machine for each resource.

[0096] Step S304, determining a constraint function according to resource capacity, demand and usage quantity.

[0097] Optionally, the control center constructs a constraint function based on the resource capacity of each cloud host node for each resource and the demand and usage of each virtual machine for each resource. The corresponding formula is:

[0098]

[0099] Where N is the total number of nodes, V is the total number of virtual machines, and x ijc represents the usage of the cth resource by the i-th virtual machine on the j-th cloud host node, VM i [c] represents the demand of the i-th virtual machine for the c-th resource, N j [c] represents the resource capacity of the j-th cloud host node for the c-th resource.

[0100] Step S306, determining a weighted mean square error function according to the total number of cloud host nodes, resource capacity, usage quantity and preset weight factors.

[0101] Optionally, the control center constructs a weighted mean square error function according to the total number of cloud host nodes, the resource capacity of each cloud host node for each resource, the usage quantity of each virtual machine for each resource, and a preset weight factor for each resource.

[0102] In this embodiment, the demand and usage of each virtual machine for each resource are analyzed according to the second load information, so that the demand of each virtual machine for various resources can be accurately identified, providing a reference basis for subsequent load balancing. Constructing a constraint function can optimize the allocation of resources and ensure that the cloud platform operates within the scope of the constraint function. Constructing a weighted mean square error function takes into account the importance of each resource and quantifies the imbalance in the use of different resources, thereby improving the balance of load distribution.

[0103] In an exemplary embodiment, step S306, determining a weighted mean square error function according to the total number of cloud host nodes, resource capacity, usage quantity and a preset weight factor, includes:

[0104] According to the total number of cloud host nodes, resource capacity and usage quantity, the average allocation of each resource in each cloud host is determined; according to the average allocation, the total number of cloud host nodes, resource capacity, usage quantity and preset weight factors, the weighted mean square error function is determined.

[0105] The average allocation amount may be the amount of all types of resources included in the current cloud platform, and each resource is evenly allocated to each cloud host node.

[0106] Optionally, the average allocation of each resource in each cloud host is calculated based on the total number of cloud host nodes included in the cloud platform, the resource capacity of each cloud host node for each resource, and the usage of each resource by each virtual machine. The corresponding formula is:

[0107]

[0108] in, represents the average allocation of the cth resource in each cloud host, N represents the total number of nodes, V represents the total number of virtual machines, and x ijc N represents the amount of resource c used by the i-th virtual machine on the j-th cloud host node. j [c] represents the resource capacity of the j-th cloud host node for the c-th resource.

[0109] Furthermore, the control center constructs a weighted mean square error function based on the average allocation of each resource in each cloud host, the total number of cloud host nodes, the resource capacity of each cloud host node for each resource, the number of each virtual machine using each resource, and the preset weight factor corresponding to each resource. The corresponding construction process and formula include: calculating the square of the difference between the actual load of each resource on each cloud host node and the average allocation based on the average allocation of each resource in each cloud host, the total number of cloud host nodes, the resource capacity of each cloud host node for each resource, and the number of each virtual machine using each resource:

[0110]

[0111] in, represents the average allocation of the cth resource in each cloud host, N represents the total number of nodes, C represents the total number of resource types, and x ijc N represents the amount of resource c used by the i-th virtual machine on the j-th cloud host node. j [c] represents the resource capacity of the j-th cloud host node for the c-th resource.

[0112] Then, according to the preset weight factors and the importance of different resources, the weighted mean square error calculation formula based on all resources is obtained:

[0113]

[0114] in, are preset weight factors that sum to 1 and are used to balance the importance of different resources. Represents the mean squared deviation of the usage of different resources.

[0115] Finally, according to the difference square formula and weighted mean square error calculation formula, the weighted mean square error function is constructed:

[0116]

[0117] Wherein, wc represents the preset weight factor of each resource.

[0118] In this embodiment, by constructing the average allocation amount, the weighted mean square error and the weighted mean square error function, the resource allocation deviation of different resources between different nodes is minimized, so that the balance of resource allocation can be improved when the optimal load balancing solution is calculated subsequently.

[0119] In an exemplary embodiment, Figure 4 As shown, step S208 uses a differential evolution algorithm to perform iterative calculations according to a weighted mean square error function and a constraint function until a preset iterative calculation end condition is met to determine an optimal load balancing solution, including the following steps S402 to S406. Among them:

[0120] Step S402: randomly generate an initial population including multiple initial equilibrium solutions.

[0121] The initial balancing scheme represents the usage of each resource by all virtual machines on each cloud host node.

[0122] The initial population may be a group of candidate solutions created in a random manner, and these candidate solutions are evenly distributed in the solution space. In this embodiment, the initial equilibrium solution is the candidate solution.

[0123] Optionally, the control center randomly generates an initial population containing multiple initial equilibrium solutions, for example, defining an initial population with a population size of P , each individual Represents an initial balancing scheme, whose attributes include the resource allocation values ​​of various resources of the virtual machine and define the weights of each resource. ,in, is the weight of the 𝑐th resource, and C is the total number of resource types.

[0124] Step S404: determining an initial optimal equalization scheme with the minimum fitness from all initial equalization schemes according to the weighted mean square error function.

[0125] The fitness may be a value calculated based on relevant parameters of the initial balancing solution and a weighted mean square error function.

[0126] Optionally, the control center calculates the fitness corresponding to each initial equilibrium solution according to the weighted mean square error function, and takes the initial equilibrium solution with the smallest fitness as the initial optimal equilibrium solution to calculate the fitness 𝑓(𝑥) of each individual 𝑥:

[0127]

[0128] Preferably, the weighted mean square error is multiplied by 1000 to more conveniently display the value of each generation in subsequent iterations.

[0129] Step S406, iteratively performing differential evolution operations according to the initial population and the constraint function until a preset iterative calculation end condition is met, thereby obtaining an optimal load balancing solution.

[0130] The differential evolution operation may include operations such as initializing the population, mutating the population, and updating the population.

[0131] Optionally, the control center performs mutation and crossover operations in the differential evolution operation according to the initial balancing scheme included in the initial population, generates candidate balancing schemes that satisfy the constraint function, calculates the fitness of each candidate balancing scheme, updates the initial population, iterates until the preset iterative calculation end condition is met, and determines the optimal load balancing scheme.

[0132] In this embodiment, the control center retains and updates the best performing solution in the iterative differential evolution operation, thereby gradually improving the load balancing strategy. This dynamic adjustment process can improve the efficiency and stability of the system.

[0133] In an exemplary embodiment, step S406 iterates the differential evolution operation according to the initial population and the constraint function until a preset iterative calculation end condition is met to obtain an optimal load balancing solution, including:

[0134] According to the initial population and the constraint function, a differential evolution operation is performed to obtain multiple candidate equilibrium solutions; when there is a target candidate equilibrium solution whose fitness is less than or equal to the fitness of the initial optimal equilibrium solution among the multiple candidate equilibrium solutions, the target candidate equilibrium solution is used as the new initial optimal equilibrium solution, and the step of performing the differential evolution operation according to the initial population and the constraint function is returned until the preset iterative calculation end condition is met, and the target optimal equilibrium solution obtained when the preset iterative calculation end condition is met is used as the optimal load balancing solution.

[0135] Among them, the candidate equilibrium solution can be a new individual generated after the initial population undergoes mutation and crossover operations in the differential evolution operation.

[0136] Optionally, the control center performs compilation operations and crossover operations in sequence according to the initial balancing scheme in the initial population, generates multiple candidate balancing schemes that meet the constraint function, calculates the fitness function corresponding to each candidate balancing scheme according to the weighted mean square error function, and uses the target optimal balancing scheme as the new initial optimal balancing scheme when there is a target optimal balancing scheme whose fitness corresponding to any candidate balancing scheme is less than or equal to the fitness of the initial optimal balancing scheme among the multiple candidate balancing schemes. If there are multiple candidate balancing schemes whose fitness is lower than the fitness of the optimal balancing scheme, update the initial population with them as new individuals to obtain a new generation of population. Return to the step of performing differential evolution operations according to the initial population and the constraint function until the preset iterative calculation end condition is met, such as reaching the maximum number of iterations or the fitness of the new optimal balancing scheme is less than or equal to the preset threshold, and use the target optimal balancing scheme as the optimal load balancing scheme when the preset iterative calculation end condition is met.

[0137] In this embodiment, candidate solutions that meet the conditions are generated according to the constraint function, so that the generated equilibrium solution is gradually optimized through the process of natural selection under the premise of meeting the actual constraints, which can improve the actual feasibility and effectiveness of the solution. In addition, by calculating the fitness function of the candidate equilibrium solution, the advantages and disadvantages of each solution in load balancing can be accurately reflected, providing a scientific basis for subsequent solution selection and updating, and selecting new individuals for updating from candidate solutions with fitness lower than the initial optimal equilibrium solution, ensuring the dynamic adaptability of the algorithm, maintaining the diversity of the population, and avoiding falling into the local optimum. According to the combination of the weighted mean square error function and the differential evolution algorithm, it can converge to the optimal or approximately optimal solution more quickly, thereby improving the solution efficiency.

[0138] In an exemplary embodiment, the steps of the above embodiment perform differential evolution operations according to the initial population and the constraint function to obtain multiple candidate equilibrium solutions, including:

[0139] According to the initial population, multiple differential vectors are obtained; according to each differential vector and a preset mutation factor, a corresponding mutation vector is obtained; a cross operation is performed on the multiple initial equilibrium schemes and the multiple mutation vectors to obtain multiple initial candidate equilibrium schemes, and the initial candidate equilibrium scheme that satisfies the constraint function is used as a candidate equilibrium scheme.

[0140] The difference vector may be a vector of differences between individuals in the initial population.

[0141] The preset variation factor may be a scaling factor, which is a real constant factor that controls the scaling of the deviation variable.

[0142] Optionally, the control center randomly selects three different initial equilibrium schemes from the initial population, calculates the difference vectors between the two initial equilibrium schemes, and then obtains the corresponding mutation vectors based on the difference vectors and the preset mutation factors. , , As a benchmark for differential evolution, the differential vector is calculated: ; Then generate the mutation vector , where F is a preset mutation factor. A crossover operation is performed on multiple initial equalization schemes and multiple mutation vectors to obtain multiple initial candidate equalization schemes, and the initial candidate equalization schemes that satisfy the constraint function are used as candidate equalization schemes. Exemplarily, the crossover operation may adopt a binary crossover method:

[0143]

[0144] Among them, k is the index of each individual vector (the vector of the initial equilibrium solution); CR is the crossover operator, which represents a probability and is a random number between [0, 1]; rand(0, 1) is a random number between [0, 1].

[0145] In this embodiment, randomly mutating and crossovering the initial balancing scheme from the initial population can ensure the diversity of the population and avoid converging to the local optimal solution too early. The setting of the mutation factor enables the algorithm to adjust according to the different characteristics of the problem and enhance its adaptive ability. The crossover operation combined with the mutation can quickly generate new candidate solutions, and filter out effective solutions through the constraint function, thereby improving the convergence speed, thereby further improving the balance of the optimal load balancing scheme finally obtained.

[0146] In an exemplary embodiment, Figure 5 As shown, a cloud host automatic load balancing method based on a weighted differential evolution algorithm is provided, which specifically includes:

[0147] Step 1: Collect resource information and resources of cloud host nodes: including the processor status, memory status, storage status, and network bandwidth of each cloud host.

[0148] For example, a cloud computing environment consists of 5 cloud host nodes (N=5), each of which has different CPU, memory, storage and network resource capacities. At the same time, there are 10 virtual machines (V=10) distributed on these 5 nodes. The services on each virtual machine are different (that is, each virtual machine has different requirements for each resource). At this time, the CPU utilization rate on one of the nodes has exceeded 90%, while the CPU utilization rate on other nodes is only 9%. The CPU resource capacity of each node is nodeCPU=[10, 8, 12, 9, 11]; the memory resource capacity of each node is nodeMemory=[20, 16, 25, 20, 22]; the storage resource capacity of each node is nodeStorage=[35, 30, 35, 35, 35]; the network resource capacity of each node is nodeNetwork=[8, 7, 8, 7, 8]; Assume that the resource requirements of the virtual machines include: the CPU resource requirements of each virtual machine are vmCPU=[2, 1, 3, 2, 1 , 5, 4, 1, 2, 2]; the memory resource demand of each virtual machine is vmMemory=[4, 2, 5, 3, 5, 4, 5, 2, 3, 6]; the storage resource demand of each virtual machine is vmStorage=[6, 6, 8, 5, 4, 6, 8, 3, 5, 5]; the network resource demand of each virtual machine is: vmNetwork=[1, 1, 1, 1, 2, 1, 1, 1, 1]; the current distribution of virtual machines is: initialVMNode=[4, 3, 2, 2, 5, 1, 1, 3, 3, 2].

[0149] Step 2: If any cloud host node is overloaded based on the collected information and resources, a load balancing operation is triggered.

[0150] For example, Figure 6 As shown in Figure 1, a schematic diagram of the load situation of the cloud computing environment before load balancing is provided. Assume that the preset threshold condition of the automatic balancing mechanism currently set is that the CPU and memory usage of any node in the cluster cannot exceed 60% of the node. Figure 6It can be seen that at this time, the CPU of node 1 exceeds 90%, and the CPU and memory of node 2 are both 88%, which have exceeded the preset load threshold. Generate the weighted sum of the mean square error (weighted mean square error function) of the pre-allocated resources according to different resource weights, set the parameters such as the number of populations in the weighted difference algorithm (differential evolution algorithm), generate the initialization population G=0, perform mutation operations on the individuals in the population, and further perform crossover to generate new candidate individuals (candidate equilibrium scheme), calculate the fitness values ​​of the generated candidate individuals, and select and retain individuals in the next generation of the new population until the maximum number of iterations meets the set termination condition (iterative calculation end condition), and generate the optimal resource scheduling scheme (optimal load balancing scheme). For example, resource types include CPU, memory, storage, and network, represented by c=1 to c=4 respectively. Preset weight factor , are the weights allocated to CPU, memory, storage, and network, respectively, and are set according to the importance and cost of the resources, such as 𝑊={0.5,0.4,0.02,0.08}. Randomly generate an initial population of 50 individuals, each of which is a three-dimensional matrix of length 10×5×4, representing the initial allocation of 10 virtual machines to 4 resources on 5 nodes, and calculate the fitness function of each individual , using the formula of the weighted mean square error function defined in the above embodiment. For each individual xi in the population, three different individuals are randomly selected. , , Used for differential operation. Calculate the differential vector And generate mutation vector Generate a new candidate solution y through crossover operation, ensure that y meets the resource capacity constraints of all nodes and the resource requirements of each virtual machine, calculate the fitness 𝐹(𝑦) of the candidate solution y, and compare it with the original individual Fitness For comparison, if , then replace 𝑦 with , forming a new population. Repeat the above differential evolution process until the termination condition is met, such as the value of the fitness function is less than the set value or the maximum number of iterations, 100 generations, is reached. At the end of the algorithm, the individual with the best fitness is selected as the optimal resource allocation scheme. The optimal resource allocation scheme will guide how to deploy 10 virtual machines on 5 nodes to achieve load balancing. Figure 7 As shown in Figure 1, a schematic diagram of the cost changes of each generation of the population during the population iteration process is provided, and finally the distribution of virtual machines in the optimal resource allocation scheme is obtained as follows: [5, 5, 4, 2, 4, 3, 1, 1, 2, 5].

[0151] Step 3: According to the generated resource allocation plan, the virtual machines in the cluster are reasonably migrated through methods such as hot migration. Figure 8As shown, a schematic diagram of the resource allocation of each cloud host node after optimization is provided. The business of the cloud host nodes is more balanced, and there is no situation where the business pressure of a certain node is too heavy.

[0152] In this embodiment, by monitoring the resource distribution of the cloud host of the entire system, a weighted differential evolution algorithm is used to realize the overall design framework and implementation of automatic load balancing of the cloud host. The designed weighted differential evolution algorithm encodes each individual into a three-dimensional matrix to represent the resource allocation scheme of the virtual machine, node and resource type. In addition, the cloud host load balancing method uses a weighted differential evolution algorithm, which takes into account the weight differences of different resource types and can effectively handle weighted multi-resource allocation problems to achieve automatic load balancing in a cloud computing environment.

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

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

[0155] In an exemplary embodiment, Fig. 9 As shown, a cloud host load balancing device 900 is provided, including: a cloud host monitoring module 902, a load determination module 904, a function construction module 906, a solution selection module 908 and a load balancing module 910, wherein:

[0156] The cloud host monitoring module 902 is used to monitor the first load information of the resources of each cloud host node included in the cloud platform in real time; the resources include multiple types.

[0157] The load determination module 904 is used to obtain the distribution of virtual machines, resource capacity and second load information of each cloud host node when the first load information of the resources of any cloud host node is greater than a preset load threshold; the second load information is the load information of the resources of each virtual machine.

[0158] The function construction module 906 is used to determine the weighted mean square error function and the constraint function according to the total number of cloud host nodes, the distribution of virtual machines, resource capacity, the second load information and the preset weight factor of each resource.

[0159] The solution selection module 908 is used to use the differential evolution algorithm to perform iterative calculations according to the weighted mean square error function and the constraint function until a preset iterative calculation end condition is met, so as to determine the optimal load balancing solution.

[0160] The load balancing module 910 is used to adjust the distribution of virtual machines of each cloud host node according to the optimal load balancing solution.

[0161] Furthermore, in one embodiment, the function construction module 906 is also used to determine the demand and usage quantity of each virtual machine for each resource based on each second load information; determine the constraint function based on the resource capacity, demand and usage quantity; and determine the weighted mean square error function based on the total number of cloud host nodes, resource capacity, usage quantity and preset weight factors.

[0162] Furthermore, in one embodiment, the function construction module 906 is also used to determine the average allocation of each resource in each cloud host based on the total number of cloud host nodes, resource capacity and usage quantity; and determine the weighted mean square error function based on the average allocation, the total number of cloud host nodes, resource capacity, usage quantity and preset weight factors.

[0163] Furthermore, in one embodiment, the scheme selection module 908 is also used to randomly generate an initial population including multiple initial balancing schemes; the initial balancing scheme characterizes the usage of each resource by all virtual machines on each cloud host node; according to the weighted mean square error function, the initial optimal balancing scheme with the minimum fitness is determined from all initial balancing schemes; according to the initial population and the constraint function, the differential evolution operation is iterated until the preset iterative calculation end condition is met to obtain the optimal load balancing scheme.

[0164] Furthermore, in one embodiment, the solution selection module 908 is also used to perform a differential evolution operation based on the initial population and the constraint function to obtain multiple candidate equilibrium solutions; when there is a target candidate equilibrium solution whose fitness is less than or equal to the fitness of the initial optimal equilibrium solution among the multiple candidate equilibrium solutions, the target candidate equilibrium solution is used as the new initial optimal equilibrium solution, and the step of performing a differential evolution operation based on the initial population and the constraint function is returned until a preset iterative calculation end condition is met, and the target optimal equilibrium solution obtained when the preset iterative calculation end condition is met is used as the optimal load balancing solution.

[0165] Furthermore, in one embodiment, the scheme selection module 908 is also used to obtain multiple differential vectors based on the initial population; obtain a corresponding mutation vector based on each differential vector and a preset mutation factor; perform cross operations on multiple initial equilibrium schemes and multiple mutation vectors to obtain multiple initial candidate equilibrium schemes, and use the initial candidate equilibrium scheme that satisfies the constraint function as a candidate equilibrium scheme.

[0166] Each module in the cloud host load balancing device 900 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.

[0167] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig.10 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. 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 data such as the first load information and the second load information of the cloud host node. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a cloud host load balancing method is implemented.

[0168] Those skilled in the art will understand that Fig.10The 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.

[0169] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0170] 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 steps in the above-mentioned method embodiments are implemented.

[0171] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

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

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

[0174] 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 cloud host load balancing method, characterized in that: The method comprises: Real-time monitoring of first load information of resources of each cloud host node included in the cloud platform; the resources include multiple types; When the first load information of the resources of any of the cloud host nodes is greater than a preset load threshold, obtaining the distribution of virtual machines, resource capacity and second load information of each of the cloud host nodes; the second load information is the load information of the resources of each of the virtual machines; Determine a weighted mean square error function and a constraint function according to the total number of the cloud host nodes, the distribution of the virtual machines, the resource capacity, the second load information, and a preset weight factor of each resource; Using a differential evolution algorithm to perform iterative calculations according to the weighted mean square error function and the constraint function until a preset iterative calculation end condition is met, thereby determining an optimal load balancing solution; According to the optimal load balancing solution, the distribution of the virtual machines of each cloud host node is adjusted.

2. The method according to claim 1, characterized in that: Determining a weighted mean square error function and a constraint function according to the total number of the cloud host nodes, the distribution of the virtual machines, the resource capacity, the second load information, and a preset weight factor of each resource includes: Determine, according to each of the second load information, the demand and usage quantity of each of the virtual machines for each of the resources; Determining a constraint function according to the resource capacity, the demand and the usage quantity; A weighted mean square error function is determined according to the total number of the cloud host nodes, the resource capacity, the usage quantity and the preset weight factor.

3. The method according to claim 2, characterized in that The determining of a weighted mean square error function according to the total number of cloud host nodes, the resource capacity, the usage quantity and the preset weight factor comprises: Determine the average allocation of each resource in each cloud host according to the total number of cloud host nodes, the resource capacity and the usage quantity; A weighted mean square error function is determined according to the average allocation, the total number of the cloud host nodes, the resource capacity, the usage quantity and the preset weight factor.

4. The method according to claim 1, characterized in that The differential evolution algorithm is used to perform iterative calculation according to the weighted mean square error function and the constraint function until a preset iterative calculation end condition is met to determine the optimal load balancing solution, including: Randomly generate an initial population including a plurality of initial balancing schemes; the initial balancing schemes represent usage of each resource by all the virtual machines on each of the cloud host nodes; According to the weighted mean square error function, determining an initial optimal balancing scheme with the minimum fitness from all the initial balancing schemes; According to the initial population and the constraint function, the differential evolution operation is iteratively performed until the preset iterative calculation end condition is met, thereby obtaining an optimal load balancing solution.

5. The method according to claim 4, characterized in that The step of iteratively performing a differential evolution operation according to the initial population and the constraint function until a preset iterative calculation end condition is met to obtain an optimal load balancing solution includes: Performing a differential evolution operation according to the initial population and the constraint function to obtain multiple candidate equilibrium solutions; In the case that there is a target candidate balancing scheme whose fitness is less than or equal to the fitness of the initial optimal balancing scheme among the multiple candidate balancing schemes, the target candidate balancing scheme is used as a new initial optimal balancing scheme, and the step of performing a differential evolution operation according to the initial population and the constraint function is returned until the preset iterative calculation end condition is met, and the target optimal balancing scheme obtained when the preset iterative calculation end condition is met is used as the optimal load balancing scheme.

6. The method according to claim 5, characterized in that The differential evolution operation is performed according to the initial population and the constraint function to obtain multiple candidate equilibrium solutions, including: According to the initial population, a plurality of difference vectors are obtained; Obtaining a corresponding mutation vector according to each of the differential vectors and a preset mutation factor; A cross operation is performed on the multiple initial equalization schemes and the multiple mutation vectors to obtain multiple initial candidate equalization schemes, and the initial candidate equalization schemes that satisfy the constraint function are used as candidate equalization schemes.

7. A cloud host load balancing device, characterized in that: The device comprises: A cloud host monitoring module, used for real-time monitoring of first load information of resources of each cloud host node included in the cloud platform; the resources include multiple types; A load determination module, configured to obtain the distribution of virtual machines, resource capacity and second load information of each of the cloud host nodes when the first load information of the resources of any of the cloud host nodes is greater than a preset load threshold; the second load information is the load information of the resources of each of the virtual machines; A function construction module, used to determine a weighted mean square error function and a constraint function according to the total number of the cloud host nodes, the distribution of the virtual machines, the resource capacity, the second load information and a preset weight factor of each resource; A scheme selection module, used to use a differential evolution algorithm to perform iterative calculation according to the weighted mean square error function and the constraint function until a preset iterative calculation end condition is met, so as to determine an optimal load balancing scheme; The load balancing module is used to adjust the distribution of the virtual machines of each cloud host node according to the optimal load balancing solution.

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.

Citation Information

Patent Citations

  • Real-time scheduling and online migration management and control method suitable for virtual resources

    CN110389838A

  • Virtual machine energy-saving integration method and system based on hybrid swarm intelligence and storage medium

    CN113075995A

  • Deployment method and device of distributed cluster storage equipment and electronic equipment

    CN115499305A

  • Cloud computing task adaptive scheduling method based on machine learning

    CN118193225A

  • Preprocessing method and system for realizing batch scheduling of virtual machines

    CN118394477A

Cited By

  • Cloud host memory optimization allocation method based on capacity calculation and dynamic migration

    CN122111573A