Task scheduling and resource management method in cloud environment based on hybrid bionic algorithm
Through the multi-particle swarm optimization and cat swarm algorithm of hybrid bionic algorithm, the virtual machine resources are dynamically monitored, and the load imbalance and resource waste of task scheduling and resource management in cloud computing systems are solved, and efficient resource utilization and response time optimization is achieved.
Patent Information
- Application Number
- CN202510349441.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-24
- Publication Date
- 2025-07-11
AI Technical Summary
The existing cloud computing systems fail to fully consider the load and resource utilization of virtual machines in task scheduling and resource management, resulting in some virtual machines being overloaded or wasted resources. Traditional scheduling algorithms are inefficient when large-scale concurrent tasks, and the resource management strategy is inflexible, so they cannot dynamically adapt to task changes.
The multi-particle swarm optimization algorithm (MPSO) based on hybrid bionic algorithm and the improved cat swarm algorithm (MCSO) are adopted to dynamically monitor the remaining resources of the virtual machine through a collaborative mechanism between local optimal and global optimal, and build a residual resource-driven elastic allocation mechanism, combining multi-dimensional resource management to optimize resource allocation and scheduling.
Load balancing is realized, resource utilization is improved, system response time and communication overhead are reduced, and overall utilization efficiency and stability of cloud resources in dynamic task environments are improved.
Smart Images

