A real-time virtual machine deployment method and system based on a buffer queue ant colony algorithm

CN120723375BActive Publication Date: 2026-08-28JIANGNAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510817224.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-18
Publication Date
2026-08-28
Estimated Expiration
2045-06-18

AI Technical Summary

Technical Problem

[0006]为此,本发明所要解决的技术问题在于克服现有技术中难以在保证资源利用率与能耗优化的同时高效处理实时动态的虚拟机部署请求的问题

Benefits of technology

本发明所述的一种基于缓冲队列蚁群算法的实时虚拟机部署方法,通过将完整计算周期划分为若干子周期,利用缓冲队列暂存当前子周期未完成部署的虚拟机,与下个子周期的即时请求同步处理,能够实现跨周期动态请求管理,避免突发负载下调度压力集中导致服务器过载的问题,提升资源利用率;并且,本发明在每个子周期采用缓冲队列蚁群算法求解当前子周期的最优部署结果,以最小化工作服务器数量,即降低能耗为主目标,均衡资源利用率为辅助目标,结合状态转移规则分步构建虚拟机-服务器映射解,信息素局部更新通过挥发因子衰减历史信息素以构建新的解,信息素全局更新基于全局最佳解与服务器资源利用率强化最优解,确保在动态负载下高效完成部署,使得本发明在不同规模场景中均显著减少工作服务器数量并提升资源利用率,有效解决云计算实时负载下的能耗优化与资源均衡问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120723375B_ABST
    Figure CN120723375B_ABST
Patent Text Reader

Abstract

The present application relates to cloud computing resource scheduling technical field, especially in a kind of real-time virtual machine deployment method and system based on buffer queue ant colony algorithm, comprising: complete computing period is divided into several sub-periods, each sub-period includes scheduling time period and deployment time period;In scheduling time period, the optimal deployment result of current sub-period is solved using buffer queue ant colony algorithm;In deployment time period, according to the optimal deployment result of current sub-period, virtual machine is deployed.The present application can significantly reduce the number of working servers in different scale scenarios and improve resource utilization, effectively solve the energy consumption optimization and resource balance problem under the real-time load of cloud computing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cloud computing resource scheduling technology, and in particular to a real-time virtual machine deployment method and system based on the buffer queue ant colony algorithm. Background Technology

[0002] In the field of cloud computing technology, virtual machine deployment strategy is one of the core technologies determining the resource utilization and service quality of an IaaS platform. Traditional virtual machine deployment mainly relies on static resource allocation strategies, where administrators allocate fixed computing, storage, and network resources to virtual machines through preset rules. This method has the advantages of simple operation and convenient management, and is suitable for scenarios with stable resource requirements. However, with the diversification of cloud computing applications and the trend of dynamic load, its limitations are becoming increasingly significant. For example, it cannot dynamically respond to load fluctuations, leading to idle or overloaded resources, which seriously affects 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 during high loads and down during low loads to improve resource utilization. However, they face challenges such as high computational and energy costs, system stability risks, and deployment efficiency bottlenecks. Real-time monitoring consumes significant computing resources and exacerbates energy waste; dynamic adjustments may trigger resource conflicts and data migration issues; and server resource competition and uneven cluster load can 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; and Liu et al. improved deployment success rate and reduced latency through reinforcement learning algorithms.

[0005] However, existing intelligent optimization algorithms struggle to efficiently process real-time dynamic virtual machine deployment requests while ensuring resource utilization and energy consumption optimization. This presents a contradiction between real-time performance and multi-objective optimization. Furthermore, under sudden loads, the concentrated scheduling pressure can easily lead to task backlog and invalid computation, affecting system stability. Summary of the Invention

[0006] Therefore, the technical problem to be solved by the present invention is to overcome the difficulty in the prior art in efficiently processing real-time dynamic virtual machine deployment requests while ensuring resource utilization and energy consumption optimization.

[0007] To address the aforementioned technical problems, this invention provides a real-time virtual machine deployment method based on a buffer queue ant colony algorithm, comprising: The complete computing cycle is divided 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 for the optimal deployment result of the current sub-cycle, including: The queue of virtual machines to be deployed in the current sub-cycle is merged with the buffer queue output from the previous sub-cycle to generate a virtual machine queue. In each iteration round, a server is deployed for each virtual machine in the virtual machine queue based on pheromone and heuristic information. If 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 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 undergoes local pheromone updates. Among the multiple individual solutions, the global optimal solution is updated with minimizing the number of servers in a working state as the primary objective and minimizing the server resource surplus rate as the secondary objective. A global pheromone update is then 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 for 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-cycle.

