An edge cloud cooperative adaptive workflow scheduling method and system
By combining graph structure modeling and multi-agent collaborative learning with graph neural networks and deep reinforcement learning, the problem of efficient scheduling of complex workflows under the edge-cloud collaborative architecture is solved, achieving adaptive balance of resource utilization and improvement of task completion rate.
Patent Information
- Application Number
- CN202511903245.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-17
- Publication Date
- 2026-03-03
- Estimated Expiration
- 2045-12-17
AI Technical Summary
Existing technologies struggle to efficiently schedule workflows with complex dependencies in edge-cloud collaborative architectures, especially in smart transportation scenarios. This leads to overload of some edge servers and high service latency. Furthermore, existing deep reinforcement learning methods lack global awareness and result in uneven resource utilization.
By introducing graph structure modeling and multi-agent collaborative learning mechanisms, deep reinforcement learning (DRL) agents are given a global network perspective through graph neural networks (GNNs). By combining macro-level candidate selection, micro-level collaborative scheduling and local dynamic optimization, an adaptive balance between task completion rate, resource utilization and migration cost is achieved.
It achieves efficient resource utilization and task completion in dynamic workflow scenarios, and reduces service latency and optimizes resource allocation through collaborative scheduling with a global network perspective.
Smart Images

Figure CN121326536B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to an edge-cloud collaborative adaptive workflow scheduling method and system, belonging to the field of distributed computing and artificial intelligence technology. Background Technology
[0002] With the development of IoT, 5G / 6G communication and smart city applications, efficient scheduling of workflows with complex dependencies under the edge-cloud collaborative architecture has become a core challenge. Especially in scenarios such as smart transportation, the distribution of task requests in time and space is extremely uneven, which can easily lead to overload of some edge servers, resulting in high service latency. This scheduling problem not only constitutes an NP-hard problem due to the exponential growth of the solution space, but also requires optimization of multiple conflicting objectives such as workflow internal dependencies, dynamic network load, latency / resource utilization / cost.
[0003] Although existing methods such as Deep Reinforcement Learning (DRL) have been attempted in this field, significant limitations remain: First, while geometrically based methods (such as Voronoi diagrams) simplify the problem, their partitioning is relatively rigid and struggles to adapt to drastic changes in node load and network state in real time. Second, standalone DRL methods are typically deployed on a single edge node, limiting their decision-making perspective to a vertical model of "local execution" or "offloading to the cloud," lacking a global awareness of the entire edge network topology and state. This hinders more efficient "edge-to-edge" horizontal collaborative scheduling, leading to uneven resource utilization and suboptimal scheduling.
[0004] Therefore, there is an urgent need for a unified scheduling method that can quickly screen the best candidate resources at the macro level and make intelligent collaborative decisions based on the global network perspective at the micro level. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides an edge-cloud collaborative adaptive workflow scheduling method and system. By introducing graph structure modeling and multi-agent collaborative learning mechanisms, it can more accurately capture the topological relationships between nodes and global state changes. It is suitable for dynamic workflow scenarios. In complex edge-cloud collaborative computing systems, it achieves an adaptive balance of multiple objectives such as task completion rate, resource utilization rate, and migration cost (including latency and bandwidth overhead) through three levels: macro-level candidate screening, micro-level collaborative decision-making, and local dynamic optimization.
[0006] The technical solution of the present invention is as follows:
[0007] An edge-cloud collaborative adaptive workflow scheduling method is applied to a collaborative architecture comprising a device layer, an edge layer, and a cloud layer. The steps are as follows:
[0008] (1) Macro candidate screening: After a large number of original workflow tasks are generated at the device layer, they are first gathered to the central scheduler. The central scheduler aggregates and processes these tasks internally to form workflow task blocks. Macro candidate node screening is performed on the task blocks to obtain a set of candidate nodes.
[0009] (2) Micro-level collaborative scheduling: Graph neural networks (GNN) are used to give deep reinforcement learning (DRL) agents a global network view, thereby achieving efficient and intelligent edge-to-edge collaborative scheduling within the candidate node set.
[0010] (3) Local dynamic optimization: When a workflow task block is assigned to the target edge node for execution, the resource manager of the edge node takes over the task and adopts a resource allocation mechanism based on priority segmentation and sliding window as the basic framework for local execution. On the basic framework, a joint optimization strategy with dynamic target weighting is introduced.
[0011] According to a preferred embodiment of the present invention, in step (1), specifically:
[0012] (11) Workflow task clustering: In order to cope with the high scheduling complexity caused by a large number of concurrent workflows gathered to the central scheduler, the original tasks with similar computational characteristics, data dependencies or generation locations are aggregated into workflow task blocks through a preprocessing process to reduce the scheduling granularity. The clustering process adopts the task clustering algorithm known in the field, such as the incremental flow clustering method based on the weighted distance of multi-dimensional task attributes, which comprehensively considers the task deadline, computational amount and spatial location attributes to dynamically generate task blocks.
[0013] (12) Candidate node selection based on probabilistic optimization: After the task block is formed, a fast candidate node selection process is performed for the task block. A probabilistic intelligent selection strategy is adopted to achieve a balance between optimal resource utilization and suboptimal node exploration.
[0014] According to a further preferred embodiment of the present invention, in step (11), computational pattern similarity is introduced as a key criterion. To resolve the fuzzy concept of similarity, computational pattern similarity is quantitatively defined. First, the computational pattern of each task (including computational resource preferences and runtime environment dependency features) is represented as a high-dimensional feature vector C. pattern This vector is used to encode the proportion of different computing power units such as CPU and GPU required by the task, as well as the dependence on specific software libraries or operating environments (e.g., represented by one-hot encoding).
[0015] Subsequently, the similarity of patterns is calculated using cosine similarity metric. This function is used to calculate the similarity score between two feature vectors, and its formula is as follows:
[0016]
[0017] in, represent The L2 norm, also known as the Euclidean length or modulus, is the square root of the sum of the squares of each element in a vector, representing the "size" or "strength" of the vector in multidimensional space. This design ensures internal consistency in the computational requirements of task blocks, thus facilitating the matching of edge nodes with corresponding computational capabilities.
[0018] Therefore, the calculation pattern similarity as a key criterion specifically means: a new task i When attempting to join an existing task block, compute the new task. i eigenvectors The cosine similarity between the computational pattern centroid and the existing computational pattern centroid of the task block. The computational pattern centroid is the mean of all feature vectors within the task block. This similarity score is denoted as Sim(i, block). When Sim(i, block) is higher than a preset similarity threshold r, sim (e.g. r) sim When >0.9), new task Only then are aggregations allowed;
[0019] After clustering, the central scheduler calculates representative features at two levels for each task block: one is the geographic centroid p, where p is the source location coordinates of a task block containing m original tasks. m y m The coordinates (x, y) of the geographic centroid p are obtained by averaging all coordinates. p y p ):
[0020]
[0021]
[0022] Geographical center This serves as a representative geographic location for this logical task block, used to characterize the spatial location of the task block in subsequent weighted distance calculations.
[0023] Second, the centroid of the computational pattern. The final feature vector obtained by averaging the core computational attributes of each task within the task block is the centroid of the computational pattern. The core computational attributes are a vector, specifically including: the total computational amount of the task, the deadline of the task, the resource preference ratio of CPU / GPU computing power, and the dependence on specific software libraries or operating environments (which can be represented by one-hot encoding). The centroid of the computational pattern is used to characterize the overall computational requirements of the task block in the subsequent scheduling stage (such as step (2)).
[0024] According to a preferred embodiment of the present invention, the specific process in step (12) is as follows:
[0025] (121) Calculate the weighted distance of each node: For the task block i to be scheduled Bk and every available edge node EN j Calculating a weighted distance that takes into account both physical distance and node resources involves two steps:
[0026] a: Edge node weight assignment, for the j-th edge node EN j Assign weights Weight R is the current remaining computing resources of this edge node. j A function of (t), i.e. Weight It reflects the overall weight of a node in terms of computing power, storage, or network capabilities. The larger the weight value, the more available resources the edge node has and the stronger its service capabilities.
[0027] b: Weighted distance calculation, defining task block i Bk The geographic centroid p and each edge node EN j Center position q j The weighted distance is D w (p,q) j );
[0028]
[0029] Where d(p,q) j ) represents task block i Bk With the center position q of the edge node j The Euclidean distance between them, and the weighted distance, measures the overall matching degree between the task block and the edge node;
[0030] (122) Convert the weighted distance into a competitiveness score: calculate the EN of each edge node. j Relative to task block i BkAfter weighting the distance, this cost-based indicator (the smaller the distance, the better) is transformed into a benefit-based indicator (the higher the score, the better), which is denoted as the competitiveness score.
[0031] The competitiveness score is calculated using the reciprocal of the weighted distance, i.e. ,in, Represents edge node EN j For the currently scheduled task block i Bk To avoid numerical instability or division-by-zero errors when the weighted distance approaches zero, a very small positive constant is introduced into the denominator for the competitiveness score. (equal to 10) -9 As a smoothing term, the optimized formula is obtained: This processing maintains the strong inverse relationship between the score and the weighted distance, effectively avoids numerical anomalies, and ensures the stability and robustness of the calculation process. Ultimately, the competitiveness score can intuitively and quantitatively reflect the attractiveness of each edge node to the current task block.
[0032] (123) Constructing a probability distribution and sampling candidate nodes: Based on the competitiveness scores of edge nodes, a probability distribution is constructed, and a set of candidate nodes is selected through weighted random sampling. Specifically:
[0033] A: The probability distribution is constructed by using the competitiveness scores of all N edge nodes to create a discrete probability distribution. This is achieved by applying the EN values of the edge nodes. j The probability P of being selected is obtained by normalizing the competitiveness score. j The calculation formula is: ,in, It is the sum of the competitiveness scores calculated by all N edge nodes for the same task block. Through normalization, it is ensured that the sum of the probabilities of all edge nodes being selected is 1 (i.e., ...). Thus, an effective probability distribution is formed;
[0034] B: After obtaining the probability distribution of all edge nodes through the weighted random sampling process, K weighted random samplings without replacement are performed to select the final set of candidate nodes.
[0035] (124) Anomaly Handling and Backup Mechanism: To ensure the stable operation of the entire scheduling process under any extreme conditions, a deterministic backup plan is designed. When an anomaly is detected during the execution of weighted random sampling (e.g., all nodes are overloaded, the network is down or there is an anomaly, resulting in an infinite weighted distance, or numerical underflow or floating-point arithmetic error occurs during probability calculation), the anomaly handling and backup mechanism is automatically triggered, immediately suspending the probabilistic sampling process and switching to the backup plan: First, obtain the original weighted distances of all edge nodes that have been calculated. Subsequently, these weighted distances are sorted in ascending order. If the weighted distances are equal (e.g., all are infinite), their relative order is determined according to a preset deterministic rule (e.g., ascending order by node ID). Finally, the top K nodes in this sorted list are deterministically selected as the final candidate node set.
[0036] According to a preferred embodiment of the present invention, in step (2), specifically:
[0037] (21) System state awareness: In order to realize context-aware decision-making, the current state of candidate nodes and their interrelationships are represented in a structured way. Traditional DRL methods usually flatten all state information into a long vector. This method will lose the topological association information between nodes. To overcome this defect, the state is dynamically constructed into a graph structure.
[0038] (22) GNN feature extraction: In order to enable deep reinforcement learning agents to understand the complex relationships of graph structure data and perform effective relational reasoning, graph neural networks (GNN) are introduced as state encoders. Its core function is to generate an intelligent profile for each node in the graph (including candidate edge nodes and cloud nodes), that is, a low-dimensional vector representation containing its own state and surrounding network environment information. The information propagation of graph neural networks strictly follows the actual connections in the graph, naturally learning and reflecting the real connectivity and isolation relationships between nodes.
[0039] (23) DRL Cooperative Scheduling Decision: After obtaining the system state encoded by the graph neural network and containing contextual information, the final cooperative scheduling decision is achieved using the deep reinforcement learning Actor-Critic framework.
[0040] According to a preferred embodiment of the present invention, in step (21), specifically:
[0041] (211) Definition and structure of graphs: At each decision moment, for the task block to be scheduled, a dynamic and focused subgraph G is constructed. t = (V, E, X) t The specific composition is as follows:
[0042] Node set (V): The nodes in the graph not only include the K candidate edge nodes selected in step (1), but also always include cloud nodes as a special, resource-rich backup node. Therefore, the total number of nodes is K+1.
[0043] Edge set (E): The edges in the graph represent the logical communication links between nodes. The central scheduler dynamically constructs the edge set based on the real-time network detection data (such as connectivity and latency) provided by the monitoring agents of each edge node.
[0044] Feature set (X)t ): The dynamic information carrier of the graph, containing the real-time state features of nodes and edges at each decision time t, composed of node feature vectors and edge feature vectors, used to comprehensively describe the state of the graph to the GNN model.
[0045] Node Feature Vector: Each node is associated with a feature vector that describes its current resource status. This vector includes five core metrics: computing resource load (e.g., the combined utilization percentage of CPU and GPU), remaining computing capacity (the part remaining after subtracting the used computing power from the node's total computing power), memory utilization (the percentage of currently used physical memory to the total memory), task queue length (the number of tasks waiting to be processed), and node type identifier (a binary identifier, e.g., 0 for edge nodes and 1 for cloud centers, used to distinguish node types).
[0046] Edge feature vector: Each edge is associated with a feature vector to describe its current network status, including two core metrics: available bandwidth (the remaining available bandwidth monitored in real time on the link) and network latency (round-trip communication latency between two nodes).
[0047] (212) Construct a state graph. The monitoring agents deployed on each edge node periodically report the node's own state and the link state to other candidate nodes to the central scheduler. When the central scheduler receives a new task block and completes the macro-candidate screening, it aggregates this latest real-time information to construct the state graph G for the task block at the current decision moment. t .
[0048] According to a preferred embodiment of the present invention, in step (22), the graph neural network implementation process simulates a multi-round information exchange and integration process. In each layer, each node will: send its current profile information to all directly connected neighboring nodes; then, collect the information sent by all neighboring nodes; and finally, combine its own information to update and form a richer and more comprehensive new profile. After propagation through H layers (a pre-set total number of iterations, such as 2 or 3 layers), the final vector representation of each node not only retains its original state features but also integrates its H layers. By incorporating topological features and resource load information within the hop neighborhood, the originally independent node states are transformed into deep feature representations with context awareness, thereby enabling a more accurate characterization of the node's position, role, and interaction with other nodes in the local network environment.
[0049] The multi-layer propagation process of a graph neural network is formally represented by the following update formula:
[0050]
[0051] Where, N j It is the edge node EN j The neighborhood group, Representing neighbor node EN i The current image (feature vector) at the h-th layer can be viewed as the neighbor node EN. i In this round, we need to share with the edge node EN. j Information, W h It is a trainable weight matrix shared among all nodes in layer h, with dimensions [input feature dimension, output feature dimension]. It acts like a smart filter, using linear transformation to adjust the weights from neighboring nodes EN. i Original portrait sent Extract, transform, and focus on nodes The most useful information, It is a normalization constant, c ji It is a symmetric normalization factor related to node degree, and its specific calculation formula is as follows: Where Degree(j) and Degree(i) represent neighbor node EN respectively. i and edge node EN j The degree (i.e., the number of edges directly connected to a node) is a normalization constant. Introducing this constant balances information transfer, preventing high-degree nodes from having excessively high information weight and low-degree nodes from having excessively low information weight, thus stabilizing the learning process. It is a non-linear activation function (such as ReLU) that enables nodes to learn and express more complex, non-linear relationships between nodes when integrating information. Represents edge node EN j After a complete round of information exchange, interpretation, summarization, and reflection, a new profile is formed for the next layer (the h+1th layer);
[0052] According to a preferred embodiment of the present invention, in step (23), specifically:
[0053] (231) Actor-Critic framework: The Actor-Critic dual network structure works together. The Actor network is responsible for generating the scheduling strategy, receiving the state representation output by the graph neural network, and determining the specific scheduling action accordingly, that is, allocating the workflow task blocks to the appropriate nodes. The Critic network is responsible for value evaluation. Based on the state representation, it estimates the long-term value of the current state or taking a specific action in the current state, and provides guidance signals for the Actor network's strategy update. Through this collaborative mechanism, the agent can continuously optimize the existing scheduling scheme while exploring new strategies.
[0054] (232) State space: The state input of a deep reinforcement learning agent is the final feature vector set of all candidate nodes (including cloud nodes) generated by the graph neural network. This feature set integrates contextual information such as network topology and resource load, providing a high-dimensional structured input for subsequent policy decisions.
[0055] (233) Action space: In order to achieve collaborative task scheduling, the action space is designed to cover the probability distribution of all candidate nodes (K edge nodes and 1 cloud node). Specifically, the Actor network outputs a vector with dimension K+1, each element of which corresponds to a candidate node. Its value represents the probability of scheduling the current task block to that node, and the node with the highest probability is selected as the execution target.
[0056] (234) Reward Function: To achieve an adaptive balance among multiple objectives such as task completion rate, resource utilization rate, and migration cost, a multi-objective reward function with dynamically adjusted weights is designed. The priority of each optimization objective is flexibly adjusted according to the running stage. Considering that reinforcement learning algorithms aim to maximize cumulative rewards, while this invention needs to minimize the comprehensive cost (including migration overhead, task timeout penalty, and resource imbalance penalty), the immediate reward r is... t Defined as the negative of the total cost, this allows the agent to equivalently minimize the total cost while maximizing the reward:
[0057]
[0058] Among them, w1, w2, and w3 are weighting coefficients;
[0059] For migration costs, Total response delay = CL t +FL t CL t To calculate latency (the time it takes for a workflow task block to complete processing on the target node). Forwarding delay (the network time required for a workflow task block to be successfully transmitted from the central scheduler to the finally selected target node). Penalties are applied to cloud services.
[0060] This is a task completion rate penalty term used to ensure tasks are completed on time. It is an event-driven, binary penalty term. , where C miss It is a penalty constant used to severely punish the behavior of missing deadlines;
[0061] This is a resource utilization penalty term used to encourage the system to achieve global load balancing. After executing the scheduling decision, the new load states of all K+1 candidate nodes are predicted, and their variances are calculated.
[0062]
[0063] in, This is a penalty for resource utilization. It is the standard function for calculating variance. It is a set;
[0064] The larger the variance, the greater the load difference between nodes, the more unbalanced the system, and the higher the penalty value. Through this mechanism, the AI tends to choose scheduling schemes that can make the overall load of the cluster more balanced, thereby improving the overall resource utilization.
[0065] (235) Policy learning: Deep reinforcement learning agents construct an adaptive policy optimization mechanism based on temporal-difference error (TD-error) through continuous interaction with the environment. This mechanism is driven by the action kernel and the evaluation kernel. The two form a closed-loop update structure of prediction-feedback-correction between decision-making and evaluation, realizing the dynamic iteration and global convergence of the policy.
[0066] ① The learning cycle mechanism strictly follows a chronological order and includes the following steps:
[0067] State evaluation and action selection: The action kernel and the evaluation kernel simultaneously receive the current system state s encoded by the GNN. t The action core outputs the action probability distribution and selects the optimal action. The evaluation kernel provides a value assessment of the current state and outputs a priori prediction of its long-term value, V(s). t );
[0068] Environmental interaction and feedback acquisition: The system executes the selected action. The environment generates immediate feedback signals, including the immediate reward r for this action. t and the next state to enter s t+1 ;
[0069] Next state value assessment: The assessment kernel receives the new state s t+1 It then performs a value assessment and outputs its long-term return forecast V(s). t+1 (i) refers to an ex-post assessment of potential future benefits;
[0070] Timing differential error calculation: Timing differential error The gap between actual returns and prior predictions is quantified using the following formula:
[0071]
[0072] in, This is a discount factor used to weigh the importance of future returns. This indicates that the actual effect of the action is better than expected (positive reinforcement signal). This indicates that the result is lower than expected (a negative penalty signal);
[0073] Parameter updates and strategy changes: utilizing As a learning signal, the action kernel and evaluation kernel parameters are updated synchronously through backpropagation, thereby achieving synergistic optimization of strategy and value estimation;
[0074] ② To achieve synergistic optimization of the action kernel and the evaluation kernel, the following joint loss function is designed:
[0075]
[0076] Among them, A pro Indicates the action check of the selected action. log probability ;
[0077] The evaluation kernel part minimizes the squared prediction error term. It continuously approximates the true value function V(s), thereby improving the estimation accuracy of long-term returns and providing a stable and reliable value benchmark for strategy optimization;
[0078] The action core section utilizes timing differential error signals. Perform a strategy update: when When (indicating a return exceeding expectations), the gradient descent process will prompt the action kernel to increase the probability of choosing the current action. ;when If the return is lower than expected, then reduce the probability of choosing it.
[0079] ③ Policy Convergence and Performance Evolution: During long-term cyclic training, the action kernel and the evaluation kernel converge through... The signals form a continuous game and cooperative relationship. The evaluation kernel continuously corrects the estimation error of the state value, while the action kernel relies on the feedback from the evaluation kernel to continuously adjust the policy distribution. When the two reach a balance, the policy gradually converges to the optimal solution.
[0080] According to a preferred embodiment of the present invention, in step (3), the joint optimization strategy uses an online learning model to optimize the window length. The local scheduling strategy continuously adjusts two key parameters—the target weight w—in conjunction with the task arrival rate. This allows the strategy to adapt not only to the task arrival rate but also to the task type (e.g., automatically increasing the weight of "task completion rate" when tasks are urgent). This maintains high efficiency and stable performance under varying task conditions. The detailed steps of the joint optimization process are as follows:
[0081] Joint optimization of adaptive window and target weights: performance is highly dependent on two key parameters, window length. The frequency and granularity of scheduling are determined, and the target weights are optimized. This determines whether the optimization focus is on task timeliness or resource economy. These two parameters are no longer fixed values, but are jointly and continuously adjusted by an online learning algorithm based on Bayesian optimization. The entire optimization process is constructed into a closed loop of modeling -> decision-making -> execution -> update.
[0082] (31) Modeling and expanding the performance prediction model, using Gaussian Process Regression (GPR) as the performance prediction model;
[0083] (32) Decision: After obtaining the performance prediction (including expected value and uncertainty) of Gaussian process regression, a sampling function is used to determine the next parameter combination to be tried. Select the optimal parameter combination ;
[0084] (33) Execution and Update: Applying the optimal parameter combination Configure the local scheduler and execute a complete scheduling cycle. After the cycle ends, observe the actual performance during the cycle. This refers to the actual average task violation rate and resource utilization rate, using real data points. It is added to the historical database, and then the Gaussian process regression learning model uses this complete historical database containing real data points to update.
[0085] According to a preferred embodiment of the present invention, in step (31), specifically:
[0086] (311) Learning Objective: Gaussian process regression learns from a two-dimensional input A complex mapping relationship y=f(x) to a scalar output (performance metric y) is modeled as a Gaussian process (GP) distribution:
[0087]
[0088] Where M(x) is the mean function, which is usually set to zero to indicate no prior preference; For the kernel function, a "similarity" is defined between the performance outputs corresponding to different parameter combinations. To capture the periodic and non-periodic features in the task pattern, a window length is defined. The following composite kernel is used in terms of dimension:
[0089]
[0090] In the formula, the first part is the periodic kernel. and 'Indicates the length of the sliding window with periodic similarity. The signal variance represents the overall variation in the output value of the control function (i.e., the system performance). The length scale controls the smoothness of the function, defining the distance over which input values (window length) are still considered relevant, thus determining how drastic the performance changes with the window length and characterizing the smoothness of the periodic parts. The period is used to capture periodic patterns in task modes, and its value defines the time interval at which the performance function repeats itself.
[0091] The second part is the Gaussian kernel: For signal variance, Using length as a scale, it characterizes the smoothness of the non-periodic portion. The larger the size, the smoother the change; The smaller the size, the more drastic the change;
[0092] This composite kernel function can simultaneously model both periodic features and non-periodic perturbations in the task arrival pattern, thereby achieving an accurate characterization of the relationship between sliding window length and performance.
[0093] (312) Definition of performance index y: In order to achieve a balance of multiple objectives, the performance index y is defined as a weighted function that integrates task completion and resource utilization. The weighted function is the unknown mapping function that Gaussian process regression attempts to learn and approximate in step (311). In practice, the better the scheduling, the higher the y-value.
[0094]
[0095] in, , The target weights are selected by the intelligent decision-making module;
[0096] The average task violation rate is represented in the window. The percentage of tasks that were not completed on time is calculated as follows:
[0097]
[0098] in, This represents the total number of tasks within the time window, and v(i) is the violation indicator function. v(i) = 1 when a task is not completed on time, and 0 otherwise. This represents the sum of v(i) of all tasks within the window, i.e., the total number of tasks that have violated the rules within the window;
[0099] This represents the on-time completion rate of tasks;
[0100] This represents the average resource utilization rate; it is indicated in the window. The computing resource usage of all edge nodes is calculated as follows:
[0101]
[0102] in, This represents the total number of edge nodes participating in the computation. For edge node EN j In the time window The actual amount of computing resources used, i.e., the resources already used. For edge nodes in the time window The total amount of computing resources that can be provided, i.e., available resources. The EN of a single edge node was calculated. j The resource utilization rate provided within the window will include all Add up the utilization rates of each edge node, and then divide by . This yields the average resource utilization rate of all edge nodes.
[0103] An edge-cloud collaborative adaptive workflow scheduling system includes:
[0104] The filtering module is used to gather the raw workflow tasks generated by the device layer to the central scheduler. The central scheduler aggregates and processes the tasks internally to form workflow task blocks, and performs macro-level candidate node filtering on the task blocks to obtain a set of candidate nodes.
[0105] The micro-cooperative scheduling module utilizes graph neural networks to give deep reinforcement learning agents a global network perspective, thereby achieving edge-to-edge cooperative scheduling within the candidate node set.
[0106] The local dynamic optimization module takes over the task when a workflow task block is assigned to a target edge node for execution. The resource manager of the edge node takes over the task and adopts a resource allocation mechanism based on priority segmentation and sliding window as the basic framework for local execution. On this basic framework, a joint optimization strategy with dynamic target weighting is introduced.
[0107] The beneficial effects of this invention are as follows:
[0108] This invention constructs a three-stage progressive decision-making system, including macro-level candidate screening, collaborative scheduling decision-making, and local adaptive optimization. First, in the macro-level candidate screening stage, task clustering reduces the problem granularity, and a probabilistic optimization strategy based on weighted distance achieves a balance between utilization and exploration, quickly selecting high-quality candidate nodes for each task block, thus initially simplifying the global scheduling problem. Next, in the collaborative scheduling decision-making stage, a global network state graph is constructed using a graph neural network (GNN), extracting deep spatial features of nodes and their neighborhoods to form a "context-aware" state representation. The reinforcement learning agent then makes the optimal collaborative decision among multiple options such as local execution, edge migration, or cloud offloading. Finally, in the local adaptive optimization stage, fine-grained optimization is performed after the task is issued. An online learning mechanism dynamically adjusts the scheduling frequency and multi-objective weights, achieving a balance between task deadlines and resource utilization, ensuring efficient and robust execution at the node level. Attached Figure Description
[0109] Figure 1 This is a flowchart of the method of the present invention;
[0110] Figure 2 This is a flowchart of the weighted random sampling without replacement process of the present invention.
[0111] Figure 3 This is a flowchart of the candidate node selection process based on probabilistic optimization according to the present invention.
[0112] Figure 4 This is a flowchart of the state graph construction process for GNN-oriented decision-making in this invention;
[0113] Figure 5 This is a flowchart of the GNN feature extraction process of the present invention;
[0114] Figure 6 This is a flowchart of the DRL collaborative scheduling decision-making process of the present invention;
[0115] Figure 7 Local dynamic optimization of the online learning process flowchart. Detailed Implementation
[0116] The present invention will be further described below with reference to the embodiments and accompanying drawings, but is not limited thereto.
[0117] Example 1:
[0118] This embodiment provides an edge-cloud collaborative adaptive workflow scheduling method, such as... Figure 1As shown, this architecture is applied to a collaborative structure comprising a Device Layer, an Edge Layer, and a Cloud Layer. The bottom Device Layer integrates numerous IoT devices (such as cameras and sensors) responsible for data collection and initial processing. The middle Edge Layer consists of geographically dispersed Edge Nodes (ENs) with independent computing and storage capabilities, providing low-latency local responses; this layer interconnects with the Device Layer via wired / wireless connections. The top Cloud Layer comprises a Cloud Data Center, responsible for global resource scheduling and optimization control, and communicates with the Edge Layer via wired connections. These three layers are tightly interconnected through a multimodal network composed of fiber optics, 5G / Wi-Fi, and other technologies.
[0119] Unlike traditional three-layer structures, this embodiment introduces Graph Neural Networks (GNNs) and Collaborative Reinforcement Learning (CRL) mechanisms into the edge layer. This enables edge nodes to share topology-aware information and decision-making experience, thereby achieving cross-node adaptive scheduling optimization. Specifically, the core scheduling optimization method of this embodiment is deployed in the edge layer. By combining task awareness, resource monitoring, and transmission modeling, it utilizes GNNs to achieve structured state representation and leverages reinforcement learning agents for policy optimization, thereby achieving efficient workflow scheduling and improved resource utilization in a multimodal network environment.
[0120] The scheduling method steps are as follows:
[0121] (1) Macro candidate screening: After a large number of original workflow tasks are generated at the device layer, they are first gathered to the central scheduler. The central scheduler aggregates and processes these tasks internally to form workflow task blocks. Macro candidate node screening is performed on the task blocks to obtain a set of candidate nodes.
[0122] (11) Workflow task clustering: In order to cope with the high scheduling complexity caused by a large number of concurrent workflows gathered to the central scheduler, the original tasks with similar computational characteristics, data dependencies or generation locations are aggregated into workflow task blocks through a preprocessing process to reduce the scheduling granularity. The clustering process adopts the task clustering algorithm known in the field, such as the incremental flow clustering method based on the weighted distance of multi-dimensional task attributes, which comprehensively considers the task deadline, computational amount and spatial location attributes to dynamically generate task blocks.
[0123] To address the ambiguity of the concept of similarity, computational pattern similarity is quantitatively defined by introducing computational pattern similarity as a key criterion. First, the computational pattern of each task (including computational resource preferences and runtime environment dependencies) is represented as a high-dimensional feature vector C. patternThis vector is used to encode the proportion of different computing power units such as CPU and GPU required by the task, as well as the dependence on specific software libraries or operating environments (e.g., represented by one-hot encoding).
[0124] Subsequently, the similarity of patterns is calculated using cosine similarity metric. This function is used to calculate the similarity score between two feature vectors, and its formula is as follows:
[0125]
[0126] in, represent The L2 norm, also known as the Euclidean length or modulus, is the square root of the sum of the squares of each element in a vector, representing the "size" or "strength" of the vector in multidimensional space. This design ensures internal consistency in the computational requirements of task blocks, thus facilitating the matching of edge nodes with corresponding computational capabilities.
[0127] Therefore, the calculation pattern similarity as a key criterion specifically means: a new task i When attempting to join an existing task block, compute the new task. i eigenvectors The cosine similarity between the computational pattern centroid and the existing computational pattern centroid of the task block. The computational pattern centroid is the mean of all feature vectors within the task block. This similarity score is denoted as Sim(i, block). When Sim(i, block) is higher than a preset similarity threshold r, sim (e.g. r) sim When >0.9), new task Only then are aggregations allowed;
[0128] After clustering, the central scheduler calculates representative features at two levels for each task block: one is the geographic centroid p, where p is the source location coordinates of a task block containing m original tasks. m y m The coordinates (x, y) of the geographic centroid p are obtained by averaging all coordinates. p y p ):
[0129]
[0130]
[0131] Geographical center This serves as a representative geographic location for this logical task block, used to characterize the spatial location of the task block in subsequent weighted distance calculations.
[0132] Second, the centroid of the computational pattern. The final feature vector obtained by averaging the core computational attributes of each task within the task block is the centroid of the computational pattern. The core computational attributes are a vector, specifically including: the total computational amount of the task, the deadline of the task, the resource preference ratio of CPU / GPU computing power, and the dependence on specific software libraries or operating environments (which can be represented by one-hot encoding). The centroid of the computational pattern is used to characterize the overall computational requirements of the task block in the subsequent scheduling stage (such as step (2)).
[0133] (12) Candidate node selection based on probabilistic optimization: After the task block is formed, a fast candidate node selection process is performed for the task block. A probabilistic intelligent selection strategy is adopted to achieve a balance between optimal resource utilization and suboptimal node exploration. The specific process is as follows:
[0134] (121) Calculate the weighted distance of each node: For the task block i to be scheduled Bk and every available edge node EN j Calculating a weighted distance that takes into account both physical distance and node resources involves two steps:
[0135] a: Edge node weight assignment, for the j-th edge node EN j Assign weights Weight R is the current remaining computing resources of this edge node. j A function of (t), i.e. Weight It reflects the overall weight of a node in terms of computing power, storage, or network capabilities. The larger the weight value, the more available resources the edge node has and the stronger its service capabilities.
[0136] b: Weighted distance calculation, defining task block i Bk The geographic centroid p and each edge node EN j Center position q j The weighted distance is D w (p,q) j );
[0137]
[0138] Where d(p,q) j ) represents task block i Bk With the center position q of the edge node j The Euclidean distance between them, and the weighted distance, measures the overall matching degree between the task block and the edge node;
[0139] (122) Convert the weighted distance into a competitiveness score: calculate the EN of each edge node.j Relative to task block i Bk After weighting the distance, this cost-based indicator (the smaller the distance, the better) is transformed into a benefit-based indicator (the higher the score, the better), which is denoted as the competitiveness score.
[0140] The competitiveness score is calculated using the reciprocal of the weighted distance, i.e. ,in, Represents edge node EN j For the currently scheduled task block i Bk To avoid numerical instability or division-by-zero errors when the weighted distance approaches zero, a very small positive constant is introduced into the denominator for the competitiveness score. (equal to 10) -9 As a smoothing term, the optimized formula is obtained: This processing maintains the strong inverse relationship between the score and the weighted distance, effectively avoids numerical anomalies, and ensures the stability and robustness of the calculation process. Ultimately, the competitiveness score can intuitively and quantitatively reflect the attractiveness of each edge node to the current task block.
[0141] (123) Constructing a probability distribution and sampling candidate nodes: Based on the competitiveness scores of edge nodes, a probability distribution is constructed, and a set of candidate nodes is selected through weighted random sampling. Specifically:
[0142] A: The probability distribution is constructed by using the competitiveness scores of all N edge nodes to create a discrete probability distribution. This is achieved by applying the EN values of the edge nodes. j The probability P of being selected is obtained by normalizing the competitiveness score. j The calculation formula is: ,in, It is the sum of the competitiveness scores calculated by all N edge nodes for the same task block. Through normalization, it is ensured that the sum of the probabilities of all edge nodes being selected is 1 (i.e., ...). Thus, an effective probability distribution is formed;
[0143] B: After obtaining the probability distribution of all edge nodes through the weighted random sampling process, K weighted random samplings without replacement are performed to select the final set of candidate nodes.
[0144] First, create a candidate pool containing all edge nodes and their initial probability distributions;
[0145] Subsequently, the core sampling step is implemented by simulating the roulette wheel selection process. Based on the probability of each edge node in the candidate pool, a cumulative probability distribution array is calculated. This array is equivalent to dividing each edge node on the roulette wheel into sectors of different sizes—the higher the probability of a node, the larger the corresponding sector area. Then, a random floating-point number is generated in the interval [0, 1) as a pointer when the roulette wheel stops, and this pointer is compared with the boundary of the cumulative probability distribution to determine the specific sector it falls into, thereby selecting the corresponding edge node. Since nodes with higher probabilities have wider sectors, they are more likely to be selected. Since this process is sampling without replacement, when an edge node is selected and removed from the candidate pool, the sum of the probabilities of the remaining nodes will no longer be 1. To ensure the fairness and effectiveness of subsequent sampling, the probabilities of the remaining nodes need to be renormalized: that is, the original probability of each remaining edge node in the candidate pool is divided by the sum of the original probabilities of the remaining edge nodes to obtain their updated probabilities in the new round of sampling.
[0146] Ultimately, after K rounds of "building cumulative probability -> random location -> removing nodes -> probability renormalization", the system selects K non-repeating candidate edge nodes to form the final set. This set tends to prioritize the optimal node while retaining the flexibility to explore suboptimal nodes.
[0147] It should be noted that the number of candidate nodes K is a key hyperparameter. It is not dynamically calculated by the algorithm, but is pre-set based on a core performance trade-off. This trade-off is the balance between decision accuracy and decision speed in step (2). At the same time, although this weighted sampling process requires K rounds of iteration, its time cost is extremely low. Compared to the traversal and evaluation of all N nodes in the entire network in the early stage of the process and the neural network inference in the subsequent second step, this... The sampling computation performed in memory by each round is almost negligible. Therefore, the choice of K value is mainly limited by the computational power of process two, rather than the performance of this sampling step itself.
[0148] Figure 2 It demonstrates the specific implementation process of weighted random sampling without replacement, which aims to select a final candidate set of K nodes from N initial nodes based on their probability distribution.
[0149] (124) Anomaly Handling and Backup Mechanism: To ensure the stable operation of the entire scheduling process under any extreme conditions, a deterministic backup plan is designed. When an anomaly is detected during the execution of weighted random sampling (e.g., all nodes are overloaded, the network is down or there is an anomaly, resulting in an infinite weighted distance, or numerical underflow or floating-point arithmetic error occurs during probability calculation), the anomaly handling and backup mechanism is automatically triggered, immediately suspending the probabilistic sampling process and switching to the backup plan: First, obtain the original weighted distances of all edge nodes that have been calculated. Subsequently, these weighted distances are sorted in ascending order. If the weighted distances are equal (e.g., all are infinite), their relative order is determined according to a preset deterministic rule (e.g., ascending order by node ID). Finally, the top K nodes in this sorted list are deterministically selected as the final candidate node set.
[0150] Through this process, even if the probability calculation stage fails or the data is abnormal, a set of candidate nodes with a fixed size and valid results can still be output, thus ensuring that the scheduling task is not interrupted. This mechanism plays a safety fallback role in the overall architecture, effectively avoiding task failures caused by unexpected calculation errors, abnormal resource status, or data distortion, and significantly improving the robustness and reliability of the system.
[0151] Figure 3 This paper demonstrates a candidate node selection method based on probabilistic optimization, the core of which is to evaluate all edge nodes by calculating weighted distances and constructing probability distributions.
[0152] In summary, through this comprehensive process integrating competitiveness score conversion, probabilistic optimal sampling, and robustness assurance mechanisms, a small but high-quality set of candidate nodes is quickly and dynamically generated for each task block. This set will be passed as input to Process Two (the micro-level collaborative scheduling decision module), where the GNN+DRL model will perform the final refined collaborative scheduling within this intelligently filtered and significantly simplified decision space.
[0153] (2) Micro-level collaborative scheduling: Graph neural networks (GNN) are used to give deep reinforcement learning (DRL) agents a global network view, thereby achieving efficient and intelligent edge-to-edge collaborative scheduling within the candidate node set.
[0154] (21) System State Awareness: To achieve context-aware decision-making, the current state of candidate nodes and their interrelationships are represented in a structured manner. Traditional DRL methods typically flatten all state information into a long vector, which loses the topological association information between nodes. To overcome this defect, the state is dynamically constructed into a graph structure, specifically:
[0155] (211) Definition and structure of graphs: At each decision moment, for the task block to be scheduled, a dynamic and focused subgraph G is constructed. t = (V, E, X) t The specific composition is as follows:
[0156] Node set (V): The nodes in the graph not only include the K candidate edge nodes selected in step (1), but also always include cloud nodes as a special, resource-rich backup node. Therefore, the total number of nodes is K+1.
[0157] Edge set (E): The edges in the graph represent logical communication links between nodes. The central scheduler dynamically constructs the edge set based on the real-time network probe data (such as connectivity and latency) provided by the monitoring agents of each edge node. Specifically, if there is a valid connection between two candidate edge nodes or between an edge node and a cloud node, then there is an edge between their corresponding nodes in the graph. At the same time, the network quality indicators (i.e., available bandwidth and network latency) contained in the probe data will be extracted as the real-time features of this edge (i.e., the edge feature vector defined in the next section c).
[0158] Feature set (X) t ): The dynamic information carrier of the graph, containing the real-time state features of nodes and edges at each decision time t, composed of node feature vectors and edge feature vectors, used to comprehensively describe the state of the graph to the GNN model.
[0159] Node Feature Vector: Each node is associated with a feature vector that describes its current resource status. This vector includes five core metrics: computing resource load (e.g., the combined utilization percentage of CPU and GPU), remaining computing capacity (the part remaining after subtracting the used computing power from the node's total computing power), memory utilization (the percentage of currently used physical memory to the total memory), task queue length (the number of tasks waiting to be processed), and node type identifier (a binary identifier, e.g., 0 for edge nodes and 1 for cloud centers, used to distinguish node types).
[0160] Edge feature vector: Each edge is associated with a feature vector to describe its current network status, including two core metrics: available bandwidth (the remaining available bandwidth monitored in real time on the link) and network latency (round-trip communication latency between two nodes).
[0161] (212) Construct a state graph. The monitoring agents deployed on each edge node periodically report the node's own state and the link state to other candidate nodes to the central scheduler. When the central scheduler receives a new task block and completes the macro-candidate screening, it aggregates this latest real-time information to construct the state graph G for the task block at the current decision moment. t ;
[0162] Figure 4 This paper demonstrates the state graph construction process for GNN-oriented decision-making. It describes how the scheduler, after receiving a task and its K candidate nodes, aggregates real-time state data generated by the monitoring agents of each node to dynamically construct a state graph G for the current decision. t And finally deliver it to GNN.
[0163] (22) GNN feature extraction: In order to enable deep reinforcement learning agents to understand the complex relationships of graph structure data and perform effective relational reasoning, graph neural networks (GNN) are introduced as state encoders. Its core function is to generate an intelligent profile for each node in the graph (including candidate edge nodes and cloud nodes), that is, a low-dimensional vector representation containing its own state and surrounding network environment information. The information propagation of graph neural networks strictly follows the actual connections in the graph, naturally learning and reflecting the real connectivity and isolation relationships between nodes.
[0164] The implementation process of a graph neural network simulates a multi-round information exchange and integration process. In each layer, each node: sends its current profile information to all directly connected neighboring nodes; then, collects information from all neighboring nodes; and finally, combines its own information to update and form a richer and more comprehensive new profile. After propagation through H layers (a pre-defined total number of iterations, such as 2 or 3 layers), the final vector representation of each node not only retains its original state features but also incorporates its H layers. By incorporating topological features and resource load information within the hop neighborhood, the originally independent node states are transformed into deep feature representations with context awareness, thereby enabling a more accurate characterization of the node's position, role, and interaction with other nodes in the local network environment.
[0165] The multi-layer propagation process of a graph neural network is formally represented by the following update formula:
[0166]
[0167] Where, N j It is the edge node EN j The neighborhood group, Representing neighbor node EN i The current image (feature vector) at the h-th layer can be viewed as the neighbor node EN. i In this round, we need to share with the edge node EN. j Information, W hIt is a trainable weight matrix shared among all nodes in layer h, with dimensions [input feature dimension, output feature dimension]. It acts like a smart filter, using linear transformation to adjust the weights from neighboring nodes EN. i Original portrait sent Extract, transform, and focus on nodes The most useful information, It is a normalization constant, c ji It is a symmetric normalization factor related to node degree, and its specific calculation formula is as follows: Where Degree(j) and Degree(i) represent neighbor node EN respectively. i and edge node EN j The degree (i.e., the number of edges directly connected to a node) is a normalization constant. Introducing this constant balances information transfer, preventing high-degree nodes from having excessively high information weight and low-degree nodes from having excessively low information weight, thus stabilizing the learning process. It is a non-linear activation function (such as ReLU) that enables nodes to learn and express more complex, non-linear relationships between nodes when integrating information. Represents edge node EN j After a complete round of information exchange, interpretation, summarization, and reflection, a new profile is formed for the next layer (the h+1th layer);
[0168] The total number of iterations, H, is a key hyperparameter of the GNN, set empirically or experimentally to control the scope of information propagation (i.e., the number of neighbor hops a node can perceive). It is typically set to 2 or 3 layers to balance model performance and computational cost; the optimal value can be obtained through experimental tuning. After these H iterations, the final output of the GNN is a set of final feature vectors for all candidate nodes in the graph (K candidate edge nodes + 1 cloud node). These vectors have low dimensionality but extremely high information density, forming the final "intelligent profile" of each node. They will serve as the state input for the DRL agent, used to make accurate collaborative scheduling decisions in the future.
[0169] Figure 5 This demonstrates the feature extraction process of a Graph Neural Network (GNN), i.e., the information propagation mechanism. It depicts a multi-layered iterative process in which each node gradually generates its own feature vector, which is richer in contextual information, by aggregating and transforming the features of its neighboring nodes, until a preset total number of layers is reached.
[0170] (23) DRL Cooperative Scheduling Decision: After obtaining the system state encoded by the graph neural network, which contains contextual information, the final cooperative scheduling decision is achieved using the deep reinforcement learning Actor-Critic framework. Specifically:
[0171] (231) Actor-Critic framework: The Actor-Critic dual network structure works together. The Actor network is responsible for generating the scheduling strategy, receiving the state representation output by the graph neural network, and determining the specific scheduling action accordingly, that is, allocating the workflow task blocks to the appropriate nodes. The Critic network is responsible for value evaluation. Based on the state representation, it estimates the long-term value of the current state or taking a specific action in the current state, and provides guidance signals for the Actor network's strategy update. Through this collaborative mechanism, the agent can continuously optimize the existing scheduling scheme while exploring new strategies.
[0172] (232) State space: The state input of a deep reinforcement learning agent is the final feature vector set of all candidate nodes (including cloud nodes) generated by the graph neural network. This feature set integrates contextual information such as network topology and resource load, providing a high-dimensional structured input for subsequent policy decisions.
[0173] (233) Action space: In order to achieve collaborative task scheduling, the action space is designed to cover the probability distribution of all candidate nodes (K edge nodes and 1 cloud node). Specifically, the Actor network outputs a vector with dimension K+1, each element of which corresponds to a candidate node. Its value represents the probability of scheduling the current task block to that node, and the node with the highest probability is selected as the execution target.
[0174] Compared to discrete action spaces that only support "local execution" or "vertical offloading to the cloud", the introduction of a continuous probability distribution allows the action space to simultaneously characterize "horizontal migration" behavior (i.e., the redistribution of workflow task blocks among edge nodes). This design effectively improves the flexibility and accuracy of scheduling strategies, enabling the system to achieve better global scheduling decisions in multi-node collaborative scenarios.
[0175] To further clarify the classification of scheduling results, the concept of a primary candidate node is defined: it refers to the edge node with the smallest weighted distance in the macro-screening stage, representing the initial optimal selection based on macro-indicators. The final decision result of the deep reinforcement learning agent based on this is the result of the initial selection. It can be divided into the following three collaborative modes according to the node type corresponding to the maximum probability output:
[0176] Local execution mode: When the node with the highest probability selected by the agent is consistent with the main candidate node, it means that the workflow task block has reached a consensus in the two stages of macro screening and intelligent decision-making, and is finally executed locally on that node;
[0177] Collaborative offloading mode (horizontal migration): When the node with the highest probability is an edge node other than the main candidate node in the candidate set, it is considered as collaborative offloading mode, which means that workflow task blocks are dynamically redistributed among edge nodes;
[0178] Cloud processing mode (vertical offloading): When the node with the highest probability is a cloud node, it is considered to be in cloud processing mode, which means that the system chooses to offload the workflow task block to the cloud for execution;
[0179] (234) Reward Function: To achieve an adaptive balance among multiple objectives such as task completion rate, resource utilization rate, and migration cost, a multi-objective reward function with dynamically adjusted weights is designed. The priority of each optimization objective is flexibly adjusted according to the running stage. Considering that reinforcement learning algorithms aim to maximize cumulative rewards, while this invention needs to minimize the comprehensive cost (including migration overhead, task timeout penalty, and resource imbalance penalty), the immediate reward r is... t Defined as the negative of the total cost, this allows the agent to equivalently minimize the total cost while maximizing the reward:
[0180]
[0181] Here, w1, w2, and w3 are weighting coefficients used to balance different optimization objectives. It is important to note that, to ensure these cost items with different physical units and significant numerical differences are effectively balanced by the weighting coefficients, the system will first perform a weighting process before calculating the total cost. , and Each component is normalized, and by dynamically tracking the range of these values, they are each scaled to a comparable numerical range (e.g., [0, 1]), resulting in the final r. t These costs are calculated based on normalized values, thus ensuring that the DRL agent can make a meaningful comprehensive trade-off for all objectives.
[0182] For migration costs, This section measures the overall time and resource overhead of a scheduling decision, and includes two parts: total response latency and cloud usage penalty. Total response latency = CL t +FL t CL t To calculate latency (the time it takes for a workflow task block to complete processing on the target node). Forwarding delay (the network time required for a workflow task block to be successfully transmitted from the central scheduler to the finally selected target node). The penalty for using the cloud refers to the situation where, if an agent chooses to offload workflow task blocks to the cloud, then... This is a preset positive value (this value can be determined based on the estimated economic cost of using cloud services or the average time cost of a typical edge collaboration). If an edge node is selected, Through this mechanism, the AI learns that it must pay close attention to the direct time costs (computation and forwarding latency) and resource overhead (cloud usage penalties) of decision-making, and is thus guided to prioritize nodes with the lowest overall response latency and the greatest economic benefits.
[0183] This is a task completion rate penalty term used to ensure tasks are completed on time. It is an event-driven, binary penalty term. , where C miss C is a penalty constant used to strongly punish the act of missing a deadline. To ensure the absolute priority of this penalty, C... miss The value is set to a value significantly higher than the theoretical maximum value of other cost items, for example, when each cost item has been normalized to... Given the interval, C miss It can be set to a fixed value much greater than 1 (such as 10 or 100), which ensures w2·C miss The severity of the penalty in this category is numerically overwhelmingly greater than... and The sum of the maximum possible values; through this mechanism, the AI learns that timeout is the most unacceptable outcome, and thus proactively prioritizes task completion rate.
[0184] This is a resource utilization penalty term used to encourage the system to achieve global load balancing. After executing the scheduling decision, the new load states of all K+1 candidate nodes are predicted, and their variances are calculated.
[0185]
[0186] in, This is a penalty for resource utilization. It is the standard function for calculating variance. It is a set representing the new resource load state (e.g., measured as a normalized percentage of compute resource utilization) of each of the K+1 candidate nodes (K edge nodes and 1 cloud node) after the system predicts that the current scheduling action will be performed.
[0187] The larger the variance, the greater the load difference between nodes, the more unbalanced the system, and the higher the penalty value. Through this mechanism, the AI tends to choose scheduling schemes that can make the overall load of the cluster more balanced, thereby improving the overall resource utilization.
[0188] (235) Policy learning: Deep reinforcement learning agents construct an adaptive policy optimization mechanism based on temporal-difference error (TD-error) through continuous interaction with the environment. This mechanism is driven by the action kernel and the evaluation kernel. The two form a closed-loop update structure of prediction-feedback-correction between decision-making and evaluation, realizing the dynamic iteration and global convergence of the policy.
[0189] ① The learning cycle mechanism strictly follows a chronological order and includes the following steps:
[0190] State evaluation and action selection: The action kernel and the evaluation kernel simultaneously receive the current system state s encoded by the GNN. t The action core outputs the action probability distribution and selects the optimal action. The evaluation kernel provides a value assessment of the current state and outputs a priori prediction of its long-term value, V(s). t );
[0191] Environmental interaction and feedback acquisition: The system executes the selected action. The environment generates immediate feedback signals, including the immediate reward r for this action. t and the next state to enter s t+1 ;
[0192] Next state value assessment: The assessment kernel receives the new state s t+1 It then performs a value assessment and outputs its long-term return forecast V(s). t+1 (i) refers to an ex-post assessment of potential future benefits;
[0193] Timing differential error calculation: Timing differential error The gap between actual returns and prior predictions is quantified using the following formula:
[0194]
[0195] in, This is a discount factor used to weigh the importance of future returns. This indicates that the actual effect of the action is better than expected (positive reinforcement signal). This indicates that the result is lower than expected (a negative penalty signal);
[0196] Parameter updates and strategy changes: utilizing As a learning signal, the action kernel and evaluation kernel parameters are updated synchronously through backpropagation, thereby achieving synergistic optimization of strategy and value estimation;
[0197] ② To achieve synergistic optimization of the action kernel and the evaluation kernel, the following joint loss function is designed:
[0198]
[0199] Among them, A pro Indicates the action check of the selected action. log probability probability The generation process is as follows: After receiving the current state s, the action kernel neural network's output layer generates an initial score for all K+1 candidate actions (i.e., each candidate node), which is then normalized to a probability distribution using the Softmax function, thus transforming it into an effective probability distribution. That is, the action that is ultimately selected and executed in this distribution. The specific probability value corresponding to it;
[0200] The evaluation kernel part minimizes the squared prediction error term. It continuously approximates the true value function V(s), thereby improving the estimation accuracy of long-term returns and providing a stable and reliable value benchmark for strategy optimization;
[0201] The action core section utilizes timing differential error signals. Perform a strategy update: when When (indicating a return exceeding expectations), the gradient descent process will prompt the action kernel to increase the probability of choosing the current action. ;when When (indicating lower-than-expected returns), the probability of selection is reduced, through this method based on... The adaptive probability adjustment mechanism of the signal allows the action core to gradually strengthen high-quality strategies and suppress inefficient behaviors during continuous iteration, thereby achieving dynamic convergence of the overall strategy toward the direction of optimal long-term returns.
[0202] ③ Policy Convergence and Performance Evolution: During long-term cyclic training, the action kernel and the evaluation kernel converge through... The signals form a continuous game and cooperative relationship. The evaluation kernel continuously corrects the estimation error of the state value, while the action kernel relies on the feedback from the evaluation kernel to continuously adjust the policy distribution. When the two reach a balance, the policy gradually converges to the optimal solution.
[0203] Figure 6 This paper details the dynamic learning and decision-making loop of Actor-Critic reinforcement learning, demonstrating how the Actor and Critic kernels work together by calculating temporal difference errors. The core learning signals are used to synchronously update their respective networks, thereby gradually converging the overall policy to the optimal state.
[0204] (3) Local dynamic optimization: When a workflow task block is assigned to the target edge node for execution, the resource manager of the edge node takes over the task and adopts a resource allocation mechanism based on priority segmentation and sliding window as the basic framework for local execution. This basic framework is implemented using technologies known in the field, such as prioritizing tasks through critical path analysis and earliest deadline first (EDF) algorithms, and prioritizing high-priority tasks within the dynamic time window. A joint optimization strategy with dynamic target weighting is introduced on the basic framework.
[0205] The joint optimization strategy uses an online learning model to optimize the window length. The local scheduling strategy continuously adjusts two key parameters—the target weight w—in conjunction with the task arrival rate. This allows the strategy to adapt not only to the task arrival rate but also to the task type (e.g., automatically increasing the weight of "task completion rate" when tasks are urgent). This maintains high efficiency and stable performance under varying task conditions. The detailed steps of the joint optimization process are as follows:
[0206] Joint optimization of adaptive window and target weights: performance is highly dependent on two key parameters, window length. The frequency and granularity of scheduling are determined, and the target weights are optimized. This determines whether the optimization focus is on task timeliness or resource economy. These two parameters are no longer fixed values, but are jointly and continuously adjusted by an online learning algorithm based on Bayesian optimization. The entire optimization process is constructed into a closed loop of modeling -> decision-making -> execution -> update.
[0207] (31) Modeling and expanding the performance prediction model: Gaussian Process Regression (GPR) is adopted as the performance prediction model. GPR is a powerful nonparametric model that can not only predict the expected performance value under given parameters, but also quantify the uncertainty (variance) of the prediction, thus providing a basis for the subsequent "exploration-exploitation" balance. Specifically:
[0208] (311) Learning Objective: Gaussian process regression learns from a two-dimensional input A complex mapping relationship y=f(x) to a scalar output (performance metric y) is modeled as a Gaussian process (GP) distribution:
[0209]
[0210] Where M(x) is the mean function, which is usually set to zero to indicate no prior preference; For the kernel function, a "similarity" is defined between the performance outputs corresponding to different parameter combinations. To capture the periodic and non-periodic features in the task pattern, a window length is defined. The following composite kernel is used in terms of dimension:
[0211]
[0212] In the formula, the first part is the periodic kernel. and 'Indicates the length of the sliding window with periodic similarity. The signal variance represents the overall variation in the output value of the control function (i.e., the system performance). The length scale controls the smoothness of the function, defining the distance over which input values (window length) are still considered relevant, thus determining how drastic the performance changes with the window length and characterizing the smoothness of the periodic parts. The period is used to capture periodic patterns in task modes, and its value defines the time interval at which the performance function repeats itself.
[0213] The second part is the Gaussian kernel: For signal variance, Using length as a scale, it characterizes the smoothness of the non-periodic portion. The larger the size, the smoother the change; The smaller the size, the more drastic the change;
[0214] This composite kernel function can simultaneously model both periodic features and non-periodic perturbations in the task arrival pattern, thereby achieving an accurate characterization of the relationship between sliding window length and performance.
[0215] (312) Definition of performance index y: In order to achieve a balance of multiple objectives, the performance index y is defined as a weighted function that integrates task completion and resource utilization. The weighted function is the unknown mapping function that Gaussian process regression attempts to learn and approximate in step (311). In practice, the better the scheduling, the higher the y-value.
[0216]
[0217] in, , The target weights are selected by the intelligent decision-making module;
[0218] The average task violation rate is represented in the window. The percentage of tasks that were not completed on time is calculated as follows:
[0219]
[0220] in, This represents the total number of tasks within the time window, and v(i) is the violation indicator function. v(i) = 1 when a task is not completed on time, and 0 otherwise. This represents the sum of v(i) of all tasks within the window, i.e., the total number of tasks that have violated the rules within the window;
[0221] This represents the on-time completion rate of tasks;
[0222] This represents the average resource utilization rate; it is indicated in the window. The computing resource usage of all edge nodes is calculated as follows:
[0223]
[0224] in, This represents the total number of edge nodes participating in the computation. For edge node EN j In the time window The actual amount of computing resources used, i.e., the resources already used. For edge nodes in the time window The total amount of computing resources that can be provided, i.e., available resources. The EN of a single edge node was calculated. j The resource utilization rate provided within the window will include all Add up the utilization rates of each edge node, and then divide by . This yields the average resource utilization rate of all edge nodes.
[0225] (32) Decision: After obtaining the performance prediction (including expected value and uncertainty) of Gaussian process regression, a sampling function is used to determine the next parameter combination to be tried. Select the optimal parameter combination Specifically:
[0226] (321) Balancing exploration and utilization: The core of the acquisition function is to achieve a balance between exploration (trying those parameter regions where the model is not yet certain but may have surprises) and utilization (directly selecting those parameters with the highest model prediction performance);
[0227] (322) UCB Acquisition Function: The classic Upper Confidence Bound (UCB) is used as the acquisition function, and its formula is as follows:
[0228]
[0229] in, It is the expected performance value of Gaussian process regression prediction, representing the utilization of... It is the standard deviation of the performance uncertainty in Gaussian process regression prediction, representing exploration. It is a hyperparameter used to control the degree of exploration. It is not a fixed value, but changes dynamically with the number of learning iterations n to achieve a smooth transition from exploration to utilization. The calculation method is as follows:
[0230]
[0231] Where n represents the number of iterations executed in the online learning process, and as n increases, the exploration rate increases. It will change dynamically. Indicates the initial optimization (i.e.) The intensity of exploration (at any time). This represents the long-run exploration rate after optimization convergence. The purpose is to ensure that the algorithm retains a certain degree of exploratory capability after long-term operation and reaching stability (convergence), in order to adapt to the dynamic changes that may occur in the task arrival pattern over time. This is a time-scale parameter used to control the exploration rate from its initial value. The short-term rate of decay begins to decline. This is another time-scale parameter used to control the convergence of the exploration rate to its final value. The long-term rate;
[0232] (323) Decision-making process: At each decision-making moment, in Find the combination that maximizes the UCB score from all possible combinations. This combination represents the parameters the system will use in the next execution cycle. This means that the decision-making process not only determines the optimal scheduling time window length. (Thus affecting the frequency and granularity of scheduling), and simultaneously determining the optimal target weight. (Used to weigh the importance of task completion rate and resource utilization rate in performance indicators).
[0233] (33) Execution and Update: Applying the optimal parameter combination Configure the local scheduler and execute a complete scheduling cycle. After the cycle ends, observe the actual performance during the cycle. This refers to the actual average task violation rate and resource utilization rate, using real data points. Added to the historical database, the Gaussian process regression learning model is then updated using this complete historical database containing real data points. These updates adjust the model's performance function. Its cognition is more accurate, and its next prediction ( and This will also make it more reliable.
[0234] Figure 7 The core online learning closed-loop process of the local adaptive scheduling phase is demonstrated. Through this continuous "modeling -> decision -> execution -> update" closed loop, the local scheduling strategy can adapt to the constantly changing task arrival patterns and system states, and always dynamically find and operate on the optimal parameter combination.
[0235] In summary, this embodiment proposes an edge-cloud collaborative adaptive workflow scheduling method based on graph neural networks and deep reinforcement learning. By constructing a three-level progressive system of "macro-candidate screening - collaborative scheduling decision - local adaptive optimization", a closed-loop scheduling mechanism from global resource awareness to local policy execution is realized. This method integrates task clustering simplified modeling, global state awareness through GNN feature encoding, DRL-driven multi-objective intelligent decision-making, and Bayesian optimization for online adaptive adjustment, effectively improving task completion rate and resource utilization, and significantly enhancing the system's adaptability and stability in complex dynamic network environments.
[0236] Example 2:
[0237] This embodiment provides an edge-cloud collaborative adaptive workflow scheduling system, including:
[0238] The filtering module is used to gather the raw workflow tasks generated by the device layer to the central scheduler. The central scheduler aggregates and processes the tasks internally to form workflow task blocks, and performs macro-level candidate node filtering on the task blocks to obtain a set of candidate nodes.
[0239] The micro-cooperative scheduling module utilizes graph neural networks to give deep reinforcement learning agents a global network perspective, thereby achieving edge-to-edge cooperative scheduling within the candidate node set.
[0240] The local dynamic optimization module takes over the task when a workflow task block is assigned to a target edge node for execution. The resource manager of the edge node takes over the task and adopts a resource allocation mechanism based on priority segmentation and sliding window as the basic framework for local execution. On this basic framework, a joint optimization strategy with dynamic target weighting is introduced.
Claims
1. A method for edge cloud collaborative adaptive workflow scheduling, characterized in that, Applied to a collaborative architecture containing device layer, edge layer and cloud layer, the steps are as follows: (1) Macroscopic candidate screening, after the device layer generates the original workflow task, it is first collected to the central scheduler, the central scheduler aggregates and processes the task internally, forms a workflow task block, performs macroscopic candidate node screening on the task block, and obtains a candidate node set; (2) Microscopic collaborative scheduling, use graph neural network to give global network vision to deep reinforcement learning agent, so as to realize edge-edge collaborative scheduling in the candidate node set; (3) Local dynamic optimization, when a workflow task block is assigned to the target edge node for execution, the resource manager of the edge node takes over the task, adopts the resource allocation mechanism based on priority segmentation and sliding window as the basic framework of local execution, and introduces the dynamic target weighted joint optimization strategy on the basis of the framework; The joint optimization strategy uses an online learning model to optimize the window length. The local scheduling strategy continuously adjusts two key parameters—the target weight w—in conjunction with the target weight w. This allows the strategy to adapt not only to the arrival rate of tasks but also to the type of task, thus maintaining high efficiency and stable performance under varying task conditions. The detailed steps of the joint optimization process are as follows: Joint optimization of adaptive window and target weight: the performance highly depends on two key parameters, window length and target weight, which determine the frequency and granularity of scheduling , and whether the focus of optimization is on task timeliness or resource economy, respectively. Instead of being fixed values, these two parameters are jointly and continuously adjusted by an online learning algorithm based on Bayesian optimization, and the whole optimization process is constructed as a closed loop of modeling -> decision -> execution -> update. (31) Modeling, the extended performance prediction model adopts Gaussian process regression as the performance prediction model; (311) Learning Goal: Gaussian process regression learns a complex mapping relationship y = f(x) from two-dimensional input to a scalar output, which is modeled as a Gaussian process distribution: where M(x) is the mean function; is the kernel function, to capture both periodic and aperiodic features in the task patterns, with window length The following composite kernel is used in the dimension where the first part is the periodic kernel, and denotes the length of the sliding window with periodic similarity, is the signal variance, controlling the overall variation of the function output; is the length scale, controlling the smoothness of the function; is the period, used to capture the periodic regularity existing in the task pattern; The second part is a Gaussian kernel: is the signal variance, is the length scale, which characterizes the smoothness of the aperiodic part, The larger, the more smooth the change; The smaller, the more dramatic the change; (312) Definition of performance index y: To achieve the balance of multi-objectives, the performance index y is defined as a weighted function that integrates the task completion and resource utilization. The weighted function is the unknown mapping function that the Gaussian process regression in step (311) attempts to learn and approximate The better the scheduling is, the higher the y value is. wherein, , is a target weight selected by the intelligent decision module; The average task violation rate is the proportion of tasks that are not completed on time within a window, calculated as: the average task violation rate = (number of tasks not completed on time) / (total number of tasks) wherein, represents the total number of tasks within the time window, v(i) is a violation indicator function, v(i) = 1 when the task is not completed on time, otherwise 0, represents the sum of v(i) of all tasks within the window, i.e., the total number of tasks that violate within the window; This represents the on-time completion rate of tasks; This represents the average resource utilization rate; it is indicated in the window. The computing resource usage of all edge nodes is calculated as follows: wherein is the total number of edge nodes participating in the calculation, is the edge node EN j the amount of computing resources actually used within the time window , i.e. the used resources, is the total amount of computing resources that the edge node can provide within the time window , i.e. the available resources, is the resource utilization provided by the individual edge node EN j within the window, the utilization of all edge nodes is added together and finally divided by to obtain the average resource utilization of all edge nodes; (32) Decision: After obtaining the prediction of performance by Gaussian process regression, a selection function is used to decide the next parameter combination , and the optimal parameter combination is selected ; (321) Balance exploration and utilization: the core of the acquisition function is to balance exploration and utilization; (322) UCB acquisition function: confidence upper bound is used as the acquisition function, and its formula is: where, is the performance expectation value of the Gaussian process regression prediction, representing exploitation, is the performance uncertainty standard deviation of the Gaussian process regression prediction, representing exploration, is a hyperparameter for controlling the degree of exploration, which is not a fixed value, and dynamically changes with the number of learning iterations n to achieve a smooth transition from exploration to exploitation, and the calculation method is: where n represents the number of loops that have been performed in the online learning process, and the exploration rate dynamically changes as n increases, represents the exploration intensity at the beginning of the optimization, represents the long-term exploration rate after the optimization converges, is a time scale parameter for controlling the short-term rate at which the exploration rate decays from the initial value , is another time scale parameter for controlling the long-term rate at which the exploration rate converges to the final value . (323) Decision process: At each decision time, among all combinations of , find the combination that maximizes the UCB score ; (33) Execution with updates: Apply the optimal parameter combination Configure the local scheduler and execute a full scheduling cycle, at the end of which the actual performance within the cycle is observed in reality i.e. the real average task violation rate and resource utilization, add the real data points to the history database, which is then used by the Gaussian process regression learning model to update. 2.The edge cloud collaboration adaptive workflow scheduling method of claim 1, wherein, In step (1), specifically: (11) Workflow task clustering: through the preprocessing process, the original tasks with similar computing characteristics, data dependencies or generation positions are aggregated into workflow task blocks to reduce the scheduling granularity; (12) Candidate node screening based on probabilistic optimization: after forming the task block, a fast candidate node screening process is performed for the task block, and a probabilistic intelligent selection strategy is adopted to balance the optimal resource utilization and suboptimal node exploration. 3.The edge cloud collaboration adaptive workflow scheduling method of claim 2, wherein, In step (11), the calculation mode similarity is introduced as a key criterion. To solve the fuzzy concept of similarity, the calculation mode similarity is quantitatively defined. First, the calculation mode of each task is represented as a high-dimensional feature vector C pattern The vector is used to encode the demand ratio of the task for different computing units and the dependence on a specific software library or running environment. Subsequently, the similarity of the calculation mode is quantified by cosine similarity, and the similarity score between the two feature vectors is calculated, and the formula is: wherein representing the L2 norm, also known as the Euclidean length or modulus; Therefore, the computing pattern similarity is taken as a key criterion, and its specific meaning is that a new task i is allowed to join an existing task block block only when the cosine similarity between the feature vector of the new task i and the computing pattern centroid of the task block block, i.e., the mean of all feature vectors in the task block, is higher than a pre-defined similarity threshold r . This similarity score is denoted as Sim(i, block), and the new task is allowed to join the task block block only when Sim(i, block) is higher than a pre-defined similarity threshold r sim . After clustering, the central dispatcher calculates two levels of representative features for each task block: one is the geographic location centroid p, if a task block contains m original tasks, then its source location coordinates are (x1, y1), …, (xm, ym), and the coordinates of the geographic location centroid p are obtained by averaging all coordinates (x, y): m m p p Second, calculate the mode centroid, by mean processing the core computing attributes of each task in the task block, the final feature vector obtained is the mode centroid, and the core computing attribute is a vector, which specifically includes: total computing amount of task, task deadline, resource preference ratio of computing power and dependence on specific software library or running environment. 4.The edge cloud collaboration adaptive workflow scheduling method of claim 3, wherein, In step (12), the specific process is as follows: (121) Calculate the weighted distance of each node: for the task i to be scheduled Bk and each available edge node EN j , calculate a weighted distance that takes into account both physical distance and node resources, including two steps: a: edge node weight distribution, for the jth edge node EN j assigning weights , the weight is a function of the current remaining computing resources R j (t) of the edge node, that is The greater the weight value, the more available resources and the stronger service capability of the edge node. b: weighted distance calculation, defining task i's Bk geographical location centroid p to each edge node EN j center location q j weighted distance is D w (p,q j ); where d(p, q j ) denotes the Euclidean distance between task i Bk and the edge node center location q j . (122) Converting the weighted distance into a competitiveness score: the weighted distance of each edge node EN j with respect to the task i Bk After converting the weighted distance of each edge node EN with respect to the task i into a cost-type index, this index is converted into a benefit-type index, denoted as the competitiveness score Score. The competitiveness score is calculated by the reciprocal of the weighted distance, i.e. wherein, denotes the edge node EN j For the task block i currently being scheduled Bk The competitiveness score of the task block i, to avoid numerical instability or division by zero error when the weighted distance tends to zero, a positive constant is introduced in the denominator as a smoothing term, and the optimized formula is obtained: The competitiveness score intuitively and quantitatively reflects the degree of attraction of each edge node to the current task block. (123) Construct probability distribution and sample candidate nodes: according to the competitiveness score of the edge node, a probability distribution is constructed, and the candidate node set is selected by weighted random sampling, specifically: A: Construction of probability distribution, using the competitiveness scores of all N edge nodes, a discrete probability distribution is constructed, and the probability P of being selected by the edge node EN j is normalized by the competitiveness score j , the calculation formula is: , wherein, is the sum of the competitiveness scores calculated by all N edge nodes for the same task block, and the sum of the probabilities of being selected by all edge nodes is ensured to be 1 through normalization processing, thereby forming an effective probability distribution; B: weighted random sampling process, after obtaining the probability distribution of all edge nodes, K times of weighted random sampling without replacement is carried out according to the probability distribution, so as to select the final candidate node set; (124) Abnormality handling and backup mechanism: To ensure the stability of the whole scheduling process in any extreme case, a deterministic backup scheme is designed. When an abnormality is detected during the execution of the weighted random sampling process, the abnormality handling and backup mechanism is automatically triggered, which immediately stops the probabilistic sampling process and switches to the backup scheme: first, all the original weighted distances calculated by the edge nodes are obtained ; then, these weighted distances are sorted in ascending order. If there are equal weighted distances, the relative order is determined according to the pre-set deterministic rule; finally, the first K nodes in the sorted list are determined as the final candidate node set. 5.The edge cloud collaboration adaptive workflow scheduling method of claim 4, wherein, In step (2), specifically: (21) System state perception: in order to realize the decision of context awareness, the current state of the candidate node and its mutual relationship are structured, and the state is dynamically constructed into a graph structure; (22) GNN feature extraction: In order to enable the deep reinforcement learning agent to understand the complex correlation of the graph structure data and conduct effective relationship reasoning, a graph neural network is introduced as a state encoder. Its core function is to generate an intelligent portrait for each node in the graph, i.e. a low-dimensional vector representation containing its own state and surrounding network environment information. The information propagation of the graph neural network is along the actual existing connections in the graph, naturally learning and reflecting the real connectivity and isolation relationship between nodes; (23) DRL collaborative scheduling decision: After obtaining the system state encoded by the graph neural network and containing context information, a deep reinforcement learning Actor-Critic framework is used to realize the collaborative scheduling decision. 6.The edge cloud collaboration adaptive workflow scheduling method of claim 5, wherein, In step (21), specifically: (211) Definition and construction of a graph G, at each decision-making moment, for the current task block to be scheduled, a dynamic and focused sub-graph G is constructed t = (V, E, X t ), which is specifically constructed as follows: Node set (V): The nodes in the graph not only include the K candidate edge nodes screened by step (1), but also always include a cloud node as a special, resource-rich backup node. Therefore, the total number of nodes is K+1; Edge set (E): The edges in the graph represent the logical communication links between nodes. The central scheduler dynamically constructs the edge set according to the real-time network probe data provided by the edge node monitoring agent; Feature set (X t ): The dynamic information carrier of the graph, which contains the real-time state features of nodes and edges at each decision time t, is composed of node feature vectors and edge feature vectors to comprehensively describe the state of the graph to the GNN model; Node feature vector: Each node is associated with a feature vector to describe its current resource state. The vector includes 5 core indicators: computing resource load, remaining computing capacity, memory utilization, task queue length, and node type identifier; Edge feature vector: Each edge is associated with a feature vector to describe its current network status, including 2 core indicators: available bandwidth and network delay; (212) Constructing state graph, the monitoring agent deployed on each edge node periodically reports the node's own state and the link state to other candidate nodes to the central scheduler, when the central scheduler receives a new task block and completes the macro candidate screening, it aggregates the latest real-time information to construct the state graph G of the current decision time for the task block t ; In step (22), the graph neural network implementation process simulates a multi-round information exchange and integration process. In each layer, each node will: send its current portrait information to all directly connected neighbor nodes; then, collect information sent by all neighbor nodes; finally, combine its own information to update a new portrait. After H layers of propagation, the final vector representation of each node not only retains its original state features, but also integrates the H By jumping the topological structure characteristics and resource load information in the neighborhood range, the originally independent node state is transformed into a deep feature representation with context awareness capability through this mechanism; The multi-layer propagation process of the graph neural network is formally represented by the following update formula: where N j is the neighbor set of edge node EN j , represents the neighbor node EN i 's portrait at the current h-th layer, W h is a trainable weight matrix shared among all nodes at the h-th layer, with dimensionality [input feature dimension, output feature dimension], is a normalization constant, c ji is a symmetric normalization factor related to the node degree, with specific formula as: where Degree(j) and Degree(i) represent the degrees of neighbor node EN i and edge node EN j , respectively, is a nonlinear activation function, represents the edge node EN j 's new portrait formed at the next layer. 7.The edge cloud collaboration adaptive workflow scheduling method of claim 6, wherein, In step (23), specifically: (231) Actor-Critic framework: The Actor-Critic dual network structure is used to work collaboratively, where the Actor network is responsible for generating the scheduling policy, receiving the state representation output by the graph neural network, and deciding the specific scheduling action based on it, i.e. assigning the workflow task block to the appropriate node. The Critic network is responsible for value evaluation, estimating the long-term value of the current state or taking a specific action in the current state based on the state representation, providing guidance signals for the policy update of the Actor network; (232) State space: The state input of the deep reinforcement learning agent is the final feature vector set of all candidate nodes generated by the graph neural network. This feature set integrates context information; (233) Action space: The action space is designed as a probability distribution covering all candidate nodes. Specifically, the Actor network outputs a vector of dimension K+1, where each element corresponds to a candidate node, and its value represents the probability of scheduling the current task block to that node. The node with the highest probability is selected as the execution target; (234) Reward function: A multi-objective reward function with dynamically adjusted weights is designed, which combines the immediate reward r t defined as the negative of the total cost, so that the agent equivalently achieves the minimization of the total cost in the process of maximizing the reward: where w1, w2, w3 are weight coefficients; for migration cost, total response delay = CL t + FL t CL t for computation delay, for forwarding delay; for cloud usage penalty term; a task completion rate penalty term for ensuring timely completion of tasks is an event-driven binary penalty term, where C miss is a penalty constant for strongly penalizing the behavior of missing deadlines. A resource utilization penalty term is used to encourage the system to achieve global load balancing. After making a scheduling decision, the new load states of all K + 1 candidate nodes are predicted, and their variances are calculated: wherein, i.e. a resource utilization penalty term, is a standard function that computes variance, is a set; The larger the variance, the greater the load gap between nodes, the more unbalanced the system, and the higher the penalty value. (235) Strategy learning: Through continuous interaction with the environment, the deep reinforcement learning agent constructs an adaptive strategy optimization mechanism based on the timing difference error, which is driven by the action kernel and the evaluation kernel. The two kernels form a closed-loop update structure of prediction-feedback-correction between decision-making and evaluation, realizing the dynamic iteration and global convergence of the strategy. ① Learning cycle mechanism: Each complete learning cycle strictly follows the time sequence and includes the following steps: State evaluation and action selection: the action head and the evaluation head receive the current system state s encoded by the GNN t , the action head outputs a probability distribution over actions and selects the optimal action , the evaluation head gives the value estimate of the current state, outputting its long-term value prediction V(s t ) Environmental interaction and feedback acquisition: the system performs the selected action , the environment produces an immediate feedback signal, including an immediate reward r t for the current action and the next state s t+1 entered; Next state value evaluation: evaluate the new state s received by the kernel t+1 and value it, outputting its long-term return prediction V(s t+1 ), i.e. a post-mortem evaluation of future potential earnings; Timing difference error calculation: Timing difference error The gap between the realized return and the prior prediction is quantified by the following formula: wherein, is a discount factor that weighs the importance of future returns, represents that the actual effect of the action was better than expected, represents that the result was worse than expected; Parameter update and policy change: exploit As learning signals, the action and value parameters are updated simultaneously by backpropagation, achieving the co-optimization of policy and value estimation. ② To realize the collaborative optimization of the action kernel and the evaluation kernel, the following joint loss function is designed: wherein A pro represents the action check the selected action log probability ; evaluating the core portion by minimizing a square term of a prediction error , continuously approximating a true value function V(s) to improve the estimation accuracy of long-term returns; Action core portion utilizes timing difference error signal Perform policy update: when the gradient descent process will cause the action core to increase the selection probability of the current action ; when , the selection probability of the current action is reduced; ③ Policy Convergence and Performance Evolution: During long-term cyclic training, the action kernel and the evaluation kernel converge through... The signals form a continuous game and cooperative relationship. The evaluation kernel continuously corrects the estimation error of the state value, while the action kernel relies on the feedback from the evaluation kernel to continuously adjust the policy distribution. When the two reach a balance, the policy gradually converges to the optimal solution.
8. A kind of edge cloud collaborative adaptive workflow scheduling system, applied to the edge cloud collaborative adaptive workflow scheduling method of claim 1, it is characterized in that, It includes: The screening module is used to collect the original workflow tasks generated by the device layer to the central scheduler. The central scheduler aggregates and processes the tasks internally to form a workflow task block. The macro candidate node screening is performed on the task block to obtain a candidate node set. The micro collaborative scheduling module uses graph neural networks to give the deep reinforcement learning agent a global network view, thereby realizing edge-by-edge collaborative scheduling within the candidate node set. The local dynamic optimization module, when a workflow task block is assigned to the target edge node for execution, the resource manager of the edge node takes over the task. The resource allocation mechanism based on priority segmentation and sliding window is used as the basic framework for local execution. The dynamic target weighted joint optimization strategy is introduced on the basis of the framework.
Citation Information
Patent Citations
Smart city dynamic task scheduling method based on cloud side-end cooperation
CN120562929A
AI development optimization system based on dynamic learning and adaptive algorithm
CN120911637A