Three-stage cloud computing resource scheduling method and system

Through the three-stage cloud computing resource scheduling method, combined with TOPSIS and PRLCC-C algorithms, the complexity and high computing complexity problems in cloud computing resource scheduling are solved, and the efficient, energy-saving and balanced allocation of resources are achieved to meet different user needs.

CN120386628APending Publication Date: 2025-07-29QILU UNIVERSITY OF TECHNOLOGY (SHANDONG ACADEMY OF SCIENCES) +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510508918.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-22
Publication Date
2025-07-29

AI Technical Summary

Technical Problem

The existing cloud computing resource scheduling methods are difficult to achieve efficient, energy-saving and balanced resource allocation when facing the huge device scale, complex application scenarios and unpredictable user requests. The computational complexity of reinforcement learning methods is high, and it is difficult to take into account the inconsistency of user optimization indicators.

Method used

The three-stage cloud computing resource scheduling method is adopted, including data center scheduling, service node scheduling and container scheduling strategies, and the TOPSIS algorithm and PRLCC-C algorithm are used to optimize resource allocation, combined with reinforcement learning and metaheuristic methods, and resource scheduling is achieved through multi-objective optimization and trade-offs.

Benefits of technology

The allocation of cloud computing resources has been optimized, resource utilization has been improved, computing complexity has been reduced, and it can flexibly adapt to the optimization goals of different users, taking into account multiple contradictory optimization goals, achieving load balancing and energy consumption optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120386628A_ABST
    Figure CN120386628A_ABST
Patent Text Reader

Abstract

The invention relates to a three-stage cloud computing resource scheduling method and system, and belongs to the technical field of cloud computing. Comprising the following steps: step 1, data center scheduling: firstly, sorting data centers; then, all the data centers are checked in sequence, and priorities of the data centers are calculated; finally, the tasks are mapped to a data center; step 2, service node scheduling; when the task is mapped to the data center; the method comprises the following steps: firstly, comprehensively considering energy consumption, cost and container starting rate, and evaluating and sequencing service nodes contained in a data center; then, the priority of the task on each service node is calculated in sequence; and finally, mapping the task to a proper service node. Step 3, obtaining a container scheduling strategy: after the task is mapped to a server node, transferring the task into a task queue, assigning the scheduling strategy, and outputting the container scheduling strategy through continuous iterative updating; and finally, carrying out resource scheduling according to the output container scheduling strategy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of cloud computing, and relates to a three-stage cloud computing resource scheduling method and system. Background Art

[0002] With the development of cloud native technology and containerization technology, the proportion of containerized jobs submitted by users to the cloud system is increasing. This requires formulating more reasonable cloud computing resource scheduling strategies and more efficient, energy-saving, and balanced methods to schedule tasks. Considering the characteristics of a large scale of devices, complexity of application scenarios, unpredictability of user requests, etc. in cloud computing, it is increasingly difficult to achieve reasonable allocation of computing resources in a complex environment simply through traditional heuristic algorithms.

[0003] Currently, common strategies for solving cloud computing resource management include multi-stage methods, virtual machine migration, queuing models, service migration, workload migration, task migration, and scheduling algorithms of schedulers. Among them, the key to solving the management and scheduling of cloud computing resources is the design of a scheduler based on a scheduling algorithm. The scheduling problem in a cloud computing system is usually an NP-complete problem (non-deterministic polynomial time complete problem) or an NP-hard problem without a polynomial time algorithm, unless NP = P. Currently, methods for solving such problems include dynamic programming, probabilistic algorithms, heuristic algorithms, meta-heuristic algorithms, hybrid algorithms, and machine learning. Since the machine learning method has good performance in solving complex cloud computing scenarios, the machine learning method is combined with the meta-heuristic method to seek better management and scheduling of cloud computing resources and lower computational costs.

[0004] There are some problems with the current mainstream cloud computing scheduling solutions and research directions, mainly including: First, the current cloud computing environment has characteristics such as a large scale of devices, complex application scenarios, and unpredictability of user requests, and the current mainstream scheduling methods are relatively difficult to handle. Second, the current mainstream methods studied, such as using reinforcement learning to achieve scheduling, have a high computational complexity and require a large amount of computing resources. Third, with the complexity of the cloud computing environment, the needs of users are also diverse, and the metrics that users want to optimize are not the same. The above problems are also the directions that the present invention wants to improve. Summary of the Invention

[0005] In view of the deficiencies of the prior art, the present invention provides a three-stage cloud computing resource scheduling method; First, when a user submits a job to the cloud computing system, the types of submitted jobs include single-task jobs without dependencies and DAG jobs with complex dependencies between multiple tasks. The job includes a job id, a task id, the number of instruction lines to execute to complete the task , the input and output file sizes , and the deadline of the task After receiving the jobs submitted by users, the cloud computing system will put these jobs into the job queue Then, the tasks in the queue that have no pre - dependency tasks and are in the ready state are put into the task queue to wait for scheduling. The data center scheduler takes the tasks in the task queue and schedules each task to the appropriate one of the L data centers. Then, the server (node) scheduler on each data center schedules the tasks on that data center to the appropriate one of the M servers. Finally, the container scheduler on each server schedules the tasks on that server to the appropriate one of the N containers. Through the above three - stage process, the reasonable scheduling of tasks in cloud computing is achieved, optimizing indicators such as computing cost, load balancing, and energy consumption.

[0006] The present invention provides a three - stage cloud computing resource scheduling system.

[0007] The technical solution of the present invention is as follows: The present invention provides a three - stage cloud computing resource scheduling method, where tasks are submitted into the task queue and it includes: Step 1: Data center scheduling: First, sort the data centers; then, view all data centers in order and calculate the priority of the tasks in the task queue in this data center; finally, map the tasks to the data center; Step 2: Service node scheduling; After the tasks are mapped to the data center, transfer the tasks to the task queue ; First, comprehensively consider energy consumption, cost, and container startup rate to evaluate and sort the service nodes included in the data center; then, calculate the priority of the tasks in on each service node in order; finally, map the tasks to the appropriate service nodes; Step 3: Obtain the container scheduling policy: After the tasks are mapped to the server nodes, transfer the tasks to the task queue , specify the scheduling policy, and after continuous iterative update, finally output the container scheduling policy; Finally, perform resource scheduling according to the output container scheduling policy.

[0008] According to the preference of the present invention, in Step 1, during the process of sorting the data centers, the TOPSIS algorithm is used to sort the data centers by comprehensively considering energy consumption, computing cost, and load balancing.