[0008] Preferably, deploying a server for each virtual machine in the virtual machine queue based on pheromones and heuristic information includes: 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, then virtual machine j selects... The server i with the largest value is the deployment server, where This represents the pheromone concentration between server i and virtual machine j. This represents the heuristic information for virtual machine j to select server i. and All are weighting coefficients; If the random number is greater than the pseudo-random factor threshold, then virtual machine j selects the deployment server by roulette.

[0009] Preferably, the formula for heuristic information is:

[0010] Where represents the heuristic information for virtual machine j to select server i. This represents the total CPU resources of server i. This indicates the amount of CPU resources already used by server i. Let represent the CPU requirement of virtual machine j, and represent the total memory resources of server i. This indicates the amount of memory resources already used by server i. This indicates the memory requirements of virtual machine j.

[0011] 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, then the deployment is successful. If the current virtual machine is deployed to only one server, and either the remaining CPU or memory of that server is less than the virtual machine's CPU and memory requirements, the deployment will fail.

[0012] Preferably, each individual solution undergoes local pheromone updating, including: If the mapping relationship between virtual machine j and server i exists in the current individual solution, then the current individual updates the pheromone concentration between server i and virtual machine j using the following formula:

[0013] in, This represents the pheromone concentration between server i and virtual machine j. As a volatile factor, The initial pheromone value, This represents the pheromone concentration between server i and virtual machine j after a partial update.

[0014] Preferably, among multiple individual solutions, the global optimal solution is updated with minimizing the number of servers in a working state as the primary objective and minimizing the remaining server resources as the secondary objective, including: With the primary objective of minimizing the number of servers in a working state, the formula is:

[0015] in, Representing individual solutions The main target value, Indicates the total number of servers. This indicates the working status of server i; when server i has virtual machines deployed... When server i does not have a virtual machine deployed, ; With minimizing the remaining server resources as an auxiliary objective, the formula is:

[0016] in, Representing individual solutions Auxiliary target value, This represents the total CPU resources of server i. This indicates the amount of CPU resources already used by server i. This represents the total memory resources of server i. This indicates the amount of memory resources already used by server i; The global optimal solution is updated by selecting the individual solution with the smallest primary objective value from among multiple individual solutions; when there are multiple individual solutions with the smallest primary objective value, the global optimal solution is updated by selecting the individual solution with the smallest auxiliary objective value from among them.

[0017] Preferably, global pheromone updates are performed based on the global optimal solution, including: If the mapping relationship between virtual machine j and server i exists in the global optimal solution, then the pheromone concentration between server i and virtual machine j is updated globally using the following formula:

[0018]

[0019] in, This represents the pheromone concentration between server i and virtual machine j. To update the coefficients, This represents the pheromone concentration between server i and virtual machine j after the global update; Indicates the pheromone increment. This is the globally optimal solution. The primary objective value is the globally optimal solution. This indicates the remaining CPU usage of server i. This indicates the amount of memory remaining in server i. This represents the total CPU resources of server i. This represents the total memory resources of server i.

[0020] Preferably, the virtual machine located in the buffer queue of the previous sub-cycle output inherits the pheromone of the previous sub-cycle.

[0021] Preferably, after the complete computation cycle, there is also a scheduling period during which a resource-unconstrained forced mapping is performed when each virtual machine in the virtual machine queue is deployed to the server, so as to ensure that all virtual machines in the virtual machine queue are deployed to the server.

[0022] This invention also provides a real-time virtual machine deployment system based on a buffer queue ant colony algorithm, comprising: The sub-cycle division module is used to divide the complete computing cycle into several sub-cycles, each of which includes a scheduling time period and a deployment time period; The scheduling module is used to determine the optimal deployment result for the current sub-cycle using a buffer queue ant colony algorithm within the scheduling time period, including: The 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 from the previous sub-cycle to generate a virtual machine queue. The solution unit is used in each iteration to deploy servers for each virtual machine in the virtual machine queue based on pheromone 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 undergoes local pheromone updates. Among the multiple individual solutions, the global optimal solution is updated with minimizing the number of servers in a working state as the primary objective and minimizing the server resource surplus rate as the secondary objective. The global pheromone is then updated based on the global optimal solution. The 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 based on the optimal deployment result of the current sub-cycle during the deployment period.

