A cloud computing resource balancing method based on discrete particle swarm optimization

By combining discrete particle swarm optimization with particle differences and allocation effectiveness, and introducing multiple random factors, this method utilizes adaptive grid technology for multi-objective optimization. This solves the problems of blindness and local optima in cloud computing resource balancing, and achieves more efficient resource allocation and utilization.

CN116302528BActive Publication Date: 2026-06-12CHINA TELECOM CLOUD TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA TELECOM CLOUD TECH CO LTD
Filing Date
2023-03-13
Publication Date
2026-06-12

Smart Images

  • Figure CN116302528B_ABST
    Figure CN116302528B_ABST
Patent Text Reader

Abstract

The application discloses a cloud computing resource balancing method based on discrete particle swarm optimization, relates to the field of IaaS cloud platform computing resource allocation, and comprises the following steps: S1, algorithm initialization; S2, updating a local optimal solution and a global optimal set, and generating a grid coordinate; S3, adaptive grid updating; S4, determining a global optimal solution; S5, updating a particle position and a speed; S6, judging whether a termination condition is met; if yes, entering S7, and if not, entering S2 and recycling; and S7, outputting a group optimal solution. The application determines an optimization direction by using the difference between particles and the effectiveness of particle distribution, overcomes blindness caused by distance calculation, introduces various random factors when a model is updated, avoids falling into a local optimum, and enhances the global search capability of the model. Finally, the LD-PSO is expanded to a multi-objective optimization field by using an adaptive grid technology, and the effective utilization rates of various resources are considered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of IaaS cloud platform computing resource allocation, and more specifically, to load balancing technology in IaaS cloud platform computing resource allocation. Background Technology

[0002] With the rapid development of IT technology, cloud computing has gradually become the mainstream computing technology, enabling users to access computing resources (such as CPU, storage, and network) anytime, anywhere. Infrastructure as a Service (IaaS) is the foundation of cloud computing, providing IT infrastructure as a service to users via the network and allocating computing nodes and resources according to user needs. Based on this, in order to improve system resource utilization and reduce response time, resource balancing methods have been proposed to redistribute workloads among different nodes in a distributed system.

[0003] In cloud computing systems, nodes correspond to different physical machines (PMs), and workloads correspond to customer-customized virtual machines (VMs). Therefore, resource balancing methods need to find the optimal (VM, PM) pair to avoid node overload or underload. Intelligent optimization algorithms are widely used in the field of resource balancing, with common ones including Genetic Algorithm (GA), Ant Colony Optimization (ACO), and Particle Swarm Optimization (PSO). The PSO algorithm determines the optimization direction and step size based on three factors: the current particle's own velocity inertia, and the deviation between the particle and the local and global optima. Through multiple iterations, it obtains the optimal particle position, which is the optimal solution to the problem. However, PSO is usually based on continuous space for searching, which may result in floating-point numbers for particle coordinates, making it unsuitable for direct application to discrete problems such as resource balancing.

[0004] To map the discrete problem space to the continuous particle motion space, the traditional RND-PSO algorithm directly rounds the particle coordinates. However, since the changes in velocity and position are small in each iteration, using RND-PSO may result in no significant change in particle coordinates, thus RND-PSO is prone to getting trapped in local optima. Furthermore, RND-PSO uses distance as a measure of the differences between particles. However, in the field of cloud computing resource balancing, the position of each particle represents a (VM, PM) pair, and the distance between different particles does not necessarily indicate the quality of the resource allocation strategy. Assume that we need to allocate 3 virtual machines (VM1,...,VM3) to 5 host machines (PM1,...,PM5), where PM2 and PM4 are at full capacity. Therefore, the position dimension of each particle in PSO is 3, corresponding to the number of virtual machines, and the range of each particle's coordinates is [1,5], corresponding to the number of host machines. If the current particle p1 = (1,1,1), the global optimal solution p g =(1,3,5). Compared to p1, although another particle p2 =(1,2,3) and p... g Although the particle distance is closer, the allocation strategy for PM2 is significantly worse than that for PM1 in actual working conditions because PM2 is at full load. Therefore, using particle distance to determine the optimization direction and step size for resource balancing problems may lead to randomness and blindness in the optimization. Summary of the Invention