Figure CN120295728A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of power system and its automation, and relates to a task scheduling and resource management method in a cloud environment based on a hybrid bionic algorithm. Background Art
[0002] With the continuous increase in the number of virtual machines in the cloud computing environment, the concurrency and dynamic variability of tasks have increased significantly. How to achieve efficient task scheduling and dynamic resource management without affecting the performance of the cloud system has become a key issue in the optimization of cloud computing systems. The existing task scheduling and resource management have the following problems:
[0003] When scheduling tasks, the load and resource utilization rate of virtual machines are not fully considered, resulting in some virtual machines being overloaded while other virtual machines have idle resources, causing waste of resources.
[0004] With the continuous increase in the number of tasks, traditional scheduling algorithms have low scheduling efficiency when facing large-scale concurrent tasks, resulting in too long response time of the system.
[0005] The resource management strategy is too simple and does not consider the dynamically changing requirements of tasks, resulting in inflexible resource allocation and inability to optimize according to actual needs. Summary of the Invention
[0006] Aiming at the increasing uncertainty risk in the operation of the existing power grid and the insufficient ability of the control system to anticipate accident scenarios and prevent risks, the present invention provides a task scheduling and resource management method in a cloud environment based on a hybrid bionic algorithm, including:
[0007] Step 1: Based on obtaining the task requests of users and the resource requirements of tasks, determine multiple virtual machines and multiple tasks for executing the tasks;
[0008] Step 2: Based on the multiple virtual machines and the multiple tasks, use an improved particle swarm optimization algorithm to determine multiple virtual machine scheduling schemes; each particle represents a virtual machine scheduling scheme, and the particle swarm represents the search space for virtual machine scheduling. Set the iteration termination condition of the improved particle swarm optimization algorithm, perform loop iteration, and when the iteration termination condition is reached, output the current scheduling scheme;
[0009] Among them, in the process of using the improved particle swarm optimization algorithm to determine multiple virtual machine scheduling schemes based on the multiple virtual machines and the multiple tasks, the improved particle swarm optimization algorithm is used to manage the computing resources of virtual machines.
[0010] Preferably, the use of the improved particle swarm optimization algorithm to manage the computing resources of virtual machines includes:
[0011] Step 2.1: Initialize the resource pools of multiple virtual machines, and assume that the resources of the multiple virtual machines are provided by the resource pools;
[0012] Step 2.2: Divide the multiple virtual machines into multiple clusters; based on each virtual machine, determine the unused resources in the virtual machine;
[0013] Step 2.3: When executing a new task, set to select matching resources from the unused resources of a virtual machine; if the unused resources in the virtual machine can meet the requirements of the new task, the virtual machine directly executes the new task, otherwise, obtain resources from the resource pool to execute the new task.
[0014] Preferably, after the step 2.3, based on the virtual machine that has completed the execution of the new task, if there are still unused resources in the virtual machine that has completed the execution of the new task, release the still unused resources to the resource pool.
[0015] Preferably, when executing a new task, setting to select matching resources from the unused resources of a virtual machine includes:
[0016] Taking minimizing the waste of unused resources as the objective function, adopt an improved cat swarm algorithm to set to select matching resources from the unused resources of a virtual machine.
[0017] Preferably, the step 2.2 includes: for the execution of parallel tasks, divide into at least two clusters.
[0018] Preferably, when executing a new task, setting to select matching resources from the unused resources of a virtual machine further includes:
[0019] When executing a new task, set to monitor the resource utilization rate of the virtual machine in real time, generate a resource allocation strategy, and obtain the resource utilization rate result;
[0020] Adjust the matching of resources according to the resource utilization rate result.
[0021] Compared with the prior art, the beneficial effects of the present invention are:
[0022] When solving the task scheduling and resource management problems in the cloud environment, first, the present invention designs a dynamic virtual machine scheduling method based on multi-particle swarm collaborative optimization. Through the dual-objective collaborative mechanism of local optimum and global optimum, it overcomes the static limitations of traditional genetic algorithms and polling scheduling, and realizes dynamic avoidance of load balancing and resource hotspots. Secondly, it constructs an elastic allocation mechanism driven by remaining resources. Based on the improved particle swarm algorithm, it monitors the remaining amounts of CPU and memory in real time, and improves the resource reuse efficiency through a dynamic recycling pool, breaking through the fragmentation bottleneck caused by static threshold allocation. Finally, it integrates the improved cat swarm algorithm and the multi-particle swarm algorithm to solve the contradiction between traditional two-dimensional resource scheduling and a single algorithm in terms of convergence speed and multi-dimensional accuracy, significantly improving the overall utilization rate and system stability of cloud resources in dynamic tasks and heterogeneous environments. Description of the Drawings
[0023] Figure 1 Flowchart of the method of the present invention.
[0024] Figure 2 Schematic diagram for comparative verification of the utilization rate effects of different algorithms involved in the present invention on virtual machines.
[0025] Figure 3 Schematic diagram for comparative analysis of the average response times of different algorithms in the sequential mode involved in the present invention.
[0026] Figure 4 Schematic diagram for comparative analysis of the average response times of different algorithms in the parallel mode involved in the present invention.
[0027] Figure 5 Schematic diagram for comparative analysis of the execution times of different algorithms involved in the present invention under different conditions (best, average, and worst).
[0028] Figure 6 Schematic diagram for comparative analysis of the resource utilization rates of different algorithms involved in the present invention under different task volumes. Detailed Embodiments
[0029] The embodiments of the present invention will be further described in conjunction with the accompanying drawings.
[0030] Embodiment:
[0031] As Figure 1-6 shown, the present invention proposes a task scheduling and resource management method in the cloud environment based on a hybrid bionic algorithm. In order to realize task scheduling and resource management in the cloud environment, the technical solutions adopted by the present invention are as follows:
[0032] The method of the present invention is based on virtual machine scheduling using the Multi-Particle Swarm Optimization (MPSO) algorithm. During the process of virtual machine scheduling based on the MPSO algorithm, tasks need to be allocated to suitable virtual machines according to their resource requirements. The core of the MPSO algorithm is to dynamically allocate the incoming tasks to different virtual machines, balance the load of the virtual machines, so as to improve resource utilization and reduce task response time. The specific process is as follows:
[0033] Step 1: Task Allocation and Virtual Machine Scheduling. After receiving a task request from a cloud user, the system first analyzes the resource requirements of the task. Assume that the resource requirements of task T i are (CPU i , Memory i ), indicating the requirements of task T i for CPU and memory. The priority P i of the task will also be sorted according to its urgency and computational complexity; the multi-particle swarm optimization algorithm will select the most suitable virtual machine to execute the task based on the resource requirements of the task (such as CPU, memory, etc.) and the current load situation of the virtual machines. The task is represented as a set {x1, x2,..., x n}, and the virtual machines are also represented as a set {vm0, vm1,..., vm k}, where n is the number of tasks and k is the number of virtual machines.
[0034] Step 2: Initialize the particle swarm
[0035] Step 2.1: MPSO optimizes the matching of tasks and virtual machines through the global search ability of the particle swarm. Task scheduling is carried out using an improved particle swarm optimization algorithm (MPSO), and the goal is to allocate task T i to the most suitable virtual machine VM j . Assume that the resources of the virtual machine are (CPU j , Memory j ). The goal of particle swarm optimization is to minimize the idle degree of virtual machine resources and the scheduling delay of tasks. This optimization goal can be expressed as:
[0036]
[0037] where N is the total number of virtual machines, f(T i , VM j ) represents the load balancing degree after task T i is scheduled on virtual machine VM j , T i represents the i-th task to be scheduled, with specific resource requirements (such as CPU and memory), VM j represents the j-th virtual machine, providing allocable CPU and memory resources, CPUj Represents the total CPU resources of the virtual machine VM j . Memory j Represents the total memory resources of the virtual machine VM j . CPU i Represents the amount of CPU resources required for task T i , Memory i Represents the amount of memory resources required for the task
[0038] Step 2.2: The MPSO algorithm uses a particle swarm to represent the search space for virtual machine scheduling. Each particle corresponds to a virtual machine scheduling scheme, where the position of the particle represents the allocation of tasks to virtual machines
[0039] Step 2.3 Update the position of the particle. In each iteration, the MPSO algorithm updates the velocity and position of each particle. Each particle adjusts its position according to the current best solution and the global best solution, that is, selects a new virtual machine to process the task. The position update rule of the particle is as follows
[0040] Among them, the velocity update of the particle is expressed by the following formula
[0041] v i (t + 1) = w·v i (t) + c1·r1·(p i -x i (t)) + c2·r2·(g - x i (t))
[0042] Among them, v i (t + 1) is the velocity of the particle after update, v i (t) is the velocity of the particle at time t, x i (t) is the position of the particle at time t, p i is the individual best position of the particle, g is the global best position, r1 and r2 are random numbers, c1 and c2 are learning factors, and w is the inertia weight
[0043] Among them, the position update of the particle is as follows
[0044] x i (t + 1) = x i (t) + v i (t + 1)
[0045] Among them, x i (t + 1) represents the updated position vector of the i-th particle at the (t + 1)-th iteration, x i (t) represents the position vector of the i-th particle at the t-th iteration, v i(t + 1) represents the velocity vector of the i-th particle at the i-th iteration, which determines the direction and amplitude of the particle position adjustment. After the position update, the position of the particle is the virtual machine to which the current task is assigned.
[0046] Among them, the local best (LB) and global best (GB) of the improved particle algorithm are updated as follows:
[0047] After each iteration, the algorithm calculates the load situation of the current virtual machine and updates the local optimal solution (LB) and global optimal solution (GB).
[0048] Among them, the local optimal solution (LB) of the improved particle algorithm: The particle with the lightest load among each virtual machine in this iteration is called the local best (LB). Global optimal solution (GB): The task allocation scheme of the virtual machine with the lightest load among all virtual machines is called the global best (GB). If the current GB scheme is better than the previous round's scheme, the global optimal solution is updated; if GB remains unchanged, the second smallest LB in the cluster list Cz is used to update GB.
[0049] This process continues in each iteration until all tasks are assigned to virtual machines. Each time the position of the particle swarm is updated, the task scheduling result is optimized until the termination condition is met (such as all tasks are assigned).
[0050] In the resource allocation and management process based on the improved particle swarm optimization algorithm, in the cloud computing environment, the dynamic allocation and management of resources are the key to solving the rapid growth of task resource requirements. Virtual machines (VMs) need to efficiently manage and allocate the required computing resources through the improved particle swarm optimization algorithm (MPSO). To reduce the communication overhead between the cloud resource pool and virtual machines, the MPSO algorithm aims to preferentially use the remaining resources in the virtual machines and dynamically obtain resources from the resource pool only when resources are insufficient.
[0051] Specific implementation steps:
[0052] Step 3.1: Initialize the virtual machine resource pool;
[0053] Suppose there is a cloud resource pool that provides computing resources for tasks to use. Each virtual machine needs to be allocated at least two basic resources (such as CPU and memory) to execute tasks. In the first round, the resources of all virtual machines are provided by the cloud resource pool.
[0054] Step 3.2: Resource allocation and cluster formation;
[0055] Divide the virtual machines into multiple clusters (such as {c1, c2,..., c z})。For the execution of parallel tasks, at least two clusters are required, where each cluster contains several virtual machines. Each virtual machine will have some unused resources, and these resources can be used for subsequent tasks.
[0056] Step 3.3: Resource Matching and Allocation
[0057] For each new task, the system will select the best-matched resources from the remaining resources of the virtual machine. If the remaining resources of the virtual machine can meet the task requirements, the virtual machine will directly execute the task; otherwise, it will obtain resources from the resource pool to execute the task. This process uses the MPSO algorithm to dynamically adjust resource allocation according to the resource requirements of the task.
[0058] Step 3.4: Release of Unused Resources and Update of Resource Pool After each task is completed, if there are still unused resources in the virtual machine, these resources will be released back to the cloud resource pool. After each task is executed, the lowest resources in the virtual machine will be released back to the resource pool, and the remaining resources will be used for future tasks.
[0059] The above steps 3.1 - 3.4 mainly achieve dynamic resource utilization and efficiency optimization. By dynamically adjusting the use of virtual machine resources, the MPSO algorithm optimizes the communication overhead between the virtual machine and the resource pool. The main goal is to preferentially utilize the remaining resources inside the virtual machine and reduce the frequency of obtaining resources from the resource pool, thereby improving the overall resource utilization efficiency of the system.
[0060] In the above step 3.3, resource allocation and management based on the improved cat swarm optimization algorithm (MCSO) are adopted. In the process of resource allocation and management based on the improved cat swarm optimization algorithm (MCSO), the key of the MCSO algorithm lies in how to effectively utilize the remaining resources in the virtual machine and achieve efficient resource allocation by intelligently matching the resource requirements of the task and the resources of the virtual machine. The advantage of MCSO is that it not only focuses on excess_res1 and excess_res2, but also introduces a new memory pool (SMP) to store other remaining resources (excess_res3[]) in the virtual machine. This design enables the algorithm to better cope with dynamic resource requirements, reduce the communication overhead between the cloud resource pool and the virtual machine, and thus improve the overall resource utilization rate and task scheduling efficiency.
[0061] Use the improved cat swarm optimization algorithm (MCSO) to allocate virtual machine resources. Assume task T i 's resource requirements are (CPU i , Memory i ), and the available resources of virtual machine VM j are (CPU j , Memory j ). The optimization goal is to make task Ti The resource requirements match the available resources of the virtual machine VM j , minimizing resource waste and allocation latency. The optimization objective function is as follows:
[0062]
[0063] where M is the number of tasks, and g(VM j , T i ) represents the resource allocation optimization of virtual machine VM j for task T i .
[0064] The core of the MCSO algorithm can achieve the following effects: 1. Task and virtual machine resource matching: The remaining resources in the virtual machine are used to match the resource requirements of the tasks. Introducing a resource pool can further match future task requirements, improving the accuracy and flexibility of resource allocation. 2. Search mode: MCSO uses four different memory pools to track and store the remaining resource status of virtual machines for dynamic resource allocation. When each search mode is updated, the algorithm matches the requirements of the current task with the remaining resources of the virtual machine. If the match is successful, the resources will be allocated to the task. MCSO can utilize the resource pool of virtual machines more efficiently, reducing resource waste and communication overhead through multi-dimensional resource management. 3. Tracking mode: This mode is used to perform state updates during each iteration, including the selection of virtual machine resource allocation and the update of its execution status. MCSO can reduce the frequency of borrowing resources from the cloud resource pool, reducing the communication burden on the cloud computing platform. 4. Resource pool management: In MCSO, the remaining resources of virtual machines are preferentially used to meet task requirements. Only when resources are insufficient, resources are borrowed from the resource pool. This resource management method can greatly reduce the number of times of borrowing resources from the cloud resource pool, thereby improving the resource utilization rate and response speed of the system. In the cloud computing environment, resource allocation and management tasks are highly dynamic and complex. To manage the resource requirements of tasks more efficiently, the present invention proposes a hybrid algorithm that combines the advantages of the particle swarm optimization algorithm (MPSO) and the cat swarm optimization algorithm (MCSO). This hybrid algorithm (MPSO + MCSO, HYBRID) can overcome the limitations of using the MPSO and MCSO algorithms alone, providing higher resource allocation efficiency, reducing system latency, and reducing the communication overhead between virtual machines and the resource pool. By flexibly adjusting the use of internal resources in virtual machines, the communication overhead between virtual machines and the resource pool is reduced. This method also optimizes the execution time of tasks, can balance the load of virtual machines, thereby reducing system response time and latency.
[0065] To verify the effectiveness of the technical method described in the present invention, the following simulation experiments were conducted on this method:
[0066] The customized simulation configuration consists of four different machines. One machine serves as the task requirement publisher (client machine), one machine serves as the load balancer, and the other two machines serve as servers. Multiple virtual machines run on the servers to execute the incoming tasks. Consider CPU and memory as the two resources required to execute the tasks. The resources are provided by a cloud resource pool, which has a large amount of resources. The system used in the customized settings has different system configurations. For example, the load balancer uses an i7 processor with a clock speed of 3.40 GHz and 8 GB of memory; the servers use an i7 processor with a clock speed of 3.40 GHz and 16 GB of memory; while the client machine that generates tasks uses a dual-core processor with a clock speed of 2.80 GHz and 4 GB of memory.
[0067] For the resource allocation and management strategy, tasks come from the client and have the same arrival interval. Set a queue size of ten tasks, and each task requests cloud resources in a random manner. Based on the method proposed in the present invention, the allocation and management of these resources are managed by the load balancer. Assume that CPU and memory are the essential resources for task execution, and each virtual machine requires at least two resources (i.e., CPU and memory) to execute tasks. In the first round, resources are taken from the cloud resource pool, which acts as the central hub of resources.
[0068] Experiments are conducted for different task sets and virtual machines. Performance evaluation is carried out in terms of the effective utilization of existing virtual machines, average response time, and optimal use of cloud resources. If resources are not used, these unused resources are returned to the cloud resource pool. When a virtual machine obtains resources from the cloud resource pool, set the round-trip time (RTT) to 1 second. Create clusters according to the number of virtual machines, and each virtual machine has its own buffer to store excess resources.
[0069] (1) Achieve efficient load balancing of virtual machines through scheduling
[0070] The multi-particle swarm optimization algorithm (MPSO) proposed in the present invention schedules tasks onto virtual machines. In the experimental example, network application tasks from different regions are regarded as inputs, and the details are shown in Table 1. Table 2 shows the number of tasks processed by virtual machines under different algorithms. From Table 2, it can be seen that the multi-particle swarm optimization algorithm proposed in the present invention gives better results by checking the status of virtual machines, and it makes comparisons based on clusters when allocating tasks to virtual machines, thus avoiding server queuing. For the above experiments, two clusters are used, and the number of virtual machines on each cluster is equal. The average response time (in milliseconds (ms)) under the same settings is shown in Table 3. It can be clearly observed from Table 2 and Table 3 that the proposed particle swarm optimization algorithm is not only efficient in balancing the load of virtual machines, but also achieves a shorter average response time. The experiments were repeated for different sets of virtual machines and task sets, and the obtained results were consistent.
[0071] Table 1 Workload settings for scheduling
[0072] User region Region number Network users during peak hours Network users during off-peak hours Xi'an 0 135,000 13,500 Chengdu 1 535,000 535,000 Wuhan 2 255,000 255,000 Changsha 3 125,000 125,000 Zhengzhou 4 30,000 30,000 Taiyuan 5 10,000 10,000
[0073] Table 2 Utilization of virtual machines
[0074]
[0075] Table 3 Average response time
[0076]
[0077]
[0078] The experiments verified the utilization of virtual machines with different combinations (1000, 2000, and 3000 tasks). Figure 3 Shows the utilization of virtual machines by different algorithms (throttle algorithm, RR scheduling algorithm, Exact algorithm, ACO algorithm, Propose MPSO algorithm) used in the experiments. From Figure 6 It can be seen that compared with other algorithms, the MPSO algorithm proposed in the present invention is more efficient in utilization.
[0079] (2) Efficient resource allocation and management
[0080] The average response time in sequential and parallel modes was experimentally verified, and the corresponding results are respectively as Figure 4 and Figure 5 shown.
[0081] In Figure 4 a, 10 and 20 virtual machines are used in two clusters to sequentially process 60 incoming tasks. In Figure 4In b, 10 and 50 virtual machines are used in two clusters to sequentially process 300 incoming tasks.
[0082] In Figure 5 , 10 and 20 virtual machines are used in two clusters to parallel - process 60 incoming tasks; in Figure 5 , 10 and 50 virtual machines are used in two clusters to parallel - process 300 incoming tasks. It can be observed from Figure 5 that, compared with the sequential mode, the parallel - mode execution reduces the average response time.
[0083] Figure 4 and Figure 5 show that, compared with the algorithm, the MPSO, MCSO and hybrid (MPSO + MCSO, HYBRID) algorithms perform better in terms of average response time, and the hybrid algorithm proposed in this method takes less time compared with all other algorithms.
[0084] Experiments were conducted on different combinations of tasks and different numbers of virtual machines using the algorithm proposed in the present invention and the currently common benchmark algorithms on the market. Figure 6 shows the execution - time analysis of all algorithms under different situations (best, average and worst). It can be observed that in the best - case and average - case scenarios, the HYBRID method takes less execution time. Moreover, if all resource mappings are correct when using the HYBRID method, then considered alone, it is superior to the MPSO and MCSO methods. Therefore, the HYBRID (MPSO + MCSO) method is more efficient in resource allocation and management in the cloud environment.
[0085] The algorithms proposed in the present invention and the currently common benchmark algorithms on the market were analyzed for resource utilization. Figure 6 Figures 6a, 6b and 6c show the resource utilization for 1000, 2000 and 3000 tasks respectively. The hybrid (MPSO + MCSO) algorithm proposed in the present invention is more efficient in utilizing the unused resources in the cluster rather than obtaining them from the cloud resource pool. It can be observed that the hybrid (MPSO + MCSO, HYBRID) algorithm proposed in the present invention achieves high resource - utilization efficiency compared with all other advanced methods used for performance evaluation.
[0086] In summary, the technical core is as follows: constructing a clustered resource management framework through a multi-particle swarm optimization algorithm, combining a dual-objective collaborative mechanism of local optimum and global optimum, and implementing dynamic virtual machine scheduling using the load-minimum first strategy. Comparative advantages: Compared with traditional static strategies such as the genetic algorithm and round-robin scheduling, it breaks through the local convergence limitation of a single particle swarm algorithm, significantly improves the iteration efficiency and load balancing ability, and effectively avoids resource hot-spot problems. Innovation value: For the first time, introducing a multi-particle swarm collaborative mechanism into the field of virtual machine scheduling to solve the problem of real-time resource adaptation in dynamic task scenarios.
[0087] The present invention realizes an elastic resource allocation mechanism driven by remaining resources, designs a dynamic monitoring model for remaining resources (CPU / memory) based on an improved particle swarm algorithm, and achieves precise matching between the cloud resource pool and virtual machines through an elastic resource recovery pool. Compared with traditional static threshold allocation methods, it significantly reduces the problem of resource fragmentation, improves the reuse efficiency of remaining resources, and reduces the dependence on external resources. Innovatively combining the real-time remaining resource recovery mechanism with particle swarm optimization promotes the transformation of resource allocation from a fixed mode to a dynamic elastic adaptation paradigm.
[0088] The present invention combines an improved cat swarm algorithm and a multi-particle swarm algorithm, introduces a third resource dimension (storage I / O bandwidth) and a search memory pool, and constructs a high-dimensional dynamic matching model. Breaking through the limitations of traditional two-dimensional resource matching, solving the problem of imbalance between the convergence speed and accuracy of a single algorithm, and significantly improving the resource matching rate in heterogeneous environments. Initiating a three-dimensional resource scheduling framework based on a hybrid bionic algorithm, providing a new paradigm for the collaborative optimization of multi-dimensional resources such as CPU, memory, and storage in the cloud environment.
[0089] The method involved in the present invention can be quickly transplanted to relevant business platforms of data centers and computing power centers. The main value lies in that industries such as cloud computing service providers, data centers, and virtualization platforms can widely apply the optimization algorithms provided by this patent. Especially when dealing with large-scale parallel computing tasks, it can significantly improve task scheduling efficiency and resource allocation accuracy. For example, large cloud service providers (such as AWS, Azure, Google Cloud) can use this technology to improve the efficiency of resource scheduling and reduce response time when dealing with large-scale tasks.
[0090] Those skilled in the art should know that:
[0091] (1) Prior art:
[0092] Currently, the following methods are usually adopted for task scheduling and resource management in the cloud computing environment:
[0093] Rule-based scheduling methods: such as round-robin scheduling, first-come-first-served (FCFS), etc. These methods have simple algorithms, but in the case of large-scale tasks and dynamic load changes, they cannot achieve the high efficiency of task scheduling and the full utilization of resources.
[0094] Scheduling methods based on optimization algorithms: such as Particle Swarm Optimization (PSO), Ant Colony Optimization (ACO), Genetic Algorithm (GA), etc. These methods can solve large-scale task scheduling problems, but a single algorithm is prone to falling into local optima and has limitations in dynamic resource allocation.
[0095] (2) Defects:
[0096] Low scheduling efficiency: A single optimization algorithm has a slow convergence speed when facing complex task scheduling problems and is difficult to meet the real-time scheduling requirements of large-scale concurrent tasks.
[0097] Inflexible resource allocation: Existing resource allocation methods usually do not consider the dynamic resource requirements of tasks, resulting in over-allocation or under-allocation of resources.
[0098] Unable to balance scheduling and resource management: Existing methods usually handle task scheduling and resource allocation separately and fail to optimize both simultaneously, resulting in insufficient overall system efficiency.
[0099] The main innovations of the present invention are as follows:
[0100] (1) Virtual machine scheduling based on multi-particle swarm optimization algorithm: Traditional virtual machine scheduling methods, such as those based on genetic algorithms or round-robin scheduling, often face problems of local optimum traps and insufficient dynamic adaptability, while static load balancing strategies are difficult to cope with real-time task fluctuations. The multi-particle swarm optimization algorithm proposed in this method parallelly iterates the dual optimization objectives of local optimum (LB) and global optimum (GB) through a clustered resource management mechanism, with a relatively high improvement in iteration efficiency compared to a single particle swarm algorithm (e.g., standard PSO). Experiments show that in the scenario of burst tasks, the load-minimum first allocation strategy can reduce the variance of virtual machine loads, which is better than the traditional shortest job first (SJF) and maximum resource first (MRF) strategies, effectively avoiding the virtual machine performance bottleneck caused by resource hotspots.
[0101] (2) Resource allocation based on improved particle swarm optimization: Existing resource allocation methods, such as static allocation based on thresholds, have problems of resource fragmentation during dynamic adjustment and insufficient utilization of remaining resources. The innovative "remaining resources" mechanism of this method constructs a dynamic resource recovery pool by real-time monitoring of excess_res1 (remaining CPU) and excess_res2 (remaining memory), and improves the resource matching accuracy between the cloud resource pool and virtual machines better than the fixed resource allocation dimension of the traditional particle swarm algorithm.
[0102] (3) Multi-dimensional Matching Based on Improved Cat Swarm Algorithm: Compared with traditional cat swarm algorithms, such as the two-dimensional resource matching model, which is limited by the binary matching mode of excess_res1 / excess_res2, existing hybrid algorithms, such as the GA-PSO combination, have the defect that it is difficult to balance the convergence speed and accuracy. Moreover, the single MCSO algorithm has a large resource mismatch rate in global search. This method breakthroughly introduces excess_res3 (the set of remaining storage IO bandwidth) as the third matching dimension. By integrating the fast convergence characteristics of MPSO and the multi-dimensional search ability of MCSO, the resource matching rate is effectively improved. The newly added Search Memory Pool (SMP) solves the problem of short-term resource mismatch in existing methods by caching three types of remaining resources.
[0103] Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented 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.
[0104] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for realizing the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0105] These computer program instructions can 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 generate a manufactured article including an instruction device, and the instruction device realizes the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0106] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus, so that a series of operation steps are executed on the computer or other programmable apparatus to produce a computer-implemented process, thereby the instructions executed on the computer or other programmable apparatus provide steps for implementing the processing in the process Figure 1 one process or a plurality of processes and / or blocks Figure 1 steps of the functions specified in one block or a plurality of blocks.
[0107] The above are only embodiments of the present invention, and are not used to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention are included in the scope of the claims of the present invention pending approval of the application.
Claims
1. A task scheduling and resource management method in a cloud environment based on a hybrid bionic algorithm, characterized in that Including: Step 1: Based on the task request of the user and the resource requirements of the task, determine multiple virtual machines and multiple tasks for executing the task; Step 2: Based on the multiple virtual machines and the multiple tasks, use an improved particle swarm optimization algorithm to determine multiple virtual machine scheduling schemes; each particle represents one of the virtual machine scheduling schemes, and the particle swarm represents the search space for virtual machine scheduling. Set the iteration termination condition of the improved particle swarm optimization algorithm, perform loop iteration, and when the iteration termination condition is reached, output the current scheduling scheme; Among them, in the process of using the improved particle swarm optimization algorithm to determine multiple virtual machine scheduling schemes based on the multiple virtual machines and the multiple tasks, the improved particle swarm optimization algorithm is used to manage the computing resources of the virtual machines.
2. The method according to claim 1, wherein, The use of the improved particle swarm optimization algorithm to manage the computing resources of the virtual machines includes: Step 2.1: Initialize the resource pools of multiple virtual machines, and assume that the resources of multiple virtual machines are provided by the resource pools; Step 2.2: Divide the multiple virtual machines into multiple clusters; based on each virtual machine, determine the unused resources in the virtual machine; Step 2.3: When executing a new task, set to select matching resources from the unused resources of a virtual machine; if the unused resources in the virtual machine can meet the requirements of the new task, the virtual machine directly executes the new task, otherwise obtain resources from the resource pool to execute the new task.
3. The method according to claim 2, wherein After Step 2.3, based on the virtual machine that has completed the execution of the new task, if there are still unused resources in the virtual machine that has completed the execution of the new task, release the still unused resources to the resource pool.
4. The method according to claim 2, wherein The setting of selecting matching resources from the unused resources of a virtual machine when executing a new task includes: Taking minimizing the waste of unused resources as the objective function, use an improved cat swarm algorithm to set the selection of matching resources from the unused resources of a virtual machine.
5. The method according to claim 2, characterized in that, Step 2.2 includes: for the execution of parallel tasks, divide them into at least two clusters.
6. The method according to claim 4, wherein The setting of selecting matching resources from the unused resources of a virtual machine when executing a new task further includes: When executing a new task, set to monitor the resource utilization rate of the virtual machine in real time, generate a resource allocation strategy, and obtain the resource utilization rate result; Adjust the matching of resources according to the resource utilization rate result.