Real-time virtual machine deployment method and system based on buffer queue ant colony algorithm
By dividing the computing cycle into sub-cycles and adopting the buffer queue ant colony algorithm, the problem of low virtual machine deployment efficiency in the existing technology is solved, efficient resource utilization and energy consumption optimization under dynamic load are achieved, and the stability and resource utilization of the cloud computing system are improved.
Patent Information
- Application Number
- CN202510817224.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-18
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2045-06-18
AI Technical Summary
Existing intelligent optimization algorithms find it difficult to efficiently process real-time dynamic virtual machine deployment requests while ensuring resource utilization and energy consumption optimization. There is a contradiction between real-time and multi-objective optimization. In addition, the scheduling pressure is concentrated under sudden loads, which can easily lead to task backlogs and invalid calculations, affecting system stability.
A buffer queue ant colony algorithm is used to divide the computing cycle into several sub-cycles. The buffer queue is used to temporarily store the virtual machines that have not been deployed in the current sub-cycle. The optimal deployment result is solved in each sub-cycle through the buffer queue ant colony algorithm. Combined with the local and global pheromone update mechanism, the virtual machine-server mapping is optimized to ensure efficient deployment under dynamic load.
It realizes cross-cycle dynamic request management, avoids the concentration of scheduling pressure under sudden load, improves resource utilization and energy efficiency, reduces the number of working servers, and solves the energy consumption optimization and resource balancing problems under real-time load of cloud computing.
Smart Images