[0005] The technical problem to be solved by this invention is to provide a cloud computing resource balancing method based on discrete particle swarm optimization. This method uses the differences between particles and the effectiveness of particle allocation to jointly determine the optimization direction and overcome the blindness caused by distance calculation. At the same time, multiple random factors are introduced during model updates to avoid getting trapped in local optima and enhance the global search capability of the model. Finally, adaptive grid technology is used to extend LD-PSO to the field of multi-objective optimization, taking into account the effective utilization of multiple resources in a comprehensive manner.

[0006] To achieve the above objectives, the present invention adopts the following technical solution:

[0007] A cloud computing resource balancing method based on discrete particle swarm optimization includes the following steps:

[0008] S1: Algorithm initialization;

[0009] S2: Update the local optimum and the global optimum set, and generate grid coordinates;

[0010] S3: Adaptive mesh update;

[0011] S4: Determine the global optimal solution;

[0012] S5: Particle position and velocity update;

[0013] S6: Determine if the termination condition is met; if yes, proceed to S7; otherwise, proceed to S2 and restart the loop.

[0014] S7: Output the optimal solution for the population.

[0015] Preferably, the method further includes S0: algorithm parameter definition.

[0016] Preferably, in S0, the LD-PSO algorithm is used to redistribute the load so that the balance of various IT resources in the cluster is minimized.

[0017] Preferably, the equilibrium equation corresponding to the LD-PSO algorithm is:

[0018] ra i,r =u i,r / o i,r ;

[0019]

[0020] Among them, u i,r Represents the i-th host machine PM i The number of IT resources of type r already used, o i,r For PM i The number of the r-th type of IT resources owned by the platform, ra i,r Represents the allocation rate of resources, while rb r This represents the balance of the r-th type of IT resource in the cluster.

[0021] Preferably, in S1, the set of virtual machines and host machines VMs = (VM1,...,VM2) is determined according to the monitoring system. vm_num PMs = (PM1, ..., PM) pm_num And based on the number of host machines, randomly initialize the particle position x. i,j ∈(1,pm_num); Initialize the local optimal solution pbest for the current particle. i =x i .

[0022] Preferably, S2 includes calculating the fitness fit(x) of the current solution. i Perform Pareto non-dominated sorting on the current particle swarm to generate the global optimal solution set front in the swarm;

[0023] The Pareto non-dominated sorting process includes:

[0024] Calculate the number of infeasible solutions for each particle, infea(x). i ):

[0025]

[0026] If the virtual machine VM m Unable to load to host machine Then α m =1, otherwise α m =0;

[0027] If fit(x) i All target values ​​in ) are less than or equal to fit(x) j And ensure that fit(x) i At least one target value in the set is less than fit(x). j If ) holds true, then fit(x) is called fit(x) i ) dominates fit(x j ), fit(x i )>fit(x j );

[0028] The dominance formula for Pareto non-dominated sorting is:

[0029]

[0030] Where x i >x j x represents i Dominate x j x i d>x j This indicates a non-dominant relationship between the two, α m It is used to determine the VM m Can it be loaded? The flag on;

[0031] Following this, the solution space of the particles is adaptively divided into div_num based on the maximum and minimum values ​​of each dimension in front. res_num There are _ _ grids, where div_num is the number of grids needed for each dimension; thus, the fitness of each particle is infea(x_i). i Mapping to the corresponding grid generates grid coordinates grid(x) i ).

[0032] Preferably, in S3, the position x of each particle is updated in each iteration. i This updates the local optimum pbest. i And the global optimal set of the particle swarm, front.

