Robot task re-planning method based on task dependency graph
By using the edge-side task routing module to locate error nodes and divide the subgraph during robot task execution, the dependency consistency verification of local rearrangement is achieved through the task dependency graph. This solves the problem of task dependency relationship destruction caused by local errors and ensures the stability and efficiency of task execution.
Patent Information
- Application Number
- CN202611318332.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-28
- Publication Date
- 2026-11-20
AI Technical Summary
In the execution of long-term tasks by robots, existing technologies often result in the disruption of task dependencies and frequent replanning due to local errors. The lack of detailed handling of local task errors may lead to unnecessary task stoppages or error propagation.
The task dependency graph is obtained through the edge task routing module. The faulty task node is located, the affected and unaffected subgraphs are divided, the frozen state is set, local rearrangement candidates are generated and dependency consistency is checked. If the check passes, it is submitted to the task execution interface. If it fails, a cloud-based rebalancing request is generated.
Effectively identify the scope of error impact, prevent error propagation, reduce the probability of pauses for unaffected tasks, ensure the integrity of task dependencies, and trigger cloud-focused planning when necessary to reduce unnecessary cloud-focused planning.
Smart Images

Figure CN123137300A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of robot task planning and cloud-based collaborative data processing technology, specifically a robot task replanning method based on task dependency graphs. Background Technology
[0002] In scenarios involving long-range task execution for robots in inspection, warehousing, service, and production collaboration, robots typically perform continuous operations according to the sequential relationship and execution status of multiple sub-tasks. After the task plan is generated on the cloud or upper-level planning side, the task relationship is sent to the edge for execution, and the next task is continued based on the execution status.
[0003] Chinese patent document CN121326586A discloses an autonomous task planning method, system, terminal, and storage medium based on a large-scale cloud-edge-device collaborative model. This scheme obtains the user's instructions and the current world state. It performs a similarity search on the vector representation of the user's instructions in a memory bank, and then performs a weighted sorting to generate an experience-enhanced context. The user's instructions, the experience-enhanced context, and the current world state are then sent to a cloud planner to obtain a task planning scheme. The task planning scheme is then parsed into a task dependency graph, and an executable task list is generated based on the task dependency graph. Tasks are allocated based on the state of the edge agent. Finally, during execution, the workflow is dynamically guided based on the task execution results: if execution is successful, the next task begins; if execution fails, the failure type is determined, and a replanning prompt is generated and sent to the planner.
[0004] The above approach can leverage historical experience for planning assistance and trigger replanning after failure, but it still has shortcomings in edge-side execution scenarios for long-term robot tasks: Post-failure handling primarily relies on failure type identification, remaining task pruning, difference analysis, and cloud-based replanning. However, it lacks more detailed constraint handling for issues such as the propagation range of local task errors across task dependencies, whether unaffected tasks still meet the requirements for continued execution, and whether adjusting the task order on the edge will disrupt previous constraints. This is because long-duration task nodes often have dependencies or coupled execution states. If a local error is reported as a complete failure, a task branch that could have continued might also stop. Conversely, relying solely on simple rules to adjust remaining tasks could lead to the submission of a new execution sequence even when dependencies are not met, causing error propagation or frequent replanning triggers. Therefore, existing technologies need to address how to maintain task dependencies on the edge and reduce unnecessary cloud-based replanning after local errors occur during long-duration robot task execution. Summary of the Invention
[0005] (a) Technical problems to be solved To address the shortcomings of existing technologies, this invention provides a robot task replanning method based on task dependency graphs. The edge task routing module acquires the task dependency graph and establishes its runtime state. After receiving task execution feedback, it locates erroneous task nodes. Based on the erroneous task nodes and their subsequent dependencies, it determines affected and unaffected subgraphs, and sets a frozen state for the affected subgraphs. In the unaffected subgraphs, it identifies a set of executable frontier nodes, generates local reordering candidates, and performs dependency consistency checks. If the check passes, it submits the candidate to the task execution interface; if the check fails or the executable frontier is empty, it generates a cloud-based replanning request, which includes the erroneous task node, the affected subgraph, and the reason for the replanning trigger. This method solves the technical problems described in the background section.
[0006] (II) Technical Solution To achieve the above objectives, the present invention provides the following technical solution: The robot task replanning method based on task dependency graph is executed by the edge task routing module, including: acquiring the task dependency graph and establishing the edge task graph runtime state. The task dependency graph includes task nodes, node states, and predecessor and successor dependencies; receiving task execution feedback and locating erroneous task nodes; dividing the affected subgraph and unaffected subgraph according to the successor dependencies of the erroneous task nodes, and freezing the task nodes in the affected subgraph. Determine the set of executable frontier nodes in the unaffected subgraph; send a cloud-focused planning request when the frontier is empty. When the frontier is not empty, local reordering candidates are generated and dependency consistency checks are performed. If the check passes, the candidate is submitted to the task execution interface. If the check fails, a cloud-based reordering request is sent. The cloud-based reordering request includes the faulty task node, the affected subgraph, and the reason for the reordering trigger.
[0007] Furthermore, the task node in the task dependency graph records the node state, the set of predecessor dependencies, the set of successor dependencies, and a freeze flag; the node state includes at least one of the following: not executed, executable, executing, completed, failed, frozen, pending recovery, and pending cloud-focused planning. The freeze flag and node status together determine the eligibility of a task node to enter the set of executable frontier nodes.
[0008] Furthermore, the edge task routing module takes the erroneous task node as the starting point, reads the set of subsequent dependencies of the erroneous task node, and searches for the affected subsequent task nodes along the subsequent dependencies. Write the erroneous task node, its affected successor task node, and its corresponding dependent edges into the affected subgraph; write the task nodes that do not depend on the erroneous task node and are not blocked by the affected dependent edges into the unaffected subgraph.
[0009] Furthermore, after setting the frozen state for the task nodes in the affected subgraph, the frozen flag of the frozen task nodes is set to prohibit scheduling; the frozen task nodes are excluded when determining the set of executable frontier nodes and generating local rearrangement candidates. Task nodes within an unaffected subgraph enter the set of executable frontier nodes only if all their strongly preceding dependent task nodes are completed and not blocked by mutually exclusive dependencies.
[0010] A robot task replanning system based on task dependency graph includes: a task graph state storage unit that stores the task dependency graph and the running state of the end-side task graph. The task dependency graph includes task nodes, node states, and predecessor and successor dependencies. The task execution interface returns task execution feedback to the task routing module on the endpoint. The edge task routing module locates erroneous task nodes based on task execution feedback, determines the affected and unaffected subgraphs according to the successor dependencies of the erroneous task nodes, sets the task nodes in the affected subgraphs to a frozen state, determines the set of executable frontier nodes in the unaffected subgraphs, generates local rearrangement candidates based on the set of executable frontier nodes, and performs dependency consistency checks; when the checks pass, the edge task routing module submits the local rearrangement candidates to the task execution interface. When the verification fails or the set of executable frontier nodes is empty, the edge task routing module generates a cloud-based replanning request. The cloud-based replanning request includes the erroneous task node, the affected subgraph, and the reason for the replanning trigger.
[0011] An electronic device includes a memory and a processor, wherein the memory stores a computer program that, when executed by the processor, implements a robot task replanning method based on a task dependency graph.
[0012] A computer-readable storage medium storing a computer program that, when executed by a processor, implements a robot task replanning method based on a task dependency graph.
[0013] (III) Beneficial Effects This invention provides a robot task replanning method based on task dependency graphs, which has the following beneficial effects: By using the task routing module on the edge to locate the erroneous task node based on the task execution feedback, the entire task failure event is mapped to a node-level error event in the task dependency graph, narrowing down from the global task to a specific node. This provides a clear data foundation for subsequent identification of the scope of the error, as well as state freezing and local reordering.
[0014] By identifying the erroneous task node and its subsequent dependencies, the affected subgraphs and unaffected subgraphs are determined. The edge task routing module can then distinguish which branches are within the scope of error propagation and which can be judged independently, thus preventing local errors from being directly amplified into overall task failure and reducing the probability of unaffected tasks being suspended simultaneously.
[0015] By performing dependency consistency checks on local rearrangement candidates, and submitting them to the task execution interface when the check passes and generating a reason for candidate rejection when the check fails, the candidate submission is subject to constraints such as prerequisite dependencies, frozen state, mutual exclusion relationship and version state, thus avoiding the disruption of the original logical closure relationship of the task dependency graph by the end-side rearrangement.
[0016] By generating a cloud-focused planning request and carrying an error-laden task node when the executable frontier is empty or the candidate fails the verification, the cloud takeover is based on the end-side graph-level analysis and local recovery failure reasons, thereby achieving data closed-loop collaboration between end-side isolation recovery and cloud-focused planning. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of the overall architecture of the cloud-side and edge-side collaborative robot task replanning system of the present invention. Figure 2 This is the main flowchart of the robot task replanning method based on task dependency graph of the present invention; Figure 3 This is a schematic diagram of the data structure of the task dependency graph and the terminal task graph in the running state of the present invention; Figure 4 This is a schematic diagram illustrating the error-affected domain identification and affected subgraph freezing of the present invention; Figure 5 This is a schematic diagram illustrating the executable frontier recalculation, local rearrangement candidate generation, and dependency consistency verification of the present invention. Figure 6 This is a schematic diagram of the task node state transition of the present invention; Figure 7 This is a schematic diagram of cloud-based planning gating and timing interaction of the present invention; Figure 8 This is a schematic diagram of the exception handling and degraded execution process of the present invention; Figure 9 This is a schematic diagram of an alternative embodiment of the present invention; Figure 10 This is a schematic diagram of the task execution carrier of the present invention applied to a mobile operating robot. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] Please see Figures 1-10 This invention provides a robot task replanning method based on task dependency graphs.
[0020] The following combination Figures 1 to 10 The embodiments of the present invention will be further described. It should be understood that the following embodiments are used to explain the technical concept and feasible path of the present invention, and are not intended to limit the scope of protection of the present invention. The cloud side, edge side, task execution interface, storage unit, task node, subgraph and state shown in the accompanying drawings are all abstract expressions of task-level data processing relationships, and do not represent limitations on the mechanical structure of the robot body, sensor installation position, path planning method, motion primitives or execution mechanism spatial arrangement. Figure 10 The mobile robot shown is only used to illustrate a specific application of the method of the present invention and does not constitute a limitation on the specific mechanical structure of the robot.
[0021] This invention focuses on how, during the execution of long-range robot tasks on the edge, when an error occurs at a local task node, the edge task routing module isolates the scope of the error's impact based on the task dependency graph in runtime, recalculates the executable frontier of unaffected task branches, generates and verifies local reordering candidates, and initiates a structured replanning request to the cloud side when the edge cannot safely submit local candidates.
[0022] For ease of reference between text and figures, the main reference numerals and their meanings used in this paper are as follows: Cloud-side task planning service 100, Cloud-side task planning module 110, Cloud-side task replanning module 120, Task memory module 130, Edge-side task routing system 200, Edge-side task routing module 210, Executable frontier recalculation unit 217, Local reordering candidate generation unit 218, Dependency consistency verification unit 219, Cloud-side replanning request generation unit 220, Task graph version consistency verification unit 230, Degradation execution control unit 240, Task execution interface 300, Robot task execution system 310, Edge-side data storage module 400, Task graph state storage unit 410, Edge-side reordering rule base 420, Communication link 500, Task dependency graph distribution link 510. Task execution feedback link; 520. Cloud-focused planning request link; 530. Cloud-focused planning result return link; 540. Edge-side cache node; 600. Edge-side task graph cache unit; 610. Cross-end conflict arbitration unit; 620. Task dependency graph; 801. Task node; 802. Dependency edge; 803. Task graph version identifier; 804. Error task node; 806. Affected subgraph; 807. Unaffected subgraph; 808. Frozen node set; 809. Executable frontier node set; 810. Local reordering candidate; 811. Candidate rejection reason; 812. Cloud-focused planning request; 813. Cloud-focused planning result; 814. Node status; 815. Predependent set; 816. Subsequent dependency set; 817. Dependency edge type; 818. Graph-level failure experience record; 819.
[0023] like Figure 1 As shown, the robot task replanning system of this embodiment includes a cloud-side task planning service 100, an edge-side task routing system 200, a task execution interface 300, an edge-side data storage module 400, and a communication link 500. The cloud-side task planning service 100 includes a cloud-side task planning module 110 and a cloud-side task replanning module 120. The edge-side task routing system 200 includes an edge-side task routing module 210, which executes the main processing logic of this invention. The edge-side data storage module 400 includes a task graph state storage unit 410 and an edge-side reordering rule base 420. The task graph state storage unit 410 stores the node states, frozen states, error markers, leading edge markers, candidate records, and optional task graph version identifiers of the task dependency graph 801 during edge execution; the edge-side reordering rule base 420 stores candidate generation rules, dependency consistency verification rules, anomaly routing rules, cloud-side replanning gating conditions, and optional degrade execution rules.
[0024] The task execution interface 300 is used to handle task-level data interaction between the end-side task routing module 210 and the robot task execution system 310. In the task issuing direction, it receives task nodes or local rearrangement candidates 811 submitted by the end-side and issues tasks and monitors their status to the robot task execution system 310. In the feedback direction, it receives execution results and status feedback returned by the robot task execution system 310 and forms task execution feedback for processing by the end-side task routing module 210. The robot task execution system 310 can be an actual robot control platform, robot task execution middleware, simulation task execution platform, or other system capable of executing tasks based on nodes and returning node execution status. In a specific application, the robot task execution system 310 can be... Figure 10 The mobile robot and its control platform shown are implemented. It should be noted that... Figure 10 The mobile robot shown is only an application example of the method of the present invention, and does not limit the specific shape, mechanical structure, sensor installation position, number of robotic arms or form of mobile chassis of the robot body.
[0025] exist Figure 10 In the application shown, the task node or local rearrangement candidate 811 submitted by the edge can correspond to the task-level execution object such as the work area, target perception, robotic arm grasping, handling, target placement, or environmental inspection. The mobile operation robot executes the corresponding task through the mobile chassis, environmental perception components, robotic arm, and end effector, and generates execution results and status feedback based on the movement, perception, or operation results; the task execution interface 300 returns the task execution feedback to the edge task routing module 210 for node-level error localization and edge task graph running status update.
[0026] like Figure 10 As shown, in one specific application embodiment, the robot task execution system 310 is implemented by a mobile manipulator robot. The mobile manipulator robot may include a mobile chassis, a robot body mounted on the mobile chassis, and a robotic arm and end effector mounted on the robot body. The robot body may also be configured with environmental perception components for obtaining the working environment or target state; Figure 10 In the example shown, the robot body has two robotic arms. These components are used to carry and execute task-level execution objects issued by the task execution interface 300. The mobile chassis is used to execute mobile tasks, the robotic arms and end effector are used to execute operational tasks, and the environmental perception component is used to generate perceptual feedback related to the task execution results. The above structure is only used to illustrate that the method of the present invention can be deployed on a mobile operational robot and does not change the processing logic of the end-side task routing module 210 based on the task dependency graph 801, which includes locating erroneous task nodes, freezing affected subgraphs, recalculating executable frontiers, generating local rearrangement candidates, and verifying dependency consistency.
[0027] The cloud-side task planning module 110 is used to generate or maintain a task dependency graph 801. The task dependency graph 801 can originate from user task objectives, cloud-side planning results, existing task templates, or task breakdown results issued by the upper-level system. In this embodiment, how the cloud-side task planning module 110 generates the initial task dependency graph 801 is not the core of this invention; the core of this invention lies in how the end-side task routing module 210 performs local recovery and cloud-side takeover gating based on the task graph's running state when a local error occurs after the task dependency graph 801 enters the end-side execution.
[0028] The cloud-side task planning module 110 sends the task dependency graph 801 to the end-side task routing module 210 through the task dependency graph distribution link 510. After receiving the task dependency graph 801, the end-side task routing module 210 writes it into the task graph state storage unit 410 and establishes the running state of the end-side task graph.
[0029] The task execution feedback link 520 is used to carry the task execution feedback returned by the task execution interface 300. This feedback indicates at least the status information of a task node, such as whether it has completed, failed, timed out, resulted in a mismatch, is unavailable, or failed preconditions. When the end-side task routing module 210 receives this feedback, it does not directly abstract the error into a complete task failure. Instead, based on the specific task node identifier carried or mapped in the feedback, it binds the error to a specific task node 802 in the task dependency graph 801 to locate the erroneous task node 806. This node-level location provides a clear data object for subsequent affected subgraph identification, freezing, executable frontier recalculation, and candidate verification.
[0030] The cloud-side replanning request link 530 is used to send the cloud-side replanning request 813 from the end-side task routing module 210 to the cloud-side task replanning module 120. Unlike ordinary failure logs, the cloud-side replanning request 813 includes at least the erroneous task node 806, the affected subgraph 807, and the replanning trigger reason. The replanning trigger reason may include the candidate rejection reason 812, the reason that the executable frontier node set 810 is empty, the reason that the task graph version is inconsistent, the reason that there is no matching end-side reordering rule, or the reason that the local reordering count has reached the limit. The cloud-side replanning result return link 540 is used to return the cloud-side replanning result 814 generated by the cloud-side task replanning module 120 to the end-side task routing module 210. The end-side task routing module 210 updates the end-side task graph running state according to the result, and performs processing such as unfreezing, replacing task nodes, updating dependent edges, or continuing to maintain the pending cloud-side replanning state.
[0031] pass Figure 1The system architecture shown forms a closed loop between the task graph generated or maintained on the cloud side and the execution feedback, local reordering on the edge side, and replanning requests on the cloud side. With the running state of the task graph on the edge side as the core, the task execution feedback can trigger the location of error nodes, the error nodes can trigger the freezing of affected subgraphs and the recalculation of the frontier of unaffected subgraphs, the local candidates are subject to dependency consistency verification before submission, and the cloud side only receives structured replanning requests when the edge side cannot safely submit local candidates.
[0032] like Figure 3 As shown, the task dependency graph 801 includes multiple task nodes 802 and dependency edges 803 connecting the task nodes 802. Figure 3 Tasks 1 through 7 are only used to illustrate the possible dependencies between task nodes and do not limit the number of nodes, node names, node task content, or dependency graph size in the actual system. Task node 802 can represent a subtask in a robot's long-range task, an executable task unit, a task segment obtained by splitting from the upper-level system, or a task-level execution object that needs to be submitted to the robot task execution system 310 through the task execution interface 300. Dependency edges 803 are used to express the pre-dependencies and successor dependencies between task nodes. If task node A must be completed before task node B is executed, then task node A can be a pre-dependent node of task node B, and task node B can be a successor task node of task node A. The direction of dependency edges 803 is used to indicate the direction of dependency propagation and the direction of influence propagation. When a pre-failure node fails, there may be affected nodes on its successor dependency chain; however, other branches that are not dependently coupled with the erroneous node are not necessarily affected. This implementation uses dependency edges 803 to limit the scope of error propagation to the affected subgraph 807.
[0033] Each task node 802 has at least: a node state 815, a set of prerequisite dependencies 816, and a set of successor dependencies 817. The node state 815 indicates the current task node's running state in the end-side task graph. The set of prerequisite dependencies 816 represents the set of prerequisite nodes that must be satisfied before the current node can execute. The set of successor dependencies 817 indicates which successor nodes might be affected after the current node completes, fails, or is frozen. The set of prerequisite dependencies 816 allows the end-side task routing module 210 to determine whether a node is eligible to enter the set of executable precursor nodes 810. The set of successor dependencies 817 allows for tracing the impact of an erroneous task node 806.
[0034] In some embodiments, task node 802 may also have a task graph version identifier 804, a dependency edge type 818, a freeze flag, an error flag, and a front flag. The task graph version identifier 804 identifies the version of the task dependency graph 801 or the runtime version of the edge task graph. When both the cloud and edge sides may update the task dependency graph 801, the task graph version identifier 804 helps the edge side determine whether the task graph it relies on is still consistent with the version confirmed by the cloud side before submitting a local reordering candidate 811. The dependency edge type 818 distinguishes different relationships such as strong dependencies, weak dependencies, mutually exclusive dependencies, substitutable dependencies, or parallel dependencies. The freeze flag indicates that the node is prohibited from entering the executable front and local reordering candidates; the error flag indicates that the node is identified as an erroneous task node; the front flag indicates that the node belongs to the current executable front node set 810.
[0035] The edge-side task graph runtime state is a runtime data object maintained by the edge-side task routing module 210 during task execution. This runtime state is not simply a copy of the cloud-side task dependency graph 801, but rather a dynamic data structure formed by overlaying task execution feedback, node state changes, frozen states, error markers, executable frontier markers, local reordering candidates, candidate rejection reasons, and optional version information onto the task dependency graph 801. Through the edge-side task graph runtime state, the edge-side task routing module 210 can determine, without immediate intervention from the cloud side, whether local errors affect all tasks, which nodes should be frozen, which nodes still have the conditions to continue execution, and whether local reordering candidates can be safely submitted.
[0036] exist Figure 3 In the illustrated embodiment, the task dependency graph 801 can be represented using a graph structure visualization method; however, in actual computer implementations, the task dependency graph 801 can be stored using an adjacency list, adjacency matrix, structured text, relational table structure, or graph database structure. Regardless of the storage method used, as long as it can express the task node 802, the preceding dependency set 816, and the subsequent dependency set 817, and support the end-side task routing module 210 in tracking the scope of error impact based on the subsequent dependency set 817, the present invention can be realized. This description gives the task dependency graph 801 sufficient upper-level generalization space, while avoiding unnecessarily limiting the scope of protection to a certain data storage format.
[0037] like Figure 2As shown in S1, the edge-side task routing module 210 obtains the task dependency graph 801 generated or maintained by the cloud-side task planning module 110. The task dependency graph 801 includes at least task nodes 802, node states 815, a set of preceding dependencies 816, and a set of succeeding dependencies 817. The edge-side task routing module 210 can receive the task dependency graph 801 through the task dependency graph distribution link 510, or it can read the synchronized task dependency graph 801 from the edge-side cache node 600 or the local task graph state storage unit 410. To ensure the consistency of task execution, the edge-side task routing module 210 can synchronously record the task graph version identifier 804 when establishing the edge-side task graph running state.
[0038] After receiving the task dependency graph 801, the edge-side task routing module 210 first performs readability and basic field integrity checks on the task graph. This check may include: whether task nodes 802 have unique node identifiers, whether the preceding dependency set 816 and the succeeding dependency set 817 can be mapped to each other, whether node states 815 have valid initial states, and whether the task graph version identifier 804 is consistent with the version distributed from the cloud or cached on the edge. This check is not intended to introduce new core algorithms, but rather to ensure that subsequent error node location, impact domain identification, freezing, and executable frontier recalculation have clear inputs.
[0039] When establishing the runtime state of the edge task graph, the edge task routing module 210 can initialize the node state 815 to one of the following: not executed / executable / in execution / completed / failed / frozen / pending recovery / pending cloud-focused planning. If a node's prerequisite dependency set 816 is empty, or all nodes in its prerequisite dependency set 816 are marked as completed, then this node can be initialized to an executable state; if a node has incomplete prerequisite dependencies, then this node can remain in an inexecuted state. In this way, before the task starts execution, the edge task routing module 210 can obtain a batch of executable nodes and provide a data foundation for the subsequent task execution feedback loop.
[0040] In some embodiments, the edge task routing module 210 can also generate or maintain a freeze flag, an error flag, and a leading edge flag for each task node 802. The freeze flag can initially be unfrozen; the error flag can initially be empty; the leading edge flag can be calculated based on the satisfying state of the preceding dependencies. Thus, during task execution, when a task node becomes an error task node 806, the edge task routing module 210 can quickly find its subsequent dependency set 817, set the freeze flag, update the leading edge flag, and regenerate the executable leading edge node set 810.
[0041] like Figure 2As shown in S2, the edge task routing module 210 receives task execution feedback through the task execution interface 300. The task execution feedback can be returned by the robot task execution system 310, task scheduling middleware, or simulation execution platform. The task execution feedback includes at least the task node identifier and execution status; optionally, it may also include fields such as error type, feedback time, task graph version identifier 804, execution result description, resource status description, and dependency condition check results. These fields are used to demonstrate that those skilled in the art can locate the task nodes in the task dependency graph 801 based on the feedback data.
[0042] If the task execution feedback indicates successful execution, the edge task routing module 210 will set the node status 815 of the corresponding task node 802 to "completed" and check whether its subsequent dependency set 817 contains nodes whose prerequisite dependencies have been satisfied. If so, the corresponding subsequent node can enter the executable frontier node set 810. If the task execution feedback indicates execution failure or timeout, or if the execution result is inconsistent with expectations, or if resources are unavailable, or if prerequisite conditions are invalid, the edge task routing module 210 will mark the corresponding node as an error task node 806 according to the task node identifier, and write the error mark and error type on the edge task graph runtime state.
[0043] Among them: execution failure can indicate that the corresponding task node has not completed the scheduled task, as confirmed by the task execution interface 300; execution timeout can indicate that no completion feedback has been received under the preset or configured waiting conditions; execution result mismatch can indicate that the result completed by the task node does not match the expected state of the task node; resource unavailability can indicate that the computing resources, execution resources or external conditions required to execute the task are temporarily unavailable; failure of prerequisite dependencies can indicate that the task node discovered that the state of its dependent prerequisite nodes has changed before or during execution.
[0044] The above error types are used to determine whether the end-side task routing module 210 has entered the influence domain identification process, and do not represent the specific cause of robot hardware failure.
[0045] By locating the execution error to the erroneous task node 806, the edge task routing module 210 can avoid directly abstracting a local error into the failure of the entire task dependency graph 801. Without node-level location, the entire task failure would have to be reported to the cloud side, which could easily cause unaffected task branches to stop simultaneously. The mapping relationship established between the erroneous task node 806 and the task dependency graph 801 provides a clear starting point for subsequent partitioning of the affected subgraph 807, identification of the unaffected subgraph 808, and generation of the frozen node set 809.
[0046] like Figure 2 S3 and Figure 4 As shown, the edge task routing module 210 starts with the erroneous task node 806, reads the successor dependency set 817 of the erroneous task node 806, and searches for the successor task nodes affected by the erroneous task node 806 along the successor dependency relationship in the task dependency graph 801. The edge task routing module 210 determines the erroneous task node 806, the found successor task nodes, and the corresponding dependency edges 803 as the affected subgraph 807. The affected subgraph 807 represents the set of nodes and edges that may not be able to continue execution according to the original task order due to the error of the erroneous task node 806 in the current running state of the edge task graph.
[0047] In another implementation, the end-side task routing module 210 searches along all subsequent dependency edges and adds all successor nodes of the erroneous task node 806 to the affected subgraph 807. This approach is suitable when dependency edge type 818 is not subdivided, or when all subsequent dependencies are considered potentially susceptible to error propagation.
[0048] In another implementation, the edge-side task routing module 210 only searches for successor task nodes along strong dependency edges or non-substitutable dependency edges, thereby avoiding including all nodes corresponding to weak dependencies, substitutable dependencies, or parallel dependencies in the affected scope. The specific search rule used can be configured by the edge-side rearrangement rule base 420, or it can be marked by the cloud-side task planning module 110 when generating the task dependency graph 801 with dependency edge types 818.
[0049] Unaffected subgraph 808 is the task graph branch corresponding to affected subgraph 807. The edge-side task routing module 210 can classify task nodes that do not depend on the erroneous task node 806, are not blocked by affected dependency edges, and whose predecessor dependencies can still be independently determined in the current task graph running state, as unaffected subgraph 808. Here, unaffected subgraph 808 does not mean that every node in it can be executed immediately, but rather that these nodes are not within the scope of the direct propagation effect of the erroneous task node 806. Whether execution is possible still needs to be recalculated in S4 based on conditions such as the predecessor dependency satisfaction state, frozen state, and mutual exclusion blocking.
[0050] After identifying the affected subgraph 807, the affected subgraph freezing unit in the edge task routing module 210 freezes (i.e., sets it to a frozen state), pending recovery, or pending cloud-based replanning for at least a portion of the task nodes in the affected subgraph 807, resulting in a frozen node set 809. The frozen state is a logically prohibited scheduling state in the edge task graph's running state; it is not a mechanical locking structure, nor does it mean the robot's actuators are physically locked. Frozen nodes will not enter the subsequent executable frontier node set 810, nor will they be selected by the local reordering candidate generation unit 218 into the local reordering candidate 811. By freezing these nodes, task nodes that have lost their dependencies or whose states are uncertain are prevented from continuing to be scheduled.
[0051] The identification of affected subgraphs 807 and unaffected subgraphs 808 is complementary: the former prevents the propagation of errors, while the latter preserves task branches that may still be able to proceed. If only affected nodes are frozen without identifying unaffected subgraphs, the endpoint cannot determine which tasks can continue; if only unaffected subgraphs are identified without freezing affected subgraphs, the endpoint may mistakenly select task nodes with failed dependencies during candidate generation. Therefore, the combination of both restricts local errors to the graph-level domain of influence and provides clear boundaries for subsequent executable frontier recalculation.
[0052] like Figure 2 S4 and Figure 5 As shown, the executable front recalculation unit 217 takes the unaffected subgraph 808 as input and filters the task nodes that can be scheduled by the edge side in the unaffected subgraph 808 to form an executable front node set 810. The executable front node set 810 is not a normal task list initially generated by the cloud side, but a set of nodes recalculated by the edge task routing module 210 based on the updated edge task graph running state after the erroneous task node 806 occurs.
[0053] In some embodiments, a task node needs to meet at least the following conditions to enter the executable frontier node set 810: the task node belongs to the unaffected subgraph 808; all strong predecessor dependent task nodes of the task node have been completed; the task node is not in a frozen state; and the task node is not blocked by mutual exclusion dependencies. If a task graph version identifier 804 is set, the end-side task graph version corresponding to the task node should also be consistent with the cloud-side confirmed version, or the task node belongs to a safe execution range unaffected by version conflicts. The above conditions can be configured by the end-side reordering rule base 420, or dynamically determined by the end-side task routing module 210 based on the node status 815 and dependency edge type 818.
[0054] The purpose of executable front recalculation is to ensure that, even after the affected subgraph 807 is frozen, task nodes that meet the execution conditions can still be found in the unaffected subgraph 808 on the endpoint, allowing unaffected task branches to continue execution; rather than pausing all tasks and waiting for the cloud center of gravity to be replanned, or blindly rearranging the remaining nodes without considering dependencies. The executable front node set 810 provides the input boundary for generating local rearrangement candidates, meaning that candidate generation is only performed within the range of nodes that can be safely judged at present.
[0055] The local rearrangement candidate generation unit 218 generates local rearrangement candidates 811 based on the executable frontier node set 810. The local rearrangement candidate 811 can be a sequence of task nodes or a candidate execution set consisting of one or more nodes. Candidate generation can be performed according to task dependency level, task time limit, task waiting time, preset execution order, constraint satisfaction conditions, or a combination of the above conditions. The candidate generation method itself is not the core inventive point of this invention; its function is to provide objects to be verified for the dependency consistency verification unit 219.
[0056] In one specific implementation, for the local rearrangement candidate generation unit 218, nodes with low dependency levels and whose prerequisite dependencies have been satisfied can be selected as candidates; in another implementation, nodes with closer task deadlines can be selected as candidates; in yet another implementation, nodes with longer waiting times but not frozen can be selected to reduce the long-term stagnation of unaffected task branches.
[0057] In either case, the edge task routing module 210 will not directly hand over the candidate to the task execution interface 300, but will first hand it over to the dependency consistency verification unit 219 for verification.
[0058] like Figure 2 S5 and Figure 5 It is known that when the dependency consistency verification unit 219 performs dependency consistency verification, the local rearrangement candidate 811 needs to be verified for dependency consistency. The minimum verification items for dependency consistency verification are the prerequisite dependency satisfaction verification and the frozen state verification: the former is used to determine whether each task node in the local rearrangement candidate 811 satisfies the conditions defined by its corresponding prerequisite dependency set 816; the latter is used to determine whether the task nodes in the local rearrangement candidate 811 are not in a frozen state. If there are task nodes in the candidate whose prerequisite dependencies are not satisfied or that are already frozen, this local rearrangement candidate 811 cannot be submitted to the task execution interface 300.
[0059] In some embodiments, dependency consistency verification may further include mutual exclusion dependency verification, substitutable dependency verification, task graph version consistency verification, and local reordering count verification. Mutual exclusion dependency verification is used to determine whether there is a mutual exclusion conflict between the candidate node and the currently executing node, other nodes in the candidate sequence, or the state of end-side resources. Substitutable dependency verification is used to determine whether there is a substitutable node when the erroneous task node 806 is unexecutable; if so, and the substitution condition is met, a local reordering candidate 811 containing the substitutable node can be generated. Task graph version consistency verification is used to determine whether the task graph version on which the candidate is based is consistent with the version confirmed by the cloud side. Local reordering count verification is used to prevent the end-side from continuously generating invalid candidates under the same error event.
[0060] Once the local rearrangement candidate 811 passes the dependency consistency check, the edge-side task routing module 210 submits it to the task execution interface 300. The task execution interface 300 receives the local rearrangement candidate 811 and converts it into a task execution instruction or request that the robot task execution system 310 can recognize. It is important to note that this invention does not restrict how the task execution interface 300 sends low-level control instructions to the robot task execution system 310, nor does it impose any restrictions on the low-level path planning and action execution process of the robot task execution system. The edge-side task routing module 210 only submits locally rearranged candidates that have passed the dependency check at the task level.
[0061] If a local reordering candidate 811 fails the dependency consistency check, the dependency consistency check unit 219 generates a candidate rejection reason 812. The candidate rejection reason 812 may include one or more of the following: the prerequisite dependency is not satisfied, the task node is in a frozen state, the mutual exclusion dependency conflict, the task graph version is inconsistent, there is no matching end-side reordering rule, the local reordering count reaches the upper limit, or the local reordering candidate is empty.
[0062] Candidate rejection reason 812 explains why the endpoint cannot safely submit a local rearrangement candidate, and also serves as structured error information in the subsequent cloud-side replanning request 813. Dependency consistency verification transforms endpoint local recovery from a simple "rearrangement" into "commitability control." Without this verification, even if a local candidate is generated on the endpoint, it will still submit task nodes with unmet prerequisites or those in a frozen state, causing secondary conflicts. Therefore, by performing dependency consistency verification before submission, the endpoint task routing module 210 ensures that the local recovery action is limited to operations allowed by the current task graph runtime state, and provides a clear rejection reason for cloud-side takeover if the condition is not met.
[0063] like Figure 2 S6 and Figure 7 As shown, when the dependency consistency verification unit 219 outputs a verification failure result, or the executable frontier node set 810 is empty, the cloud-side replanning request generation unit 220 generates a cloud-side replanning request 813 and sends it to the cloud-side task replanning module 120 through the cloud-side replanning request link 530. The cloud-side replanning request 813 includes at least the erroneous task node 806, the affected subgraph 807, and the replanning triggering reason. The replanning triggering reason may include the candidate rejection reason 812 or the reason that the executable frontier node set 810 is empty. If the executable frontier node set 810 is not empty and the local reordering candidate 811 passes the dependency consistency verification, then the above cloud-side replanning gating conditions are not met, the end side does not trigger cloud-side replanning, and submits the local reordering candidate 811 to the task execution interface 300 to continue local execution.
[0064] In some embodiments, the cloud-based replanning request 813 may further include fields such as: frozen node set 809, unaffected subgraph 808, local reordering candidates 811, error type, task graph version identifier 804, local reordering count, and end-side degradation execution status. These fields are used to explain to the cloud-based task replanning module 120 the reasons for error range identification, local recovery attempts, and candidate rejections already performed on the end side. Compared to ordinary failure logs that only report "task failure," the cloud-based replanning request 813 has clear graph-level error boundaries and explanations for local recovery failures.
[0065] When the cloud-side replanning request 813 is received by the cloud-side task replanning module 120, it can generate a cloud-side replanning result 814 based on the erroneous task node 806, the affected subgraph 807, and the candidate rejection reason 812. If the candidate rejection reason is that the prerequisite dependency is not met, the cloud-side task replanning module 120 can rearrange the prerequisite nodes or replacement nodes in the affected subgraph 807. If it is a mutual exclusion dependency conflict, the execution order of the relevant nodes can be adjusted. If the task graph versions are inconsistent, the task graph synchronization result can be returned first. If there is no matching end-side rescheduling rule, the cloud side can regenerate the task segment corresponding to the affected subgraph 807. After the cloud-side replanning result 814 is returned, the end-side task routing module 210 can perform runtime updates on the end-side task graph based on this result.
[0066] The update actions may include unfreezing some nodes in the affected subgraph 807, replacing faulty task nodes 806, updating dependent edges 803, updating the task graph version identifier 804, recalculating the set of executable frontier nodes 810, and keeping some nodes in a state awaiting cloud-based planning. Therefore, in this feedback loop, the interaction between the edge and cloud is not a simple failure report, but a collaborative process involving error isolation, local recovery, structured requests, and cloud-side takeover, all centered around the task graph's runtime state.
[0067] like Figure 6 As shown, the status 815 of a task node can include: not executed 815a, executable 815b, executing 815c, completed 815d, failed 815e, frozen 815f, pending recovery 815g, and pending cloud-focused planning 815h.
[0068] The task node state 815 is maintained by the running state of the task graph on the client side, and the different states are driven by task execution feedback, prerequisite dependency satisfaction status, error impact domain identification results, cloud-focused planning results, and client-side recovery submission conditions. When a task node is in the inactive state 815a, if all prerequisite nodes in its prerequisite dependency set 816 have been completed and the task node is neither frozen nor blocked by mutual exclusion dependencies, then the client-side task routing module 210 can migrate the node to the executable state 815b. After the client-side task routing module 210 submits the executable node to the task execution interface 300, the node is migrated to the executing state 815c. Once the task execution interface 300 returns a successful execution feedback message, the node will be migrated to the completed state 815d.
[0069] If task execution interface 300 returns feedback such as execution failure, execution timeout, result mismatch, resource unavailability, or invalid prerequisites, the node in the execution state 815c will be migrated to the failure state 815e. The node in the failure state 815e will be identified as an erroneous task node 806 by the end-side task routing module 210. If the error of this node affects the scope of subsequent dependencies, the end-side task routing module 210 can migrate the erroneous node or its affected subsequent nodes to the frozen state 815f. The frozen state 815f indicates that the task node must not enter the set of executable leading nodes 810 or the local reordering candidate 811 in the current end-side task graph running state.
[0070] After the cloud-side task replanning module 120 returns the cloud-side replanning result 814, nodes frozen in state 815f can migrate to the state pending recovery 815g based on the cloud-side replanning result. The state pending recovery 815g indicates that the node has met the conditions for unfreezing or being replaced, but the task routing module 210 on the end side still needs to determine whether further operation is required based on prerequisites, version consistency, or recovery submission conditions. If the recovery submission conditions are met, the state pending recovery 815g can migrate to the state in execution 815c and the state executable 815b. If local recovery fails, or if cloud-side replanning still needs to continue, the state of failure 815e or frozen 815f can migrate to the state pending cloud-side replanning 815h, and after the cloud side returns a new task graph or task segment, it will return to the state of not executed 815a or executable 815b.
[0071] Based on the above state transition methods, this paper integrates the frozen state, the pending recovery state, and the pending cloud-focused planning state into... Figure 6 The concept of "freezing" is explained as part of the running state of the edge task graph to avoid the concept of "freezing" being understood as an abstract result or a mechanical action; at the same time, it provides a unified state landing point for abnormal situations such as missing feedback, all candidates being rejected, cloud side unreachable, and version conflicts.
[0072] In some embodiments, such as Figure 8 and Figure 9 As shown, a task graph version identifier 804 is set in the task dependency graph 801. The task graph version identifier 804 can be generated synchronously by the cloud-side task planning module 110 when generating the task dependency graph 801, or it can be updated by the cloud-side task replanning module 120 when updating the task dependency graph 801. The end-side task routing module 210 records the task graph version identifier 804 when establishing the end-side task graph runtime state.
[0073] After the local rearrangement candidate generation unit 218 generates a local rearrangement candidate 811, the edge-side task routing module 210 can call the task graph version consistency verification unit 230 to compare whether the edge-side task graph version on which the local rearrangement candidate 811 is based is consistent with the cloud-side confirmed version. If the versions are consistent, the local rearrangement candidate 811 can enter the dependency consistency verification process. If the versions are inconsistent, the edge-side task routing module 210 suspends the submission of the local rearrangement candidate 811 and requests task graph version synchronization from the cloud-side task planning service 100 through the communication link 500.
[0074] After synchronization is completed, the task routing module 210 on the edge side will recalculate the set of front nodes 810 that can be executed based on the updated task dependency graph 801, and re-verify the dependency consistency of the local reordering candidates 811. This embodiment can avoid the edge side from using expired task graphs to submit local reordering candidates, and reduce state conflicts in the edge-cloud task graph.
[0075] In some embodiments, such as Figure 3 and Figure 5 As shown, the dependency edge type 818 can include at least one of strong dependency, weak dependency, mutually exclusive dependency, substitutable dependency, and parallel dependency. The dependency edge type 818 can be marked by the cloud-side task planning module 110 when generating the task dependency graph 801, or it can be maintained by the end-side reordering rule base 420 according to the task node type, task execution conditions, or historical task configuration.
[0076] When an error occurs in task node 806, the end-side task routing module 210 determines the affected subgraph 807 based on the dependency edge type 818: For strong dependency edges, after task node 806 fails, its strong dependent successor nodes are generally assigned to the affected subgraph 807 and set to a frozen state; for weak dependency edges, successor nodes can be delayed and do not need to be frozen immediately; for mutually exclusive dependency edges, if there is a conflict between a task node and a currently executing or pending task node in the local reordering candidate 811, the dependency consistency verification unit 219 will reject the candidate and provide a reason for rejection 812; for substitutable dependency edges, if there is a node that meets the substitution condition, the local reordering candidate generation unit 218 can generate a candidate with a substitute task node; for parallel dependency edges, if they do not depend on task node 806, the recalculation of the executable frontier in the unaffected subgraph 808 can be left unblocked.
[0077] By driving the lower-end centroid reordering rules through the above dependency edge types, the end-side task routing module 210 will not treat all dependencies as a strong dependency. As a result, the size of the affected subgraph 807, the scale of the frozen node set 809, and the local reordering candidates 811 are closer to the actual task graph running state. After the candidate generation is completed, dependency consistency needs to be checked.
[0078] In some embodiments, such as Figure 7 As shown, the cloud-focused planning request 813 includes, in addition to the erroneous task node 806 and the affected subgraph 807, a frozen node set 809, candidate rejection reasons 812, local reordering candidates 811, error type, and task graph version identifier 804. These fields can be gradually generated and cached by the edge-side task routing module 210 during processes S3 to S5.
[0079] After receiving the cloud-side replanning request 813, the cloud-side task replanning module 120 can determine the reason for the local recovery failure on the end side based on the candidate rejection reason 812 and perform corresponding processing: If the candidate rejection reason is that the prerequisite dependency is not satisfied, the prerequisite dependencies in the affected subgraph 807 can be readjusted in the cloud-side task replanning module 120, or the prerequisite task nodes that need to be recovered can be added; if the candidate rejection reason is that the task graph version is inconsistent, the result of task graph synchronization can be returned first in the cloud-side task replanning module 120; if the candidate rejection reason is that there is a conflict in the mutual exclusion dependency, the execution order of the mutual exclusion nodes can be rearranged in the cloud-side task replanning module 120, or the corresponding task nodes can be replaced, etc.
[0080] This ensures that the task replanning module 120 on the cloud side does not receive a generalized failure signal, but rather a graph-level error message obtained after the edge side has completed error impact domain identification, freezing, frontier recalculation, and candidate verification. In this way, the reason for the edge side's local recovery failure can be retained, so that the cloud side can perform local replanning or alternative task generation on the affected subgraph 807.
[0081] like Figure 8 As shown, when a cloud-side replanning request 813 is sent but no cloud-side replanning result 814 is received, or when communication link 500 returns a communication failure status, the execution control unit 240 is degraded to enter the cloud-side unreachable handling process. Cloud-side unreachability can be triggered by conditions such as communication failure, cloud-side response timeout, cloud-side return of an abnormal status, or continuous unavailability of the communication link. The specific waiting time or judgment threshold can be determined by system configuration, service level requirements, or the customer's actual deployment strategy; unconfirmed specific values are not included in this document.
[0082] Once the cloud-side unreachable processing flow is entered, the task routing module 210 on the endpoint ceases scheduling operations on task nodes in the affected subgraph 807 and maintains nodes in the frozen node set 809 in a frozen or pending cloud-side replanning state. For unaffected subgraphs 808, only task nodes in the executable frontier node set 810 that meet the prerequisite dependency conditions and are not frozen or blocked by mutual exclusion dependencies are allowed to be submitted to the task execution interface 300. This degraded execution method prevents the endpoint from blindly executing affected tasks when the cloud side is unreachable, while still ensuring that unaffected task branches have the ability to continue moving forward in a controllable manner. When communication is restored, the endpoint task routing module 210 uploads the execution results during the degrade process, the current task graph version identifier 804, the frozen node set 809, the status of already executed nodes, and the affected subgraph 807 still pending processing to the cloud-side task replanning module 120. The cloud-side task replanning module 120 returns a synchronization result or a cloud-side replanning result 814 based on this information. After receiving the message, the endpoint task routing module 210 updates the runtime state of the endpoint task graph, unfreezing or replacing task nodes, or recalculating the executable frontier.
[0083] like Figure 8 As shown, if the task execution interface 300 does not return task execution feedback, or if the returned task execution feedback does not contain the task node identifier, the edge task routing module 210 cannot immediately find the erroneous task node 806. In this case, the edge task routing module 210 can set the corresponding executing task node to a pending confirmation state and record the feedback missing event. The pending confirmation state means that the result of the task node's execution has not yet become a definite state, and it cannot be immediately regarded as a completed node for the next step of judging the satisfaction of prerequisite dependencies.
[0084] If subsequent supplementary feedback can be mapped to task node 802, the error task node location unit will continue to update the node's status based on the feedback (updating to "completed" if the feedback is successful, and locating it as error task node 806 if the feedback is failed). If the pending confirmation status consistently meets the preset timeout conditions, the end-side task routing module 210 can mark this node as error task node 806 and proceed to... Figure 4 The error impact domain identification process is shown below. This exception handling ensures that missing feedback does not cause the task graph to remain suspended for an extended period, nor does it directly treat missing feedback as a complete task failure.
[0085] like Figure 8As shown, after the local rearrangement candidate generation unit 218 generates multiple local rearrangement candidates 811 based on the executable frontier node set 810, the dependency consistency verification unit 219 can perform verification one by one. If all local rearrangement candidates 811 are rejected due to unmet prerequisites, frozen nodes, mutual exclusion dependency conflicts, inconsistent task graph versions, lack of matching end-side rearrangement rules, or empty candidates, the dependency consistency verification unit 219 generates a candidate rejection reason set.
[0086] When all multiple local reordering candidates 811 are rejected, the dependency consistency verification unit 219 generates a set of candidate rejection reasons. The cloud-side replanning request generation unit 220 writes this set of candidate rejection reasons as the replanning trigger reason into the cloud-side replanning request 813 and sends it to the cloud-side task replanning module 120. The end-side updates or maintains the running state of the end-side task graph according to the current anomaly handling result and waits for the cloud-side replanning result 814. By recording the reason for each candidate rejection, the cloud-side task replanning module 120 can determine the specific reason why the end-side cannot partially recover. For example, if all candidates are rejected because the prerequisite dependencies are not met, the cloud side can prioritize recovering the prerequisite task chain; if all are rejected because of mutual exclusion dependency conflicts, the cloud side can adjust the order of conflicting tasks; if all are rejected because of version conflicts, the cloud side can prioritize synchronizing the task graph version. This anomaly embodiment directly supports candidate rejection reasons as structured error information entering the cloud-side replanning request.
[0087] like Figure 8 As shown, when the task graph version consistency verification unit 230 determines that the task graph version on the client side is inconsistent with the version confirmed by the cloud side, the task routing module 210 on the client side suspends the submission of local reordering candidates 811. Version conflicts may occur when the cloud side has updated the task dependency graph 801, the client side is still generating candidates based on the old version of the task graph, or there is a delay in the edge cache node 600 distributing task graph versions to multiple client sides.
[0088] In the event of a version conflict, the task routing module 210 on the client side can set the partially rearranged candidate 811 to a pending submission state and initiate a request to the upper-layer cloud-side task planning service 100 to synchronize the task graph version. After synchronization is complete, the task routing module 210 on the client side can recalculate the set of executable leading nodes 810 based on the updated task dependency graph 801 and perform dependency consistency checks. This reduces the possibility of duplicate execution / missed execution or dependency conflicts caused by the client side using expired task graph submission candidates.
[0089] like Figure 8As shown, if no rule corresponding to the current error type or dependency edge type 818 is found in the endpoint reordering rule base 420, the local reordering candidate generation unit 218 will not generate any local reordering candidates 811. Simultaneously, the endpoint task routing module 210 will not attempt to reorder tasks using undefined rules. Instead, the cloud-side reordering request generation unit 220 will directly generate a cloud-side reordering request 813, and write "no matching endpoint reordering rule" as a candidate rejection reason 812 into the cloud-side reordering request 813. This exception handling is to prevent the risk of error propagation caused by the endpoint generating candidates on its own when there are no corresponding rules.
[0090] Generally speaking, the cloud-side task replanning module 120 has more complete information (including task graphs) and stronger capabilities for task replanning. When the end-side rules are missing, handing over the processing power to the cloud side helps to maintain the consistency and traceability of the task graph's running state.
[0091] In some embodiments, adjacency lists, adjacency matrices, structured text, relational table structures, or graph database structures can be used to store the task dependency graph 801. Among these: when the number of nodes is large and the number of dependencies is small, it is recommended to use adjacency lists, which makes it easier for the end side to trace the affected nodes along the successor dependency set 817; when the number of nodes is small or the dependencies are dense, it is recommended to use adjacency matrices, which makes it easier to quickly determine whether two nodes have a dependency relationship; if it needs to be combined with a regular task scheduling system, database, or interface documentation, a structured text or relational table structure can be selected; if it is necessary to perform subgraph queries on data with a rich variety of task nodes and dependency edge types 818, a graph database is selected.
[0092] It should be noted that regardless of the storage method used, as long as it can express the task node 802, the preceding dependency set 816 and the subsequent dependency set 817, and support the end-side task routing module 210 to determine the affected subgraph 807 based on the subsequent dependency set 817, it will not affect the core mechanism of this case of performing local replanning based on the end-side task graph runtime.
[0093] In some embodiments, local reordering candidates 811 can be generated based on task dependency level, task time limit, waiting time, preset order, or constraint satisfaction conditions: when generated according to task dependency level, the client-side can prioritize nodes with lower dependency levels and whose prerequisite dependencies have been satisfied; when generated according to task time limit, nodes with tighter time limits and no impact can be prioritized; when generated according to waiting time, task nodes with longer waiting times and no freezing can be prioritized; when generated according to preset order, the execution order can be sorted according to the pre-set execution order in the cloud-side or client-side rule base; when generated according to constraint satisfaction conditions, prerequisite dependencies, mutual exclusion dependencies, freezing status, and version status can be used as constraints for filtering. The above-described candidate generation methods are only used to form candidates to be verified. Whether they can be submitted to the task execution interface 300 in the end depends on the verification result of the dependency consistency verification unit 219.
[0094] Optionally, the task planning service 100 on the cloud side and the task routing system 200 on the client side can use a conventional network communication interface, remote call interface, message queue, or publish-subscribe message channel as the communication link 500. The communication link 500 includes: a task dependency graph distribution link 510, a task execution feedback link 520, a cloud-side re-planning request link 530, and a cloud-side re-planning result return link 540, etc. Changing the communication protocol or message format will not affect the core mechanism of the client-side task routing module 210 in performing error isolation, local candidate generation, and cloud-side takeover gating based on the task graph's running state.
[0095] In some embodiments, such as Figure 9 As shown, the task memory module 130 can be used to store graph-level failure experience records 819. The graph-level failure experience record 819 may include at least one of the following: erroneous task node 806, affected subgraph 807, frozen node set 809, local reordering candidates 811, candidate rejection reasons 812, cloud-focused planning trigger reasons, and final recovery path. Compared to ordinary execution logs, the graph-level failure experience record 819 records the propagation range of the error in the task dependency graph 801, local recovery attempts, and candidate rejection reasons, providing more specific graph-level recovery experience for subsequent task planning.
[0096] When the cloud-side task planning module 110 generates or updates the task dependency graph 801, it can read the graph-level failure experience record 819 to adjust the task combinations that have caused dependency breaks or candidate rejections: if the subsequent dependencies of a certain faulty task node 806 often cause all candidates to be rejected, the cloud-side task planning module 110 can add alternative tasks to the relevant successor nodes, change the dependency edge type 818, or add more explicit preceding dependency recovery steps in subsequent planning.
[0097] In some embodiments, such as Figure 8 and Figure 9 As shown, the degradation execution control unit 240 is used to perform edge-side dependency constraint degradation execution when the cloud side is unreachable or the communication link 500 is abnormal. The prerequisite for degradation execution is that the edge-side task routing module 210 has completed the division of the affected subgraph 807 and the unaffected subgraph 808, and can determine the set of executable frontier nodes 810 in the unaffected subgraph 808.
[0098] This degraded execution only allows task nodes in unaffected subgraph 808 that satisfy prerequisite dependencies and are not frozen to be submitted to task execution interface 300, while keeping task nodes in affected subgraph 807 in a frozen state or pending cloud-based planning state. This process can maintain controlled task progress when the cloud side is temporarily unreachable and avoids executing task nodes with uncertain dependency states on the endpoint when cloud-based planning results are lacking.
[0099] In some embodiments, such as Figure 8 and Figure 9 As shown, the task graph version consistency verification unit 230 is used to verify whether the task graph version on the client side is consistent with the confirmed version on the cloud side before the local reordering candidate 811 is submitted. If the versions are inconsistent, the local reordering candidate 811 enters a paused submission state, and the client-side task routing module 210 requests the cloud side to synchronize the task graph version. This method can be understood as a submission lock mechanism oriented towards the task graph runtime state, the purpose of which is to prevent the client side from submitting the local reordering candidate 811 based on the expired task dependency graph 801.
[0100] In some embodiments, such as Figure 9 As shown, the edge-side cache node 600 includes an edge-side task graph cache unit 610 and a cross-end conflict arbitration unit 620. The edge-side task graph cache unit 610 can be used to cache the task dependency graph 801 and the task graph version identifier 804; when multiple end-side task routing modules submit local reordering candidates 811, the cross-end conflict arbitration unit 620 can process the multiple local reordering candidates 811 by allowing submission, delaying submission, or rejecting submission according to the node occupancy status, task graph version consistency, and candidate submission order.
[0101] To facilitate understanding, the following will be combined with... Figures 1 to 7 and with Figure 10 The mobile robot shown is used as an application carrier to provide an execution example. Figure 10 The mobile robot shown is capable of performing tasks such as moving to the work area, target perception, robotic arm grasping, handling, target placement, and environmental inspection; Figure 3 and Figure 4In the abstract task dependency graph shown, each task node can correspond to the aforementioned task-level execution object according to the specific work process. In this embodiment, task three is exemplarily mapped to the robotic arm grasping task, but the one-to-one correspondence between other task nodes and specific robot actions is not limited. The cloud-side task planning module 110 generates the following... Figure 3 The task dependency graph 801 shown is sent to the end-side task routing module 210 via the task dependency graph distribution link 510. The end-side task routing module 210 writes task nodes one through seven and their corresponding dependency edges 803 into the task graph state storage unit 410, forming the end-side task graph running state. In the initial state, if task one has no prerequisites, it can enter the executable state. Tasks two and three enter the executable state after task one is completed, based on the satisfaction of their respective prerequisites. If the task execution interface 300 returns task three, i.e., the robotic arm grasping task execution failed, the end-side task routing module 210 identifies task three as an erroneous task node 806. Figure 4 As shown in the dependency relationship, the end-side task routing module 210 searches along the successor dependency relationship of task 3, and assigns task 3, task 5, task 6 and task 7 to the affected subgraph 807. Task 2 and task 4, which do not depend on task 3 and are not blocked by the affected dependency edge, are assigned to the unaffected subgraph 808. Then, task 3, task 5, task 6 and task 7 in the affected subgraph 807 are set to a frozen state, resulting in a frozen node set 809.
[0102] Next, in such Figure 5 In the case shown, the executable front recalculation unit 217 can reselect the executable front set 810 in the unaffected subgraph 808: if task 2 has been completed and all strong prerequisites of task 4 have been satisfied, then task 4 can enter the executable front set 810; if task 5 still depends on the frozen nodes, then it cannot enter the front set.
[0103] Then, the local rearrangement candidate generation unit 218 generates a local rearrangement candidate 811 based on the executable frontier node set 810. For example, the candidate may include Task 4 and subsequent unaffected nodes, and the dependency consistency verification unit 219 performs pre-dependency and frozen state verification on this candidate.
[0104] If the local rearrangement candidate 811 passes the dependency consistency check, the edge task routing module 210 submits the candidate to the task execution interface 300, which then continues to schedule the robot task execution system 310. Figure 10The mobile robot shown executes an unaffected branch; after the robot task execution system 310 completes the corresponding task, it continues to return the execution result and status feedback, the task execution interface 300 generates new task execution feedback, and the end-side task routing module 210 re-enters the system. Figure 2 S2, as shown, updates the node state and determines subsequent tasks. If the local rearrangement candidate 811 fails the verification, the consistency verification unit 219 generates a candidate rejection reason 812, and then proceeds according to... Figure 2 and Figure 7 The gating logic shown enters the cloud for focused planning and processing.
[0105] like Figure 7 As described above, the cloud-based replanning request generation unit 220 will write the erroneous task node 806, the affected subgraph 807, and the candidate rejection reason 812 into the cloud-based replanning request 813 and then send it to the cloud-based task replanning module 120. After receiving the cloud-based replanning result 814, the end-side task routing module 210 will update the end-side task graph running state.
[0106] This example illustrates that it is not simply a matter of replanning in the cloud immediately after a task fails; nor is it about directly changing the order of the remaining tasks without any verification. Instead, it uses error impact domain identification, freezing, executable frontier recalculation, and dependency consistency verification in the task graph runtime state to control the commitability of the endpoint. Only when a candidate is uncommittable or the executable frontier is empty will the endpoint send a replanning request with structured error information to the cloud.
[0107] In this embodiment, each action performed by the edge task routing module 210 can be mapped to a specific input, processing, and output. The input for obtaining the task dependency graph 801 is the task dependency graph issued by the cloud task planning module 110 or the task dependency graph cached on the edge, and the output is the running state of the edge task graph; the input for locating the erroneous task node is the task execution feedback and the running state of the task graph, and the output is the erroneous task node 806 and the error marker; the input for identifying the error impact domain is the erroneous task node 806 and the successor dependency set 817, and the output is the affected subgraph 807 and the unaffected subgraph 808.
[0108] exist Figures 4 to 5In the core processing chain shown, the freezing action, the frontier recalculation action, and the candidate verification action are interdependent: if the affected subgraph 807 is not determined first, the range of the frozen node set 809 cannot be determined; if the freezing state is not set, the executable frontier node set 810 may incorrectly include nodes with invalid dependencies; if consistency checks are not performed on the dependencies of the local rearrangement candidates 811, even if the candidates come from the executable frontier, they may not be suitable for submission due to mutual exclusion dependencies, version conflicts, or lack of relevant rules. Therefore, these features are not parallel stacked modules, but rather form a continuous processing chain around the control of end-side commitability.
[0109] exist Figure 7 In the cloud-edge interaction shown, the field settings in the cloud-side replanning request 813 are also to serve the above continuous processing chain: the error task node 806 informs the cloud side of the replanning starting point; the affected subgraph 807 informs the cloud side of the task range that needs to be replanned or replaced; and the candidate rejection reason 812 allows the cloud side to understand the reason for the local recovery failure on the edge side. Therefore, sending these fields together to the cloud-side task replanning module 120 allows the cloud-side task replanning module 120 to continue processing based on the graph-level analysis results already completed on the edge side, without having to re-infer the error range as in a normal failure event.
[0110] exist Figure 8 In the exception handling shown, each exception is associated with a corresponding main process S1 to S6: the "Cloud unreachable" branch represents request failures after S6; the "missing feedback" branch represents situations before S2 or where error nodes cannot be located during S2; the "all candidates rejected" branch represents scenarios where one or more local reordering candidates fail validation; the "version conflict" branch represents scenarios where task graph version consistency validation fails; and the "missing rule" branch represents scenarios where no valid local reordering candidates can be generated in S4. This mapping of exceptions to the main process avoids exception handling becoming an isolated description.
[0111] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A robot task replanning method based on task dependency graphs, characterized in that, Executed by the edge-side task routing module, the process includes: acquiring a task dependency graph and establishing an edge-side task graph runtime state, wherein the task dependency graph includes task nodes and their predecessor and successor dependencies; receiving task execution feedback and locating erroneous task nodes, determining affected and unaffected subgraphs along the successor dependencies of the erroneous task nodes, and freezing task nodes in the affected subgraphs; determining a set of executable frontier nodes in the unaffected subgraphs; when the set is not empty, generating local reordering candidates, and performing dependency consistency verification based on the predecessor dependency satisfaction status and frozen status of the candidate task nodes, and submitting the candidates to the task execution interface when the verification passes; when the verification fails or the set is empty, sending a cloud-side reordering request containing erroneous task nodes, affected subgraphs, and reordering trigger reasons.
2. The robot task replanning method based on task dependency graph according to claim 1, characterized in that, The task node has a unique node identifier and records the node status, the set of predecessor dependencies, the set of successor dependencies, the freeze flag, and the frontier flag. The node status includes at least one of not executed, executable, executing, completed, failed, frozen, pending recovery, and pending cloud-focused planning. The freeze flag is used to prevent the corresponding task node from entering the set of executable frontier nodes and the local rearrangement candidate. The frontier flag is used to indicate that the corresponding task node belongs to the current set of executable frontier nodes.
3. The robot task replanning method based on task dependency graph according to claim 2, characterized in that, The edge-side task routing module reads the set of successors of the erroneous task node as the starting point, searches for the affected successor task node along the successor dependency relationship, and writes the erroneous task node, the affected successor task node and the corresponding dependency edge into the affected subgraph; and writes the task node that does not depend on the erroneous task node, is not blocked by the affected dependency edge, and can still independently determine the satisfaction status of its predecessor dependency in the running state of the edge-side task graph into the unaffected subgraph; the task nodes in the unaffected subgraph are used as candidate ranges for recalculation of the executable frontier, and are not directly identified as executable.
4. The robot task replanning method based on task dependency graph according to claim 3, characterized in that, The edge task routing module writes the erroneous task nodes in the affected subgraph and the subsequent task nodes affected by the failure of dependency conditions into the frozen node set, and sets their node status to one of frozen, pending recovery, or pending cloud-focused planning, while setting the frozen flag to prohibit scheduling; when recalculating the executable frontier node set, only the task nodes in the unaffected subgraph that have all strong predecessor dependency task nodes completed, not frozen, and not blocked by mutual exclusion dependencies are updated to the executable state and written into the executable frontier node set.
5. The robot task replanning method based on task dependency graph according to claim 4, characterized in that, The local reordering candidate is a candidate sequence or candidate execution set consisting of one or more executable frontier task nodes. The end-side task routing module generates the local reordering candidate according to at least one of the following: task dependency level, task time limit, waiting time, preset execution order, or constraint satisfaction condition. The dependency consistency verification includes at least the preceding dependency satisfaction verification, frozen state verification, and mutual exclusion dependency verification. When all three items pass, the verification result is output. When any item fails, submission is prohibited and a candidate rejection reason bound to the candidate identifier is generated.
6. The robot task replanning method based on task dependency graph according to claim 5, characterized in that, The dependency edge has a dependency edge type, which includes at least one of strong dependency, weak dependency, mutually exclusive dependency, substitutable dependency, and parallel dependency; the end-side task routing module freezes the corresponding successor task node when a strong dependency fails, delays the processing of the corresponding successor task node when a weak dependency fails, generates a candidate rejection reason when a mutually exclusive dependency conflict occurs, generates a local rearrangement candidate containing the substitute task node when the substitutable dependency is satisfied, and maintains the recalculation of the executable frontier of the corresponding task branch when the parallel dependency is not affected by the erroneous task node.
7. The robot task replanning method based on task dependency graph according to claim 5, characterized in that, The task dependency graph sets a task graph version identifier, and the task graph runtime records the task graph version identifier. Before submitting the partial reordering candidate, the task graph version on the end side on which the partial reordering candidate is based is compared with the cloud side confirmed version. If the versions are consistent, the dependency consistency check is performed. If the versions are inconsistent, the partial reordering candidate is set to a paused submission state and a task graph version synchronization request is generated. After the version synchronization is completed, the set of executable frontier nodes is recalculated based on the updated task dependency graph and the dependency consistency check is performed again.
8. The robot task replanning method based on task dependency graph according to claim 5, characterized in that, The fields of the cloud-based replanning request include at least the error task node identifier, the affected subgraph identifier, and the replanning trigger reason; when triggered by a failure of dependency consistency verification, the fields also include the local reordering candidate identifier and the candidate rejection reason; when triggered by an empty set of executable frontier nodes, the fields also include the frontier empty field; after receiving the cloud-based replanning result, the end-side task routing module unfreezes or keeps frozen, replaces error task nodes, updates dependency edges or task graph version identifiers, and recalculates the set of executable frontier nodes based on the result.
9. The robot task replanning method based on task dependency graph according to claim 1, characterized in that, When the task execution feedback lacks a task node identifier or does not return task execution feedback, the currently executing task node is set to a pending confirmation state and the feedback missing event is recorded; when supplementary feedback that can be mapped to a task node is received within the preset waiting conditions, the corresponding task node is updated to a completed state or located as an erroneous task node according to the supplementary feedback. If the supplementary feedback is not received within the preset waiting conditions, the task node in the pending confirmation state is identified as an erroneous task node, and the process proceeds to determine the affected and unaffected subgraphs.
10. The robot task replanning method based on task dependency graph according to claim 8, characterized in that, After sending a cloud-focused planning request, if no cloud-focused planning result is received within the preset waiting conditions or the communication link returns a failure status, then the downgrade execution control is initiated to maintain the task nodes in the affected subgraph as frozen or pending cloud-focused planning. Only task nodes in the unaffected subgraph that have strong prerequisite dependencies that have been completed, are not frozen, and are not blocked by mutual exclusion dependencies are submitted to the task execution interface. After communication is restored, upload the execution results, task graph version identifier and frozen node set during the downgrade period, and update the running state of the task graph on the client side based on the returned results.
Citation Information
Patent Citations
Autonomous task planning method and system of large model based on cloud side-end cooperation, terminal and storage medium
CN121326586A