[0023] Compared with the prior art, the above-described technical solution of the present invention has the following advantages: This invention discloses a real-time virtual machine deployment method based on a buffer queue ant colony algorithm. By dividing the complete computing cycle into several sub-cycles, a buffer queue is used to temporarily store virtual machines that have not yet been deployed in the current sub-cycle, and to process them synchronously with the immediate requests of the next sub-cycle. This enables cross-cycle dynamic request management, avoids the problem of server overload caused by concentrated scheduling pressure under sudden loads, and improves resource utilization. Furthermore, this invention uses the buffer queue ant colony algorithm in each sub-cycle to solve for the optimal deployment result of the current sub-cycle, with minimizing the number of working servers (i.e., reducing energy consumption) as the primary objective and balancing resource utilization as a secondary objective. Combined with state transition rules, the virtual machine-server mapping solution is constructed step by step. Local pheromone updates decay historical pheromones through volatile factors to construct new solutions, and global pheromone updates strengthen the optimal solution based on the globally optimal solution and server resource utilization, ensuring efficient deployment under dynamic loads. This invention significantly reduces the number of working servers and improves resource utilization in different scale scenarios, effectively solving the problems of energy consumption optimization and resource balancing under real-time cloud computing loads. Attached Figure Description

[0024] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings, wherein: Figure 1 This is a flowchart of a real-time virtual machine deployment method based on a buffer queue ant colony algorithm according to the present invention; Figure 2This is a schematic diagram of dividing the calculation period into sub-periods; Figure 3 This is a schematic diagram illustrating the construction of individual solutions in the buffer queue ant colony algorithm; Figure 4 This is a schematic diagram illustrating the working principle of a buffer queue; Figure 5 This is a graph showing the principal objective value f(S) at the end of a sub-cycle for each algorithm in three test instances of different sizes. Figure 5 (a) in the figure is a graph of the principal objective value f(S) at the end of a sub-cycle in a small-scale instance or a small-scale test instance. Figure 5 (b) is a graph of the principal objective value f(S) at the end of a sub-cycle in a medium-scale test instance. Figure 5 (c) is a graph of the main objective value f(S) at the end of a sub-cycle in a large-scale test instance. Detailed Implementation

[0025] 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 and implement the present invention. However, the embodiments described are not intended to limit the present invention.

[0026] Reference Figure 1 As shown, this invention provides a real-time virtual machine deployment method based on a buffer queue ant colony algorithm, comprising: S1: Construct a real-time virtual machine deployment model for the cloud computing center.

[0027] Define physical and virtual resources digitally: Define the system to include... M Taiwan physical server (i=1,2,…,M) and N virtual machines to be deployed (j=1,2,…,N), each server Configure total CPU resources (millicores) and total memory resources (MB), and monitor the server's used CPU resources in real time. and memory resources And calculate the remaining CPU resources and remaining memory resources Virtual machines to be deployed CPU resources need to be applied for and memory resources Deployment relationships are represented by a 0-1 matrix. S This represents the elements in the matrix. Indicates virtual machine Deploy to server .

[0028] Establish a real-time virtual machine deployment model that includes constraints and objective functions, including:

[0029]

[0030] in, Used to determine the server Is a virtual machine deployed on the server? If a virtual machine is deployed on it, then... Set it to 1, otherwise set it to 0.

[0031] Define a single-virtual machine deployment constraint to ensure that each virtual machine is deployed on only one server, expressed by the formula:

[0032] If virtual machine Deployed on server Up, current server The remaining CPU resources must satisfy the virtual machine. The CPU requirement is expressed by the formula:

[0033] in, This represents the CPU requirement of virtual machine j. This indicates the remaining CPU usage of server i.

[0034] If virtual machine Deployed on server Up, current server The remaining memory resources must satisfy the virtual machine. The memory requirement is expressed by the formula:

[0035] in, This represents the memory requirements of virtual machine j. This indicates the amount of memory remaining for server i.

[0036] S2: Divide the complete computing cycle into several sub-cycles, each of which includes a scheduling period and a deployment period.

[0037] For complete calculation cycle division logic reference Figure 2 As shown. To handle dynamic requests, the complete computation cycle will be... Divided into n sub-periods (i=1,2,…,n), each sub-period is ,in Set the scheduling time period at the beginning of each sub-cycle. It is used to process immediate requests within the current sub-cycle and unfinished planned requests from the previous sub-cycle, ensuring that requests are scheduled in an orderly manner according to priority.