[0033] Preferably, S4 specifically includes the following steps:

[0034] S41: Statistics of each grid o The number of particles in partnm o and according to s / partnmo Assign a probability value to each grid cell, where s is a manually set parameter;

[0035] S42: Randomly select a grid according to probability, following the roulette wheel method. o ;

[0036] S43: From grid o One particle is randomly selected as the global optimal solution gbest.

[0037] Preferably, S5 specifically includes: determining the particle velocity v based on the effectiveness of particle allocation and the difference between the particle and the local optimal solution and the global optimal solution. i ; in updating the velocity v corresponding to each particle i Then, update the particle's coordinate x according to the following formula. i :

[0038] x i (t)=x i (t-1)+v i (t);

[0039] Where x i (t) represents the updated particle position, v i (t) represents the updated velocity.

[0040] Preferably, S6 specifically includes:

[0041] Determine if the iteration count t has reached the maximum iteration count iter_num. If not, return to step S2 and start the loop again; otherwise, end the loop and proceed to S7.

[0042] S7 specifically includes: randomly selecting a gbest output from the final global optimal solution set front. gbest is the final global optimal solution generated by the algorithm, representing the migration scheme for the virtual machine to be migrated from the source host to the destination host.

[0043] The advantages of this invention compared to existing technologies are as follows: Based on the traditional PSO algorithm, this invention combines the discrete characteristics of resource balancing problems, mapping the discrete problem space to a continuous particle motion space. During model updates, it abandons the traditional distance metric and introduces particle allocation effectiveness, seeking low-load hosts based on the current resource allocation strategy to achieve its own optimization. Simultaneously, it introduces inter-particle differences, statistically analyzing the similarities and differences between local and global optima, and correcting the optimization direction under the guidance of the cluster optimal solution. Furthermore, to avoid the algorithm getting trapped in local optima, it proposes multiple random factors to enhance the model's randomness and global search capability. For multi-resource balancing problems, it proposes modified Pareto non-dominated sorting and adaptive grid technology to extend PSO to multi-objective optimization. Therefore, the method of this invention is a superior cloud computing resource balancing method. Attached Figure Description

[0044] Figure 1 This is a flowchart illustrating the implementation of the method of this invention;

[0045] Figure 2 This is a flowchart of the particle position and velocity update process of this invention;

[0046] Figure 3 Comparison chart of implementation results for LD-PSO and RND-PSO. Detailed Implementation

[0047] The specific embodiments of the present invention will now be described with reference to the accompanying drawings.

[0048] First, combine Figure 1 The general flowchart of the present invention is as follows, and the method of the present invention is described in detail below:

[0049] (1) Algorithm parameter definition:

[0050] The particle swarm has a population size of pop_num, a total number of iterations of iter_num, and a number of IT resources of res_num. The particle coordinates x in the particle swarm are... i =(x i,1 ,...,x i,vm_num ), where i∈(1,pop_num), x i,j ∈(1, pm_num), where vm_num and pm_num represent the number of virtual machines and the number of host machines, respectively. Particle velocity v i =(v i,1 ,...,v i,vm_num ), with x i They have the same dimensions. Regarding the resource balancing problem, the optimization objective of the LD-PSO algorithm is to achieve a balanced distribution of various IT resources (rb) within the cluster by redistributing the load. r All should be as small as possible, as shown in formula (1-2).

[0051] ra i,r =u i,r / o i,r (1)

[0052]