[0009] Further preferably, the energy consumption of container j This includes the energy consumption when the CPU is idle and the energy consumption when the CPU is performing computing tasks. The calculation formula is as follows: ; For data centers , data center Energy consumption It's the data center The sum of the energy consumption of all included containers is calculated as follows: ; in, and It is the energy consumption of CPU idle time and the energy consumption of CPU performing computing tasks per unit time. is the CPU idle time of container j, is the time that the CPU of container j executes tasks, Indicates data center The maximum number of containers that can be started; Calculate costs Including CPU computing cost and memory usage cost, the calculation formula is as follows: ; in, It is a task i The execution time in container j, It is a task i The memory required, and It is the price of using CPU and memory per unit time; data center The average computational cost of The calculation formula is as follows: ; In the e-time data center Load balancing The calculation method is as follows: ; in, Indicates data center Including the variance of the container startup rate of each service node, the number of container startups of the service node As shown below: ; ; in, It represents the container startup rate of service node n, and N represents the maximum number of containers that can be started by service node n.

[0010] Preferably according to the present invention, calculate the priority of tasks in the task queue in this data center; including: First, construct a decision matrix D: ; Among them, the decision matrix D is a matrix with m rows and n columns. Each row represents a solution, that is, a data center; each column represents an evaluation metric, including: energy consumption, computing cost, and load balancing; After obtaining the decision matrix D, standardize each element in the decision matrix D according to the following formula to obtain the standardized decision matrix ND, as shown below: ; Among them, represents the value of the jth index shown after mapping the task to the ith data center; Then, set a weight for each index, satisfying , and obtain the weighted normalized decision matrix WND through ; According to determine the worst solution and the optimal solution : The worst solution refers to the set of the worst values of each index; the optimal solution refers to the set of the best values of each index; as shown below: ; ; Calculate the distance ratio of each solution to the optimal solution and the worst solution according to the n-dimensional Euclidean distance; as shown below: ; ; Among them, represents the distance ratio of the allocation solution to the optimal solution, represents the distance ratio of the allocation solution to the worst; Finally, calculate the closeness C of each strategy to the ideal strategy, specifically as follows: ; After calculating the closeness of each data center, sort all data centers in descending order of closeness and view all data centers in order; The formula for feasibility is as follows: ; Among them, , is a matrix, where T represents the number of tasks in , and each element of the matrix is obtained based on the execution time, as follows: ; Among them, represents the number of instruction lines to be executed to complete the task, represents the CPU speed of container j, with the unit of MIPS (millions of instructions executed per second). Then, the formula for determining the priority is as follows: ; Among them, is the priority of computing task i in the data center ; Tasks are mapped to data centers, specifically including: sorting data centers using the TOPSIS algorithm, checking the priority of each task on this data center, and mapping the current task to the data center with the highest priority.

[0011] According to the preference of the present invention, in step 2, considering energy consumption, cost, and container startup rate comprehensively, evaluate and sort the service nodes included in the data center; First, for service node n, the energy consumption index of service node n is the sum of the energy consumptions of all containers it includes : ; Among them, is the energy consumption of container j per unit time; Then, compare the overall situation of and of the containers included in the computing node, and adopt the following processing: ; Among them, and are the costs of using CPU and memory per unit time, and N is the number of service nodes; Finally, the calculation method of the container startup rate is specifically as follows: ; Among them, represents the number of containers in working state of service node n at time e; Evaluate and sort each service node. After the sorting is completed, view all service nodes in order. When viewing, calculate the priority of the tasks in and map the current task to the service node with the highest priority.