[0038] Before the complete calculation cycle, there is also a cross-cycle transition segment. This is the transition period from the end of the previous calculation cycle to the current calculation cycle.

[0039] After the complete computation cycle, a scheduling period is also included. This scheduling period involves performing a resource-unconstrained forced mapping for each virtual machine in the virtual machine queue when it is deployed to a server, ensuring that all virtual machines in the virtual machine queue are deployed to the server.

[0040] S3: During the scheduling period, the Buffered Queue Ant Colony Algorithm (BQACS) is used to solve for the optimal deployment result of the current sub-cycle, including: S31: Merge the virtual machine queue (VL) to be deployed in the current sub-cycle and the buffer queue (BQ) output from the previous sub-cycle to generate a virtual machine queue. Virtual machines in the queue are sorted according to the priority of deployment requests, with immediate requests taking precedence over planned requests, and requests with low latency tolerance being scheduled first. Under equal priority, virtual machines are sorted by their arrival timestamps, with earlier, incomplete requests being scheduled first.

[0041] S32: In each iteration round, deploy a server for each virtual machine in the virtual machine queue based on pheromones and heuristics, including: Generate random numbers for virtual machine j to be deployed. ; If random number Less than or equal to the pseudo-random factor threshold Then virtual machine j selects The server i with the largest value is the deployment server; if the random number... Greater than the pseudo-random factor threshold Then virtual machine j selects the deployment server by roulette, as expressed by the formula:

[0042] in, This represents the pheromone concentration between server i and virtual machine j. This represents the heuristic information for virtual machine j to select server i; and All are weighting coefficients. These are predefined parameters that control the relative importance of pheromones. These are predefined parameters that control the relative importance of heuristic information; For the rules of roulette, Index of server i; pseudo-random factor threshold Used to control an individual's tendency to utilize and explore the solution space.

[0043] Specifically, the formula for roulette rules is:

[0044] Specifically, heuristic information is used to measure the balance of resource utilization, and the formula is as follows:

[0045] in, This represents the heuristic information corresponding to virtual machine j being deployed on server i. This represents the total CPU resources of server i. This indicates the amount of CPU resources already used by server i. This represents the CPU requirement of virtual machine j. This represents the total memory resources of server i. This indicates the amount of memory resources already used by server i. This indicates the memory requirements of virtual machine j.

[0046] S33: If deployment is successful, add the mapping relationship between the current virtual machine and the server to the individual solution and remove the current virtual machine from the virtual machine queue; if deployment fails, leave the current virtual machine as an undeployed virtual machine in the virtual machine queue as an individual solution.

[0047] Specifically, if the current virtual machine is deployed to only one server, and the remaining CPU and memory of that server are both greater than or equal to the CPU and memory requirements of the virtual machine, then the deployment is successful; if the current virtual machine is deployed to only one server, and either the remaining CPU or memory of that server is less than the CPU and memory requirements of the virtual machine, then the deployment fails.

[0048] For example, the mapping relationship between virtual machines and servers can be [[1,3],[2,1],…], where [1,3] indicates that virtual machine 3 is deployed on server 1, and [2,1] indicates that virtual machine 1 is deployed on server 2. The process of constructing an individual solution is described in [reference]. Figure 3 As shown.

[0049] S34: To quickly respond to the results of a single iteration, the pheromone is adjusted in a short period. After obtaining multiple individual solutions, the pheromone of each individual solution is updated locally, including: If the mapping relationship between virtual machine j and server i exists in the current individual solution, then the current individual updates the pheromone concentration between server i and virtual machine j using the following formula:

[0050] in, This represents the pheromone concentration between server i and virtual machine j. As a volatile factor, The initial pheromone value, This represents the pheromone concentration between server i and virtual machine j after a partial update.

[0051] S35: Among multiple individual solutions, the primary objective is to minimize the number of servers in a working state, and the secondary objective is to minimize the remaining server resources. The global optimal solution is then updated.

[0052] Specifically, the primary objective is to minimize the number of servers in active status, as shown in the formula:

[0053] in, Representing individual solutions The main target value, Indicates the total number of servers. This indicates the working status of server i; when server i has virtual machines deployed... When server i does not have a virtual machine deployed, ; With minimizing the remaining server resources as an auxiliary objective, the formula is:

[0054] in, Representing individual solutions Auxiliary target value, This represents the total CPU resources of server i. This indicates the amount of CPU resources already used by server i. This represents the total memory resources of server i. This indicates the amount of memory resources already used by server i; The global optimal solution is updated by selecting the individual solution with the smallest primary objective value from among multiple individual solutions; when there are multiple individual solutions with the smallest primary objective value, the global optimal solution is updated by selecting the individual solution with the smallest auxiliary objective value from among them.

[0055] The primary objective constructed in this invention is to minimize the number of working servers and reduce energy consumption; when the primary objective values ​​are the same, the individual solution with the smallest auxiliary objective value is selected to ensure higher overall server utilization.

[0056] S36: To gradually strengthen the global optimal solution and guide convergence over a long period, global pheromone updates are performed based on the global optimal solution, including: If the mapping relationship between virtual machine j and server i exists in the global optimal solution, then the pheromone concentration between server i and virtual machine j is updated globally using the following formula:

[0057]

[0058] in, This represents the pheromone concentration between server i and virtual machine j. To update the coefficients, This represents the pheromone concentration between server i and virtual machine j after the global update; Indicates the pheromone increment. This is the globally optimal solution. The primary objective value is the globally optimal solution. This indicates the remaining CPU usage of server i. This indicates the amount of memory remaining in server i. This represents the total CPU resources of server i. This represents the total memory resources of server i.

[0059] S37: After reaching the maximum number of iterations, output the globally optimal solution as the optimal deployment result for the current sub-cycle, and output the undeployed virtual machines as a buffer queue to the next sub-cycle. See the schematic diagram of the buffer queue's working principle. Figure 4 As shown.

[0060] Preferably, the iteration termination condition can also be set to the target value showing no improvement after multiple consecutive iterations.

[0061] Preferably, the virtual machines located 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 through cross-cycle pheromone accumulation, avoiding searching from the beginning in each scheduling, thereby improving the efficiency of dynamic resource allocation. The mechanism of this invention ensures that the pheromone update is always based on the best solution of the current iteration. The queue of virtual machines to be deployed acquired in each sub-cycle uses the initial pheromone.

[0062] The following is the pseudocode for the buffer queue ant colony algorithm: 1 Algorithm BQACS() 2. Initialize BQ = ∅, VL = ∅ # Initialize: BQ (buffer queue), VL (new request queue) 3 for each sub-period P i do: 4 VL = Get_New_Requests(Pi) # Load the immediate requests (new requests) of the subcycle Pi 5 BQ = BQ ∪ VL # Explicitly merge historical incomplete requests (BQ) with new requests (VL) 6 t = 0 7 while t <Max_t do: 8 for k = 1 to popsize do: 9 for j = 1 to length(BQ) do: # Traverse the merged queue 10. Calculate η(i,j) and select Server. i 11. If deployment is successful: 12 BQ.remove(VM j # Remove successfully deployed VMs directly from the merge queue j To avoid confusion caused by operating on two queues 13 else: 14 # Reserve VM j In BQ 15 Perform a partial update 16. Calculate the target value f(k) and update BP. 17. Perform a global update 18 t += 1 19 BQ = Remaining undeployed VMs in the merge queue # Subcycle ends, unfinished requests remain in BQ 20 end In the iterations of the buffer queue ant colony algorithm, the mapping of successfully deployed virtual machines remains unchanged after being removed from the virtual machine queue, but their corresponding paths continue to influence subsequent searches through pheromone updates (evaporation decay and optimal solution reinforcement). The core change in each iteration lies in the dynamic adjustment of pheromone concentration based on the quality of historical solutions, the updating of heuristic information according to the real-time resource status of the server, and the buffer queue mechanism enabling failed virtual machines to be merged and scheduled with new requests across cycles. Although a single iteration fails, if pheromone-guided optimization or server resources are released in subsequent iterations, the failed virtual machine still has a chance to be successfully deployed.

[0063] S4: During the deployment period, deploy virtual machines based on the optimal deployment result of the current sub-cycle.

[0064] To verify the effectiveness of the BQACS algorithm, this embodiment sets up the following algorithms for experimental data comparison: Algorithm 1 is the Ant Colony Algorithm for Dynamic Vehicle Routing Problem (ACS-DVRP), published in the Journal of Combinatorial Optimization in 2005, entitled "Ant colony system for a dynamic vehicle routing problem"; Algorithm 2 is the Social Learning Particle Swarm Optimization Algorithm (SLPSO), published in Information Sciences in 2015, entitled "A social learning particle swarm optimization algorithm for scalable optimization"; and Algorithm 3 is the Reordering Grouping Genetic Algorithm (RGGA), published in the IEEE Congress of Evolutionary Computation (CEC) in 2011, entitled "Solving virtual machine packing with a reordering grouping genetic algorithm".

