Search

CN-122019213-A - Cloud edge cooperative micro-service scheduling method for Internet of things

CN122019213ACN 122019213 ACN122019213 ACN 122019213ACN-122019213-A

Abstract

The invention relates to a cloud edge cooperative micro-service scheduling method for the Internet of things, and belongs to the technical field of cloud edge calculation cooperative scheduling. The method comprises the steps of modeling a scheduling micro-service execution task as a directed acyclic graph, modeling cloud edge computing equipment as computing nodes, grouping the nodes and configuring bandwidth and communication delay among the node groups, constructing a scheduling optimization target, modeling a scheduling process as a Markov decision process, defining a state space, an action space, a state transfer function and defining a reward function according to the optimization target, constructing and training a scheduling model aiming at the Markov decision process, wherein the scheduling model comprises a first scheduler and a second scheduler, the first scheduler selects a node group for executing the sub-task according to the current global state and the situation of the sub-task, the second scheduler selects the computing nodes in the nodes of the node group selected by the first scheduler according to the local state, the dimension of the action space is obviously reduced, the convergence is good, the self-adaptive adjustment scheduling is good, and the robustness is good.

Inventors

  • DUAN WEIQI
  • LU HUA

Assignees

  • 山东怡然信息技术有限公司

Dates

Publication Date
20260512
Application Date
20260413