[0012] Preferably according to the present invention, in step 3, a container scheduling policy is obtained through the PRLCC-C algorithm, including: The first part: Initialize the population, evaluate each individual in the population, and select two optimal solutions as the parent crows; First, each individual in the initialized population represents a potential solution, that is, each row represents a solution, also known as the behavior of the individual. The defined population is shown as follows: ; Among them, C ij represents the j-th attribute of the behavior C i of crow i. The population is initialized using the chaotic initialization method as follows: ; Among them, and are the lower and upper limits of the i-th crow respectively, is the chaotic parameter of the j-th attribute of crow i, is a random number between 0 and 1; Then, the behavior of each crow in the population is evaluated through the fitness function. The fitness function is as follows: ; Determine two optimization objectives: The first optimization objective is the maximum step size, as shown in the following formula: ; Among them, is the execution time required on container j after task i is mapped to container j, represents all tasks mapped to container j; The first optimization objective is resource utilization : ; Among them, represents the processing time of task i on the j-th container; The fitness evaluation function is shown as follows: ; Among them, are all values of the evaluation crow individual index L, is the value of the i-th individual, is the normal value of the i-th crow. Mapping to between 0 and 1 is the fitness of the i-th crow; Obtained through calculation Mapping to between 0 and 1 is ; Finally, determine the parent crows: After evaluating the behavior of each crow through the fitness evaluation function, the crow population is divided into two categories. The division method is to arrange the entire crow population in descending order of fitness from high to low. The crows with the highest fitness, that is, the top two crows, are the parent crows, and the rest are the offspring crows; The first category is the parent crows, which are the two crows with the best fitness and are the closest to the optimal strategy in the population; The second category is the offspring crows; Second part: Each offspring crow improves its behavior by adopting four behaviors: Exploration, Exploitation, High Asocial Learning - Low Social Learning (HASO - LSO), and High Social Learning - Low Asocial Learning (HSO - LASO). Each of these four behaviors includes two sub - behaviors, namely asocial learning and social learning; For social learning, first, calculate the maximum number of advantages provided by each parent crow; Then, calculate the amount of knowledge (maximum advantages) that the offspring crow obtains from the parent crow according to consciousness; Further preferably, first, calculate the maximum number of advantages provided by each parent crow; Then, calculate the amount of knowledge that the offspring crow obtains from the parent crow according to consciousness; including: First, define the position of crow individual i at time t as C i (t), and the learning rate of offspring b towards the i - th parent at time t is denoted as Lr(C b ,C pi ). Use Lr( , ) to represent the learning rate generated by the i - th parent crow. The calculation method is as follows: ; Among them, C is the confidence constant, and its value is lower than all possible fitness values, represents the i - th parent crow; The distance between offspring crow b and parent crow i The calculation method is as follows: ; Among them, represents the b - th offspring crow; The learning rate between offspring b and parent i is as follows: ; Among them, represents the standard deviation of all offspring crows on each attribute, Controls the degree of attenuation of the learning rate as the distance increases, The changes of include two types: and ; Starting from low attenuation, it increases with iteration, and starting from high attenuation, it decreases with iteration. Among them, t and represent the current iteration and the maximum number of iterations respectively; The young birds learn from their parents according to their own consciousness and the advantages of their parents. The amount of knowledge obtained by the young crows from the parent crows is as follows: ; Among them, r1 and r2 are two random weight factors used to adjust the learning intensity when the young crows learn from two parent crows, represents the i-th crow, represents the learning rate when the young crow b learns from the parent crow i at time t; For non-social learning, a random value is added to each dimension of the crow to control the search steps during the entire iteration process; specifically as follows: ; Among them, and represent the minimum boundary and the maximum boundary of the search space respectively, is a random number from 0 to 1; or ; Among them, the two realize two opposite changes in the exploration step length, namely, the long step length starts to become shorter with iteration and the short step length starts to become longer with iteration. t and represent the current iteration and the maximum number of iterations respectively; Use the reinforcement learning method to enable the crow to reasonably adopt learning behaviors. Take the crow individual as the agent of reinforcement learning (RL). Regard the solution space for searching for solutions and the current behavior of the crow as the environment and state. The action is that the crow changes from one state to another. The behavior of the crow is composed of four activities of social learning and non-social learning, namely exploration, exploitation, high non-social learning and low social learning, and high social learning and low non-social learning. The four activities are divided into two categories, including global search and local search; global search includes: exploration, high non-social learning and low social learning, which are responsible for exploring the unknown solution space and increasing the diversity of solutions; local search includes: exploitation, high social learning and low non-social learning, which are responsible for exploring the area near the optimal solution; In social learning and non-social learning, for the variables σ and r aSet different values to control the learning step size and attenuation, and implement four activities. Develop non-social learning including long-step search and social learning with high attenuation; explore non-social learning with short step sizes and social learning with low attenuation; high non-social learning and low social learning include long-step non-social learning and low-attenuation social learning, and high social learning and low non-social learning include short-step non-social learning and high-attenuation social learning; After the crow takes four activities, according to the resulting outcome, the offspring crow obtains a reward value. The reward value is divided into two categories. One is the reward RW1 for the activities of global search (exploration and HASO-LSO), and the other is the reward RW2 for the local search activities (development and HSO-LASO). These two rewards guide the offspring crow to update the Q-table and the selection of the next activity; the calculation of the two reward values is as follows: ; ; where r1 and r2 are random numbers, represents the difference between the new attribute and the previous one, represents the exploration of the solution space by the crow, and the calculation formula is as follows: ; ; where, represents the average fitness value of attribute j, t represents which iteration is the current one, represents at time step the fitness value of the th crow (or solution), r is a random value between 0 and 1; the learning factor is used for the balance between exploration and development of the algorithm, and the calculation formula is as follows: ; where, and are respectively the minimum value and the minimum value of the factor, is the learning factor, which is used for the balance between exploration and development of the algorithm, and t and max_t represent the current iteration and the maximum number of iterations respectively; ; ; ; where, is the learning rate, Indicates the immediate reward obtained. When the fitness of the crow increases, it is 1; otherwise, it is -1. Indicates the reward values obtained from the two learning behaviors of the offspring crows and , and respectively indicate that the offspring crow selects high non-social learning, low social learning or exploration behavior, and the offspring crow selects high social learning, low non-social learning or exploitation behavior, while indicates to select the sub-activity of the main activity that maximizes the fitness of the offspring crow; After completing the Q-table update, the update of the offspring crows means: calculating to replace the in the Q-table; Part Three: Update the parent crows respectively through the following formulas, specifically as follows: ; Among them, represents the behavioral characteristic value of the th parent crow on the jth attribute at the tth iteration, represents the behavioral characteristic value of the first parent crow, which is also the crow with the highest fitness, on the jth attribute at the tth iteration, represents the average value of all crows on the jth attribute, that is, the average behavior of the population on the jth attribute, represents the index of the parent crow, which is 1 or 2, representing two different parent crows respectively. r1 and r2 are random numbers between 0 and 1; Part Four: Combine the updated parent and offspring crows into a new population; Part Five: Evaluate the new population generated in the previous part, including: calculating the fitness of each crow in the new population through the fitness function, sorting them from high to low according to the fitness, the two individuals with the highest fitness are used as parent crows, and the rest are offspring crows, and determine the parent and offspring in this population; Repeat from Part Two to Part Five until the algorithm reaches the maximum number of iterations. Finally, the crow with the highest fitness in the obtained crow population is used as the container scheduling strategy for this stage.

[0013] A three-stage cloud computing resource scheduling system, including: A data center scheduling module, configured to: First, sort the data centers; then, view all data centers in order and calculate the priorities of the tasks in the task queue in this data center; finally, map the tasks to the data centers; The service node scheduling module is configured to: after a task is mapped to a data center, transfer the task to a task queue ; First, comprehensively consider energy consumption, cost, and container startup rate, and evaluate and sort the service nodes included in the data center; then, calculate in sequence the priorities of the tasks in each service node; finally, map the tasks to appropriate service nodes; The container scheduling policy acquisition module is configured to: after a task is mapped to a server node, transfer the task to a task queue , specify a scheduling policy, and after continuous iterative update, finally output a container scheduling policy; The resource scheduling module is configured to: finally perform resource scheduling according to the output container scheduling policy.

[0014] The beneficial effects of the present invention are as follows: 1. The present invention optimizes the allocation of cloud computing resources through a three-stage scheduling method, improving resource utilization.

[0015] 2. Due to the scheduling framework of the present invention, the present invention is relatively flexible and can be applied to usage scenarios with different optimization goals for different users.

[0016] 3. The present invention uses a relatively simple policy scheduling method in the first two stages, so it can reduce the computational complexity to a certain extent compared with the classification method using reinforcement learning.

[0017] 4. The present invention can also take into account multiple optimization goals, weigh conflicting optimization goals, and make the scheduling scheme as reasonable as possible. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 is a flowchart of a three-stage cloud computing resource scheduling method of the present invention; Figure 2 is a main flowchart of the present invention based on parallel reinforcement learning of Caledonian crows and adding a chaotic initialization method; Figure 3 is a schematic diagram of the update method of young crows of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0019] The present invention will be further described below through embodiments in conjunction with the drawings, but is not limited thereto.

[0020] Embodiment 1 The present invention provides a three-stage cloud computing resource scheduling method, submitting a task into a task queue ; As Figure 1 shown, it includes: Step 1: Data center scheduling: Using the TOP-PR scheduling algorithm, when a task enters QueueT, it will be assigned to a data center through the following three steps; First, use the TOPSIS algorithm to sort the data centers; then, view all the data centers in order and calculate the priority of the tasks in the task queue in this data center; finally, map the task to the data center; Step 2: Service node scheduling; After the task is mapped to the data center, transfer the task to the task queue ; Adopt the same algorithm TOP-PR as the previous step: First, use the TOPSIS algorithm to comprehensively consider energy consumption, cost, and container startup rate to evaluate and sort the service nodes included in the data center; then, calculate the priority of the tasks in each service node in order ; finally, map the task to the appropriate service node; Step 3: Obtain the container scheduling policy: After the task is mapped to the server node, transfer the task to the task queue , use the PRLCC-C algorithm to specify the scheduling policy, and after continuous iterative update, finally output the container scheduling policy; Finally, perform resource scheduling according to the output container scheduling policy.

