Cloud computing resource scheduling method, system and device based on enhanced Meland spar optimization algorithm, and medium
By adopting the enhanced Puma optimization algorithm and related strategies in cloud computing, the problems of long response time and resource waste in large-scale task scheduling are solved, and efficient resource scheduling and performance improvement are achieved.
Patent Information
- Application Number
- CN202411046424.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-08-01
AI Technical Summary
Existing task scheduling algorithms have long response times, long exploration times, and insufficient optimization performance when processing large-scale tasks, leading to resource waste and business performance degradation.
A cloud computing resource scheduling method based on the enhanced Puma optimization algorithm is adopted. By obtaining cloud tasks, virtual machine resources and load cost vectors, an objective function that minimizes the total cost is established, and the enhanced Puma optimization algorithm is used to optimize the objective function, combined with Sinusoidal chaos. Mapping and intermediate point sample learning strategies improve population diversity and search speed, and finally map the optimal individual to a binary scheduling matrix for task scheduling.
It significantly reduces the time cost of task scheduling, reduces the response time of the computer system, improves resource utilization and hardware computing efficiency, and improves system performance.
Smart Images

Figure CN118585341A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of task scheduling methods under cloud computing, and in particular to a cloud computing resource scheduling method, system, device and medium based on an enhanced Puma optimization algorithm. Background Art
[0002] Cloud computing technology has been on the rise since the beginning of the 21st century and has gradually become an important support for modern society. It provides computing resources, storage resources, and application services to users through the Internet through virtualization technology, distributed data storage technology, large-scale data management technology, etc., realizing the decoupling of IT and business, so that IT resources can be supplied on demand. Cloud computing optimization scheduling is used to reduce the waste rate of resources and prevent the waste of virtual machine computing resources, storage resources, and resource bandwidth resources under large-scale task scheduling.
[0003] At present, many task scheduling problems are generally solved using heuristic and meta-heuristic algorithms. Heuristic algorithms are search and optimization algorithms based on experience and intuition, which are usually used to solve complex combinatorial optimization problems, such as simulated annealing, genetic algorithm, and ant colony optimization. However, these algorithms often have difficulty in handling large-scale task scheduling problems, resulting in excessive computer response time. On the other hand, existing meta-heuristic algorithms use random exploration, such as the whale optimization algorithm (WOA), the gray wolf optimization algorithm (GWO), and the differential evolution algorithm (DE) to handle scheduling problems, making them have a higher response speed. However, although the existing meta-heuristic algorithms have their advantages in handling large-scale task scheduling problems, most meta-heuristic algorithms have problems such as long exploration time and insufficient optimization performance when handling large-scale task scheduling problems. Therefore, the existing cloud computing task scheduling methods based on meta-heuristic algorithms need to be further improved. Summary of the invention
[0004] The purpose of the present invention is to solve the technical problems existing in large-scale task scheduling, and in particular to introduce a cloud computing resource scheduling method, system, device and medium based on an enhanced Puma optimization algorithm.
[0005] In order to achieve the above-mentioned object of the present invention, the present invention provides a cloud computing resource scheduling method based on an enhanced Puma optimization algorithm, comprising the following steps:
[0006] S1. Obtain the cloud task byte size vector and the computing resource vector, load cost vector, and resource bandwidth vector of the virtual machine, and then establish the following objective function that minimizes the total cost:
[0007] (1)
[0008] In formula (1), , and Respectively represent functions , and The weight is used to adjust the center of gravity of the objective function when optimizing different aspects;
[0009] represents the time cost function;
[0010] represents the load cost function;
[0011] represents the resource bandwidth cost function;
[0012] represents the time cost function and is calculated as follows:
[0013] (2)
[0014] In formula (2), Indicates the number of tasks, Indicates the number of computing resources (virtual machines), Indicates The task is in Each task can only be calculated on one virtual machine. get , Indicates The computing resource vector of a virtual machine, Indicates The computing resource vector required by each task is represents the load cost function and is calculated as follows:
[0015] (3)
[0016] In formula (3), Indicates the number of tasks, Indicates the number of computing resources (virtual machines), Indicates The task is in Each task can only be calculated on one virtual machine. get , Indicates The load vector of each virtual machine, Indicates The load vector required by each task is represents the resource bandwidth cost function and is calculated as follows:
[0017] (4)
[0018] In formula (4), Indicates the number of tasks, Indicates the number of computing resources (virtual machines), Indicates The task is in Each task can only be calculated on one virtual machine. get , Indicates The computing resource vector required by each task is Indicates The resource bandwidth vector of each virtual machine, Indicates The resource bandwidth vector required by each task is Indicates The computing resource vector of a virtual machine, Represents price-related parameters.
[0019] S2. Use the enhanced Puma optimization algorithm to optimize the objective function and obtain the optimal individual:
[0020] S21. Initialize the original population using formula (5) to obtain the initialized original population :
[0021] (5)
[0022] In formula (5), Represents population Middle Individual location information, represents the upper bound vector of the solution space, represents the lower bound vector of the solution space, Indicates that a A random number between
[0023] S22, Initial , by judging and 4, if , then execute S23, otherwise jump to execute S28; where, Indicates the current iteration number;
[0024] S23, updating individual positions through the exploration phase;
[0025] S24, updating individual positions through the development phase;
[0026] S25. Population , and Merge and take the previous individuals, among which represents the original population after initialization, represents the new population after being updated in the exploration phase, represents the new population after being updated through the development phase;
[0027] S26. Calculate the population and The optimal individual fitness and ,at the same time ;
[0028] S27, calculate the The score of the exploration phase at iteration and development stage scores ;
[0029] S28, if Then execute S29, otherwise execute step S33; wherein, represents the maximum number of iterations, and ;
[0030] S29, update the individual position through the exploration phase, the individual here is the previous step S25 individual;
[0031] S30, update the individual position through the development stage, the individual here is the previous step S25 individual;
[0032] S31, yes and Make updates;
[0033] S32, , return to S28;
[0034] S33, select the population at the last iteration The individual with the smallest objective function value is used as the scheduling method;
[0035] Furthermore, the specific steps of S23 are:
[0036] S231, calculate the first The individual New position in dimensions:
[0037] (6)
[0038] In formula (6), represents the upper bound vector of the solution space, represents the lower bound vector of the solution space, is a random number, and , is a random number between 0 and 1, Represents the dimension of the problem, For two different random solutions and The difference between , Specifically, by Two individuals randomly selected), Calculated by the following formula:
[0039] (7)
[0040] In formula (7), Indicates two different or Two random different solutions of and The difference between , Specifically, by Two individuals randomly selected), It is given by the following formula:
[0041] (8)
[0042] In formula (8), For two different , , or Random solution and The difference between , Specifically, by Two individuals randomly selected); the new population is obtained by the following formula , ={ }, The solution formula is as follows:
[0043] (9)
[0044] In formula (9), Represents a new population The Individuals, Represents a new population No. Individual The new position in the dimension, Represents the original population after initialization Individuals, It represents the newly generated The fitness value of each individual, Represents the original population after initialization of The fitness value of an individual.
[0045] Furthermore, the specific steps of S24 are:
[0046] S241, calculate the first The individual New position in dimensions:
[0047] (10)
[0048] In formula (10), Represents a new population The Individuals, Represents population The Individuals, and For population There are two random different solutions in and To set the parameters before the optimization starts, A random number representing 0 or 1. Represents population The best individual in Indicates The exponential function with base , represents the mean value function, express to A random number between Represents population All individuals in Represents population The number of individuals in Represents a random number that conforms to the normal distribution in the problem dimension, Calculated by the following formula:
[0049] (11)
[0050] In formula (11), is a random number, Represents population The Individuals, Represents population The best individual in Calculated by the following formula:
[0051] (12)
[0052] In formula (12), Indicates the current iteration number, represents the total number of iterations, Indicates is the base exponential function, Represents a random number that conforms to the normal distribution in the problem dimension, Calculated by the following formula:
[0053] (13)
[0054] In formula (13), represents the cosine function, Represents a random number that conforms to the normal distribution in the problem dimension, express to A random number between
[0055] Furthermore, the specific steps of S25 are:
[0056] S251, merge the three populations and take the first Individuals:
[0057] (14)
[0058] In formula (14), represents the original population after initialization, represents the new population after being updated in the exploration phase, Represents the new population after the development phase, and then sorted by the following formula:
[0059] (15)
[0060] In formula (15), Express After sorting in ascending order, represents the ascending function, Represents population The fitness matrix, Indicates that After sorting in ascending order, the new population is obtained by the following formula:
[0061] (16)
[0062] In formula (16), Indicates that The subscript after sorting in ascending order, Indicates the number of populations; Indicates the population Before individual;
[0063] Furthermore, the specific steps of S26 are:
[0064] S261, calculate the population by the following formula and The best fitness individual and :
[0065] (17)
[0066] Formula (17), represents the minimum value function, and Respectively represent populations and The fitness vector of ;
[0067] Furthermore, the specific steps of S27 are:
[0068] S271, update the first The score of the exploration phase at iteration and development stage scores :
[0069] (18)
[0070] In formula (18), and are the parameters set before optimization and are initialized to , and Calculated by the following formula:
[0071] (19)
[0072] In formula (19), , , and are four numbers with initial value 1, and are the parameters set before optimization and are initialized to , , and Calculated by the following formula:
[0073] (20)
[0074] In formula (20), is the original population after initialization The fitness value of the best individual in , and Represents the population in the first three iterations The optimal fitness value of and Calculated by the following formula:
[0075] (twenty one)
[0076] In formula (21), and are the parameters set before optimization and are initialized to , , , and are four numbers with initial value 1, , and Calculated by the following formula:
[0077] (twenty two)
[0078] In formula (22), , and Represents the population in the first three iterations The optimal fitness value of is the original population after initialization The fitness value of the best individual in ;
[0079] Furthermore, the specific steps of S31 are:
[0080] S311, through the following formula and To update:
[0081] (twenty three)
[0082] In formula (23), and Respectively represent The scores of the exploration and development phases during the iteration, and Calculated by the following formula:
[0083] (twenty four)
[0084] In formula (24), is the rounding symbol; and Respectively The scores of the exploration and development phases at the iteration, and Calculated by the following formula:
[0085] (25)
[0086] In formula (25), Calculated by the following formula:
[0087] (26)
[0088] In formula (26), and They are respectively expressed as the absolute value of the difference between the fitness value before and after the update in the development and exploration phases, represents the minimum value function, and Calculated by the following equation:
[0089] (27)
[0090] In formula (27), and They represent the optimal fitness before and after the development phase update, respectively. and They represent the optimal fitness before the exploration phase and the optimal fitness after the exploration phase respectively. represents the number of times the individual is updated through formula (10), represents the number of individuals updated in the exploration phase selected by formula (9), are the parameters set before optimization and are initialized to , and Calculated by the following formula:
[0091] (28)
[0092] In formula (28), and They are The best fitness value of the current solution in the development phase and exploration phase before the update, and They are The fitness value of the best solution in the development phase and exploration phase, and They are The fitness value of the best solution in the development phase and exploration phase, and They are The best fitness value of the current solution in the development phase and exploration phase after the update, and They are The fitness value of the best solution in the development phase and exploration phase, and They are The fitness value of the best solution in the development phase and exploration phase after the first selection, It is an iterative process through the development phase Iterations to The number of iterations to select the individuals after the development phase update, It is an iterative process through the exploration phase Iterations to The number of iterations to select the individuals after the exploration phase update, It is an iterative process through the development phase Iterations to The number of iterations to select the individuals after the development phase update, It is an iterative process through the exploration phase Iterations to The number of iterations to select the individuals after the exploration phase update, It is an iterative process through the development phase Iterations to The number of iterations to select the individuals after the development phase update, It is an iterative process through the exploration phase Iterations to The number of iterations to select the individuals after the exploration phase update, are the parameters set before optimization and are initialized to , and Calculated by the following formula:
[0093] (29)
[0094] In formula (29), To optimize the parameters set before and initialized to ;
[0095] S3, mapping the optimal individuals obtained in S2 to a binary scheduling matrix to perform task scheduling;
[0096] The binary scheduling matrix is represented as:
[0097]
[0098] Among them, the matrix is the scheduling matrix;
[0099] Indicates The task is Each task can only be computed on one virtual machine. get ; The first row of the scheduling matrix represents the first task, and its first row The column has a value of 1 (a row has at least one value 1); it means that the first task is in running on a computing resource.
[0100] Furthermore, the initialization population It also includes: using Sinusoidal chaotic mapping to update the initialized population:
[0101] (30)
[0102] In formula (30), For the control parameters, the initial ;
[0103] represents the sine function;
[0104] Represents the original population after initialization The individual;
[0105] Represents the individual after updating by Sinusoidal chaotic mapping.
[0106] By adding the sinusoidal chaotic map initialization method to the algorithm, on the one hand, the diversity of the population is improved, thereby reducing the average total cost of all strategies in the initial task scheduling strategy. On the other hand, the search speed for the optimal solution is accelerated, thereby improving the efficiency of obtaining the task scheduling strategy.
[0107] Furthermore, in the development stage, the individual positions are updated and an intermediate point sample learning strategy is introduced to improve the development stage, which is specifically the following formula:
[0108] (31)
[0109] In formula (31), represents the new individual updated in the original development stage; the specific expression is formula (10) in step S241.
[0110] represents the individual generated by the intermediate point sample learning strategy and is represented by the following formula:
[0111] (32)
[0112] In formula (32), Represents the updated population The first Individuals, Represents the updated population The population after being sorted in ascending order by its fitness value, Calculated by the following formula:
[0113] (33)
[0114] In formula (33), Indicates Individuals, represents the ceiling function, The interval is A random number between
[0115] Since the median is not affected by extreme values and can also judge the quality of a batch of data, the middle point carries relevant information about the optimal solution during the task scheduling process. By adding the middle point sample learning strategy during the algorithm development phase, the convergence speed of finding the optimal solution in the task scheduling process is accelerated, thereby reducing the response time of cloud computing task scheduling.
[0116] Furthermore, the optimal individual is mapped to a binary scheduling matrix by using a random ST-shaped transfer function to convert the optimal individual into a binary matrix for task scheduling, which is specifically expressed as the following formula:
[0117] (34)
[0118] In formula (34), represents the absolute value function, represents the tangent function, represents the optimal individual in the iterative process, represents the matrix after transformation by random ST-shaped transfer function;
[0119] A single or traditional transfer function will use a lot of conversion time, resulting in a waste of computing resources during task scheduling. Using a random ST-shaped transfer function, the time for converting the optimal solution to the optimal scheduling method during task scheduling can be reduced through the above steps, thereby reducing the response time of the computer system during scheduling.
[0120] The present invention also proposes a cloud task scheduling system based on a multi-strategy Cougar optimization algorithm.
[0121] Furthermore, the system comprises:
[0122] Data collection module: obtains the cloud task byte size vector and the computing resource vector, load cost vector and resource bandwidth vector of the virtual machine;
[0123] Task scheduling module: optimize the objective function of minimizing the total cost through the enhanced Puma optimization algorithm to obtain the optimal individual; then map the optimal individual to the binary scheduling matrix, obtain the task scheduling strategy through the scheduling matrix, and then perform task scheduling;
[0124] The binary scheduling matrix is represented as:
[0125]
[0126] Among them, the matrix is the scheduling matrix;
[0127] Indicates The task is Each task can only be computed on one virtual machine. get ; The first row of the scheduling matrix represents the first task, and its first row The column has a value of 1 (a row has at least one value 1); it means that the first task is in running on a computing resource.
[0128] The objective function of minimizing the total cost is:
[0129] (1)
[0130] In formula (1), , and Respectively represent functions , and The weight is used to adjust the center of gravity of the objective function when optimizing different aspects;
[0131] represents the time cost function;
[0132] represents the load cost function;
[0133] represents the resource bandwidth cost function;
[0134] The objective function of minimizing the total cost is optimized by the enhanced Cougar optimization algorithm to obtain the optimal individual, including:
[0135] S21. Initialize the original population using formula (5) to obtain the initialized original population :
[0136] (5)
[0137] In formula (5), Represents population Middle Location information of individuals;
[0138] Represents the upper bound vector of the solution space;
[0139] Represents the lower bound vector of the solution space;
[0140] Indicates that a A random number between
[0141] S22, Initial , by judging and 4, if , then execute S23, otherwise jump to execute S28; where, Indicates the current iteration number;
[0142] S23, updating individual positions through the exploration phase;
[0143] S24, updating individual positions through the development phase;
[0144] S25. Population , and Merge and take the previous individuals; among them, represents the original population after initialization, represents the new population after being updated in the exploration phase, represents the new population after being updated through the development phase;
[0145] S26. Calculate the population and The optimal individual fitness and ,at the same time ;
[0146] S27, calculate the The score of the exploration phase at iteration and development stage scores ;
[0147] S28, if Then execute S29, otherwise execute step S33; wherein, represents the maximum number of iterations, and ;
[0148] S29, update the individual position through the exploration phase, the individual here is the previous step S25 individual;
[0149] S30, update the individual position through the development stage, the individual here is the previous step S25 individual;
[0150] S31, yes and Make updates;
[0151] S32, , return to S28;
[0152] S33, select the population at the last iteration The individual with the smallest objective function value is selected as the scheduling method.
[0153] Furthermore, the initialization population It also includes: using Sinusoidal chaotic mapping to update the initialized population:
[0154] (30)
[0155] In formula (30), For the control parameters, the initial ;
[0156] represents the sine function;
[0157] Represents the original population after initialization The individual;
[0158] Represents the individual after updating by Sinusoidal chaotic mapping.
[0159] Furthermore, in the development stage, the individual positions are updated and an intermediate point sample learning strategy is introduced to improve the development stage, which is specifically the following formula:
[0160] (31)
[0161] In formula (31), represents the new individuals updated in the development phase after the introduction of the intermediate point sample learning strategy;
[0162] represents the new individual updated in the original development stage; the specific expression is formula (10) in step S241.
[0163] represents the individual generated by the intermediate point sample learning strategy and is represented by the following formula:
[0164] (32)
[0165] In formula (32), Represents the updated population The population after being sorted in ascending order by its fitness value, Calculated by the following formula:
[0166] (33)
[0167] In formula (33), Indicates Individuals, represents the ceiling function, The interval is A random number between .
[0168] Furthermore, the optimal individual is mapped to a binary scheduling matrix by using a random ST-shaped transfer function to convert the optimal individual into a binary matrix for task scheduling, which is specifically expressed as the following formula:
[0169] (34)
[0170] In formula (34), represents the absolute value function, represents the tangent function, represents the optimal individual in the iterative process, Represents the matrix after transformation by a random ST-shaped transfer function.
[0171] The present invention also proposes a computer device, wherein when the processor executes the program stored in the memory, a cloud task scheduling method based on the multi-strategy Cougar optimization algorithm is implemented.
[0172] The present invention also proposes a readable storage medium storing a program, which, when executed by a processor, implements a cloud task scheduling method based on a multi-strategy Cougar optimization algorithm.
[0173] In summary, due to the adoption of the above technical solutions, the task scheduling method proposed in the present invention obtains a scheduling strategy by introducing an advanced optimization algorithm, which significantly reduces the time cost of task scheduling. This optimization not only reduces the response time of the computer system, but also enhances the search range of the understanding space by adding an intermediate point sample learning strategy in the development stage, thereby improving the accuracy of the optimal solution. This method is particularly suitable for large-scale task scheduling problems, and can effectively improve the rationality of cloud computing task scheduling, maximize resource utilization, and effectively reduce resource waste and business performance degradation. At the same time, by optimizing the task execution process and resource allocation, this method can also improve hardware computing efficiency and hardware processing speed, thereby improving system performance as a whole.
[0174] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0175] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0176] Figure 1 It is a schematic diagram of the task scheduling process based on the enhanced Puma optimization algorithm SMRSTPO of the present invention.
[0177] Figure 2 This is a comparison chart of task scheduling based on the enhanced Puma optimization algorithm SMRSTPO and other optimization algorithms in the present invention. DETAILED DESCRIPTION
[0178] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0179] With the rise of cloud computing, the scale of tasks has also continued to rise. Existing task scheduling methods often face the problem of falling into suboptimal task scheduling. The fundamental reason is that the algorithm's exploration and utilization performance is weak, and it is impossible to quickly and effectively find the optimal task scheduling method. The selected task scheduling method is inefficient, resulting in problems such as wasting resources when the system performs large-scale task scheduling.
[0180] In order to alleviate these problems, this paper proposes a cloud computing resource scheduling method SMRSTPO based on the enhanced Puma optimization algorithm. Figure 1 As shown, the specific steps include:
[0181] S1. Obtain the cloud task (Task) byte size vector and the virtual machine (VM) computing resource vector, load cost vector and resource bandwidth vector; then establish the following objective function that minimizes the total cost;
[0182] S2, using the enhanced Puma optimization algorithm to optimize the objective function and obtain the optimal individual;
[0183] S3, mapping the optimal individual (optimal solution) obtained in S2 to a binary scheduling matrix, obtaining the task scheduling strategy through the scheduling matrix, and thus performing task scheduling;
[0184] The binary scheduling matrix is represented as:
[0185]
[0186] Among them, the matrix is the scheduling matrix;
[0187] Indicates The task is Each task can only be computed on one virtual machine. get ; The first row of the scheduling matrix represents the first task, and its first row The column has a value of 1 (a row has at least one value 1); it means that the first task is in computing resources; for example: the scheduling matrix The first line of The value of is 1, indicating that the first task is assigned to the second computing resource to run; the scheduling matrix In the second line of , The value of is 1, indicating that the second task is assigned to the second computing resource and the fifth computing resource. Therefore, the scheduling matrix of The value can be used to know the specific task scheduling strategy, thereby realizing task scheduling.
[0188] Furthermore, the objective function of minimizing the total cost established in step S1 is as follows:
[0189] (1)
[0190] In formula (1), , and Respectively represent functions , and The weight is used to adjust the center of gravity of the objective function when optimizing different aspects. represents the time cost function, represents the load cost function, represents the resource bandwidth cost function;
[0191] represents the time cost function and is calculated as follows:
[0192] (2)
[0193] In formula (2), Indicates the number of tasks, Indicates the number of computing resources (virtual machines), Indicates The task is in Each task can only be calculated on one virtual machine. get , Indicates The computing resource vector of a virtual machine, Indicates The computing resource vector required by each task is represents the load cost function and is calculated as follows:
[0194] (3)
[0195] In formula (3), Indicates the number of tasks, Indicates the number of computing resources (virtual machines), Indicates The task is in Each task can only be calculated on one virtual machine. get , Indicates The load vector of each virtual machine, Indicates The load vector required by each task is represents the resource bandwidth cost function and is calculated as follows:
[0196] (4)
[0197] In formula (4), Indicates the number of tasks, Indicates the number of computing resources (virtual machines), Indicates The task is in Each task can only be calculated on one virtual machine. get , Indicates The computing resource vector required by each task is Indicates The resource bandwidth vector of each virtual machine, Indicates The resource bandwidth vector required by each task is Indicates The computing resource vector of a virtual machine, Represents price-related parameters.
[0198] Furthermore, the S2 optimizes the cloud task scheduling method using the enhanced Puma optimization algorithm, and the specific steps of obtaining the optimal task scheduling strategy are:
[0199] S21. Initialize the original population using formula (5) to obtain the initialized original population :
[0200] (5)
[0201] In formula (5), Represents population Middle Individual location information;
[0202] Represents the upper bound vector of the solution space;
[0203] Represents the lower bound vector of the solution space;
[0204] Indicates that a A random number between
[0205] S22, Initial , by judging and 4, if , then execute S23, otherwise jump to execute S28; where, Indicates the current iteration number;
[0206] S23, updating individual positions through the exploration phase;
[0207] S24, updating individual positions through the development phase;
[0208] S25. Population , and Merge and take the previous individuals; among them, represents the original population after initialization, represents the new population after being updated in the exploration phase, represents the new population after being updated through the development phase;
[0209] S26. Calculate the population and The optimal individual fitness and ,at the same time ;
[0210] S27, calculate the The score of the exploration phase at iteration and development stage scores ;
[0211] S28, if Then execute S29, otherwise execute step S33; wherein, represents the maximum number of iterations, and ;
[0212] S29, update the individual position through the exploration phase, the individual here is the previous step S25 individual;
[0213] S30, update the individual position through the development stage, the individual here is the previous step S25 individual;
[0214] S31, yes and Make updates;
[0215] S32, , return to S28;
[0216] S33, select the population at the last iteration The individual with the smallest objective function value is selected as the scheduling method.
[0217] Furthermore, the specific steps of S23 are:
[0218] S231, calculate the first The individual New position in dimensions:
[0219] (6)
[0220] In formula (6), represents the upper bound vector of the solution space, represents the lower bound vector of the solution space, is a random number, and , is a random number between 0 and 1, Represents the dimension of the problem, For two different random solutions and The difference between , Specifically, by Two individuals randomly selected), Calculated by the following formula:
[0221] (7)
[0222] In formula (7), Indicates two different or Two random different solutions of and The difference between , Specifically, by Two individuals randomly selected), It is given by the following formula:
[0223] (8)
[0224] In formula (8), For two different , , or Random solution and The difference between , Specifically, by Two individuals randomly selected); the new population is obtained by the following formula , ={ }, The solution formula is as follows:
[0225] (9)
[0226] In formula (9), Represents a new population The Individuals, Represents a new population No. Individual The new position in the dimension, Represents the original population after initialization Individuals, It represents the newly generated The fitness value of each individual, Represents the original population after initialization of The fitness value of an individual.
[0227] Furthermore, the specific steps of S24 are:
[0228] S241, calculate the first The individual New position in dimensions:
[0229] (10)
[0230] In formula (10), Represents a new population The Individuals, Represents population The Individuals, and For population There are two random different solutions in and To set the parameters before the optimization starts, A random number representing 0 or 1. Represents population The best individual in Indicates The exponential function with base , represents the mean value function, express to A random number between Represents population All individuals in Represents population The number of individuals in Represents a random number that conforms to the normal distribution in the problem dimension, Calculated by the following formula:
[0231] (11)
[0232] In formula (11), is a random number, Represents population The Individuals, Represents population The best individual in Calculated by the following formula:
[0233] (12)
[0234] In formula (12), Indicates the current iteration number, represents the total number of iterations, Indicates is the base exponential function, Represents a random number that conforms to the normal distribution in the problem dimension, Calculated by the following formula:
[0235] (13)
[0236] In formula (13), represents the cosine function, Represents a random number that conforms to the normal distribution in the problem dimension, express to A random number between
[0237] Furthermore, the specific steps of S25 are:
[0238] S251, merge the three populations and take the first Individuals:
[0239] (14)
[0240] In formula (14), represents the original population after initialization, represents the new population after being updated in the exploration phase, Represents the new population after the development phase, and then sorted by the following formula:
[0241] (15)
[0242] In formula (15), Express After sorting in ascending order, represents the ascending function, Represents population The fitness matrix, Indicates that After sorting in ascending order, the new population is obtained by the following formula:
[0243] (16)
[0244] In formula (16), Indicates that The subscript after sorting in ascending order, Indicates the number of populations; Indicates the population Before individual;
[0245] Furthermore, the specific steps of S26 are:
[0246] S261, calculate the population by the following formula and The best fitness individual and :
[0247] (17)
[0248] Formula (17), represents the minimum value function, and Respectively represent populations and The fitness vector of ;
[0249] Furthermore, the specific steps of S27 are:
[0250] S271, update the first The score of the exploration phase at iteration and development stage scores :
[0251] (18)
[0252] In formula (18), and are the parameters set before optimization and are initialized to , and Calculated by the following formula:
[0253] (19)
[0254] In formula (19), , , and are four numbers with initial value 1, and are the parameters set before optimization and are initialized to , , and Calculated by the following formula:
[0255] (20)
[0256] In formula (20), is the original population after initialization The fitness value of the best individual in , and Represents the population in the first three iterations The optimal fitness value of and Calculated by the following formula:
[0257] (twenty one)
[0258] In formula (21), and are the parameters set before optimization and are initialized to , , , and are four numbers with initial value 1, , and Calculated by the following formula:
[0259] (twenty two)
[0260] In formula (22), , and Represents the population in the first three iterations The optimal fitness value of is the original population after initialization The fitness value of the best individual in ;
[0261] Furthermore, the specific steps of S31 are:
[0262] S311, through the following formula and To update:
[0263] (twenty three)
[0264] In formula (23), and Respectively represent The scores of the exploration and development phases during the iteration, and Calculated by the following formula:
[0265] (twenty four)
[0266] In formula (24), is the rounding symbol; and Respectively The scores of the exploration and development phases at the iteration, and Calculated by the following formula:
[0267] (25)
[0268] In formula (25), Calculated by the following formula:
[0269] (26)
[0270] In formula (26), and They are respectively expressed as the absolute value of the difference between the fitness value before and after the update in the development and exploration phases, represents the minimum value function, and Calculated by the following equation:
[0271] (27)
[0272] In formula (27), and They represent the optimal fitness before and after the development phase update, respectively. and They represent the optimal fitness before the exploration phase and the optimal fitness after the exploration phase respectively. represents the number of times the individual is updated through formula (10), represents the number of individuals updated in the exploration phase selected by formula (9), are the parameters set before optimization and are initialized to , and Calculated by the following formula:
[0273] (28)
[0274] In formula (28), and They are The best fitness value of the current solution in the development phase and exploration phase before the update, and They are The fitness value of the best solution in the development phase and exploration phase, and They are The fitness value of the best solution in the development phase and exploration phase, and They are The best fitness value of the current solution in the development phase and exploration phase after the update, and They are The fitness value of the best solution in the development phase and exploration phase, and They are The fitness value of the best solution in the development phase and exploration phase after the first selection, It is an iterative process through the development phase Iterations to The number of iterations to select the individuals after the development phase update, It is an iterative process through the exploration phase Iterations to The number of iterations to select the individuals after the exploration phase update, It is an iterative process through the development phase Iterations to The number of iterations to select the individuals after the development phase update, It is an iterative process through the exploration phase Iterations to The number of iterations to select the individuals after the exploration phase update, It is an iterative process through the development phase Iterations to The number of iterations to select the individuals after the development phase update, It is an iterative process through the exploration phase Iterations to The number of iterations to select the individuals after the exploration phase update, are the parameters set before optimization and are initialized to , and Calculated by the following formula:
[0275] (29)
[0276] In formula (29), To optimize the parameters set before and initialized to ;
[0277] Furthermore, the Sinusoidal chaotic map is introduced to update the initialized original population, which is expressed as the following formula:
[0278] (30)
[0279] In formula (30), For the control parameters, the initial , represents the sine function, Represents the original population after initialization The Individuals, represents the individual after updating by Sinusoidal chaotic mapping;
[0280] By adding the sinusoidal chaotic map initialization method to the algorithm, on the one hand, the diversity of the population is improved, thereby reducing the average total cost of all strategies in the initial task scheduling strategy. On the other hand, the search speed for the optimal solution is accelerated, thereby improving the efficiency of obtaining the task scheduling strategy.
[0281] Furthermore, the intermediate point sample learning strategy is introduced to improve the development stage, which is specifically the following formula:
[0282] (31)
[0283] In formula (31), Indicates the new individual updated in the original development stage, represents the individual generated by the intermediate point sample learning strategy and is represented by the following formula:
[0284] (32)
[0285] In formula (32), Represents the updated population The population after being sorted in ascending order by its fitness value, Calculated by the following formula:
[0286] (33)
[0287] In formula (33), Indicates Individuals, represents the ceiling function, The interval is A random number between
[0288] Since the median is not affected by extreme values and can also judge the quality of a batch of data, the middle point carries relevant information about the optimal solution during the task scheduling process. By adding the middle point sample learning strategy during the algorithm development phase, the convergence speed of finding the optimal solution in the task scheduling process is accelerated, thereby reducing the response time of cloud computing task scheduling.
[0289] Furthermore, the optimal individual (optimal solution) is mapped to a binary scheduling matrix by using a random ST-shaped transfer function to convert the optimal individual into a binary matrix for task scheduling, which is specifically expressed as the following formula:
[0290] (34)
[0291] In formula (34), represents the absolute value function, represents the tangent function, represents the optimal individual in the iterative process, represents the matrix after transformation by random ST-shaped transfer function;
[0292] In addition to the binary scheduling matrix obtained by adopting the proposed random ST transfer function, general s-shaped transfer functions, t-shaped transfer functions, v-shaped transfer functions, etc. can also be used. However, a single or traditional transfer function will use a lot of conversion time, resulting in a waste of computing resources during task scheduling. Using a random ST-shaped transfer function, the time for converting the optimal solution into the optimal scheduling method during task scheduling can be reduced through the above steps, thereby reducing the response time of the computer system during scheduling.
[0293] The pseudo code of the SMRSTPO algorithm is as follows:
[0294] enter: , , , , , , , ,
[0295] Output: Global optimal individual ( ) and its fitness value ( )
[0296] 1 Initialize the population through Sinusoidal chaos map , and calculate the objective function value
[0297] 2for
[0298] 3 Generate new individuals through S23
[0299] 4if
[0300] 5
[0301] 6 end if
[0302] 7 Generate new individuals through S24
[0303] 8if
[0304] 9
[0305] 10 end if
[0306] 11end for
[0307] 12for
[0308] 13 if
[0309] 14 Use S23 to generate new individuals;
[0310] 15 if
[0311] 16
[0312] 17 end if
[0313] 18 if Exploration
[0314] 19 Update the best individual
[0315] 20 end if
[0316] 21else
[0317] 22 Generate new individuals through S24;
[0318] 23 if
[0319] twenty four
[0320] 25 end if
[0321] 26 if Exploitation
[0322] 27 Update the best individual
[0323] 28 end if
[0324] 29end if
[0325] 30 Updated through S31 and ;
[0326] 31end for
[0327] 32 Output the global optimal solution Its fitness value
[0328] In order to further illustrate the technical effect of SMRSTPO, simulation experiments were conducted. We analyzed the performance of the proposed SMRSTPO in solving the cloud resource scheduling problem and compared it with the ant colony optimization algorithm (ACO), particle swarm optimization algorithm (PSO), whale optimization algorithm (WOA), puma optimization algorithm (PO) and improved whale optimization algorithm (IWC). The description of the computing tasks and virtual machine parameters is shown in Table 1. Load cost, time cost (i.e., resource bandwidth cost), price cost and total cost are used as performance analysis indicators. The experimental conditions are set to a population size of 50 and a maximum number of iterations of 100.
[0329] We tested SMRSTPO's ability to handle task scheduling using 100 computing tasks. Figure 2 The simulation results are shown in Figure 2. Figure 2 It can be clearly seen in (a) that the total cost of SMRSTPO is reduced by more than 20% compared with PSO, WOA, and ACO, which shows that SMRSTPO has a strong optimization ability. In addition, compared with the powerful IWC, the total cost of SMRSTPO is also reduced by about 1%, which further shows that SMRSTPO has a more accurate solution. Figure 2 (b) It can be seen that SMRSTPO is always better than ACO, PSO, PO and WOA in terms of price cost, and after the 60th iteration, SMRSTPO is comparable to IWC in terms of price cost. Figure 2(c) It can be seen that in terms of load performance, SMRSTPO is much lower than ACO, PSO, WOA and PO, indicating that SMRSTPO has a stronger search ability.
[0330] Table 1. Virtual machine and computing task parameters
[0331] parameter Virtual Machine Scope Scope of Tasks Computational resource vector En [200,500] [10,50] Load cost vector Sn [100,500] [50,100] Resource bandwidth vector Cn [100,250] [20,50]
Claims
1. A cloud computing resource scheduling method based on enhanced Puma optimization algorithm, characterized in that: The following steps are involved: S1. Obtain the cloud task byte size vector and the computing resource vector, load cost vector, and resource bandwidth vector of the virtual machine, and then establish the following objective function that minimizes the total cost: (1) In formula (1), , and Respectively represent functions , and The weight of represents the time cost function; represents the load cost function; represents the resource bandwidth cost function; S2. Use the enhanced Puma optimization algorithm to optimize the objective function and obtain the optimal individual: S21. Initialize the original population using formula (5) to obtain the initialized original population : (5) In formula (5), Represents population Middle Location information of individuals; Represents the upper bound vector of the solution space; Represents the lower bound vector of the solution space; Indicates the generation of a A random number between S22, Initial , by judging and 4, if , then execute S23, otherwise jump to execute S28; where, Indicates the current iteration number; S23, updating individual positions through the exploration phase; S24, updating individual positions through the development phase; S25. Population , and Merge and take the previous individuals; among them, represents the original population after initialization, represents the new population after being updated in the exploration phase, represents the new population after being updated through the development phase; S26. Calculate the population and The optimal individual fitness and ,at the same time ; S27, calculate the The score of the exploration phase at iteration and development stage scores ; S28, if Then execute S29, otherwise execute step S33; wherein, represents the maximum number of iterations, and ; S29, update individual positions through the exploration phase; S30, updating individual positions through the development phase; S31, yes and Make updates; S32, , return to S28; S33, select the population at the last iteration The individual with the smallest objective function value is used as the scheduling method; S3, mapping the optimal individual obtained in S2 to a binary scheduling matrix, obtaining the task scheduling strategy through the scheduling matrix, and thus performing task scheduling; The binary scheduling matrix is represented as: , Among them, the matrix is the scheduling matrix; The matrices are The number of rows and columns; Indicates The task is It runs on multiple computing resources and stipulates that each task can only be calculated on one virtual machine; The optimal individual is mapped to a binary scheduling matrix by using a random ST-shaped transfer function to convert the optimal individual into a binary matrix for task scheduling, which is specifically expressed as the following formula: (34) In formula (34), represents the absolute value function, represents the tangent function, represents the optimal individual in the iterative process, Represents the matrix after transformation by a random ST-shaped transfer function.
2. The cloud computing resource scheduling method based on the enhanced Puma optimization algorithm according to claim 1 is characterized in that: The initialization population It also includes: using Sinusoidal chaotic mapping to update the initialized population: (30) In formula (30), To control the parameters; represents the sine function; Represents the original population after initialization The individual; Represents the individual after updating by Sinusoidal chaotic mapping.
3. The cloud computing resource scheduling method based on the enhanced Puma optimization algorithm according to claim 1 is characterized in that: In the development stage, the individual positions are updated and the intermediate point sample learning strategy is introduced to improve the development stage, which is specifically the following formula: (31) In formula (31), represents the new individuals updated in the development phase after the introduction of the intermediate point sample learning strategy; It represents the new individuals updated in the original development stage; represents the individual generated by the intermediate point sample learning strategy and is represented by the following formula: (32) In formula (32), Represents the updated population The first Individuals, Calculated by the following formula: (33) In formula (33), Indicates Individuals, represents the ceiling function, The interval is A random number between .
4. A cloud computing resource scheduling system based on enhanced Puma optimization algorithm, characterized in that: The system comprises: Data collection module: obtains the cloud task byte size vector and the computing resource vector, load cost vector and resource bandwidth vector of the virtual machine; Task scheduling module: optimize the objective function of minimizing the total cost through the enhanced Puma optimization algorithm to obtain the optimal individual; then map the optimal individual to the binary scheduling matrix, obtain the task scheduling strategy through the scheduling matrix, and then perform task scheduling; The binary scheduling matrix is represented as: , Among them, the matrix is the scheduling matrix; The matrices are The number of rows and columns; Indicates The task is It runs on computing resources and stipulates that each task can only be calculated on one virtual machine. The objective function of minimizing the total cost is: (1) In formula (1), , and Respectively represent functions , and The weight of represents the time cost function; represents the load cost function; represents the resource bandwidth cost function; The objective function of minimizing the total cost is optimized by the enhanced Cougar optimization algorithm to obtain the optimal individual, including: S21. Initialize the original population using formula (5) to obtain the initialized original population : (5) In formula (5), Represents population Middle Individual location information, represents the upper bound vector of the solution space, represents the lower bound vector of the solution space, Indicates that a A random number between S22, Initial , by judging and 4, if , then execute S23, otherwise jump to execute S28; where, Indicates the current iteration number; S23, updating individual positions through the exploration phase; S24, updating individual positions through the development phase; S25. Population , and Merge and take the previous individuals, among which represents the original population after initialization, represents the new population after being updated in the exploration phase, represents the new population after being updated through the development phase; S26. Calculate the population and The optimal individual fitness and ,at the same time ; S27, calculate the The score of the exploration phase at iteration and development stage scores ; S28, if Then execute S29, otherwise execute step S33; wherein, represents the maximum number of iterations, and ; S29, update individual positions through the exploration phase; S30, updating individual positions through the development phase; S31, yes and Make updates; S32, , return to S28; S33, select the population at the last iteration The individual with the smallest objective function value is used as the scheduling method; The optimal individual is mapped to a binary scheduling matrix by using a random ST-shaped transfer function to convert the optimal individual into a binary matrix for task scheduling, which is specifically expressed as the following formula: (34) In formula (34), represents the absolute value function, represents the tangent function, represents the optimal individual in the iterative process, Represents the matrix after transformation by a random ST-shaped transfer function.
5. The cloud computing resource scheduling system based on the enhanced Puma optimization algorithm according to claim 4 is characterized in that: The initialization population It also includes: using Sinusoidal chaotic mapping to update the initialized population: (30) In formula (30), To control the parameters; represents the sine function; Represents the original population after initialization The individual; Represents the individual after updating by Sinusoidal chaotic mapping.
6. The cloud computing resource scheduling system based on the enhanced Puma optimization algorithm according to claim 4, characterized in that: In the development stage, the individual positions are updated and the intermediate point sample learning strategy is introduced to improve the development stage, which is specifically the following formula: (31) In formula (31), It represents the new individuals updated in the original development stage; represents the individual generated by the intermediate point sample learning strategy and is represented by the following formula: (32) In formula (32), Represents the updated population The population after being sorted in ascending order by its fitness value, Calculated by the following formula: (33) In formula (33), Indicates Individuals, represents the ceiling function, The interval is A random number between .
7. A computer device comprising a processor and a memory for storing a program executable by the processor, characterized in that: When the processor executes the program stored in the memory, the method of claim 1 is implemented.
8. A readable storage medium storing a program, characterized in that: When the program is executed by a processor, the method according to claim 1 is implemented.
Citation Information
Patent Citations
Super-heuristic task scheduling method and system based on reinforcement learning in cloud environment
CN113448687A
Resource scheduling method and device, computer equipment and computer readable storage medium
CN116954815A
Cloud resource scheduling method based on enhanced growth optimizer
CN118210603A
Method, system and product to implement deterministic on-boarding and scheduling of virtualized workloads for edge computing
US20200296155A1
Cited By
Job resource consumption pattern analysis method based on BWO and clustering algorithm
CN118779197A
Cloud task model method of high-precision artificial neural network optimization algorithm
CN119003135A
Cloud computing task scheduling method based on improved hiking optimization algorithm
CN119292754A
A cloud computing task scheduling method based on improved hiking optimization algorithm
CN119292754B
Cloud computing task scheduling method and device, electronic equipment and storage medium
CN119402556A