Claims (10)

  1. 1. The cloud edge cooperative micro-service scheduling method for the Internet of things is characterized by comprising the following steps of: modeling a process of scheduling a plurality of micro-service realization tasks into a directed acyclic graph; constructing a cloud edge cooperative computing infrastructure model, wherein the cloud edge cooperative computing infrastructure model models all computing devices of edges and cloud ends as computing nodes with set computing capacity and memory capacity, groups the nodes and configures bandwidth and communication delay among node groups; constructing a dispatching optimization target based on the directed acyclic graph and cloud edge cooperative computing infrastructure model; modeling a scheduling process as a Markov decision process, the scheduling process being broken down into a plurality of decision steps, each decision step processing a ready subtask, defining a state space, an action space, a state transfer function and defining a reward function according to a scheduling optimization objective; Constructing and training a scheduling model aiming at a Markov decision process, wherein the scheduling model comprises a first scheduler and a second scheduler which are based on depth deterministic strategy gradients, wherein the first scheduler constructed based on the depth deterministic strategy gradients selects a node group for executing subtasks according to the current global state and the situation of the subtasks; when the method is applied, a scheduling model is utilized to make scheduling decisions.
  2. 2. The internet of things cloud edge collaborative micro-service scheduling method according to claim 1, wherein tasks for scheduling a plurality of micro-service implementations are modeled into a directed acyclic graph, vertexes of the directed acyclic graph represent sub-tasks implemented by a plurality of micro-services, directed edges among the sub-tasks represent dependency relationships among the sub-tasks, and after an upstream sub-task is completed, the downstream sub-task can be executed, wherein the vertex configuration of the directed acyclic graph determines attributes of how to schedule the sub-tasks, including sub-task workload, sub-task memory requirements and sub-task output data volume.
  3. 3. The internet of things cloud edge collaborative micro-service scheduling method according to claim 1, wherein an edge is further divided into a plurality of sub-edges or a cloud end is further divided into a plurality of sub-cloud ends, and the node group is any one of the cloud end, the sub-cloud end subdivided by the cloud end, the edge or the sub-edge subdivided by the edge.
  4. 4. The internet of things cloud edge collaborative micro-service scheduling method according to claim 1, wherein the scheduling optimization objective is to obtain a scheduling scheme under allocation constraint so as to minimize total task consumption; The allocation constraint comprises that each subtask of the directed acyclic graph is allocated to any node of the cloud edge collaborative computing infrastructure model once in the whole task processing process, and the memory requirement of the subtask is not exceeded by the memory capacity of the allocated node when the subtask is allocated.
  5. 5. The internet of things cloud computing micro-service scheduling method according to claim 4, wherein the calculation process of the total time consumption of the task is as follows: according to the workload of subtask v And the computing power of node n to determine the computation time-consuming: ; Wherein, the The computing power of node n; If the processing of subtask v requires communication, the communication time is the maximum transmission time of the task output data for all upstream subtasks: ; Wherein, the As an upstream subtask of subtask v, For the set of subtasks upstream of subtask v, Upstream subtask, subtask v Is used for outputting the data quantity of the task, Representing slave upstream subtasks Node group where node is located To the node group where node v is located Bandwidth between; Representing slave upstream subtasks Node group where node is located To the node group where node v is located A delay between; the total consumption time of subtask v at node n is: ; The total consumption of all upstream subtasks of the subtasks is considered, and the total consumption of subtask v is: ; Wherein, the For all upstream subtasks of subtask v, the total time consumed is the maximum, for the inlet subtasks without upstream subtasks, ; For the entire task, the total time consumed by the task is the maximum of the total time consumed by all subtasks, namely: 。
  6. 6. The internet of things cloud edge collaborative micro-service scheduling method according to claim 1, wherein the state space of the Markov decision process comprises a global state space and a local state space, the global state comprises a feature vector of a current ready subtask set, aggregation information of each node group and global dependency information, the feature vector of the current ready subtask set in the global state comprises calculation workload, memory requirement, output data size and ready subtask number of all ready subtasks, the aggregation information of each node group comprises average calculation load of each node group, aggregation available memory capacity and average communication delay from each node group to all upstream subtasks, the global dependency information comprises the number of the not yet scheduled subtasks in a task and estimated residual execution time, and the estimated residual execution time is estimated by calculating the longest path length from a current unscheduled node to an exit node in a directed acyclic graph; the local state of each node group comprises the residual memory, the computing power and the expected available time of each computing node in the node group, and the expected available time of each computing node in the local state is determined by estimating the time point of the node completing all the current distributed tasks according to the sum of the computing time and the communication time of all the tasks in the current task queue of the node.
  7. 7. The internet of things cloud computing micro-service scheduling method of claim 1, wherein the state transition process comprises the following updates: resource state updating, namely distributing subtasks to nodes, and reducing the required memory quantity of the subtasks by the residual memory of the nodes; Adding a subtask to a task queue of a node, wherein the expected completion time is updated to be the current completion time of the node plus the total time consumption of the subtask at the node; a ready subtask set update, removing the subtasks allocated to the subtasks from the current ready subtask set and adding ready new subtasks; and updating the state variables, namely calculating new aggregation statistics according to the updated node resources to form a new global state, and forming a new local state according to the updated node resources.
  8. 8. The internet of things cloud computing micro-service scheduling method of claim 1, wherein the reward function is defined as: Wherein, the For the current subtask At the selected node At the time of total consumption of the materials, Giving a set positive reward when all sub-tasks of the whole task are completely scheduled, so as to guide the scheme to complete the scheduling process of the whole task; Rewarding resource utilization efficiency, encouraging efficient resource utilization, Is a weight coefficient.
  9. 9. The internet of things cloud edge collaborative micro-service scheduling method according to claim 1, wherein the training process of the first scheduler and the second scheduler comprises the following steps: step S501, initializing all network parameters by using an Xavier initialization method; step S502, initializing an experience playback buffer; Step S503, starting training round circulation, wherein each training round corresponds to a complete task scheduling process, and the subtask number, the calculation requirement, the memory requirement and the subtask output data amount of the task in each round are randomly generated from preset distribution; step S504, initializing the current round, resetting the state, generating an initial ready subtask set, and initializing the global state and the local state; step S505, judging whether the ready subtask set is empty or not, if not, continuing to execute, and if so, ending the current round; Step S506, selecting one subtask from the ready subtask set based on the path priority; Step S507, a first scheduler selects a target node group, and noise disturbance is added in the selection process; step S508, the second scheduler selects a target node in the target node group, and adds noise disturbance in the selection process; step S509, executing allocation action, allocating the subtasks to the selected nodes, and updating the residual memory and task queues of the nodes; step S510, calculating instant rewards according to the rewards function; step S511, constructing an experience tuple, storing the experience tuple in an experience playback buffer, wherein the experience tuple comprises a global state and all local states, selecting node group actions and node actions in the node group, and rewarding the global state and the local state after updating immediately; step S512, judging whether the training condition is met, and executing network updating when the number of samples in the experience playback buffer zone reaches a preset threshold value, otherwise, returning to step S505 to continuously collect samples; step S513, randomly sampling batch samples from the experience playback buffer; Step S514, calculating a target value and loss of the first critic network by using the sample, and minimizing the loss of the first critic network by using an Adam optimizer; Step S515, calculating target values and losses of all second commentators by using samples, and minimizing network losses of all second commentators by using an Adam optimizer; Step S516, calculating strategy gradients of the first actor network, and updating parameters of the first actor network along the gradient ascending direction by using an Adam optimizer; Step S517, calculating the strategy gradient of each second actor network, and updating the parameters of each second actor network by using an Adam optimizer; step S518, soft updating the target network parameters; step S519, if the first actor network and each second actor network have converged or reach the maximum number of rounds, training is finished, otherwise, step S504 is returned to continue the next round.
  10. 10. The cloud computing cooperation micro-service scheduling method of the Internet of things according to claim 9, wherein selecting one sub-task based on the path priority comprises calculating the path length of each ready sub-task, selecting the longest path length from the sub-task to an exit sub-task, and preferentially scheduling the sub-task with the largest path length.