Figure CN120723375A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of cloud computing resource scheduling, and in particular to a real-time virtual machine deployment method and system based on a buffer queue ant colony algorithm. Background Art
[0002] In the field of cloud computing, virtual machine deployment strategies are one of the core technologies that determine resource utilization and service quality on IaaS platforms. Traditional virtual machine deployment relies primarily on static resource allocation strategies, where administrators allocate fixed computing, storage, and network resources to virtual machines based on pre-set rules. This approach offers the advantages of simple operation and convenient management, making it suitable for scenarios with stable resource demands. However, with the trend toward diversified cloud computing applications and dynamic workloads, its limitations are becoming increasingly significant. For example, it cannot dynamically respond to load fluctuations, leading to idle or overloaded resources and severely impacting system performance and stability.
[0003] To address these issues, dynamic resource allocation strategies optimize efficiency by monitoring load in real time and adjusting resource quotas. These methods analyze system load and resource utilization metrics, scaling up capacity during periods of high load and scaling down during periods of low load, thereby improving resource utilization. However, these strategies face challenges such as high computing and energy costs, system stability risks, and deployment efficiency bottlenecks. Real-time monitoring consumes significant computing resources and exacerbates energy waste. Dynamic adjustments can lead to resource conflicts and data migration. Server resource competition and uneven cluster load can also lead to low deployment request completion rates and high latency.
[0004] To address the shortcomings of dynamic allocation, intelligent optimization algorithms are widely used in virtual machine deployment. For example, Zhu et al. proposed an improved micro-genetic algorithm to reduce energy consumption and resource waste. Dong et al. used Euclidean distance to improve the particle swarm optimization algorithm to enhance server resource utilization and energy efficiency. Pei designed a multi-objective optimization method based on the ant colony algorithm to balance resource waste and energy consumption. Liu et al. used a reinforcement learning algorithm to improve deployment success rate and reduce latency.
[0005] However, existing intelligent optimization algorithms find it difficult to efficiently process real-time dynamic virtual machine deployment requests while ensuring resource utilization and energy consumption optimization. There is a contradiction between real-time and multi-objective optimization. In addition, the scheduling pressure is concentrated under sudden loads, which can easily lead to task backlogs and invalid calculations, affecting system stability. Summary of the Invention
[0006] Therefore, the technical problem to be solved by the present invention is to overcome the problem in the prior art that it is difficult to efficiently process real-time dynamic virtual machine deployment requests while ensuring resource utilization and energy consumption optimization.
[0007] To solve the above technical problems, the present invention provides a real-time virtual machine deployment method based on a buffer queue ant colony algorithm, comprising:
[0008] Divide the complete computing cycle into several sub-cycles, each of which includes a scheduling period and a deployment period;
[0009] During the scheduling period, the buffer queue ant colony algorithm is used to solve the optimal deployment result of the current sub-period, including:
[0010] Merge the queue of virtual machines to be deployed in the current sub-cycle with the buffer queue output in the previous sub-cycle to generate a virtual machine queue;
[0011] In each iteration, a server is deployed for each virtual machine in the virtual machine queue based on pheromones and heuristic information. If the deployment is successful, the mapping relationship between the current virtual machine and the server is added to the individual solution, and the current virtual machine is removed from the virtual machine queue. If the deployment fails, the current virtual machine is left in the virtual machine queue as an undeployed virtual machine in the individual solution. After obtaining multiple individual solutions, each individual solution is locally updated with pheromones. Among the multiple individual solutions, the global optimal solution is updated with minimizing the number of servers in working state as the main goal and minimizing the server resource surplus rate as the auxiliary goal. The global pheromone update is performed based on the global optimal solution.
[0012] After reaching the maximum number of iterations, the global optimal solution is output as the optimal deployment result of the current sub-cycle, and the undeployed virtual machines are output as a buffer queue to the next sub-cycle;
[0013] During the deployment period, virtual machines are deployed based on the optimal deployment result of the current sub-period.
[0014] Preferably, deploying a server for each virtual machine in the virtual machine queue according to the pheromone and heuristic information includes:
[0015] Generate a random number for the virtual machine j to be deployed;
[0016] If the random number is less than or equal to the pseudo-random factor threshold, virtual machine j selects [τ(i, j)] α [η(i, j)] β The server i with the largest value is the deployment server, where τ(i, j) represents the pheromone concentration between server i and virtual machine j, η(i, j) represents the heuristic information for selecting server i for virtual machine j, and α and β are weight coefficients;
[0017] If the random number is greater than the pseudo-random factor threshold, virtual machine j selects the deployment server through roulette.
[0018] Preferably, the formula for the heuristic information is:
[0019]
[0020] Among them, η(i, j) represents the heuristic information for selecting server i for virtual machine j, Pc i Indicates the total CPU resources of server i, Uc i Indicates the amount of CPU resources used by server i, Uc j Indicates the CPU demand of virtual machine j, Pm i Indicates the total memory resources of server i, Um i Indicates the amount of memory resources used by server i, Ur j Represents the memory requirement of virtual machine j.
[0021] Preferably, if the current virtual machine is deployed to only one server, and the remaining CPU and memory of the server are both greater than or equal to the CPU and memory requirements of the virtual machine, the deployment is successful;
[0022] If the current virtual machine is deployed to only one server and the remaining CPU and memory of the server are both less than the CPU and memory requirements of the virtual machine, the deployment fails.
[0023] Preferably, each individual solution performs a local pheromone update, including:
[0024] If the mapping relationship between virtual machine j and server i exists in the current individual solution, the current individual updates the pheromone concentration between server i and virtual machine j. The formula is:
[0025] τ1(i,j)=(1-ρ)×τ(i,j)+ρ×τ0
[0026] Among them, τ(i, j) represents the pheromone concentration between server i and virtual machine j, ρ is the volatility factor, τ0 is the initial pheromone value, and τ1(i, j) represents the pheromone concentration between server i and virtual machine j after local update.
[0027] Preferably, among multiple individual solutions, minimizing the number of servers in working state is the primary goal, and minimizing the server resource surplus rate is the secondary goal, and updating the global optimal solution includes:
[0028] The main goal is to minimize the number of servers in working state. The formula is:
[0029]
[0030] Where f(S) represents the primary objective value of the individual solution S, M represents the total number of servers, and R i Indicates the working status of server i; when server i is deployed with a virtual machine, R i =1; when server i has no virtual machine deployed, R i =0;
[0031] Taking minimizing the server resource surplus rate as the auxiliary goal, the formula is:
[0032]
[0033] Among them, f2(S) represents the auxiliary target value of the individual solution S, Pc i Indicates the total CPU resources of server i, Uc i Indicates the amount of CPU resources used by server i, Pm i Indicates the total memory resources of server i, Um i Indicates the amount of memory resources used by server i;
[0034] The individual solution with the smallest main objective value is selected from multiple individual solutions to update the global optimal solution; when there are multiple individual solutions with the smallest main objective value, the individual solution with the smallest auxiliary objective value is selected to update the global optimal solution.
[0035] Preferably, performing global pheromone updating according to the global optimal solution includes:
[0036] If the mapping relationship between virtual machine j and server i exists in the global optimal solution, the pheromone concentration between server i and virtual machine j is globally updated, and the formula is:
[0037] τ2(i,j)=(1-ε)×τ(i,j)+ε×Δτ(i,j)
[0038]
[0039] τ2(i, j) represents the pheromone concentration between server i and virtual machine j after global update; Δτ(i, j) represents the pheromone increment, BP is the global optimal solution, f(BP) is the main objective value of the global optimal solution, Tc i Indicates the remaining CPU of server i, Tr i Indicates the remaining memory of server i, Pc i Indicates the total CPU resources of server i, Pm i Indicates the total memory resources of server i.
[0040] Preferably, the virtual machines in the buffer queue output in the previous sub-period inherit the pheromones of the previous sub-period.
[0041] Preferably, after the complete computing cycle, a scheduling period is further included, in which mandatory mapping without resource constraints is performed when each virtual machine in the virtual machine queue is deployed on a server, to ensure that all virtual machines in the virtual machine queue are deployed on the server.
[0042] The present invention also provides a real-time virtual machine deployment system based on a buffer queue ant colony algorithm, comprising:
[0043] A sub-cycle division module is used to divide the complete computing cycle into several sub-cycles, each of which includes a scheduling period and a deployment period;
[0044] The scheduling module is used to solve the optimal deployment result of the current sub-period using the buffer queue ant colony algorithm during the scheduling period, including:
[0045] A queue merging unit is used to merge the queue of virtual machines to be deployed in the current sub-cycle with the buffer queue output in the previous sub-cycle to generate a virtual machine queue;
[0046] The solution unit is used to deploy a server for each virtual machine in the virtual machine queue based on pheromones and heuristic information in each iteration round. If the deployment is successful, the mapping relationship between the current virtual machine and the server is added to the individual solution, and the current virtual machine is removed from the virtual machine queue. If the deployment fails, the current virtual machine is left in the virtual machine queue as an undeployed virtual machine in the individual solution. After obtaining multiple individual solutions, each individual solution is locally updated with pheromones. Among the multiple individual solutions, the global optimal solution is updated with minimizing the number of servers in working state as the main goal and minimizing the server resource surplus rate as the auxiliary goal. The global pheromone update is performed based on the global optimal solution.
[0047] An output unit is used to output the global optimal solution as the optimal deployment result of the current sub-cycle after reaching the maximum number of iterations, and output the undeployed virtual machines as a buffer queue to the next sub-cycle;
[0048] The deployment module is used to deploy virtual machines according to the optimal deployment result of the current sub-period during the deployment time period.
[0049] The above technical solution of the present invention has the following beneficial effects compared with the prior art:
[0050] The present invention discloses a real-time virtual machine deployment method based on a buffer queue ant colony algorithm. By dividing a complete computing cycle into several sub-cycles, a buffer queue is used to temporarily store virtual machines that have not been fully deployed in the current sub-cycle, and these virtual machines are processed synchronously with immediate requests in the next sub-cycle. This method can achieve dynamic request management across cycles, avoid the problem of server overload caused by concentrated scheduling pressure under sudden loads, and improve resource utilization. In addition, the present invention uses a buffer queue ant colony algorithm in each sub-cycle to solve the optimal deployment result of the current sub-cycle, with minimizing the number of working servers, that is, reducing energy consumption as the main goal and balancing resource utilization as the auxiliary goal. A virtual machine-server mapping solution is constructed step by step in combination with state transition rules. A local pheromone update attenuates historical pheromones through a volatility factor to construct a new solution. A global pheromone update strengthens the optimal solution based on the global optimal solution and server resource utilization, ensuring efficient deployment under dynamic loads. This method significantly reduces the number of working servers and improves resource utilization in different scale scenarios, effectively solving the energy consumption optimization and resource balancing problems under real-time loads in cloud computing. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to make the content of the present invention more clearly understood, the present invention is further described in detail below based on specific embodiments of the present invention in conjunction with the accompanying drawings, wherein:
[0052] Figure 1 This is a flow chart of a real-time virtual machine deployment method based on a buffer queue ant colony algorithm according to the present invention;
[0053] Figure 2 This is a schematic diagram of dividing the calculation period into sub-periods;
[0054] Figure 3 This is a schematic diagram of the individual solution construction of the buffer queue ant colony algorithm;
[0055] Figure 4 This is a schematic diagram of the working principle of the buffer queue;
[0056] Figure 5 is a graph of the main objective value f(S) of each algorithm at the end of the sub-period of three different scale test instances, where Figure 5 (a) is a graph of the main target value f(S) at the end of the sub-period of the small-scale test instance. Figure 5 (b) is a graph of the main target value f(S) at the end of the sub-period of the medium-scale test instance. Figure 5 (c) is a graph of the main target value f(S) at the end of the sub-period of the large-scale test instance. DETAILED DESCRIPTION
[0057] The present invention will be further described below with reference to the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it. However, the embodiments are not intended to limit the present invention.
[0058] Reference Figure 1 As shown, the present invention provides a real-time virtual machine deployment method based on a buffer queue ant colony algorithm, comprising:
[0059] S1: Build a real-time virtual machine deployment model for cloud computing centers.
[0060] Digitally define physical and virtual resources: Set the system to include M physical servers i (i=1, 2, ..., M) and N virtual machines VM to be deployed j (j=1, 2, ..., N), each server Servier i Configure the total CPU resources Pc i (millicore) and total memory resources Pm i (MB), and monitor the server's used CPU resources Uc in real time i and memory resources Um i , and calculate the remaining CPU resources Tc i =Pc i -Uc i and remaining memory resources Tm i =Pm i -Um i ; Virtual machine VM to be deployed j Need to apply for CPU resources Uc j and memory resources Ur j , the deployment relationship is represented by a 0-1 matrix S, where the elements in the matrix S i,j =1 means the virtual machine VM j Deploy to the server i .
[0061] Build a real-time virtual machine deployment model with constraints and objective functions, including:
[0062]
[0063] Among them, R i Used to determine the server Servier i Is a virtual machine deployed on the server? i If a virtual machine is deployed on the i Set to 1, otherwise it is 0.
[0064] Define a single VM deployment constraint to ensure that each VM is deployed on only one server. The formula is:
[0065]
[0066] If the virtual machine VM j Deployed on the server i On the current server Servier i The remaining CPU resources must satisfy the VM j The CPU demand is expressed as follows:
[0067]
[0068] Among them, Uc j Indicates the CPU demand of virtual machine j, Tc i Indicates the remaining CPU usage of server i.
[0069] If the virtual machine VM j Deployed on the server i On the current server Servier i The remaining memory resources must satisfy the virtual machine VM j The memory requirement is expressed as follows:
[0070]
[0071] Among them, Ur i Indicates the memory requirement of virtual machine j, Tr i Indicates the remaining memory of server i.
[0072] S2: Divide the complete computing cycle into several sub-cycles, each of which includes a scheduling period and a deployment period.
[0073] Logical reference for dividing the complete calculation cycle Figure 2 To process dynamic requests, the complete calculation cycle [T s , T e ] is divided into n sub-periods P i (i=1,2,...,n), each sub-period is [T i-1 , T i ), where T0 = T s At the beginning of each sub-cycle, the scheduling time period Sched i-1 , used to process immediate requests in the current sub-cycle and unfinished planned requests in the previous sub-cycle, ensuring that requests are scheduled in order according to priority.
[0074] Before the complete calculation cycle, there is also a cross-cycle connection segment P0, which is a transition segment from the end of the previous calculation cycle to the current calculation cycle.
[0075] After the complete computing cycle, there is also a scheduling period Sched n ,This scheduling time period is for each virtual machine in the virtual machine queue to be deployed on the server, ,and a mandatory mapping without resource constraints is performed to ensure that all virtual machines in the ,virtual machine queue are deployed on the server.
[0076] S3: During the scheduling period, the buffer queue ant colony algorithm (BQACS) is used to solve the optimal deployment result for the current sub-period, including:
[0077] S31: The queue of virtual machines to be deployed (VL) in the current sub-cycle is merged with the buffer queue (BQ) output from the previous sub-cycle to generate a virtual machine queue. The virtual machines in the virtual machine queue are sorted by the priority of the deployment request, with immediate requests taking precedence over scheduled requests and requests with low latency tolerance being scheduled first. For virtual machines of equal priority, they are sorted by arrival timestamp, with earlier unfinished requests being scheduled first.
[0078] S32: In each iteration round, a server is deployed for each virtual machine in the virtual machine queue based on the pheromone and heuristic information, including:
[0079] Generate a random number q for the virtual machine j to be deployed;
[0080] If the random number q is less than or equal to the pseudo-random factor threshold q0 (0≤q0≤1), then virtual machine j selects [τ(i, j)] α [η(i, j)] β The server i with the largest value is the deployment server; if the random number q is greater than the pseudo-random factor threshold q0, the virtual machine j selects the deployment server through roulette, and the formula is expressed as:
[0081]
[0082] Where τ(i, j) represents the pheromone concentration between server i and virtual machine j, η(i, j) represents the heuristic information for selecting server i for virtual machine j; α and β are weight coefficients, α (α>0) is a predefined parameter that controls the relative importance of pheromones, and β is a predefined parameter that controls the relative importance of heuristic information; Roulette Wheel Selection is the roulette rule, index i represents the index of server i; the pseudo-random factor threshold q0 is used to control the individual's tendency to utilize and explore the solution space.
[0083] Specifically, the formula for roulette rules is:
[0084]
[0085] Specifically, heuristic information is used to measure resource utilization balance, and the formula is:
[0086]
[0087] Among them, η(i, j) represents the heuristic information corresponding to virtual machine j deployed on server i, Pc i Indicates the total CPU resources of server i, Uc i Indicates the amount of CPU resources used by server i, Uc j Indicates the CPU demand of virtual machine j, Pm i Indicates the total memory resources of server i, Um i Indicates the amount of memory resources used by server i, Ur j Represents the memory requirement of virtual machine j.
[0088] S33: If the deployment is successful, the mapping relationship between the current virtual machine and the server is added to the individual solution, and the current virtual machine is removed from the virtual machine queue; if the deployment fails, the current virtual machine is left in the virtual machine queue as an undeployed virtual machine of the individual solution.
[0089] Specifically, if the current virtual machine is deployed to only one server, and the remaining CPU and remaining memory of the server are both greater than or equal to the CPU requirements and memory requirements of the virtual machine, the deployment is successful; if the current virtual machine is deployed to only one server, and the remaining CPU and remaining memory of the server are both less than the CPU requirements and memory requirements of the virtual machine, the deployment fails.
[0090] For example, the mapping relationship between virtual machines and servers can be [[1, 3], [2, 1], ...], where [1, 3] means deploying virtual machine 3 on server 1, and [2, 1] means deploying virtual machine 1 on server 2. The process of constructing an individual solution refers to Figure 3 shown.
[0091] S34: To quickly respond to the results of a single iteration, the pheromone is adjusted in the short term. After obtaining multiple individual solutions, each individual solution is updated with a local pheromone update, including:
[0092] If the mapping relationship between virtual machine j and server i exists in the current individual solution, the current individual updates the pheromone concentration between server i and virtual machine j. The formula is:
[0093] τ1(i,j)=(1-ρ)×τ(i,j)+ρ×τ0
[0094] Among them, τ(i, j) represents the pheromone concentration between server i and virtual machine j, ρ is the volatility factor, τ0 is the initial pheromone value, and τ1(i, j) represents the pheromone concentration between server i and virtual machine j after local update.
[0095] S35: Among multiple individual solutions, the global optimal solution is updated with minimizing the number of servers in working state as the main goal and minimizing the server resource surplus rate as the auxiliary goal.
[0096] Specifically, minimizing the number of servers in working state is the main goal, and the formula is:
[0097]
[0098] Where f(S) represents the primary objective value of the individual solution S, M represents the total number of servers, and R i Indicates the working status of server i; when server i is deployed with a virtual machine, R i =1; when server i has no virtual machine deployed, R i =0;
[0099] Taking minimizing the server resource surplus rate as the auxiliary goal, the formula is:
[0100]
[0101] Among them, f2(S) represents the auxiliary target value of the individual solution S, Pc i Indicates the total CPU resources of server i, Uc i Indicates the amount of CPU resources used by server i, Pm i Indicates the total memory resources of server i, Um i Indicates the amount of memory resources used by server i;
[0102] The individual solution with the smallest main objective value is selected from multiple individual solutions to update the global optimal solution; when there are multiple individual solutions with the smallest main objective value, the individual solution with the smallest auxiliary objective value is selected to update the global optimal solution.
[0103] The main objective constructed by the present invention is used to minimize the number of working servers and reduce energy consumption; when the main objective values are the same, the individual solution with the smallest auxiliary objective value is selected to ensure a higher comprehensive utilization rate of the servers.
[0104] S36: To slowly strengthen the global optimal solution and guide convergence over a long period of time, the global pheromone update is performed based on the global optimal solution, including:
[0105] If the mapping relationship between virtual machine j and server i exists in the global optimal solution, the pheromone concentration between server i and virtual machine j is globally updated, and the formula is:
[0106] τ2(i,j)=(1-ε)×τ(i,j)+ε×Δτ(i,j)
[0107]
[0108] Where τ(i, j) represents the pheromone concentration between server i and virtual machine j, ε is the update coefficient, τ2(i, j) represents the pheromone concentration between server i and virtual machine j after global update; Δτ(i, j) represents the pheromone increment, BP is the global optimal solution, f(BP) is the main objective value of the global optimal solution, Tc i Indicates the remaining CPU of server i, Tr i Indicates the remaining memory of server i, Pc i Indicates the total CPU resources of server i, Pm i Indicates the total memory resources of server i.
[0109] S37: After reaching the maximum number of iterations, the global optimal solution is output as the optimal deployment result of the current sub-period, and the undeployed virtual machines are output as a buffer queue to the next sub-period. Figure 4 shown.
[0110] Preferably, the iteration termination condition can also be set to the target value having no improvement after multiple consecutive iterations.
[0111] Preferably, virtual machines in the buffer queue output from the previous sub-cycle inherit the pheromone from the previous sub-cycle. The buffer queue ant colony algorithm strengthens the guidance of high-quality solutions by accumulating pheromones across cycles, avoiding a complete search from scratch for each scheduling, thereby improving the efficiency of dynamic resource allocation. This mechanism ensures that pheromone updates are always based on the optimal solution for the current iteration. The queue of virtual machines to be deployed obtained in each sub-cycle uses the initial pheromone.
[0112] The following is the pseudo code of the buffer queue ant colony algorithm:
[0113]
[0114]
[0115] During iterations of the buffer queue ant colony algorithm, the mapping of successfully deployed virtual machines remains unchanged due to their removal from the virtual machine queue. However, their corresponding paths continue to influence subsequent searches through pheromone updates (volatile decay and optimal solution reinforcement). The core changes in each iteration are the dynamic adjustment of pheromone concentration based on the quality of historical solutions, heuristic information updated based on the real-time resource status of the server, and the buffer queue mechanism that allows failed virtual machines to be scheduled across cycles with new requests. Even if a single iteration fails, the failed virtual machine may still have a chance to be successfully deployed if pheromone-guided optimization or server resources are released in subsequent iterations.
[0116] S4: In the deployment time period, deploy the virtual machine according to the optimal deployment result of the current sub-period.
[0117] To verify the effectiveness of the BQACS algorithm, this embodiment sets the following algorithms for experimental data comparison: Algorithm 1 is the ant colony algorithm for solving dynamic path planning problems (ACS-DVRP) published in the article "Ant colony system for a dynamic vehicle routing problem" in the Journal of combinatorial optimization in 2005; Algorithm 2 is the social learning particle swarm algorithm (SLPSO) published in the article "A social learning particle swarm optimization algorithm for scalable optimization" in the journal Information Sciences in 2015; Algorithm 3 is the reordering grouping genetic algorithm (RGGA) published in the article "Solving virtual machine packing with a reordering grouping genetic algorithm" at the IEEE Congress of Evolutionary Computation (CEC) in 2011.
[0118] For fairness, we tested 12 instances using each of the three algorithms. Each instance included parameters for all virtual machines and servers. These instances were categorized into three different sizes. For each test instance, we ran each algorithm 30 times independently, recording the best, worst, and average results from these 30 runs.
[0119] The parameter settings of the BQACS algorithm and the comparison algorithm used in the present invention are shown in Table 1.
[0120] Table 1. Parameters of BQACS algorithm and comparison algorithms
[0121] algorithm Parameter settings ACS-DVRP <![CDATA[NP=5,α=2.0,β=5.0,q0=0.5,ρ=0.3,ε=0.3]]> SLPSO N=200,α=0.5,β=0.01 RGGA PS=75,pc=0.8,pm=0.2 BQACS NP=5, α=2.0, β=5.0, q0=0.5, ρ=0.3, ε=0.3
[0122] The comparison of the main target values of the BQACS algorithm and the comparison algorithm in each scale test instance is shown in Table 2.
[0123] Table 2. Comparison of main objective values between BQACS algorithm and comparison algorithm
[0124]
[0125]
[0126] The comparison of auxiliary function values between the BQACS algorithm and the comparison algorithm in a small-scale test instance is shown in Table 3.
[0127] Table 3. Comparison of auxiliary target values between BQACS algorithm and comparison algorithm
[0128]
[0129]
[0130] Experimental results demonstrate that the proposed algorithm, through deep collaboration between the model and the algorithm, outperforms existing solutions in key metrics such as energy consumption, resource balancing, and real-time performance. As the data scale increases, the difficulty of solving the problem increases significantly. However, the proposed algorithm demonstrates excellent performance across test cases of varying sizes, demonstrating its robust ability to handle large-scale problems.
[0131] In order to further clearly analyze the algorithm's solving ability, the present invention selects one test instance from each of three different scale instances and draws a curve based on the main target value f(S) at the end of each sub-period. Figure 5 The graphs of the main objective value f(S) at the end of the sub-period of each algorithm for three different scale test instances are shown. Figure 5 (a) is a graph of the main target value f(S) at the end of the sub-period of the small-scale test instance. Figure 5 (b) is a graph of the main target value f(S) at the end of the sub-period of the medium-scale test instance. Figure 5 (c) is a graph of the main target value f(S) at the end of the sub-period of the large-scale test instance.
[0132] like Figure 5As shown in the figure, in a smaller-scale test case, analysis of the target value curve reveals that the BQACS algorithm begins to outperform the other algorithms after the second subcycle. The ACS-DVRP and RGGA algorithms perform relatively similarly, both outperforming the SLPSO algorithm overall. Notably, the SLPSO algorithm exhibits significant fluctuations in its target value curve, indicating poor stability. In practice, this fluctuation manifests as a significant imbalance in the number of VMs scheduled within each subcycle, which can lead to excessive computational load within a particular subcycle, thus impacting the overall system efficiency. In summary, the BQACS algorithm demonstrates high solution efficiency and stability for smaller-scale problems.
[0133] When the medium-scale test cases were included in the study, the advantages of the BQACS algorithm were further highlighted. Its objective value curve remained at the lowest level throughout the entire computation, demonstrating its superiority in handling medium-scale problems. During the mid-term computational phase, the SLPSO and RGGA algorithms exhibited some fluctuation. In stark contrast, the BQACS algorithm's objective value curve was relatively smooth, demonstrating its superior robustness. From a practical scheduling perspective, the BQACS algorithm's scheduling strategy ensured a relatively balanced number of VMs scheduled within each sub-period, effectively reducing periods of excessive computational load and server pressure. Although the performance of ACS-DVRP and RGGA remained similar, the BQACS algorithm's advantage became even more pronounced. The SLPSO algorithm's curve, on the other hand, continued to fluctuate significantly, clearly indicating its weaker ability to solve medium-scale problems. This demonstrates that the BQACS algorithm excels in medium-scale problems and is capable of effectively handling these computational tasks.
[0134] Further expansion of the research to large-scale test cases further validated the superior performance of the BQACS algorithm. Its objective value curve was significantly lower than that of other algorithms, indicating that the algorithm consistently found a superior solution at the end of each sub-period. This also demonstrates its efficient ability to solve large-scale problems. The ACS-DVPR algorithm, thanks to its pheromone protection mechanism, has certain advantages in dynamic environments, but its efficiency still lags behind that of the BQACS algorithm when dealing with large-scale problems. The ACS-DVRP and RGGA algorithms performed relatively stably on large-scale problems, but compared to the BQACS algorithm, there is still significant room for improvement. Although the SLPSO algorithm enhances global search capabilities through a social learning mechanism, it performs worst in environments with high dynamics and real-time requirements, with significant fluctuations in its objective value curve. This indicates that the algorithm's ability to solve large-scale problems is relatively limited. In contrast, the BQACS algorithm demonstrated extremely high stability and efficiency on large-scale problems.
[0135] In summary, the real-time virtual machine deployment method based on the buffer queue ant colony algorithm described in the present invention divides the complete computing cycle into several sub-cycles, uses the buffer queue to temporarily store virtual machines that have not been fully deployed in the current sub-cycle, and processes them synchronously with the immediate requests of the next sub-cycle. This can achieve dynamic request management across cycles, avoid the problem of server overload caused by concentrated scheduling pressure under sudden loads, and improve resource utilization. In addition, the present invention uses the buffer queue ant colony algorithm in each sub-cycle to solve the optimal deployment result of the current sub-cycle, with minimizing the number of working servers, that is, reducing energy consumption as the main goal and balancing resource utilization as the auxiliary goal. Combined with state transition rules, a virtual machine-server mapping solution is constructed step by step. The local pheromone update attenuates historical pheromones through a volatility factor to construct a new solution. The global pheromone update strengthens the optimal solution based on the global optimal solution and server resource utilization, ensuring efficient deployment under dynamic loads. This allows the present invention to significantly reduce the number of working servers and improve resource utilization in different scale scenarios, effectively solving the energy consumption optimization and resource balancing problems under real-time loads in cloud computing.
[0136] Based on the above-mentioned real-time virtual machine deployment method based on the buffer queue ant colony algorithm, a real-time virtual machine deployment system based on the buffer queue ant colony algorithm is also provided, including:
[0137] A sub-cycle division module is used to divide the complete computing cycle into several sub-cycles, each of which includes a scheduling period and a deployment period;
[0138] The scheduling module is used to solve the optimal deployment result of the current sub-period using the buffer queue ant colony algorithm during the scheduling period, including:
[0139] A queue merging unit is used to merge the queue of virtual machines to be deployed in the current sub-cycle with the buffer queue output in the previous sub-cycle to generate a virtual machine queue;
[0140] The solution unit is used to deploy a server for each virtual machine in the virtual machine queue based on pheromones and heuristic information in each iteration round. If the deployment is successful, the mapping relationship between the current virtual machine and the server is added to the individual solution, and the current virtual machine is removed from the virtual machine queue. If the deployment fails, the current virtual machine is left in the virtual machine queue as an undeployed virtual machine in the individual solution. After obtaining multiple individual solutions, each individual solution is locally updated with pheromones. Among the multiple individual solutions, the global optimal solution is updated with minimizing the number of servers in working state as the main goal and minimizing the server resource surplus rate as the auxiliary goal. The global pheromone update is performed based on the global optimal solution.
[0141] An output unit is used to output the global optimal solution as the optimal deployment result of the current sub-cycle after reaching the maximum number of iterations, and output the undeployed virtual machines as a buffer queue to the next sub-cycle;
[0142] The deployment module is used to deploy virtual machines according to the optimal deployment result of the current sub-period during the deployment time period.
[0143] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0144] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0145] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0146] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0147] Obviously, the above embodiments are merely examples for clarity of explanation and are not intended to limit the implementation methods. Those skilled in the art will appreciate that other variations or modifications can be made based on the above description. It is not necessary and impossible to enumerate all implementation methods here. Obvious variations or modifications arising therefrom remain within the scope of protection of the present invention.
Claims
1. A real-time virtual machine deployment method based on a buffer queue ant colony algorithm, characterized in that: include: Divide the complete computing cycle into several sub-cycles, each of which includes a scheduling period and a deployment period; During the scheduling period, the buffer queue ant colony algorithm is used to solve the optimal deployment result of the current sub-period, including: Merge the queue of virtual machines to be deployed in the current sub-cycle with the buffer queue output in the previous sub-cycle to generate a virtual machine queue; In each iteration, a server is deployed for each virtual machine in the virtual machine queue based on pheromones and heuristic information. If the deployment is successful, the mapping relationship between the current virtual machine and the server is added to the individual solution, and the current virtual machine is removed from the virtual machine queue. If the deployment fails, the current virtual machine is left in the virtual machine queue as an undeployed virtual machine in the individual solution. After obtaining multiple individual solutions, each individual solution is locally updated with pheromones. Among the multiple individual solutions, the global optimal solution is updated with minimizing the number of servers in working state as the main goal and minimizing the server resource surplus rate as the auxiliary goal. The global pheromone update is performed based on the global optimal solution. After reaching the maximum number of iterations, the global optimal solution is output as the optimal deployment result of the current sub-cycle, and the undeployed virtual machines are output as a buffer queue to the next sub-cycle; During the deployment period, virtual machines are deployed based on the optimal deployment result of the current sub-period.
2. A real-time virtual machine deployment method based on a buffer queue ant colony algorithm according to claim 1, characterized in that: Deploy a server for each VM in the VM queue based on pheromone and heuristic information, including: Generate a random number for the virtual machine j to be deployed; If the random number is less than or equal to the pseudo-random factor threshold, virtual machine j selects [τ(i,j)] α ·[η(i,j)] β The server i with the largest value is the deployment server, where τ(i, j) represents the pheromone concentration between server i and virtual machine j, η(i, j) represents the heuristic information for selecting server i for virtual machine j, and α and β are weight coefficients; If the random number is greater than the pseudo-random factor threshold, virtual machine j selects the deployment server through roulette.
3. The real-time virtual machine deployment method based on the buffer queue ant colony algorithm according to claim 2 is characterized in that: The formula for heuristic information is: Among them, η(i,j) represents the heuristic information for selecting server i for virtual machine j, Pc i Indicates the total CPU resources of server i, Uc i Indicates the amount of CPU resources used by server i, Uc j Indicates the CPU demand of virtual machine j, Pm i Indicates the total memory resources of server i, Um i Indicates the amount of memory resources used by server i, Ur j Represents the memory requirement of virtual machine j.
4. The real-time virtual machine deployment method based on the buffer queue ant colony algorithm according to claim 1 is characterized in that: If the current virtual machine is deployed to only one server, and the remaining CPU and memory of the server are both greater than or equal to the CPU and memory requirements of the virtual machine, the deployment is successful; If the current virtual machine is deployed to only one server and the remaining CPU and memory of the server are both less than the CPU and memory requirements of the virtual machine, the deployment fails.
5. The real-time virtual machine deployment method based on the buffer queue ant colony algorithm according to claim 1 is characterized in that: Each individual solution performs a local pheromone update, including: If the mapping relationship between virtual machine j and server i exists in the current individual solution, the current individual updates the pheromone concentration between server i and virtual machine j. The formula is: τ1(i,j)=(1-ρ)×τ(i,j)+ρ×τ0 Among them, τ(i,j) represents the pheromone concentration between server i and virtual machine j, ρ is the volatility factor, τ0 is the initial pheromone value, and τ1(i,j) represents the pheromone concentration between server i and virtual machine j after local update.
6. The real-time virtual machine deployment method based on the buffer queue ant colony algorithm according to claim 1 is characterized in that: Among multiple individual solutions, the primary goal is to minimize the number of servers in working state, and the secondary goal is to minimize the server resource surplus rate. The global optimal solution is updated, including: The main goal is to minimize the number of servers in working state. The formula is: Where f(S) represents the primary objective value of the individual solution S, M represents the total number of servers, and R i Indicates the working status of server i; when server i is deployed with a virtual machine, R i =1; when server i has no virtual machine deployed, R i =0; Taking minimizing the server resource surplus rate as the auxiliary goal, the formula is: Among them, f2(S) represents the auxiliary target value of the individual solution S, Pc i Indicates the total CPU resources of server i, Uc i Indicates the amount of CPU resources used by server i, Pm i Indicates the total memory resources of server i, Um i Indicates the amount of memory resources used by server i; The individual solution with the smallest main objective value is selected from multiple individual solutions to update the global optimal solution; when there are multiple individual solutions with the smallest main objective value, the individual solution with the smallest auxiliary objective value is selected to update the global optimal solution.
7. The real-time virtual machine deployment method based on the buffer queue ant colony algorithm according to claim 1 is characterized in that: Perform global pheromone updates based on the global optimal solution, including: If the mapping relationship between virtual machine j and server i exists in the global optimal solution, the pheromone concentration between server i and virtual machine j is globally updated, and the formula is: τ2(i,j)=(1-ε)×τ(i,j)+ε×Δτ(i,j) Where τ(i,j) represents the pheromone concentration between server i and virtual machine j, ε is the update coefficient, τ2(i,j) represents the pheromone concentration between server i and virtual machine j after global update; Δτ(i,j) represents the pheromone increment, BP is the global optimal solution, f(BP) is the main objective value of the global optimal solution, Tc i Indicates the remaining CPU of server i, Tr i Indicates the remaining memory of server i, Pc i Indicates the total CPU resources of server i, Pm i Indicates the total memory resources of server i.
8. The real-time virtual machine deployment method based on the buffer queue ant colony algorithm according to claim 1 is characterized in that: The virtual machines in the buffer queue output from the previous sub-cycle inherit the pheromones from the previous sub-cycle.
9. The real-time virtual machine deployment method based on the buffer queue ant colony algorithm according to claim 1 is characterized in that: After the complete computing cycle, a scheduling period is also included. During this scheduling period, mandatory mapping without resource constraints is performed for each virtual machine in the virtual machine queue when deploying the server to ensure that all virtual machines in the virtual machine queue are deployed on the server.
10. A real-time virtual machine deployment system based on a buffer queue ant colony algorithm, characterized in that: include: A sub-cycle division module is used to divide the complete computing cycle into several sub-cycles, each of which includes a scheduling period and a deployment period; The scheduling module is used to solve the optimal deployment result of the current sub-period using the buffer queue ant colony algorithm during the scheduling period, including: A queue merging unit is used to merge the queue of virtual machines to be deployed in the current sub-cycle with the buffer queue output in the previous sub-cycle to generate a virtual machine queue; The solution unit is used to deploy a server for each virtual machine in the virtual machine queue based on pheromones and heuristic information in each iteration round. If the deployment is successful, the mapping relationship between the current virtual machine and the server is added to the individual solution, and the current virtual machine is removed from the virtual machine queue. If the deployment fails, the current virtual machine is left in the virtual machine queue as an undeployed virtual machine in the individual solution. After obtaining multiple individual solutions, each individual solution is locally updated with pheromones. Among the multiple individual solutions, the global optimal solution is updated with minimizing the number of servers in working state as the main goal and minimizing the server resource surplus rate as the auxiliary goal. The global pheromone update is performed based on the global optimal solution. An output unit is used to output the global optimal solution as the optimal deployment result of the current sub-cycle after reaching the maximum number of iterations, and output the undeployed virtual machines as a buffer queue to the next sub-cycle; The deployment module is used to deploy virtual machines according to the optimal deployment result of the current sub-period during the deployment time period.
Citation Information
Patent Citations
Edge computing task cooperative scheduling method, system and device
CN111611080A
Virtual machine deployment planning method based on multi-population ant colony algorithm
CN117785381A
Data pre-migration method and device of virtual machine, storage medium and electronic equipment
CN119668769A
Cloud computing task allocation method and device, apparatus, and storage medium
US20200201677A1
Cloud computing task allocation method and apparatus, device, and storage medium
WO2019196127A1