[0065] To ensure fairness, the three algorithms were used to solve the problem, and experiments were conducted on 12 instances. Each instance included parameters for all virtual machines and the server. These instances were divided into three different sizes. For each test instance, each algorithm was run independently 30 times, and the best, worst, and average values ​​from the 30 runs were recorded.

[0066] The parameter settings for the BQACS algorithm and the comparison algorithm used in this invention are shown in Table 1.

[0067] Table 1. Parameters of BQACS Algorithm and Comparison Algorithm

[0068] The comparison of the principal target values ​​(units) of the BQACS algorithm and the comparison algorithm in test instances of various scales is shown in Table 2.

[0069] Table 2. Comparison of principal objective values ​​between BQACS algorithm and comparison algorithms

[0070] Table 3 shows a comparison of the auxiliary function values ​​of the BQACS algorithm and the comparison algorithm in a small-scale test instance.

[0071] Table 3. Comparison of auxiliary target values ​​between BQACS algorithm and comparison algorithms

[0072] Experimental results show that the algorithm of this invention, through deep collaboration between the model and the algorithm, outperforms existing solutions in key indicators such as energy consumption, resource balance, and real-time performance. As the data scale increases, the difficulty of solving the problem also increases significantly; however, the algorithm of this invention demonstrates excellent performance in test instances of different scales, indicating that the method of this invention has a strong ability to handle large-scale problems.

[0073] To further clarify the algorithm's solving capability, this invention selects one test instance from each of three different scales and plots curves based on the main objective value f(S) at the end of each sub-cycle. Figure 5 The graphs show the principal objective value f(S) at the end of each sub-cycle for each algorithm in three test instances of different sizes. Figure 5 (a) in the figure is a graph of the principal objective value f(S) at the end of a sub-cycle in a small-scale instance or a small-scale test instance. Figure 5 (b) is a graph of the principal objective value f(S) at the end of a sub-cycle in a medium-scale test instance. Figure 5 (c) is a graph of the main objective value f(S) at the end of a sub-cycle in a large-scale test instance.

[0074] like Figure 5 As shown, in smaller-scale test instances, analysis of the objective value curves reveals that the BQACS algorithm begins to outperform other algorithms after the second sub-cycle. The performance of ACS-DVRP and RGGA algorithms is relatively similar, both outperforming the SLPSO algorithm overall. Notably, the SLPSO algorithm exhibits significant fluctuations in its objective value curve, indicating poor stability. In practice, this fluctuation manifests as a severely uneven distribution of the number of virtual machines scheduled within each sub-cycle, potentially leading to excessive computational load in any given sub-cycle and impacting overall system efficiency. In summary, the BQACS algorithm demonstrates high solution efficiency and stability for smaller-scale problems.

[0075] When medium-sized test cases were included in the study, the advantages of the BQACS algorithm became even more apparent. Its objective value curve remained at the lowest level throughout the computation, demonstrating its superiority in handling medium-sized problems. In the mid-term computation phase, the SLPSO and RGGA algorithms exhibited some fluctuations, in stark contrast to the smoother objective value curve of the BQACS algorithm, indicating better robustness. From a practical scheduling perspective, under the BQACS algorithm's scheduling strategy, the number of virtual machines scheduled in each sub-cycle was relatively balanced, effectively reducing the possibility of excessive computational load and server pressure in any given period. Although the performance of ACS-DVRP and RGGA remained similar, the advantages of the BQACS algorithm became more pronounced. The SLPSO algorithm's curve still fluctuated significantly, undoubtedly indicating its weaker ability to solve medium-sized problems. Therefore, the BQACS algorithm performs exceptionally well in medium-sized problems and can effectively handle related computational tasks.