Description

Cloud edge cooperative micro-service scheduling method for Internet of things Technical Field The invention relates to the technical field of cloud computing and edge computing collaborative scheduling, in particular to a cloud edge collaborative micro-service scheduling method of the Internet of things. Background The statements in this section merely provide background information related to the present disclosure and may not necessarily constitute prior art. The traditional cloud computing mode has strong centralized computing capability, but relies on a remote data center, so that the data transmission network has high delay and large bandwidth occupation, and is difficult to meet the time-sensitive micro-service application requirements. A complete flow of a microservice application typically contains a series of computing tasks with sequential dependencies that vary significantly in computational, memory requirements, and data throughput. To meet the real-time requirements of micro-service applications, cloud-edge collaborative computing architectures have evolved. The cloud-edge collaborative computing architecture deploys computing tasks at edge nodes near data sources or cloud nodes with greater computing power, and balances latency and computing efficiency by using resources in a distributed manner. Cloud edge collaborative computing extends computing, storage, and network resources from a central cloud data center to edge nodes near end users and devices to form a continuous computing resource pool of geographic distribution, resource heterogeneity, and network dynamics. In such environments, the user requests need to traverse complex microservice invocation relationships, traffic patterns vary significantly over time, and network conditions across nodes, such as delay, bandwidth, packet loss rate, also fluctuate due to resource contention, background traffic, and route variations. These interwoven dynamic factors directly affect the end-to-end delay, throughput, and reliability of the micro-service applications deployed on the containerization platform. How to schedule efficiently to minimize the completion time becomes a very challenging problem. In the prior art, deep reinforcement learning is introduced in task scheduling schemes, such as deep deterministic strategy gradient algorithms. However, the action space of the existing reinforcement learning method expands exponentially with the number of nodes, so that the problems of low exploration efficiency, slow model convergence, poor expandability and the like are caused, and the method is especially not suitable for the problems of a large number of cloud edge heterogeneous nodes and complex task dependence. Therefore, how to design a cloud-edge layered architecture capable of fully utilizing the characteristics of the cloud-edge layered architecture, efficiently processing tasks, and adapting to dynamic environment changes is a technical problem to be solved in the art. Disclosure of Invention In order to solve the technical problems or at least partially solve the technical problems, the invention provides a cloud-edge collaborative micro-service scheduling method for the Internet of things. The invention provides a cloud edge cooperative microservice scheduling method of the Internet of things, which comprises the following steps: modeling a process of scheduling a plurality of micro-service realization tasks into a directed acyclic graph; constructing a cloud edge cooperative computing infrastructure model, wherein the cloud edge cooperative computing infrastructure model models all computing devices of edges and cloud ends as computing nodes with set computing capacity and memory capacity, groups the nodes and configures bandwidth and communication delay among node groups; constructing a dispatching optimization target based on the directed acyclic graph and cloud edge cooperative computing infrastructure model; modeling a scheduling process as a Markov decision process, the scheduling process being broken down into a plurality of decision steps, each decision step processing a ready subtask, defining a state space, an action space, a state transfer function and defining a reward function according to a scheduling optimization objective; Constructing and training a scheduling model aiming at a Markov decision process, wherein the scheduling model comprises a first scheduler and a second scheduler which are based on depth deterministic strategy gradients, wherein the first scheduler constructed based on the depth deterministic strategy gradients selects a node group for executing subtasks according to the current global state and the situation of the subtasks; when the method is applied, a scheduling model is utilized to make scheduling decisions. Further, the task for scheduling a plurality of micro-service realization is modeled into a directed acyclic graph, the vertexes of the directed acyclic graph represent the sub-tasks realized b