[0021] Example 2 A three-stage cloud computing resource scheduling method according to Example 1, wherein: In Step 1, during the process of sorting the data centers, since it is considered that using the data center scheduler is to reduce the energy consumption of the cloud computing system, reduce the scheduling cost, and maximize the utilization of computing resources as much as possible, the TOPSIS algorithm is used to comprehensively consider energy consumption, computing cost, and load balancing to sort the data centers. Let tasks with higher priorities have a greater probability of being mapped to data centers that perform better and are ranked higher in the TOPSIS algorithm.

[0022] The energy consumption of container j includes the energy consumption when the CPU is idle and the energy consumption when the CPU executes computing tasks. The calculation formula is as follows: ; Then, for the data center , the energy consumption of data center is the sum of the energy consumption of all the containers included in data center , and the calculation formula is as follows: ; Among them, and are the energy consumption when the CPU is idle per unit time and the energy consumption when the CPU executes computational tasks, is the time when the CPU of container j is idle, is the time when the CPU of container j executes tasks, represents the data center the maximum number of containers that can be started; In the present invention, when a task is executed in a container, a certain fee must be paid to it. The calculation cost here includes the computational cost of the CPU and the usage cost of the memory. The calculation formula is as follows: ; Among them, is the time when task Task i is executed in container j, is the task Task i needs to occupy the memory, and are the prices of using the CPU and memory per unit time; To measure the performance of the data center in terms of calculation cost, it is necessary to compare the and overall situation of the data center average calculation cost The calculation formula is as follows: ; The load balancing of the data center is an important indicator to measure whether the scheduling of a cloud computing system (platform) is reasonable. It shows whether the tasks are evenly distributed on all service nodes in the data center. At time e, the data center load balancing The calculation method is as follows: ; Among them, represents the variance of the container startup rates of each service node included in the data center. The number of containers started by the service node will be used as an important indicator to evaluate the service node in the scheduling of step 2, as follows: ; ; Among them, represents the container startup rate of service node n, and N represents the maximum number of containers that service node n can start.

[0023] Calculate the priority of the tasks in the task queue in this data center; including: First, construct the decision matrix D: ; Among them, the decision matrix D is an m×n matrix, where each row represents a solution, i.e., a data center; each column represents an evaluation metric, including: energy consumption, computing cost, and load balancing; After obtaining the decision matrix D, each element in the decision matrix D is processed by normalization according to the following formula to obtain the normalized decision matrix ND, as shown below: ; Among them, represents the value of the jth metric shown after mapping the task to the ith data center; Then, a weight is set for each metric, which can be the same or different, but the set value satisfies , and through the weighted normalized decision matrix WND is obtained; According to determine the worst solution and the optimal solution : The worst solution refers to the set of the worst values of each metric; the optimal solution refers to the set of the best values of each metric; as shown below: ; ; Here, the present invention considers three metrics, so n = 3. In order to find the optimal scheduling strategy, it is required that the scheduler can achieve low energy consumption, low cost, and load balancing scheduling. Therefore, these three metrics should be minimized , and ; Calculate the distance ratio of each solution to the optimal solution and the worst solution according to the n-dimensional Euclidean distance; as shown below: ; ; Among them, represents the distance ratio of the allocation solution to the optimal solution, represents the distance ratio of the allocation solution to the worst solution; Finally, calculate the closeness C of each strategy to the ideal strategy, specifically as follows: ; In the present invention, after calculating the closeness of each data center, all data centers are sorted in descending order of closeness, and all data centers are viewed in sequence; when viewing each data center, calculate the priority of the tasks in The calculation of the priority of task i in data center is based on the feasibility of this task. The calculation formula of feasibility is as follows: ; where , is a matrix, T represents the number of tasks in, and each element of the matrix is obtained based on the execution time, as follows: ; where represents the number of instruction lines required to complete the task, represents the CPU speed of container j, with the unit of MIPS (millions of instructions executed per second). Then the formula for determining the priority is as follows: ; where is the priority of computing task i in data center ; Mapping tasks to data centers specifically includes: using the TOPSIS algorithm to sort data centers, viewing the priority of each task on this data center, and mapping the current task to the data center with the highest priority. Tasks with higher priorities have a greater probability of being mapped to this data center. Here, the probability is to map the range of all task priorities on this data center to the range of 0 to 1.

[0024] In step 2, since the goal of the present invention is to find a reasonable scheduling strategy to achieve the purpose of reducing the energy consumption and computing cost of the cloud computing system and making the cloud computing system load - balanced, the TOPSIS algorithm is used to select indicators such as energy consumption, cost, and container startup rate to sort service nodes. The overall process of the TOPSIS algorithm is the same as that in step 1, except that the evaluation indicators are changed to energy consumption, cost, and container startup rate; Using the TOPSIS algorithm, comprehensively considering energy consumption, cost, and container startup rate, evaluate and sort the service nodes included in the data center; First, the setting of energy consumption is also the same as in step 1. Then, for service node n, the energy consumption index of service node n is the sum of the energy consumption of all containers it includes : ; Among them, is the energy consumption of container j per unit time; Then, the setting in terms of cost is also the same as in Step 1. To measure the pros and cons of the computing nodes in terms of computing cost, it is necessary to compare the and of the containers included in the computing nodes. The following processing is adopted: ; Among them, and are the costs of using CPU and memory per unit time, and N is the number of service nodes; Finally, load balancing is one of the optimization objectives of the present invention. Different from Step 1, Step 2 uses the container startup rate to measure. This indicator shows the number of containers in a startup state among the containers included in a service node. This indicator can illustrate the load situation of the service node from the side. When this value is too high, it means that the load of this service node is too large and it is not suitable to map tasks to this data node anymore. On the contrary, when it is too low, it means that the utilization rate of this service node is insufficient and more tasks should be mapped to this node. The calculation method of the container startup rate is as follows: ; Among them, represents the number of containers in the working state of service node n at time e; Each service node is evaluated and sorted. The only difference from Step 2 is that the index to be minimized here is , and . After sorting is completed, all service nodes are viewed in order. When viewing, calculate the priority of the tasks in , and map the current task to the service node with the highest priority.

[0025] Evaluating and sorting each service node specifically means: using the TOPSIS algorithm, using , and these three indicators to construct a decision matrix. Among them, each row of the decision matrix is these three indicators after a task is assigned to a service node. Then, a weighted normalized decision matrix is obtained. For each row (or the indicators of each task node), calculate the distance ratios from the worst solution and the optimal solution , and then calculate the closeness degree through the distance ratios. Finally, the task nodes are sorted in descending order according to the closeness degree.