[0053] Among them, u i,r Representing PM i The number of IT resources of type r already used, o i,r For PM i The number of the r-th type of IT resources owned by the platform, ra i,r Represents the allocation rate of resources, while rb r This represents the balance of the r-th type of IT resource in the cluster. Since resource balancing in cloud computing typically requires consideration of multiple IT resources, it is a multi-objective optimization problem, with the fitness function being fit(x) = ... i )=(rb1,...,rb res_num According to the fitness of each particle, fit(x) i The Pareto dominance relationship between the particles can determine the local optimum pbest in the current particle optimization path. i , and the set of globally optimal solutions in the entire population, front.

[0054] (2) Algorithm initialization:

[0055] Based on the monitoring system, the set of virtual machines and host machines VMs = (VM1, ..., VM2) is determined. vm_num PMs = (PM1, ..., PM) pm_num And based on the number of host machines, randomly initialize the particle position x. i,j ∈(1, pm_num). Initialize the local optimal solution pbest for the current particle. i =x i Calculate the fitness of the current solution, fit(x). i The current particle swarm is subjected to Pareto non-dominated sorting to generate the global optimal solution set *front*. In the domain of resource equilibrium, Pareto non-dominated sorting needs to consider the following two aspects:

[0056] i) Due to particle coordinates x i The corresponding resource allocation strategy is limited by the number of resources available on the host machine. i,r This may cause some VMs to fail to be assigned to the corresponding PMs. Therefore, it is necessary to calculate the number of infeasible solutions for each particle. i As shown in formula (3).

[0057]

[0058] If VM m Unable to load Then α m =1, otherwise α m =0.

[0059] ii) If fit(x i All target values ​​in ) are less than or equal to fit(x) j And ensure that fit(x) i At least one target value in the set is less than fit(x). j If ) holds true, then fit(x) is called fit(x) i ) dominates fit(x j ), fit(x i )>fit(x j ).

[0060] Taking into account both i) and ii), the dominance relationship of the Pareto non-dominated ordination is shown in formula (4). Where x i >x j x represents i Dominate x j x i d>x j This indicates a non-dominant relationship between the two, α m It is used to determine the VM m Can it be loaded? The flag on it.

[0061]

[0062] Following this, the solution space of the particles is adaptively divided into div_num based on the maximum and minimum values ​​of each dimension in front. res_num There are _ _ grids, where div_num is the number of grids needed for each dimension. This allows us to determine the fitness of each particle, infea(x). i Mapping to the corresponding grid generates grid coordinates grid(x) i ).

[0063] (3) Proceed to the t-th iteration:

[0064] In each iteration, the position x of each particle needs to be updated. i This updates the local optimum pbest. i The process consists of the following steps (4)-(8), which involve the global optimal set of the particle swarm, front, and adaptively correcting the mesh based on front.

[0065] (4) Determine the global optimal solution gbest:

[0066] Because Pareto dominance requires consideration of multiple objectives, the front set of the particle swarm contains multiple non-dominated global optima. For each particle, the corresponding gbest needs to be determined from the front, thereby adjusting the optimization direction based on the gbest. The determination of gbest mainly consists of the following steps:

[0067] i) Statistics of each grid o The number of particles in partnm o and according to s / partnm o A probability value is assigned to each grid cell, where s is a parameter set manually.

[0068] ii) Randomly select a grid according to probability using the roulette wheel method. o .

[0069] iii) From grid o One particle is randomly selected as gbest.

[0070] Based on the global optimal selection strategy, LD-PSO tends to select particles with lower aggregation density as the global optimal solution, thereby ensuring the distribution of the optimal solution of the LD-PSO algorithm.

[0071] (5) Particle position and velocity update:

[0072] The particle velocity update is mainly divided into three parts: the particle velocity v is determined based on the effectiveness of particle allocation and the difference between the particle and the local and global optima. i ,like Figure 2 As shown.

[0073] i) Particle allocation effectiveness. Based on particle position x i The corresponding resource allocation strategy identifies VMs that cannot be allocated to the corresponding PM. The definition of α is the same as that in formula (3). If α j =1, then x i,j Add left_vm, otherwise x i,j Remove.

[0074] Using an inertia factor w, randomly select a VM from left_vm and modify its corresponding host machine to the VM with the lowest load under the current allocation policy. min len(left_vm) × w. Therefore, the corresponding velocity is... Representing PM min The serial number.

