An ant colony optimization-based cat swarm algorithm cloud computing resource scheduling method and system
Patent Information
- Application Number
- CN202310462751.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-26
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2043-04-26
AI Technical Summary
但是现有算法中都未考虑到多目标优化的效率问题,并且云计算系统无法兼顾成本和性能
[0063]本发明中将猫的位置代表为云计算资源的分配方案,以适应度函数为优化目标,采用猫群算法对云计算资源调度策略进行优化求解;根据预先设定的结合率将猫群分为搜寻模式组和追踪模式组;通过搜寻模式组的猫和追踪模式组的猫搜寻最优解,收敛速度更快,同时容易搜索到全局最优解。
Smart Images

Figure CN116467084B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of cloud computing technology, specifically relating to a cloud computing resource scheduling method and system based on the cat colony algorithm with ant colony optimization. Background Technology
[0002] With the booming development of cloud computing technology, the demands of big data on computers are increasing. When there is a large amount of data to be processed, a single computer cannot meet the needs. This is where cloud computing comes in. It is used to solve the problem of ultra-large-scale data processing. Essentially, it combines multiple computers to form a unified system. This technology can make computing more efficient when processing large amounts of data. However, in this process, task scheduling has become a very important issue.
[0003] In cloud computing systems, as the number of users increases, the number of submitted tasks also increases exponentially. This necessitates more efficient use of resources to process these tasks and achieve load balancing scheduling in a shorter time and at a lower cost, thereby continuously improving user satisfaction. However, existing algorithms do not consider the efficiency issues of multi-objective optimization, and cloud computing systems cannot balance cost and performance. Summary of the Invention
[0004] This invention provides a cloud computing resource scheduling method and system based on cat colony optimization ant colony algorithm, which achieves load-balanced cloud computing resource scheduling in a shorter time and at a lower cost, enabling the cloud computing system to balance cost and performance.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0006] The first aspect of this invention provides a cloud computing resource scheduling method based on the cat colony algorithm with ant colony optimization, comprising:
[0007] Build a cloud computing virtual system in the Cloudsim simulation platform, create cloud tasks and set the number and length of cloud tasks according to requirements; schedule cloud computing resources in the cloud computing virtual system to execute cloud tasks;
[0008] A fitness function is established based on the total execution time and total execution cost of all cloud tasks; the cat's position represents the allocation scheme of cloud computing resources, and the cat swarm algorithm is used to optimize the cloud computing resource scheduling strategy with the fitness function as the optimization objective; the cat swarm is divided into a search mode group and a tracking mode group according to a pre-set combination rate.
[0009] Ant colony optimization is introduced in the cat search for optimal cloud computing resource scheduling strategy in the search pattern group. Initial solution A is obtained by searching the cats in the search pattern group. Based on the initial solution A, the ant colony optimization is used to search for the initial solution B. The initial solution A and the initial solution B are selected as the search results according to the fitness value. The location of the cats in the search pattern group is stored in the memory pool.
[0010] Find the position of the current optimal solution in the memory pool; obtain the tracking result by tracking the cats in the tracking pattern group to move towards the position of the current optimal solution; store the position of the cats in the tracking pattern group in the memory pool;
[0011] Using total execution time and total execution cost as the two Pareto objectives, a multi-objective optimization is performed on the search and tracking results to obtain a Pareto solution set; the positions of the cats in the cat group are updated according to the Pareto solution set; the final positions of the cats in the cat group are output after repeated iterations for a set number of times, and the global optimal solution of the cloud computing resource scheduling strategy is found from the final positions of the cats in the cat group.
[0012] Preferred methods for building a cloud computing virtual system in the Cloudsim simulation platform include:
[0013] Initialize the Cloudsim package on the Cloudsim platform, create a virtual machine according to the cloud computing environment, and set the virtual machine parameters, including the virtual machine number, user ID, resource processor speed, and number of CPUs.
[0014] A datacenter and a datacenterBroker are created to form a cloud computing virtual system. The datacenter is used to manage a group of physical computing nodes for virtual machines. The datacenterBroker is used to schedule cloud computing resources in the cloud computing virtual system to execute cloud tasks.
[0015] Preferably, the method for establishing a fitness function based on the total execution time and total execution cost of all cloud tasks includes:
[0016] The total execution time of a cloud task can be calculated using the following formula:
[0017]
[0018]
[0019] In the formula, Texe ij The total execution time of the cloud task is represented by the .exe file. ij Here, i represents the execution time of the virtual machine, j represents the virtual machine number, m represents the number of virtual machines in the cloud computing virtual system, n represents the number of cloud tasks, and c represents the execution time of the virtual machine. iNPE represents the set of cloud tasks assigned to virtual machines. j ×V mipsj Let x represent the processor speed of the j-th virtual machine. If task i is assigned to the j-th virtual machine, then x... i j=1, otherwise its value is 0;
[0020] The total execution cost of a cloud task can be calculated using the following formula:
[0021]
[0022]
[0023] In the formula, The execution cost of a single virtual machine. V cost represents the line cost of cloud tasks. j It is the hourly cost of the j-th virtual machine;
[0024] A fitness function is established based on the total execution time and total execution cost of all cloud tasks, expressed as follows:
[0025]
[0026] In the formula, MinF(x) represents the fitness function.
[0027] Preferably, the method for obtaining the initial solution B by searching using the ant colony algorithm based on the initial solution A includes:
[0028] Ants are placed on each computing node, and the next virtual machine is selected based on the probability of a roulette wheel. Pheromones are left along the ants' path, and the pheromone concentration provides search clues for the ant colony.
[0029] The search radius R of the ant colony S The calculation formula is:
[0030]
[0031] In the formula, Nbest represents the position of the cat corresponding to the best solution among all initial solutions A; Nworst represents the position of the cat corresponding to the worst solution among all initial solutions A.
[0032] Preferably, it also includes: performing a mutation operation on the position of each cat in the memory pool in the cat swarm algorithm, expressed by the formula:
[0033] X' k =(1±SRD) k *R)*X k
[0034]
[0035] In the formula, X' k For the new mutation location in cats, X k R represents the cat's current position, and R is a random number; SRD is the set initial mutation operator value. k ω is the value of the mutation operator in the kth generation. max ω represents the maximum number of iterations. k This represents the current iteration number.
[0036] Preferably, the method for obtaining tracking results by moving the cat in the tracking pattern group toward the position of the current optimal solution includes:
[0037] The speed and position of the cat in the tracking mode group are updated using the following formula:
[0038] V h,k+1 =V h,k +ω h,k ×c×r×(X k,best (t)-X h,k (t))
[0039] X h,k+1 (t)=X h,k (t)+V h,k+1
[0040] In the formula, V h,k+1 V represents the speed of the h-th cat in the (k+1)-th iteration. h,k Let ω represent the speed of the h-th cat in the k-th iteration, c be a constant, r be a random number between 0 and 1, and ω be a random number between 0 and 1. h,k Let X represent the step size of the h-th cat in the k-th iteration; k,best (t) represents the position of the optimal solution in the cat group during the k-th iteration; X h,k (t) represents the position of the h-th cat in the k-th iteration; X h,k+1 (t) represents the position of the h-th cat in the (k+1)-th iteration.
[0041] Preferably, the step length of the cat in the tracking mode group is calculated using the following formula:
[0042]
[0043] In the formula, ω max This is expressed as the maximum inertia coefficient; ω min Represented as the minimum inertia coefficient, F(x) h,k F is the fitness value of the h-th cat in the k-th iteration. k,min F represents the worst fitness of the cat population in the k-th iteration. k,average is the average fitness value of the cat population in the k-th iteration.
[0044] Preferred methods for finding the globally optimal solution to the cloud computing resource scheduling strategy based on the positions of the cats in the final cat group include:
[0045] Output the corresponding cloud computing resource scheduling strategy based on the final position of each cat in the cat group, denoted as alternative strategy P. c ;
[0046] Calculate alternative strategy P c The load balancing difference BL is expressed by the following formula:
[0047]
[0048] AVL = Texe ij / m
[0049] In the formula, AVL is the average of the sum of the times all virtual machines take to complete the tasks assigned to them;
[0050] Calculate alternative strategy P c The service quality is expressed by the formula:
[0051]
[0052] In the formula, QoS(x) represents the alternative policy P. c The service quality is represented by θ, which is the weighting coefficient for execution time.
[0053] Based on the service quality and load balancing difference (BL), all alternative strategies (P) are selected. c The goal is to find the globally optimal solution for cloud computing resource scheduling strategies.
[0054] The second aspect of this invention provides an application system for a cloud computing resource scheduling method based on the cat colony algorithm with ant colony optimization, comprising:
[0055] The model building module is used to build a cloud computing virtual system in the Cloudsim simulation platform, create cloud tasks and set the number and length of cloud tasks according to requirements; and schedule cloud computing resources in the cloud computing virtual system to execute cloud tasks.
[0056] The module is used to establish a fitness function based on the total execution time and total execution cost of all cloud tasks; the cat's position represents the allocation scheme of cloud computing resources, and the cat swarm algorithm is used to optimize the cloud computing resource scheduling strategy with the fitness function as the optimization objective; the cat swarm is divided into a search mode group and a tracking mode group according to a pre-set combination rate.
[0057] The search module is used to introduce the ant colony algorithm during the stage of searching for the optimal cloud computing resource scheduling strategy by the cats in the search mode group; it obtains an initial solution A by searching the cats in the search mode group, and obtains an initial solution B by searching the cats in the search mode group based on the initial solution A; it selects the initial solution A and the initial solution B as the search results according to the fitness value; and it stores the location of the cats in the search mode group in the memory pool.
[0058] The tracking module is used to find the position of the current optimal solution in the memory pool; to obtain the tracking result by tracking the cats in the tracking pattern group to move towards the position of the current optimal solution; and to store the positions of the cats in the tracking pattern group in the memory pool.
[0059] The output module is used to take the total execution time and total execution cost as the two Pareto objectives, and to perform multi-objective optimization on the search results and tracking results to obtain the Pareto solution set; update the position of the cat in the cat group according to the Pareto solution set; repeat the iteration a set number of times to output the final position of the cat in the cat group, and find the global optimal solution of the cloud computing resource scheduling strategy from the final position of the cat in the cat group.
[0060] Preferably, the Cloudsim simulation platform includes a network layer, a cloud resource layer, a cloud service layer, a virtual service layer, a user interface layer, and a user code unit; the network layer is used to simulate a real network topology; the cloud service layer is used to create a data center; the cloud service layer is used to allocate cloud computing resources according to a set strategy; the virtual service layer is used to manage the lifecycle of virtual machines; the user interface layer is used to provide connections between task requests and computing nodes; and the user code unit is used to set simulation specifications.
[0061] A third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the cat swarm algorithm cloud computing resource scheduling method.
[0062] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0063] In this invention, the position of the cat represents the allocation scheme of cloud computing resources. The fitness function is used as the optimization objective, and the cat swarm algorithm is used to optimize the cloud computing resource scheduling strategy. The cat swarm is divided into a search mode group and a tracking mode group according to a pre-set combination rate. The optimal solution is searched by the cats in the search mode group and the cats in the tracking mode group, which has a faster convergence speed and makes it easier to find the global optimal solution.
[0064] In this invention, an ant colony algorithm is introduced during the cat search for the optimal cloud computing resource scheduling strategy in the search mode group. An initial solution A is obtained through cat search in the search mode group, and an initial solution B is obtained by searching based on the initial solution A using the ant colony algorithm. The initial solutions A and B are selected as search results based on their fitness values. The ant colony algorithm is introduced for comparison and updating, guiding the cat group to move closer to the optimal solution during the search phase, reducing the impact of blindness, effectively improving the quality of search results, and reducing the randomness and uncertainty caused by mutations in the cat group search mode.
[0065] In this invention, the position of each cat in the memory pool is mutated in the cat swarm algorithm to find the position of the current optimal solution in the memory pool; the tracking result is obtained by moving the cats in the tracking pattern group toward the position of the current optimal solution; the positions of the cats in the tracking pattern group are stored in the memory pool; the SRD mutation factor of the cat swarm is set to decrease gradually. Since the mutation operator is higher in the early stage, it can increase the diversity of the population and effectively avoid getting trapped in local optima. Decreasing it in the later stage helps the population converge. Attached Figure Description
[0066] Figure 1 This is a system framework diagram of Cloudsim provided in an embodiment of the present invention;
[0067] Figure 2 This is a flowchart of resource scheduling based on the Cloudsim platform provided in an embodiment of the present invention;
[0068] Figure 3 This is a flowchart of the ant colony optimization cat colony algorithm provided in an embodiment of the present invention;
[0069] Figure 4 This is a structural block diagram of resource scheduling based on the cat group algorithm provided in an embodiment of the present invention. Detailed Implementation
[0070] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the scope of protection of the present invention.
[0071] Example 1
[0072] like Figures 1 to 4 As shown, a cloud computing resource scheduling method based on the cat colony algorithm with ant colony optimization includes:
[0073] Methods for building a cloud computing virtual system in the Cloudsim simulation platform include:
[0074] Initialize the Cloudsim package on the Cloudsim platform, create a virtual machine according to the cloud computing environment, and set the virtual machine parameters, including the virtual machine number, user ID, resource processor speed, and number of CPUs.
[0075] A datacenter and a datacenterBroker are created to form a cloud computing virtual system. The datacenter is used to manage a group of physical computing nodes for virtual machines. The datacenterBroker is used to schedule cloud computing resources in the cloud computing virtual system to execute cloud tasks.
[0076] Create cloud tasks and set the number and length of cloud tasks as needed; schedule cloud computing resources in the cloud computing virtual system to execute cloud tasks; freely build model structures in cloud computing scenarios and perform simulations as needed, including dedicated interfaces for computing resources, memory, storage and bandwidth, which are efficient and convenient;
[0077] The cat's position is represented as the allocation scheme of cloud computing resources. The fitness function is used as the optimization objective, and the cat group algorithm is used to optimize the cloud computing resource scheduling strategy. The number of cats in the cat group is set as n, and the memory pool SMP size, change domain SRD, change number CDC, self-position judgment SPC, and crossover rate MR are set.
[0078] Methods for establishing a fitness function based on the total execution time and total execution cost of all cloud tasks include:
[0079] The total execution time of a cloud task can be calculated using the following formula:
[0080]
[0081]
[0082] In the formula, Texe ij The total execution time of the cloud task is represented by the .exe file. ij Here, i represents the execution time of the virtual machine, j represents the virtual machine number, m represents the number of virtual machines in the cloud computing virtual system, n represents the number of cloud tasks, and c represents the execution time of the virtual machine. i NPE represents the set of cloud tasks assigned to virtual machines. j ×V mipsj Let x represent the processor speed of the j-th virtual machine. If task i is assigned to the j-th virtual machine, then x... ij =1, otherwise its value is 0;
[0083] The total execution cost of a cloud task can be calculated using the following formula:
[0084]
[0085]
[0086] In the formula, The execution cost of a single virtual machine. Vcost is the line cost of cloud tasks. j It is the hourly cost of the j-th virtual machine;
[0087] A fitness function is established based on the total execution time and total execution cost of all cloud tasks, expressed as follows:
[0088] MinF(x)={(Texe ij ,Texe cos t ij )}
[0089] In the formula, MinF(x) represents the fitness function.
[0090] The cats are divided into a search mode group and a tracking mode group according to a pre-set combination rate; the optimal solution is searched globally using the cats in the search mode group and the cats in the tracking mode group; ant colony algorithm is introduced in the stage where the cats in the search mode group search for the optimal cloud computing resource scheduling strategy; the initial solution A is obtained by searching using the cats in the search mode group.
[0091] Methods for obtaining initial solution B using the ant colony algorithm based on initial solution A include:
[0092] Ants are placed on each computing node, and the next virtual machine is selected based on the probability of a roulette wheel. Pheromones are left along the ants' paths, and the concentration of pheromones provides search clues for the ant colony. When multiple ants pass through the same path in the same time period, the pheromone concentration of that path will be higher than that of other paths, ultimately forming a positive feedback mechanism for the entire colony. A positive feedback mechanism is used, and the ants keep moving closer to the optimal solution. Ant colony optimization is introduced for comparison and updating, guiding the cat colony to move closer to the optimal solution during the search phase, reducing the impact of blindness, effectively improving the quality of search results, and reducing the randomness and uncertainty caused by mutations in the cat colony search mode.
[0093] The search radius R of the ant colony S The calculation formula is:
[0094]
[0095] In the formula, Nbest represents the position of the cat corresponding to the best solution among all initial solutions A; Nworst represents the position of the cat corresponding to the worst solution among all initial solutions A.
[0096] Initial solutions A and B are selected as search results based on fitness values; the locations of the cats in the search pattern group are stored in the memory pool;
[0097] In the cat swarm algorithm, the position of each cat in the memory pool is mutated, expressed by the following formula:
[0098] X' k =(1±SRD) k *R)*X k
[0099]
[0100] In the formula, X' k For the new mutation location in cats, X k R represents the cat's current position, and R is a random number; SRD is the set initial mutation operator value. k ω is the value of the mutation operator in the kth generation. max ωk represents the maximum number of iterations, and ωk represents the current number of iterations.
[0101] Setting the SRD mutation factor of the cat population to gradually decrease is beneficial because a higher mutation factor in the early stage can increase the diversity of the population and effectively avoid getting trapped in local optima. Reducing it in the later stage helps the population converge.
[0102] The process involves: finding the current optimal solution's location in the memory pool; tracking the cats in the tracking pattern group towards that location to obtain the tracking result; and storing the cats' locations in the tracking pattern group in the memory pool.
[0103] The formula for calculating the cat's stride in the tracking mode group is as follows:
[0104]
[0105] In the formula, ω max This is expressed as the maximum inertia coefficient; ω min Represented as the minimum inertia coefficient, F(x) h,k F is the fitness value of the h-th cat in the k-th iteration. k,min F represents the worst fitness of the cat population in the k-th iteration. k,average is the average fitness value of the cat population in the k-th iteration.
[0106] When the fitness value after k iterations is less than the average, a local search is used. When the fitness value is greater than the average, it indicates that the solution is far from the optimal solution, and a global search is used to expand the search range.
[0107] The speed and position of the cat in the tracking mode group are updated using the following formula:
[0108] V h,k+1=V h,k +ω h,k ×c×r×(X k,best (t)-X h,k (t))
[0109] X h,k+1 (t)=X h,k (t)+V h,k+1
[0110] In the formula, V h,k+1 V represents the speed of the h-th cat in the (k+1)-th iteration. h,k Let ω represent the speed of the h-th cat in the k-th iteration, c be a constant, r be a random number between 0 and 1, and ω be a random number between 0 and 1. h,k Let X represent the step size of the h-th cat in the k-th iteration; k,best (t) represents the position of the optimal solution in the cat group during the k-th iteration; X h,k (t) represents the position of the h-th cat in the k-th iteration; X h,k+1 (t) represents the position of the h-th cat in the (k+1)-th iteration.
[0111] Using total execution time and total execution cost as the two Pareto objectives, a multi-objective optimization is performed on the search and tracking results to obtain the Pareto solution set; the positions of the cats in the cat group are updated according to the Pareto solution set; the final positions of the cats in the cat group are output after repeated iterations for a set number of times;
[0112] Methods for finding the globally optimal solution to a cloud computing resource scheduling strategy based on the final positions of the cats in the cat group include:
[0113] Output the corresponding cloud computing resource scheduling strategy based on the final position of each cat in the cat group, denoted as alternative strategy P. c ;
[0114] Calculate alternative strategy P c The load balancing difference BL is expressed by the following formula:
[0115]
[0116] AVL = Texe ij / m
[0117] In the formula, AVL is the average of the sum of the times all virtual machines take to complete the tasks assigned to them;
[0118] Calculate alternative strategy P c The service quality is expressed by the formula:
[0119]
[0120] In the formula, QoS(x) represents the alternative policy P.c The service quality is represented by θ, which is the weighting coefficient for execution time.
[0121] Based on the service quality and load balancing difference (BL), all alternative strategies (P) are selected. c The method finds the global optimal solution for cloud computing resource scheduling strategy, which not only improves stability and reduces task processing time, but also effectively ensures virtual machine load balancing during the scheduling process.
[0122] Example 2
[0123] An application system for a cloud computing resource scheduling method based on the cat colony algorithm with ant colony optimization is disclosed. This system can be applied to the multi-domain certificate two-way authentication method described in Example 1. The application system includes:
[0124] The model building module is used to build a cloud computing virtual system in the Cloudsim simulation platform, create cloud tasks and set the number and length of cloud tasks according to requirements; and schedule cloud computing resources in the cloud computing virtual system to execute cloud tasks.
[0125] The module is used to establish a fitness function based on the total execution time and total execution cost of all cloud tasks; the cat's position represents the allocation scheme of cloud computing resources, and the cat swarm algorithm is used to optimize the cloud computing resource scheduling strategy with the fitness function as the optimization objective; the cat swarm is divided into a search mode group and a tracking mode group according to a pre-set combination rate.
[0126] The search module is used to introduce the ant colony algorithm during the stage of searching for the optimal cloud computing resource scheduling strategy by the cats in the search mode group; it obtains an initial solution A by searching the cats in the search mode group, and obtains an initial solution B by searching the cats in the search mode group based on the initial solution A; it selects the initial solution A and the initial solution B as the search results according to the fitness value; and it stores the location of the cats in the search mode group in the memory pool.
[0127] The tracking module is used to find the position of the current optimal solution in the memory pool; to obtain the tracking result by tracking the cats in the tracking pattern group to move towards the position of the current optimal solution; and to store the positions of the cats in the tracking pattern group in the memory pool.
[0128] The output module is used to take the total execution time and total execution cost as the two Pareto objectives, and to perform multi-objective optimization on the search results and tracking results to obtain the Pareto solution set; update the position of the cat in the cat group according to the Pareto solution set; repeat the iteration a set number of times to output the final position of the cat in the cat group, and find the global optimal solution of the cloud computing resource scheduling strategy from the final position of the cat in the cat group.
[0129] The Cloudsim simulation platform includes a network layer, a cloud resource layer, a cloud service layer, a virtual service layer, a user interface layer, and a user code unit. The network layer is used to simulate a real network topology. The cloud service layer is used to create a data center. The cloud service layer is used to allocate cloud computing resources according to a set strategy. The virtual service layer is used to manage the lifecycle of virtual machines. The user interface layer is used to provide connections between task requests and computing nodes. The user code unit is used to set simulation specifications.
[0130] Example 3
[0131] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the cat swarm algorithm cloud computing resource scheduling method described in Embodiment 1.
[0132] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention 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.
[0133] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. 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 illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0134] 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.
[0135] 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.
[0136] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A cloud computing resource scheduling method based on cat colony optimization and ant colony optimization, characterized in that, include: Build a cloud computing virtual system in the Cloudsim simulation platform, create cloud tasks, and set the number and length of cloud tasks according to requirements; Schedule cloud computing resources in the cloud computing virtual system to execute cloud tasks; A fitness function is established based on the total execution time and total execution cost of all cloud tasks; the cat's position represents the allocation scheme of cloud computing resources, and the cat swarm algorithm is used to optimize the cloud computing resource scheduling strategy with the fitness function as the optimization objective; the cat swarm is divided into a search mode group and a tracking mode group according to a pre-set combination rate. Ant colony optimization is introduced in the cat search for optimal cloud computing resource scheduling strategy in the search pattern group. Initial solution A is obtained by searching the cats in the search pattern group. Based on the initial solution A, the ant colony optimization is used to search for the initial solution B. The initial solution A and the initial solution B are selected as the search results according to the fitness value. The location of the cats in the search pattern group is stored in the memory pool. Find the position of the current optimal solution in the memory pool; obtain the tracking result by tracking the cats in the tracking pattern group to move towards the position of the current optimal solution; store the position of the cats in the tracking pattern group in the memory pool; Using total execution time and total execution cost as the two Pareto objectives, a multi-objective optimization of the search and tracking results is performed to obtain the Pareto solution set; the positions of the cats in the cat group are updated based on the Pareto solution set; The algorithm iterates a set number of times to output the final position of the cats in the cat group, and then uses the final position of the cats in the cat group to find the global optimal solution for the cloud computing resource scheduling strategy.
2. The cloud computing resource scheduling method based on ant colony optimization and cat colony algorithm according to claim 1, characterized in that, Methods for building a cloud computing virtual system in the Cloudsim simulation platform include: Initialize the Cloudsim package on the Cloudsim platform, create a virtual machine according to the cloud computing environment, and set the virtual machine parameters, including the virtual machine number, user ID, resource processor speed, and number of CPUs. A datacenter and a datacenterBroker are created to form a cloud computing virtual system. The datacenter is used to manage a group of physical computing nodes for virtual machines. The datacenterBroker is used to schedule cloud computing resources in the cloud computing virtual system to execute cloud tasks.
3. The cloud computing resource scheduling method based on ant colony optimization and cat colony algorithm according to claim 2, characterized in that, Methods for establishing a fitness function based on the total execution time and total execution cost of all cloud tasks include: The total execution time of a cloud task can be calculated using the following formula: In the formula, Texe ij The total execution time of the cloud task is represented by the .exe file. ij Here, i represents the execution time of the virtual machine, j represents the virtual machine number, m represents the number of virtual machines in the cloud computing virtual system, n represents the number of cloud tasks, and c represents the execution time of the virtual machine. i Represents the set of cloud tasks assigned to virtual machines, npe j ×V mipsj Let x represent the processor speed of the j-th virtual machine. If task i is assigned to the j-th virtual machine, then x... ij =1, otherwise its value is 0; The total execution cost of a cloud task can be calculated using the following formula: In the formula, The execution cost of a single virtual machine. For the line cost of cloud tasks, V cos t j It is the hourly cost of the j-th virtual machine; A fitness function is established based on the total execution time and total execution cost of all cloud tasks, expressed as follows: In the formula, MinF(x) represents the fitness function.
4. The cloud computing resource scheduling method based on ant colony optimization and cat colony algorithm according to claim 2, characterized in that, Methods for obtaining initial solution B using the ant colony algorithm based on initial solution A include: Ants are placed on each computing node, and the next virtual machine is selected based on the probability of a roulette wheel. Pheromones are left along the ants' path, and the pheromone concentration provides search clues for the ant colony. The search radius R of the ant colony S The calculation formula is: In the formula, Nbest represents the position of the cat corresponding to the best solution among all initial solutions A; Nworst represents the position of the cat corresponding to the worst solution among all initial solutions A.
5. The cloud computing resource scheduling method based on ant colony optimization and cat colony algorithm according to claim 1, characterized in that, Also includes: In the cat swarm algorithm, the position of each cat in the memory pool is mutated, expressed by the following formula: X' k =(1±SRD k *R)*X k In the formula, X' k For the new mutation location in cats, X k R represents the cat's current position, and R is a random number; SRD is the set initial mutation operator value. k ω is the value of the mutation operator in the kth generation. max ω represents the maximum number of iterations. k This represents the current iteration number.
6. The cloud computing resource scheduling method based on ant colony optimization and cat colony algorithm according to claim 5, characterized in that, Methods for obtaining tracking results by moving the cat in the tracking pattern group toward the current optimal solution include: The speed and position of the cat in the tracking mode group are updated using the following formula: V h,k+1 =V h,k +ω h,k ×c×r×(X k,best (t)-X h,k (t)) X h,k+1 (t)=X h,k (t)+V h,k+1 In the formula, V h,k+1 V represents the speed of the h-th cat in the (k+1)-th iteration. h,k Let ω represent the speed of the h-th cat in the k-th iteration, c be a constant, r be a random number between 0 and 1, and ω be a random number between 0 and 1. h,k Let X represent the step size of the h-th cat in the k-th iteration; k,best (t) represents the position of the optimal solution in the cat group during the k-th iteration; X h,k (t) represents the position of the h-th cat in the k-th iteration; X h,k+1 (t) represents the position of the h-th cat in the (k+1)-th iteration.
7. The cloud computing resource scheduling method based on ant colony optimization and cat colony algorithm according to claim 6, characterized in that, The formula for calculating the cat's stride in the tracking mode group is as follows: In the formula, ω max This is expressed as the maximum inertia coefficient; ω min Represented as the minimum inertia coefficient, F(x) h,k F is the fitness value of the h-th cat in the k-th iteration. k,min F represents the worst fitness of the cat population in the k-th iteration. k,average is the average fitness value of the cat population in the k-th iteration.
8. The cloud computing resource scheduling method based on cat colony optimization according to claim 3, characterized in that, Methods for finding the globally optimal solution to a cloud computing resource scheduling strategy based on the final positions of the cats in the cat group include: Output the corresponding cloud computing resource scheduling strategy based on the final position of each cat in the cat group, denoted as alternative strategy P. c ; Calculate alternative strategy P c The load balancing difference BL is expressed by the following formula: AVL=Texe ij / m In the formula, AVL is the average of the sum of the times all virtual machines take to complete the tasks assigned to them; Calculate alternative strategy P c The service quality is expressed by the formula: In the formula, QoS(x) represents the alternative policy P. c The service quality is represented by θ, which is the weighting coefficient for execution time. Based on the service quality and load balancing difference (BL), all alternative strategies (P) are selected. c The goal is to find the globally optimal solution for cloud computing resource scheduling strategies.
9. An application system for a cloud computing resource scheduling method based on ant colony optimization and cat colony algorithm according to any one of claims 1 to 8, comprising: The model building module is used to build a cloud computing virtual system in the Cloudsim simulation platform, create cloud tasks, and set the number and length of cloud tasks as needed. Schedule cloud computing resources in the cloud computing virtual system to execute cloud tasks; A partitioning module is used to establish a fitness function based on the total execution time and total execution cost of all cloud tasks; the position of the cat represents the allocation scheme of cloud computing resources, and the cat swarm algorithm is used to optimize the cloud computing resource scheduling strategy with the fitness function as the optimization objective; The cat population is divided into a search pattern group and a tracking pattern group based on a pre-set mating rate. The search module is used to introduce the ant colony algorithm during the stage of searching for the optimal cloud computing resource scheduling strategy by the cats in the search mode group; it obtains an initial solution A by searching the cats in the search mode group, and obtains an initial solution B by searching the cats in the search mode group based on the initial solution A; it selects the initial solution A and the initial solution B as the search results according to the fitness value; and it stores the location of the cats in the search mode group in the memory pool. The tracking module is used to find the position of the current optimal solution in the memory pool; to obtain the tracking result by tracking the cats in the tracking pattern group to move towards the position of the current optimal solution; and to store the positions of the cats in the tracking pattern group in the memory pool. The output module is used to take the total execution time and total execution cost as two Pareto objectives, perform multi-objective optimization on the search results and tracking results to obtain the Pareto solution set, and update the position of the cats in the cat group according to the Pareto solution set; The algorithm iterates a set number of times to output the final position of the cats in the cat group, and then uses the final position of the cats in the cat group to find the global optimal solution for the cloud computing resource scheduling strategy.
10. A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the cat swarm algorithm cloud computing resource scheduling method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Cloud computing task allocation method and device, equipment and storage medium
CN108776612A
Virtual machine deployment method and device based on cat swarm algorithm, equipment and storage medium
CN111338765A