[0076] Further extending the research to large-scale test cases, the superior performance of the BQACS algorithm was once again validated. Its objective value curve was significantly lower than other algorithms, meaning that it could find a better solution at the end of each sub-cycle, demonstrating its efficient solution capability even in large-scale problems. The ACS-DVPR algorithm, with its pheromone protection mechanism, has certain advantages in dynamic environments, but its solution efficiency still lags behind BQACS when dealing with large-scale problems. The ACS-DVRP and RGGA algorithms showed relatively stable performance in large-scale problems, but still have significant room for improvement compared to BQACS. Although the SLPSO algorithm enhances its global search capability through a social learning mechanism, it performs the worst in environments with high dynamic and real-time requirements, exhibiting significant fluctuations in its objective value curve, indicating that its solution capability in large-scale problems is relatively limited. In contrast, the BQACS algorithm demonstrated extremely high stability and solution efficiency in large-scale problems.

[0077] In summary, the real-time virtual machine deployment method based on the buffer queue ant colony algorithm described in this invention divides the complete computing cycle into several sub-cycles. A buffer queue is used to temporarily store virtual machines that have not yet been deployed in the current sub-cycle, allowing for synchronized processing of immediate requests from the next sub-cycle. This enables cross-cycle dynamic request management, avoiding server overload caused by concentrated scheduling pressure under sudden loads and improving resource utilization. Furthermore, this invention uses the buffer queue ant colony algorithm in each sub-cycle to solve for the optimal deployment result, minimizing the number of working servers (i.e., reducing energy consumption) as the primary objective, with balanced resource utilization as a secondary objective. Combined with state transition rules, a virtual machine-server mapping solution is constructed step-by-step. Local pheromone updates decay historical pheromones through volatile factors to construct new solutions, while global pheromone updates reinforce the optimal solution based on the globally optimal solution and server resource utilization. This ensures efficient deployment under dynamic loads, significantly reducing the number of working servers and improving resource utilization in scenarios of different scales, effectively solving the problems of energy consumption optimization and resource balancing under real-time cloud computing loads.

[0078] 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: The sub-cycle division module is used to divide the complete computing cycle into several sub-cycles, each of which includes a scheduling time period and a deployment time period; The scheduling module is used to determine the optimal deployment result for the current sub-cycle using a buffer queue ant colony algorithm within the scheduling time period, including: The 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 from the previous sub-cycle to generate a virtual machine queue. The solution unit is used in each iteration to deploy servers for each virtual machine in the virtual machine queue based on pheromone 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 undergoes local pheromone updates. Among the multiple individual solutions, the global optimal solution is updated with minimizing the number of servers in a working state as the primary objective and minimizing the server resource surplus rate as the secondary objective. The global pheromone is then updated based on the global optimal solution. The 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 based on the optimal deployment result of the current sub-cycle during the deployment period.

[0079] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0080] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0081] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0082] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0083] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.

Claims

1. A real-time virtual machine deployment method based on a buffer queue ant colony algorithm, characterized in that, include: The complete computing cycle is divided 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 for the optimal deployment result of the current sub-cycle, including: The queue of virtual machines to be deployed in the current sub-cycle is merged with the buffer queue output from the previous sub-cycle to generate a virtual machine queue. In each iteration round, a server is deployed for each virtual machine in the virtual machine queue based on pheromone and heuristic information. If 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 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 undergoes local pheromone updates. Among the multiple individual solutions, the global optimal solution is updated with minimizing the number of servers in a working state as the primary objective and minimizing the server resource surplus rate as the secondary objective. A global pheromone update is then 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 for the current sub-cycle, and the undeployed virtual machines are output as a buffer queue to the next sub-cycle; During the deployment period, deploy virtual machines based on the optimal deployment result of the current sub-cycle; Deploy servers for each virtual machine in the virtual machine queue based on pheromones and heuristics, 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, then virtual machine j selects... The server i with the largest value is the deployment server, where This represents the pheromone concentration between server i and virtual machine j. This represents the heuristic information for virtual machine j to select server i. and All are weighting coefficients; If the random number is greater than the pseudo-random factor threshold, then virtual machine j selects the deployment server by roulette.

2. The real-time virtual machine deployment method based on the buffer queue ant colony algorithm according to claim 1, characterized in that, The formula for heuristic information is: ,in, This represents the heuristic information for virtual machine j to select server i. This represents the total CPU resources of server i. This indicates the amount of CPU resources already used by server i. This represents the CPU requirement of virtual machine j. This represents the total memory resources of server i. This indicates the amount of memory resources already used by server i. This indicates the memory requirements of virtual machine j.