[0026] In step 3, the method used is based on Parallel Reinforcement Learning Caledonian Crows (PRLCC) and incorporates a chaotic initialization method called PRLCC-C. This method is derived from the standard New Caledonian Crow Algorithm (NCCLA). For the NCCLA algorithm, since most decision variables are randomly set, it is prone to premature convergence and the problem of unreasonable exploration of the search space, resulting in the NCCLA algorithm sometimes being unable to find the global optimal solution. Considering the deficiencies of NCCLA, the present invention uses PRLCC-C, which improves the social and non-social learning parts of the NCCLA algorithm and uses parallel technology with reinforcement learning to reduce the computation time and balance the exploration and exploitation phases respectively. Moreover, when initializing the population, the chaotic initialization method is used to enhance population diversity, which is beneficial to avoiding local optima. The container scheduling policy is obtained through the PRLCC-C algorithm; including: after the tasks are mapped to the service nodes, these tasks are transferred to the task queue , and then the PRLCC-C algorithm is used to specify the scheduling policy. In the PRLCC-C algorithm, each crow individual is a container scheduling policy, and the characteristics of each individual are which container should be assigned to all the tasks in . After continuous iterative updates, the finally output is the container scheduling policy; including: The first part: Initialize the population, evaluate each individual in the population, and select two optimal solutions as the parent crows; First, for initialization, like other metaheuristic algorithms, each individual in the initialized population represents a potential solution, that is, each row represents a solution, also known as the behavior of the individual. The defined population ; where, C ij represents the j-th attribute of the behavior C i of crow i. The population is initialized using the chaotic initialization method as shown in the following formula: ; where, and are the lower and upper limits of the i-th crow respectively, is the chaotic parameter of the j-th attribute of crow i, and the value range of r is: 3.57 - 4. The mapping shows chaotic behavior, and its value is usually set to 4, is a random number between 0 and 1; Then, the behavior of each crow in the population is evaluated through the fitness function. The fitness function is as follows: ; Determine two optimization objectives: The first optimization objective is the maximum step size, as shown in the following formula: ; where, is the execution time required on container j after task i is mapped to container j, represents all tasks mapped to container j; The first optimization objective is resource utilization : ; where, represents the processing time of task i on the j-th container; Fitness evaluation function is as follows: ; where, are all values of the evaluation index L of the crow individuals, is the value of the i-th individual, is the normal value of the i-th crow. Mapping to between 0 and 1 is the fitness of the i-th crow; The obtained by calculation, mapping it to between 0 and 1 is ; Finally, determine the parent crows: After evaluating the behavior of each crow through the fitness evaluation function, the crow population is divided into two categories. The division method is to sort the entire crow population in descending order according to fitness. The crows with the highest fitness, that is, the top two crows, are the parent crows, and the rest are the offspring crows. The first category is the parent crows, which are the two crows with the best fitness, indicating that these two crows are the solutions in the population that are closest to the optimal strategy; they are the most potential. The second category is the offspring crows; these crows have relatively poor fitness compared to the parent crows, indicating that these solutions are far from the optimal strategy, and they will improve themselves by obtaining experience from the parent crows or by trial and error on their own; The second part: Each offspring crow improves its behavior by adopting four behaviors: Exploration, Exploitation, High Asocial Learning - Low Social Learning (HASO - LSO), and High Social Learning - Low Asocial Learning (HSO - LASO), so that it is closer to the optimal strategy. These four behaviors all include two sub - behaviors, namely asocial learning and social learning; they guide the offspring crows to explore the solution space with an appropriate step size; For social learning, PRLCC - C pursues a way that each offspring crow learns from the parent crows according to its own advantages. The advantage refers to the information of the solution represented by the crow's behavior, and this value is related to the fitness of the crow. The main process is: First, calculate the maximum number of advantages provided by each parent crow; then, calculate the amount of knowledge (maximum advantages) obtained by the offspring crow from the parent crow according to its awareness. Here, awareness is used to describe the degree of recognition of the offspring crow towards the parent crow. A high awareness level means that the offspring crow pays more attention to the parent crow and is more inclined to learn from them. Awareness is related to the proximity, visibility of the parent crow or the degree of association with the offspring crow; First, calculate the maximum number of advantages provided by each parent crow; then, calculate the amount of knowledge obtained by the offspring crow from the parent crow according to its awareness; as Figure 3 shown, including: First, define the position of crow individual i at time t as C i (t). The learning rate of offspring b from the i-th parent at time t is denoted as Lr(C b ,C pi ). Denote the learning rate generated by the i-th parent crow with Lr( , ). The calculation method is as follows: ; where C is a confidence constant, and its value is lower than all possible fitness values, denotes the i-th parent crow; The distance between offspring crow b and parent crow i is calculated as follows: ; where, denotes the b-th offspring crow; The learning rate between offspring b and parent i is as follows: ; where, denotes the standard deviation of all offspring crows on each attribute, which is used here to measure the distribution of offspring crows in the solution space, controls the degree of attenuation of the learning rate as the distance increases. If the distance between individuals increases, the learning rate will decrease according to the value, which reflects that the farther the distance, the less knowledge can be learned from other individuals. The change of and includes two types: starting from low attenuation and increasing with iterations and starting from high attenuation and decreasing with iterations. Among them, t and represent the current iteration and the maximum number of iterations respectively; The young birds learn from their parents based on their own consciousness and the advantages of their parents. The specific amount of knowledge obtained by the young crows from the parent crows is as follows: ; where r1 and r2 are two random weight factors, and their values are usually between 0 and 1, which are used to adjust the learning intensity when the young crows learn from two parents. represents the i-th crow, represents the learning rate when the young crow b learns from the parent crow i at time t; these factors introduce the randomness of the algorithm, which helps to increase the diversity of the population and avoid premature convergence; The maximum number of advantages provided by the parent crows is related to the fitness Here, it is not necessary to calculate the specific value. The formula can reflect the maximum number of advantages provided by the parent crows, but its specific value is not required in this update process. The maximum number of advantages provided by the parent crows is only used to describe the process of the young crows learning from the parent crows in the update process. The reflection of consciousness in the update process is the distance between the young crow b and the parent crow i , and the amount of knowledge obtained by the young crow from the parent crow .