[0075] ii) Local optimality discrepancy. Statistical x iwith pbest i Differences between Where x i,j ≠pbest i,j At that time, β j =1.

[0076] Using a local factor c1, len(p_diff)×c1 VMs are randomly selected from p_diff, and their corresponding host machines are modified to pbest. i,j Therefore, the corresponding velocity is v. i,j =pbest i,j -x i,j .

[0077] iii) Global optimal difference. Statistical x i Differences between gbest Where x i,j ≠gbest j At that time, δ j =1.

[0078] Using a global factor c2, len(g_diff)×c2 VMs are randomly selected from g_diff, and their corresponding host machines are modified to gbest. j Therefore, the corresponding velocity is v. i,j =gbest j -x i,j .

[0079] Update the velocity v of each particle i Then, the particle's coordinate x is updated according to formula (5). i Where x i (t) represents the updated particle position, v i (t) represents the updated velocity.

[0080] x i (t)=x i (t-1)+v i (t) (5)

[0081] (6) Local optimal solution update:

[0082] Update particle position x based on particle allocation effectiveness and inter-particle differences. i Then, the fitness function `fit` is used to compare the current position with the local optimum. As shown in equation (6), if `fit(x)`... i ) dominates fit(pbest i If the local optimum is not found, then the local optimum will be updated to x. i If fit(pbest) i ) dominates fit(xi If fit(x) is used, the local optimal solution is preserved unchanged; if fit(x) is used, the local optimal solution is preserved unchanged i non-dominated fit(pbest) i If x is randomly selected, then... i and pbest i Choose one as the latest local optimum:

[0083]

[0084] (7) Update the global optimal solution set front:

[0085] The updated particle swarm is subjected to Pareto non-dominated sorting to obtain the optimal candidate set. The candidate set is then merged with the original front, and the merged optimal solution set is subjected to Pareto non-dominated sorting again to obtain the updated front.

[0086] (8) Adaptive grid update:

[0087] The grid is redefined based on the maximum and minimum values ​​of each dimension in the updated front, and the particles are mapped to the corresponding grids to obtain the grid coordinates (grid(x)) for each particle. i ), and the number of particles contained in each grid.

[0088] (9) Output the population optimal solution gbest:

[0089] Determine whether the iteration count t has reached the maximum iteration count iter_num. If it has not, return to step (3). If it has, end the loop and randomly select a gbest from the final global optimal solution set front for output.

[0090] Compared with traditional methods, the advantages of the method of the present invention are:

[0091] This invention, based on the traditional PSO algorithm, incorporates the discrete nature of resource balancing problems by mapping the discrete problem space to a continuous particle motion space. During model updates, it abandons the traditional distance metric and introduces particle allocation effectiveness, seeking low-load hosts based on the current resource allocation strategy to achieve its own optimization. Simultaneously, it introduces inter-particle differences, statistically analyzing the similarities and differences between local and global optima, and corrects the optimization direction under the guidance of the cluster optimal solution. Furthermore, to avoid the algorithm getting trapped in local optima, it proposes multiple random factors to enhance the model's randomness and global search capability. For multi-resource balancing problems, it proposes modified Pareto non-dominated sorting and adaptive grid technology to extend PSO to multi-objective optimization. Therefore, this invention represents a superior cloud computing resource balancing method.

[0092] To further demonstrate the advantages of this invention, 20 host machines (PMs) and 100 virtual machines (VMs) were generated on a cloud platform as input to the model. The computing resource requirements of the PMs and VMs are shown in Tables 1 and 2.

[0093] Table 1. Host machine computing resources

[0094]

[0095] Table 2. Virtual Machine Computing Resources

[0096]

[0097]

[0098] The VM set and PM set are input into the LD-PSO method to output the optimal resource allocation strategy.

[0099] The specific steps are as follows:

[0100] (1) Based on Tables 1 and 2, the parameters of the LD-PSO model are set as shown in Table 3. Initialize the position x of each particle in the particle swarm. i The local optimal solution of each particle is initialized to its own pbest value. i =x i Calculate the fitness (fit(x)) of each particle at the current position. i The particle swarm is then subjected to Pareto non-dominated sorting to initialize the global optimal solution set front.

[0101] Table 3. LD-PSO Training Parameters

[0102]

[0103] (2) Run the t-th iteration to update the velocity and position of each particle, and then update the local optimum pbest of the particles. i The global optimal solution set front mainly consists of steps (3)-(7).

[0104] (3) Determine the global optimal solution gbest. Based on the maximum and minimum values ​​in front, adaptively divide the particle solution space into multiple grids, and record the grid coordinates (grid(x)) of each particle. i ) and the number of particles in each grid (partnm) o According to s / partnm o A probability value is assigned to each grid, and the grid is randomly selected using a roulette wheel method. o , where s is a manually set parameter. From the grid o A particle is randomly selected as gbest.

[0105] (4) Update particle positions. Particle positions are determined based on particle allocation effectiveness and the differences between the particles and the local and global optima, such as... Figure 2 As shown.

[0106] a) Based on particle allocation effectiveness, count the locations that cannot be allocated to the corresponding PM. Using an inertia factor w, randomly select len(left_vm)×w VMs from left_vm, and modify their corresponding host machines to the VMs with the lowest load under the current allocation policy. min .

[0107] b) Based on the local optimum difference, statistically analyze x. i with pbest i Differences between Using a local factor c1, len(p_diff)×c1 VMs are randomly selected from p_diff, and their corresponding host machines are modified to pbest. i,j .

[0108] c) Based on the global optimal difference, statistically analyze x. i Differences between gbest Using a local factor of c2, len(g_diff)×c2 VMs are randomly selected from g_diff, and their corresponding host machines are modified to gbest. j .

[0109] Update the local optimum. Update the particle position x. i Then, compare the current position x according to formula (6). i With local optimal solution pbest i The pros and cons between them, updated pbest i .

[0110] Update the global optimal solution set. Perform non-dominated sorting on the updated particle swarm to obtain the optimal candidate set, merge the candidates with the original front, and perform non-dominated sorting again on the merged set to generate the updated front.

[0111] Adaptive mesh update. The mesh is re-divided based on the maximum and minimum values ​​in the front, resulting in the mesh coordinates (grid(x)) for each particle. i ).

[0112] Output the global optimal solution. Determine if the iteration count t has reached the maximum iteration count iter_num. If not, return to step (3); otherwise, end the loop and randomly select a gbest from the final global optimal solution set front for output.

[0113] The fitness function corresponding to each global optimal solution gbest in LD-PSO and RND-PSO is fit(gbest). LD ) and fit(gbest RND ) drawn in Figure 3 middle.

[0114] (5) Through Figure 3 It can be seen that, under the same conditions, the resource allocation strategy generated by the method of this invention outperforms the traditional RND-PSO in terms of resource balance in CPU, memory, and bandwidth. Update the local optimum. Update the particle position x. i Then, compare the current position x according to formula (6). i With local optimal solution pbest i The pros and cons between them, updated pbest i .

[0115] (6) Update the global optimal solution set. Perform non-dominated sorting on the updated particle swarm to obtain the optimal candidate set, merge the candidate set with the original front set, and perform non-dominated sorting again on the merged set to generate the updated front set.

[0116] (7) Adaptive Mesh Update. The mesh is re-divided based on the maximum and minimum values ​​in the front, resulting in the mesh coordinates (grid(x)) for each particle. i ).

[0117] (8) Output the global optimal solution. Determine whether the iteration count t has reached the maximum iteration count iter_num. If it has not, return to step (3); if it has, end the loop and randomly select a gbest from the final global optimal solution set front for output.