3. The real-time virtual machine deployment method based on the buffer queue ant colony algorithm according to claim 1, characterized in that, If the current virtual machine is deployed to only one server, and the remaining CPU and memory of that server are both greater than or equal to the CPU and memory requirements of the virtual machine, then the deployment is successful. If the current virtual machine is deployed to only one server, and either the remaining CPU or memory of that server is less than the virtual machine's CPU and memory requirements, the deployment will fail.

4. The real-time virtual machine deployment method based on the buffer queue ant colony algorithm according to claim 1, characterized in that, Each individual solution undergoes a local pheromone update, including: If the mapping relationship between virtual machine j and server i exists in the current individual solution, then the current individual updates the pheromone concentration between server i and virtual machine j using the following formula: ,in, This represents the pheromone concentration between server i and virtual machine j. As a volatile factor, The initial pheromone value, This represents the pheromone concentration between server i and virtual machine j after a partial update.

5. A real-time virtual machine deployment method based on a buffer queue ant colony algorithm according to claim 1, characterized in that, Among multiple individual solutions, the primary objective is to minimize the number of servers in a working state, and the secondary objective is to minimize the remaining server resources. The global optimal solution is then updated, including: With the primary objective of minimizing the number of servers in a working state, the formula is: ,in, Representing individual solutions The main target value, Indicates the total number of servers. This indicates the working status of server i; when server i has virtual machines deployed... When server i does not have a virtual machine deployed, ; With minimizing the remaining server resources as an auxiliary objective, the formula is: ,in, Representing individual solutions Auxiliary target value, This represents the total CPU resources of server i. This indicates the amount of CPU resources already used by server i. This represents the total memory resources of server i. This indicates the amount of memory resources already used by server i; The global optimal solution is updated by selecting the individual solution with the smallest primary objective value from among multiple individual solutions; when there are multiple individual solutions with the smallest primary objective value, the global optimal solution is updated by selecting the individual solution with the smallest auxiliary objective value from among them.

6. The real-time virtual machine deployment method based on the buffer queue ant colony algorithm according to claim 1, characterized in that, Global pheromone updates are performed based on the globally optimal solution, including: If the mapping relationship between virtual machine j and server i exists in the global optimal solution, then the pheromone concentration between server i and virtual machine j is updated globally using the following formula: , ,in, This represents the pheromone concentration between server i and virtual machine j. To update the coefficients, This represents the pheromone concentration between server i and virtual machine j after the global update; Indicates the pheromone increment. This is the globally optimal solution. The primary objective value is the globally optimal solution. This indicates the remaining CPU usage of server i. This indicates the amount of memory remaining in server i. This represents the total CPU resources of server i. This represents the total memory resources of server i.

7. The real-time virtual machine deployment method based on the buffer queue ant colony algorithm according to claim 1, characterized in that, The virtual machine located in the buffer queue of the previous sub-cycle's output inherits the pheromone from the previous sub-cycle.

8. A real-time virtual machine deployment method based on a buffer queue ant colony algorithm according to claim 1, characterized in that, Following the complete computation cycle, there is also a scheduling period during which a resource-unconstrained forced mapping is performed for each virtual machine in the virtual machine queue as it is deployed to the server, ensuring that all virtual machines in the virtual machine queue are deployed to the server.

9. A real-time virtual machine deployment system based on a buffer queue ant colony algorithm, characterized in that, include: The sub-cycle division module is used to divide the complete computing cycle into several sub-cycles, each of which includes a scheduling time period and a deployment time period; The scheduling module is used to determine the optimal deployment result for the current sub-cycle using a buffer queue ant colony algorithm within the scheduling time period, including: The 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 from the previous sub-cycle to generate a virtual machine queue. The solution unit is used to deploy servers for each virtual machine in the virtual machine queue based on pheromone 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 undergoes local pheromone updates. Among the multiple individual solutions, the global optimal solution is updated with minimizing the number of servers in working state as the primary objective and minimizing the server resource surplus rate as the secondary objective. Global pheromone updates are performed based on the global optimal solution. Deploying servers for each virtual machine in the virtual machine queue based on pheromone and heuristic information includes: generating 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, then virtual machine j is selected. The server i with the largest value is the deployment server, where This represents the pheromone concentration between server i and virtual machine j. This represents the heuristic information for virtual machine j to select server i. and All are weighting coefficients; if the random number is greater than the pseudo-random factor threshold, then virtual machine j selects the deployment server by roulette wheel selection; The 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 based on the optimal deployment result of the current sub-cycle during the deployment period.

Citation Information

Patent Citations

  • 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