[0027] For non-social learning, the main purpose of this part is to enable the crow individuals to escape from possible local optimal solutions and enhance their search ability. The main idea is to explore the solution space with different step sizes at different stages of the young crow iteration, so that a large range and fineness of exploration can be achieved. A random value is added to each dimension of the crow to control the search steps in the whole iteration process; specifically as follows: ; where, and represent the minimum boundary and the maximum boundary of the search space respectively, is a random number from 0 to 1; or ; Among them, the two realize two opposite changes in the exploration step sizes, namely, the long step size starts to become shorter with the iteration and the short step size starts to become longer with the iteration. t and represent the current iteration and the maximum number of iterations respectively; In the present invention, in order to balance exploration and exploitation, a reinforcement learning method is used to enable crows to reasonably adopt learning behaviors. Taking an individual crow as an agent for reinforcement learning (RL), the solution space for searching solutions and the current behavior of the crow are regarded as the environment and state, and the action is for the crow to change from one state to another. The behavior of the crow consists of four activities composed of social learning and non-social learning, namely exploration, exploitation, high non-social learning and low social learning, and high social learning and low non-social learning. The four activities are divided into two categories, including global search and local search; global search includes: exploration, high non-social learning and low social learning, which are responsible for exploring the unknown solution space and increasing the diversity of solutions; local search includes: exploitation, high social learning and low non-social learning, which are responsible for exploring the area near the optimal solution to improve the accuracy of the algorithm; In social learning and non-social learning, different values are set for the variables σ and r a to control the learning step size and attenuation and implement the four activities. Exploitation includes non-social learning with a long step size search and social learning with a high attenuation; exploration includes non-social learning with a short step size and social learning with a low attenuation; high non-social learning and low social learning include non-social learning with a long step size and social learning with a low attenuation, and high social learning and low non-social learning include non-social learning with a short step size and social learning with a high attenuation; After the crow adopts the four activities, according to the results generated, the young crows obtain a reward value. The reward value is divided into two categories. One is the reward RW1 for the global search activities (exploration and HASO-LSO), and the other is the reward RW2 for the local search activities (exploitation and HSO-LASO). These two rewards guide the young crows to update the Q-table and the selection of the next activity; the Q-table is to calculate the benefits after each young crow selects various learning behaviors according to the following formula, that is, from the following shown, and then the Q-values of all the young crows in the population adopting various learning behaviors are gathered together to form the Q-table. Of course, at the beginning, all the Q-values in the Q-table are 0; the calculations of the two reward values are as follows: ; ; where r1 and r2 are random numbers to avoid the strategy falling into a local optimum, represents the difference between the new attribute and the previous one, represents the exploration of the solution space by the crow, and the calculation formula is as follows: ; ; Among them, represents the average fitness value of attribute j, and t represents the number of the current iteration, represents at the time step when, the The fitness value of a crow (or solution), r is a random value between 0 and 1; the learning factor is used for the balance between exploration and exploitation of the algorithm, and the calculation formula is as follows: ; Among them, and are respectively the minimum value and the minimum value of the factor, is the learning factor, which is used for the balance between exploration and exploitation of the algorithm. t and max_t respectively represent the current iteration and the maximum number of iterations; Select the operation to be executed according to the Q-table. After execution, calculate the fitness, and then obtain an immediate reward to update the Q-table: ; ; ; Among them, is the learning rate, represents the obtained immediate reward. When the fitness of the crow increases, it is 1, otherwise, it is -1; represents the reward values obtained from the two learning behaviors of the offspring crow and , and respectively represent that the offspring crow selects high non-social learning, low social learning or exploration behavior, and the offspring crow selects high social learning, low non-social learning or exploitation behavior. And indicates that the sub-activity of the main activity to be selected is the one that maximizes the fitness of the offspring crow; to ensure that the selected activity can improve the fitness of the offspring; After completing the update of the Q-table, update the offspring crow, which means: calculate Replace the in the Q-table; Part three: Update the parent crows respectively through the following formula, specifically as follows: ; Among them, represents the behavioral characteristic value of the th parent crow on the jth attribute at the tth iteration, represents the behavioral characteristic value of the first parent crow, which is also the crow with the highest fitness, on the jth attribute at the tth iteration, represents the average value of all crows on the jth attribute, that is, the average behavior of the group on the jth attribute, Indicates the index of the parent crow, which is 1 or 2, representing two different parent crows respectively. r1 and r2 are random numbers between 0 and 1; Part Four: Merge the updated parent and offspring crows into a new population; Part Five: Evaluate the new population generated in the previous part, including: calculating the fitness of each crow in the new population through the fitness function, sorting them from high to low according to the fitness, the two individuals with the highest fitness are used as parent crows, and the rest are offspring crows, and determine the parent and offspring in this population; Repeat from Part Two to Part Five until the algorithm reaches the maximum number of iterations. Finally, the crow with the highest fitness in the obtained crow population is used as the container scheduling strategy for this stage.

[0028] The main idea of the present invention is that when a number of users submit some jobs to the cloud computing system during a certain period of time, the system will put these jobs into the job queue and then put the tasks in the queue that have no prerequisite dependent tasks and are in the ready state into the task queue to wait for scheduling. At this time, the information that the scheduling system needs to obtain includes the structure of the three-layer cloud computing system, that is, how many data centers there are in total in the system, how many service nodes each data center includes, and how many containers each service node includes. It is also necessary to obtain some basic information of all containers, such as the price of using CPU and memory per unit time of each container and , the processing capacity of each container , as well as the startup status of all containers, etc. There is also the maximum waiting time, that is, the deadline of the tasks waiting to be scheduled in the task queue . After obtaining this information, the data center scheduler uses the TOPSIS algorithm and calculates the priority of the tasks on each data center to dispatch these tasks to the data centers. The data center will store the tasks assigned to it in the task queue . The next stage is to assign the tasks to the appropriate service nodes. The method used in this second stage is the same as that in the previous stage. The difference is that the evaluation indicators of the TOPSIS algorithm in the two stages are different. The evaluation indicators in the first stage are energy consumption, calculation cost, and load balancing, and the evaluation indicators in the second stage are energy consumption, cost, and container startup rate. The service node stores the tasks assigned to it in the task queue , and then uses PRLCC-C to formulate a scheduling strategy. In the PRLCC-C algorithm, each crow individual is a container scheduling strategy, and the characteristics of each individual are Which container should be assigned to each task in it, and the finally output after continuous iterative update is the container scheduling policy. Since the optimization objectives of the present invention are computing cost, energy consumption, and load balancing, according to experience and practice, the present invention can optimize approximately 10% in terms of computing cost compared with traditional scheduling methods and traditional genetic algorithm scheduling, 5% in terms of computing cost, and approximately 8% in terms of load balancing.

[0029] Embodiment 3 A three-stage cloud computing resource scheduling system, comprising: A data center scheduling module, configured to: First, sort the data centers; then, view all data centers in sequence and calculate the priority of the tasks in the task queue in this data center; finally, map the tasks to the data center; A service node scheduling module, configured to: When the tasks are mapped to the data center, transfer the tasks to the task queue ; First, comprehensively consider energy consumption, cost, and container startup rate, evaluate and sort the service nodes included in the data center; then, calculate in sequence the priority of the tasks in each service node; finally, map the tasks to the appropriate service nodes; A container scheduling policy acquisition module, configured to: When the tasks are mapped to the server nodes, transfer the tasks to the task queue , use the PRLCC-C algorithm to specify the scheduling policy, and after continuous iterative update, finally output the container scheduling policy; A resource scheduling module, configured to: Finally, perform resource scheduling according to the output container scheduling policy.