[0118] (9) Set the fitness function (gbest) corresponding to each global optimal solution gbest in LD-PSO and RND-PSO to fit(gbest). LD ) and fit(gbest RND ) drawn in Figure 3 middle.

[0119] pass Figure 3 It can be seen that, under the same conditions, the resource allocation strategy generated by the method of the present invention is superior to the traditional RND-PSO in terms of resource balance in CPU, memory and bandwidth.

[0120] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A cloud computing resource balancing method based on discrete particle swarm optimization, characterized in that, Includes the following steps: S0: Algorithm parameter definition, specifically using the LD-PSO algorithm to redistribute the load so that the balance of various IT resources in the cluster is minimized; The equilibrium equation corresponding to the LD-PSO algorithm is: ; ; in, Represents the i-th host machine The above has already used the first Number of IT resources for The first one owned by the above Number of IT resources This represents the allocation rate of resources, while Represents the first in the cluster The balance of various IT resources, where pm_num is the number of host machines; S1: Algorithm initialization; S2: Update the local optimum and global optimum set, and generate grid coordinates, specifically including: Calculate the fitness of the current solution Perform Pareto non-dominated sorting on the current particle swarm to generate a set of globally optimal solutions for the swarm. ; The Pareto non-dominated sorting process includes: Calculate the number of infeasible solutions for each particle. : ; If virtual machine Unable to load to host machine ,but ,otherwise ; like All target values ​​are less than or equal to And guarantee At least one of the target values ​​is less than If established, it is called Dominate , ; The dominance formula for Pareto non-dominated sorting is: in express Dominate , This indicates that the relationship between the two is one of non-dominance. It is used to judge Can it be loaded? The flag on; After that, according to The maximum and minimum values ​​of each dimension adaptively divide the particle's solution space into... 1 grid, of which The number of grids needed for each dimension; the fitness of each particle. Mapping to the corresponding grid to generate grid coordinates S3: Adaptive mesh update; S4: Determine the global optimal solution, specifically including: S41: Statistics for each grid Number of particles and in accordance with A probability value is assigned to each grid cell, where Parameters set by humans; S42: Randomly select grids based on probability, following the roulette wheel method. ; S43: From the grid A particle is randomly selected as the global optimal solution. ; S5: Particle position and velocity update, specifically including: The particle velocity is determined jointly based on the effectiveness of particle allocation and the differences between the particles and the local and global optimal solutions. ; in updating the velocities of each particle Then, update the particle's coordinates according to the following formula. : ; in Indicates the position of the particle after the update. For the updated speed; S6: Determine if the termination condition is met; if yes, proceed to S7; otherwise, proceed to S2 and restart the loop. S7: Output the optimal solution for the population.

2. The cloud computing resource balancing method based on discrete particle swarm optimization according to claim 1, characterized in that, In S1, the set of virtual machines and host machines is determined based on the monitoring system. , And randomly initialize particle positions based on the number of host machines. Initialize the local optimal solution for the current particle. .

3. The cloud computing resource balancing method based on discrete particle swarm optimization according to claim 1, characterized in that, In S3, the positions of each particle are updated in each iteration. This updates the local optimum. and the global optimal set of particle swarms. .

4. The cloud computing resource balancing method based on discrete particle swarm optimization according to claim 1, characterized in that, S6 specifically includes: Determine the number of iterations Has the maximum number of iterations been reached? If the condition is not met, return to step S2 and repeat the loop; otherwise, end the loop and proceed to S7. S7 specifically includes: from the final set of globally optimal solutions Randomly select one Output, The final globally optimal solution generated by the algorithm represents the migration scheme for virtual machines to be migrated from the source host to the destination host.

Citation Information

Patent Citations

  • Virtual machine allocation method based on particle swarm optimization

    CN107491341A

  • Virtual machine load balancing method under cloud environment

    CN108182115A