Claims

1. A three-stage cloud computing resource scheduling method, submitting a task into a task queue ; characterized in that Including: Step 1: Data center scheduling: First, sort the data centers; then, view all the data centers in order and calculate the priority of the tasks in the task queue in this data center; finally, map the tasks to the data centers. Step 2: Service node scheduling; After the task is mapped to the data center, transfer the task to the task queue ; First, comprehensively consider energy consumption, cost, and container startup rate, and evaluate and rank the service nodes included in the data center; then, calculate the priorities of the tasks in on each service node in sequence; finally, map the tasks to the appropriate service nodes; Step 3: Obtain the container scheduling policy: After the task is mapped to the server node, transfer the task to the task queue , specify the scheduling policy, and after continuous iterative updates, finally output the container scheduling policy; Finally, perform resource scheduling according to the output container scheduling policy.

2. The three-stage cloud computing resource scheduling method according to claim 1, characterized in that, In Step 1, during the process of sorting the data centers, the TOPSIS algorithm is used to sort the data centers comprehensively considering energy consumption, computing cost, and load balancing.

3. A three-stage cloud computing resource scheduling method according to claim 1, characterized in that, Energy consumption of container j It includes the energy consumption when the CPU is idle and the energy consumption when the CPU executes computing tasks. The calculation formula is as follows: ; For a data center The energy consumption of the data center is the sum of the energy consumption of all containers included in the data center, and the calculation formula is as follows: ​ ; Among them, and are the energy consumption of the CPU when idle per unit time and the energy consumption of the CPU when executing computing tasks, is the time when the CPU of container j is idle, is the time when the CPU of container j executes tasks, represents the data center the maximum number of containers that can be started; Computing cost It includes the computing cost of the CPU and the usage cost of the memory. The calculation formula is as follows: ; Among them, is the time when task Task i is executed in container j, is the memory that task Task i needs to occupy, and are the prices of using CPU and memory per unit time; the average computing cost of the data center is calculated as follows: ; At time e, the data center load balancing The calculation method is as follows: ; in, Indicates data center Including the variance of the container startup rate of each service node, the number of container startups of the service node As shown below: ; ; Among them, represents the container startup rate of service node n, and N represents the maximum number of containers that service node n can start.

4. A three-stage cloud computing resource scheduling method according to claim 1, characterized in that, Calculate the priority of tasks in the task queue in this data center; including: First, construct the decision matrix D: ; Among them, the decision matrix D is a matrix with m rows and n columns. Each row represents a solution, that is, a data center; each column represents an evaluation metric, including: energy consumption, computing cost, and load balancing; After obtaining the decision matrix D, each element in the decision matrix D is normalized according to the following formula to obtain the normalized decision matrix ND, as shown below: ; Among them, represents the value of the j-th metric after mapping the task to the i-th data center; Then, a weight is set for each index , satisfying , and the weighted normalized decision matrix WND is obtained through ​ According to Determine the worst solution And the optimal solution : The worst solution Refers to the set of the worst values of each index; The optimal solution Refers to the set of the best values of each index; As follows: ; ; Calculate the distance ratio of each solution to the optimal solution and the worst solution according to the n-dimensional Euclidean distance; as shown below: ; ; Among them, represents the distance ratio of the allocation scheme to the optimal solution, represents the distance ratio of the allocation scheme to the worst; Finally, calculate the closeness C of each strategy to the ideal strategy, specifically as follows: ; After calculating the closeness of each data center, sort all the data centers in descending order of closeness and view all the data centers in order.

5. A three-stage cloud computing resource scheduling method according to claim 4, characterized in that The formula for feasibility is as follows: ; Among them, , is a matrix, where T represents the number of tasks in, and each element of the matrix is obtained based on the execution time, as follows: ; Among them, represents the number of instruction lines to be executed to complete the task, represents the CPU speed of container j in MIPS. Then the formula for determining the priority is as follows: ; Among them, is the priority of computing task i in the data center ; Map the tasks to the data centers, specifically including: using the TOPSIS algorithm to sort the data centers, view the priority of each task on the data center, and map the current task to the data center with the highest priority.

6. A three-stage cloud computing resource scheduling method according to claim 1, characterized in that, In Step 2, comprehensively consider energy consumption, cost, and container startup rate, and evaluate and sort the service nodes included in the data center; First, for the service node n, the energy consumption index of the service node n is the sum of the energy consumptions of all the containers it includes : ; Among them, is the energy consumption of container j per unit time; Then, compare the overall situation of the and included in the computing node, and adopt the following processing: ; Among them, and are the costs of using CPU and memory per unit time, and N is the number of service nodes; Finally, the calculation method of the container startup rate is specifically as follows: ; Among them, represents the number of containers in which the service node n is in the working state at time e; Evaluate and sort each service node. After the sorting is completed, view all service nodes in sequence. When viewing, calculate the priority of the tasks in it and map the current task to the service node with the highest priority.

7. The three-stage cloud computing resource scheduling method according to claim 1, characterized in that: In Step 3, obtain the container scheduling policy through the PRLCC-C algorithm; including: The first part: Initialize the population, evaluate each individual in the population, and select two optimal solutions as the parent crows; The second part: Each young crow improves its behavior by adopting four behaviors: exploration, exploitation, high non-social learning and low social learning, and high social learning and low non-social learning. These four behaviors all include two sub-behaviors, namely non-social learning and social learning; For social learning, first, calculate the maximum number of advantages provided by each parent crow; then, calculate the amount of knowledge obtained by the young crow from the parent crow according to consciousness.

8. A three-stage cloud computing resource scheduling method according to claim 7, characterized in that The first part includes: First, each individual in the initialized population represents a potential solution, that is, each row represents a solution, also known as the behavior of the individual, and the defined population is shown as follows: ; Among them, C ij represents the j-th attribute of the behavior C i of crow i. Initialize the population using the chaotic initialization method as shown in the following formula: ; wherein, and are the lower limit and the upper limit of the i-th crow respectively, is the chaos parameter of the j-th attribute of crow i, is a random number between 0 and 1; Then, the behavior of each crow in the population is evaluated through a fitness function, and the fitness function is as follows: ; Determine two optimization goals: The first optimization goal is the maximum step size, as shown in the following formula: ; Among them, is the execution time required on container j after task i is mapped to container j, represents all tasks mapped to container j; The first optimization objective is resource utilization rate : ; Among them, represents the processing time of task i on the j-th container; Fitness evaluation function As shown below: ; Among them, are all values of the individual index L of the crows, is the value of the i-th individual, is the normal value of the i-th crow. Mapping to between 0 and 1 is the fitness of the i-th crow; Obtained by calculation Mapped to between 0 and 1 is ; Finally, determine the parent crows: After evaluating the behavior of each crow through the fitness evaluation function, divide the crow population into two categories. The division method is to sort the entire crow population in descending order of fitness. The crows with the highest fitness, that is, the top two crows, are the parent crows, and the rest are the young crows; The first category is the parent crows, which are the two crows with the best fitness and are the solutions in the population closest to the optimal strategy; The second category is the young crows.

9. A three-stage cloud computing resource scheduling method according to claim 8, characterized in that, First, calculate the maximum number of advantages provided by each parent crow; Then, calculate the amount of knowledge obtained by the young crow from the parent crow according to consciousness; including: First, define the position of crow individual i at time t as C i (t). The learning rate of offspring b from the i-th parent at time t is denoted as Lr(C b , C pi ). Use Lr( , ) to represent the learning rate generated by the i-th parent crow. The calculation method is as follows: ; where C is a confidence constant and its value is lower than all possible fitness values, denotes the i-th parent crow; The distance between the juvenile crow b and the parental crow i The calculation method is as follows: ; Among them, represents the b-th young crow; Learning rate between the young generation b and the parent generation i is as follows: ; Among them, represents the standard deviation of all young crows on each attribute, controls the degree of attenuation of the learning rate as the distance increases, The changes of include two types: and ; Starting from low attenuation, it increases with iteration, and starting from high attenuation, it decreases with iteration, where t and represent the current iteration and the maximum number of iterations, respectively; The young bird learns from its parents based on its own consciousness and the advantages of its parents. The amount of knowledge obtained by the young crow from the parent crow is specifically as follows: ; Among them, r1 and r2 are two random weight factors used to adjust the learning intensity when the young crows learn from the two parents. represents the i-th crow, represents the learning rate of the young crow b learning from the parent crow i at time t; For non-social learning, a random value is added to each dimension of the crow to control the search steps during the entire iteration process; specifically as follows: ; Among them, and represent the minimum boundary and the maximum boundary of the search space respectively, is a random number from 0 to 1; or ; Among them, the two realize the changes of two opposite exploration step lengths, namely, the long step length starts to shorten with the iteration and the short step length starts to lengthen with the iteration, where t and represent the current iteration and the maximum number of iterations respectively; The reinforcement learning method is used to enable the crow to reasonably adopt learning behaviors. Taking the crow individual as the intelligent agent of reinforcement learning, the solution space for searching solutions and the current behavior of the crow are regarded as the environment and state, and the action is that the crow changes from one state to another. The behavior of the crow consists of four activities composed of social learning and non-social learning, namely exploration, exploitation, high non-social learning and low social learning, and high social learning and low non-social learning. The four activities are divided into two categories, including global search and local search; global search includes: exploration, high non-social learning and low social learning, which are responsible for exploring the unknown solution space and increasing the diversity of solutions; local search includes: exploitation, high social learning and low non-social learning, which are responsible for exploring the area near the optimal solution; In social and non-social learning, different values are set for the variables σ and r a to control the learning step size and decay, and four activities are implemented. Develop non-social learning including long-step search and social learning with high decay; explore non-social learning with short step sizes and social learning with low decay; high non-social learning and low social learning include long-step non-social learning and low-decay social learning, and high social learning and low non-social learning include short-step non-social learning and high-decay social learning; After the crow takes the four activities, according to the results generated, the offspring crow obtains a reward value. The reward value is divided into two categories. One is the reward RW1 for the activities of global search, and the other is the reward RW2 for the local search activities. These two rewards guide the offspring crow to update the Q-table and the selection of the next activity; the calculation of the two reward values is as follows: ; ; where r1 and r2 are random numbers, indicating the difference between the new attribute and the previous one, indicating the exploration of the solution space by the crow, and the calculation formula is as follows: ; ; Among them, represents the average fitness value of attribute j, t represents which iteration is the current one, represents at time step when, the th crow's fitness value, r is a random value between 0 and 1; the learning factor is used for the balance between exploration and exploitation of the algorithm, and the calculation formula is as follows: ; Among them, and are respectively the minimum value and the minimum value of the factor, is the learning factor, which is used to balance the exploration and exploitation of the algorithm. t and max_t represent the current iteration and the maximum number of iterations respectively; Select the operation to be executed according to the Q-table, calculate the fitness after execution, obtain an immediate reward, and update the Q-table: ; ; ; Among them, is the learning rate, represents the immediate reward obtained. When the fitness of the crow increases, it is 1; otherwise, it is -1; represents the reward values obtained from the two learning behaviors of the young crows and , and respectively represent that the young crow selects high non-social learning, low social learning or exploration behavior, and the young crow selects high social learning, low non-social learning or exploitation behavior. And indicates that among the sub-activities to select the main activity, the one that maximizes the fitness of the young crow should be chosen; After completing the Q table update, the young crows are updated, which means: calculate Replace the Q table ; Part Three: Update the parent crows respectively through the following formula, specifically as follows: ; Among them, represents the behavioral characteristic value of the th parental crow on the jth attribute at the tth iteration, represents the behavioral characteristic value of the first parental crow, which is also the crow with the highest fitness, on the jth attribute at the tth iteration, represents the average value of all crows on the jth attribute, that is, the average behavior of the group on the jth attribute, represents the index of the parental crow, which is 1 or 2, representing two different parental crows respectively, and r1, r2 are random numbers between 0 and 1; Part Four: Combine the updated parent and offspring crows into a new population; Part Five: Evaluate the new population generated in the previous part, including: calculating the fitness of each crow in the new population through the fitness function, sorting them from high to low according to the fitness, the two individuals with the highest fitness are used as the parent crows, and the rest are the offspring crows, and determine the parent and offspring in this population; Repeat from Part Two to Part Five until the algorithm reaches the maximum number of iterations. Finally, the crow with the highest fitness in the obtained crow population is used as the container scheduling strategy for this stage.

10. A three-stage cloud computing resource scheduling system, characterized in that, Including: The data center scheduling module is configured to: First, sort the data centers; Then, view all data centers in sequence and calculate the priority of the tasks in the task queue in this data center; finally, map the tasks to the data center; A service node scheduling module, configured to: after a task is mapped to a data center, transfer the task to a task queue ; First, comprehensively consider energy consumption, cost, and container startup rate, and evaluate and sort the service nodes included in the data center; then, calculate in sequence the priorities of the tasks in each service node; finally, map the tasks to appropriate service nodes; A container scheduling policy acquisition module, which is configured to: after a task is mapped to a server node, transfer the task to a task queue , specify a scheduling policy, and after continuous iterative update, finally output a container scheduling policy; The resource scheduling module is configured to: Finally, perform resource scheduling according to the output container scheduling strategy.

Citation Information

Patent Citations

  • Two-stage workflow scheduling method and system based on deep reinforcement learning

    CN118519752A

  • Landslide displacement dynamic prediction method based on MACSA-BiLSTM

    CN119202636A