Intelligent task decomposition and execution body allocation method and system based on constraint satisfaction

By constructing a directed acyclic graph of tasks and an execution entity capability model, and combining semantic context propagation and grouping constraints, the task decomposition and execution entity allocation of the intelligent agent are optimized, solving the problem of mismatch between task decomposition and execution entity allocation in the existing technology, and improving the execution efficiency and stability of complex long-term tasks.

CN123178076APending Publication Date: 2026-11-27QIXIUHUI ARTIFICIAL INTELLIGENCE TECHNOLOGY (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611408148.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-11
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing intelligent agent systems lack unified constraint optimization in complex long-term tasks, leading to a mismatch between task decomposition and executor allocation, which can easily result in problems such as capability mismatch, execution failure, context overflow, information loss, and resource waste.

Method used

By constructing a directed acyclic graph of tasks, establishing an execution entity capability model, and building a unified constraint optimization model, combined with semantic context propagation and grouping constraints, the decomposition granularity, execution entity allocation, and order are optimized to achieve unified optimization of task decomposition and execution entity allocation.

Benefits of technology

It improves the efficiency of multi-executor collaborative execution for complex and long-term tasks, reduces resource consumption, and enhances the stability and robustness of task execution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123178076A_ABST
    Figure CN123178076A_ABST
Patent Text Reader

Abstract

The application provides a kind of intelligent task decomposition and execution body distribution method and system based on constraint satisfaction, the granularity of the decomposition of target task is determined by the recursive decomposition of target task and the atomic constraint, to avoid the processing capacity of single execution body being exceeded by subtask;By establishing an execution body capability model and constructing a unified constraint optimization model, the allocation relationship between the decomposition granularity, subtask and execution body and the execution order of subtask are jointly solved to realize the unified optimization of task decomposition and execution body distribution;By constructing semantic context propagation constraints and semantic grouping constraints, the context information is propagated along the dependency edge and the allocation relationship of the interrelated subtasks is constrained, the cross-execution body information transmission is reduced, and the context overflow and information loss are reduced;Therefore, the multi-execution body collaborative execution efficiency of complex long-range tasks can be improved, the resource consumption can be reduced, and the stability and robustness of task execution can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent agent task orchestration technology, and in particular to a method and system for intelligent task decomposition and execution allocation based on constraint satisfaction. Background Technology

[0002] With the improvement of Large Language Model (LLM) capabilities, intelligent agent systems driven by them have been widely used in complex and long-term task scenarios such as software development, data analysis, scientific research assistance, and business automation. To improve the execution efficiency of complex tasks, existing intelligent agent systems typically adopt an "Orchestrator-Subagent" architecture. The master intelligent agent decomposes the user task and assigns multiple subtasks to different subagents or tools for collaborative execution. Finally, the execution results are aggregated to form the overall task output.

[0003] In existing technologies, a common approach is a heuristic task orchestration method based on large language model prompts. This method involves the master model decomposing tasks using natural language and assigning executors to each subtask based on experience, which are then executed sequentially or in a simple parallel manner. However, this approach primarily relies on model experience for decision-making, failing to uniformly constrain and optimize factors such as executor capability matching, subtask dependencies, context capacity, computing power budget, and concurrency limitations. Therefore, it suffers from the following shortcomings: First, task decomposition and executor allocation are disconnected, easily leading to capability mismatches, execution failures, and rework. Second, it does not consider the context capacity of individual executors and the overall computing power budget, making it prone to context overflow, loss of critical information, and "out-of-focus" long-term tasks. Third, it lacks explicit modeling of subtask dependencies, easily resulting in incorrect execution order or dependency deadlocks. Fourth, it does not organize tasks with the goal of reducing cross-executor information transmission, leading to frequent intermediate information transfers, increasing communication overhead and context pressure. Fifth, when subtasks fail or operating conditions change, it typically requires overall replanning or manual intervention, lacking an efficient dynamic incremental reallocation mechanism, making it difficult to meet the requirements of complex long-term tasks for execution efficiency, resource utilization, and robustness. Summary of the Invention

[0004] In view of this, embodiments of the present invention provide a method and system for intelligent task decomposition and execution body allocation based on constraint satisfaction, in order to solve the problem that the lack of unified constraint optimization in task decomposition and execution body allocation during the execution of complex long-term tasks by large language model intelligent agents leads to low efficiency of multi-execution body collaborative execution and easy loss of focus of context information.

[0005] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:

[0006] The first aspect of this invention discloses an intelligent task decomposition and execution body allocation method based on constraint satisfaction, the method comprising:

[0007] The target task is received, and the target task is recursively decomposed to construct a directed acyclic graph of the task consisting of multiple subtask nodes and dependency edges. The atomicity constraint of the leaf subtasks in the directed acyclic graph of the task is determined. When the leaf subtask cannot be completed independently by a single executor within the resource constraints, the leaf subtask is decomposed again until all leaf subtasks satisfy the atomic constraint, so as to determine the decomposition granularity of the target task.

[0008] An execution entity capability model is established, and a unified constraint optimization model is constructed based on the task directed acyclic graph and the execution entity capability model. The joint solution variables of the unified constraint optimization model are the decomposition granularity, the allocation relationship between subtasks and execution entities, and the execution order of subtasks.

[0009] A semantic context propagation constraint is constructed based on the directed acyclic graph of the task. The semantic context propagation constraint determines the propagation range of context information along the dependency edge based on the semantic association between subtasks, and constrains the context information that each executor can maintain during execution based on the propagated context state.

[0010] Semantic grouping constraints are constructed based on the directed acyclic graph of the task, wherein the semantic grouping constraints constrain the assignment of related subtasks to the same execution body or different execution bodies based on the semantic association between subtasks;

[0011] Solving the unified constraint optimization model, under the conditions of satisfying the atomicity constraint, the semantic context propagation constraint, the semantic grouping constraint, and the execution entity capability constraint, yields the task decomposition result, execution entity allocation result, and execution order corresponding to the target task.

[0012] Preferably, the atomicity constraint determination for the leaf subtasks in the directed acyclic graph of the task includes:

[0013] Obtain the context requirements and resource requirements of the leaf subtasks in the directed acyclic graph of the task.

[0014] Determine whether the leaf subtask satisfies the preset atomicity constraint based on the context requirement and the resource requirement;

[0015] When the leaf subtask satisfies the preset atomicity constraint, it is determined that the leaf subtask can be completed independently by a single executor within the resource constraints;

[0016] When the leaf subtask does not satisfy the preset atomicity constraint, it is determined that the leaf subtask cannot be completed independently by a single executor within the resource constraints.

[0017] Preferably, the establishment of the execution entity capability model includes:

[0018] Obtain the capability information, context capacity information, resource consumption information, and concurrency capability information corresponding to each execution entity in the execution entity pool;

[0019] The execution entity capability model is established based on the capability information, the context capacity information, the resource consumption information, and the concurrency capability information.

[0020] Preferably, the step of constructing a unified constraint optimization model based on the task directed acyclic graph and the executor capability model includes:

[0021] Determine the dependencies between subtasks based on the directed acyclic graph of the task;

[0022] The capability constraints corresponding to each executor are determined based on the executor capability model.

[0023] The resource constraints corresponding to each subtask are determined based on the decomposition granularity.

[0024] A unified constraint optimization model is constructed based on the dependencies, capability constraints, and resource constraints.

[0025] Preferably, the step of constructing semantic context propagation constraints based on the task's directed acyclic graph includes:

[0026] Obtain the subtasks with dependencies in the directed acyclic graph of the task;

[0027] Obtain the task description and input / output information corresponding to each subtask;

[0028] Determine the semantic relationships between the subtasks based on the task description and the input / output information;

[0029] Semantic context propagation constraints are constructed based on the semantic associations and dependencies.

[0030] Preferably, the step of constructing semantic context propagation constraints based on the semantic association and the dependency includes:

[0031] Determine the context propagation relationship between the subtasks based on the dependencies;

[0032] Determine the association constraints between the subtasks based on the semantic associations;

[0033] Semantic context propagation constraints are constructed based on the context propagation relationship and the association constraint relationship.

[0034] Preferably, determining the context propagation relationship between the subtasks based on the dependency relationship includes:

[0035] Determine the propagation path of context information based on the dependencies;

[0036] Determine the context retention state corresponding to each subtask based on the propagation path;

[0037] The active context occupancy of each executor at any point during execution is determined based on the context retention state.

[0038] The context propagation relationship is determined based on the active context occupancy.

[0039] Preferably, determining the association constraints between the subtasks based on the semantic association includes:

[0040] Determine the semantic correlation degree corresponding to each dependency edge based on the semantic correlation relationship;

[0041] The association weight of each dependency edge is determined based on the data transmission volume corresponding to the dependency edge and the semantic relevance.

[0042] The grouping relationship between semantically related subtasks is determined based on the association weights;

[0043] The associated constraint relationship is determined based on the grouping relationship.

[0044] Preferably, after solving the unified constraint optimization model, the method further includes:

[0045] Obtain the execution results and running status corresponding to each of the aforementioned executors;

[0046] When it is determined that an execution exception exists based on the execution result and the running status, the exception type corresponding to the execution exception is determined;

[0047] Determine the affected subtasks and corresponding reconstruction strategies based on the anomaly type;

[0048] Construct a residual task graph based on the affected subtasks;

[0049] The unified constraint optimization model is reconstructed based on the reconstruction strategy for the residual task graph, and the reconstructed unified constraint optimization model is solved.

[0050] A second aspect of this invention discloses an intelligent task decomposition and execution body allocation system based on constraint satisfaction, the system comprising:

[0051] The task decomposition unit is used to receive the target task, recursively decompose the target task, construct a directed acyclic graph of the task consisting of multiple subtask nodes and dependency edges, and determine the atomicity constraint of the leaf subtasks in the directed acyclic graph of the task. When the leaf subtask cannot be completed independently by a single executor within the resource constraints, the leaf subtask is decomposed again until all leaf subtasks satisfy the atomicity constraint, so as to determine the decomposition granularity of the target task.

[0052] An execution entity capability modeling unit is used to establish an execution entity capability model and construct a unified constraint optimization model based on the task directed acyclic graph and the execution entity capability model. The joint solution variables of the unified constraint optimization model are the decomposition granularity, the allocation relationship between subtasks and execution entities, and the execution order of subtasks.

[0053] The first constraint modeling unit is used to construct semantic context propagation constraints based on the directed acyclic graph of the task. The semantic context propagation constraints determine the propagation range of context information along the dependency edges based on the semantic association between subtasks, and constrain the context information that each executor can maintain during execution based on the propagated context state.

[0054] The second constraint modeling unit is used to construct semantic grouping constraints based on the directed acyclic graph of the task, wherein the semantic grouping constraints constrain the assignment of related subtasks to the same execution body or different execution bodies based on the semantic association between subtasks;

[0055] The constraint solving and allocation unit is used to solve the unified constraint optimization model and obtain the task decomposition result, execution body allocation result and execution order corresponding to the target task under the conditions of satisfying the atomicity constraint, the semantic context propagation constraint, the semantic grouping constraint and the execution body capability constraint.

[0056] Based on the above embodiments of the present invention, an intelligent task decomposition and execution body allocation method and system based on constraint satisfaction is provided. This method recursively decomposes the target task and determines the decomposition granularity of the target task by combining atomic constraints, thus avoiding subtasks exceeding the processing capacity of a single execution body. By establishing an execution body capability model and constructing a unified constraint optimization model, the decomposition granularity, the allocation relationship between subtasks and execution bodies, and the execution order of subtasks are jointly solved, achieving unified optimization of task decomposition and execution body allocation. By constructing semantic context propagation constraints and semantic grouping constraints, context information is constrained to propagate along dependency edges and the allocation relationship of interrelated subtasks is constrained, reducing the amount of cross-execution body information transmission and minimizing context overflow and information loss. Therefore, this method can improve the multi-execution body collaborative execution efficiency of complex long-term tasks, reduce resource consumption, and enhance the stability and robustness of task execution. Attached Figure Description

[0057] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0058] Figure 1 A flowchart of an intelligent task decomposition and execution body allocation method based on constraint satisfaction provided in an embodiment of the present invention;

[0059] Figure 2 Another flowchart of an intelligent task decomposition and execution body allocation method based on constraint satisfaction provided in an embodiment of the present invention;

[0060] Figure 3 This is a structural block diagram of an intelligent task decomposition and execution body allocation system based on constraint satisfaction, provided in an embodiment of the present invention. Detailed Implementation

[0061] 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.

[0062] In this application, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0063] As the background technology shows, existing heuristic task orchestration methods based on large language model prompts typically involve a master model separately handling task decomposition and execution entity assignment. They lack unified constraint modeling for execution entity capabilities, subtask dependencies, context capacity, resource consumption, and concurrency capabilities, easily leading to issues such as mismatch between task decomposition granularity and execution entity capabilities, context information overflow, incorrect execution order, and repeated information transfer across execution entities. When a subtask execution fails, existing methods require replanning all tasks, increasing task processing time and resource consumption.

[0064] Therefore, this invention provides a method and system for intelligent task decomposition and execution entity allocation based on constraint satisfaction. By recursively decomposing the target task and combining atomic constraints to determine the decomposition granularity of the target task, it avoids subtasks exceeding the processing capacity of a single execution entity. By establishing an execution entity capability model and constructing a unified constraint optimization model, it jointly solves for the decomposition granularity, the allocation relationship between subtasks and execution entities, and the execution order of subtasks, achieving unified optimization of task decomposition and execution entity allocation. By constructing semantic context propagation constraints and semantic grouping constraints, it constrains the propagation of context information along dependency edges and constrains the allocation relationship of interrelated subtasks, reducing the amount of cross-execution entity information transmission and minimizing context overflow and information loss. Therefore, it can improve the multi-execution entity collaborative execution efficiency of complex long-term tasks, reduce resource consumption, and enhance the stability and robustness of task execution.

[0065] See Figure 1 This diagram illustrates a flowchart of a constraint-satisfaction-based intelligent task decomposition and executor allocation method provided by an embodiment of the present invention. The executor of this method can be an orchestration device for controlling multiple executors to collaboratively complete a target task, or a server, computing device, or master intelligent agent deployed with a task orchestration program. Executors can include sub-intelligent agents, tools, external services, or computing processes. The method includes:

[0066] Step S101: Receive the target task, recursively decompose the target task, construct a directed acyclic graph of the task consisting of multiple subtask nodes and dependent edges, and determine the atomicity constraint of the leaf subtasks in the directed acyclic graph of the task. When a leaf subtask cannot be completed independently by a single executor within the resource constraints, the leaf subtask is decomposed again until all leaf subtasks satisfy the atomicity constraint, so as to determine the decomposition granularity of the target task.

[0067] It should be noted that the target task can be a software development task, a data analysis task, a research support task, or a business automation task. The target task includes the task objective, input data, output requirements, and execution conditions. Recursive decomposition is used to break down the target task into multiple interrelated subtasks until each leaf subtask reaches a granularity that can be independently completed by a single executor.

[0068] Combination Figure 2 The flowchart shown illustrates how, when constructing a Directed Acyclic Graph (DAG), subtasks are treated as subtask nodes, and the execution order and data transfer relationships between subtasks are represented as dependency edges. Each subtask node can include a task identifier, task description, task type, input information, output information, resource requirements, and context requirements. Dependency edges indicate whether the output information of an upstream subtask serves as the input information for a downstream subtask, or whether a downstream subtask needs to continue execution based on the context information generated by the upstream subtask.

[0069] It should be noted that the specific process for determining the atomicity constraints of leaf subtasks in a directed acyclic graph of tasks includes (processes A1 to A4):

[0070] Process A1: Obtain the context requirements and resource requirements of the leaf subtasks in the directed acyclic graph of tasks.

[0071] Context requirements characterize the amount of information needed to input the execution context window when executing a leaf subtask. Resource requirements characterize the computing power, execution time, number of tool calls, or concurrent resources required to execute a leaf subtask. Context requirements can be estimated based on the task description, input information, and output information of the leaf subtask, while resource requirements can be determined based on the task type, estimated execution steps, and required tools.

[0072] In one implementation, the structural context requirement is determined based on the data structure of the input and output information, and the historical context requirement is determined based on historical execution data of the same task type. The larger value between the structural context requirement and the historical context requirement is taken as the context requirement of the leaf subtask.

[0073] If no historical execution data exists, the context requirement can be determined based on the data structure of the input and output information.

[0074] Process A2: Determine whether the leaf subtasks meet the preset atomicity constraints based on the context requirements and resource requirements.

[0075] It should be noted that the preset atomicity constraint is used to limit the leaf subtasks to be completed independently by a single executor within the resource constraints.

[0076] During the judgment process, the context requirement is compared with the preset context capacity threshold, and the resource requirement is compared with the preset resource budget threshold.

[0077] Specifically, the preset context capacity threshold and preset resource budget threshold can be set according to the resource configuration range of the execution pool.

[0078] Process A3: When a leaf subtask satisfies the preset atomicity constraint, it is determined that the leaf subtask can be completed independently by a single executor within the resource constraints.

[0079] Process A4: When a leaf subtask does not meet the preset atomicity constraint, determine that the leaf subtask cannot be completed independently by a single executor within the resource constraints.

[0080] Understandably, after determining that a leaf subtask cannot be completed independently by a single executor within resource constraints, the leaf subtask is treated as a task to be decomposed and decomposed again. The subtask nodes and dependency edges formed in the next decomposition are added to the task directed acyclic graph, and atomicity constraints are checked again.

[0081] By repeatedly executing the above process, atomic constraints can be used as the stopping condition for recursive decomposition, making the decomposition granularity compatible with the context processing and resource processing capabilities of a single executor, and reducing execution failures caused by the scope of factor tasks exceeding the processing capabilities of the executor.

[0082] Step S102: Establish the execution entity capability model, and construct a unified constraint optimization model based on the task directed acyclic graph and the execution entity capability model.

[0083] It should be noted that the specific process of establishing the execution entity capability model is as follows: obtain the capability information, context capacity information, resource consumption information, and concurrency capability information corresponding to each execution entity in the execution entity pool; and establish the execution entity capability model based on the capability information, context capacity information, resource consumption information, and concurrency capability information.

[0084] It should be noted that capability information characterizes the types of tasks the executor can handle and the tools it can invoke. Context capacity information characterizes the upper limit of context information that the executor can retain during a single task execution. Resource consumption information characterizes the computing power, time, or invocation cost required for the executor to execute a unit of task. Concurrency capability information characterizes the number of subtasks the executor can process simultaneously.

[0085] The executor capability model can establish a corresponding capability record for each executor in the executor pool. The capability record can include the executor identifier, supported task types, callable tools, context capacity, unit resource consumption, and concurrency capacity. The executor capability model can determine whether each executor has the capability to process the corresponding subtask and define the resource boundaries of the executor during task execution.

[0086] Understandably, the joint solution variables of the unified constraint optimization model are the decomposition granularity, the allocation relationship between subtasks and executors, and the subtask execution order. The decomposition granularity is used to represent the subtask level and leaf subtask range adopted by the target task; the allocation relationship is used to represent the executor corresponding to each subtask; and the subtask execution order is used to represent the start order and dependency order of each subtask.

[0087] It should be noted that the specific process of constructing a unified constraint optimization model based on the task's directed acyclic graph and the executor's capability model includes (processes B1 to B4):

[0088] Process B1: Determine the dependencies between subtasks based on the directed acyclic graph of the task.

[0089] It should be noted that dependencies are used to constrain downstream subtasks to execute after upstream subtasks have completed and generated corresponding output information. For subtasks without dependencies, parallel execution can be performed based on the concurrency capabilities and resource budget of the executor; for subtasks with dependencies, the execution order is determined according to the direction indicated by the dependency edges in the directed acyclic graph of tasks.

[0090] Process B2: Determine the capability constraints corresponding to each executor based on the executor capability model.

[0091] Understandably, capability constraints are used to restrict subtasks to being assigned only to executors with the corresponding task processing and tool invocation capabilities. For subtasks that require invoking specific tools, capability constraints also restrict the assigned executor from having the corresponding tool invocation permissions or API access.

[0092] Process B3: Determine the resource constraints corresponding to each subtask based on the decomposition granularity.

[0093] Specifically, resource constraints include context capacity constraints, resource consumption constraints, and concurrency constraints. Context capacity constraints limit the context information maintained by the executor during execution to no more than the context capacity; resource consumption constraints limit the resource consumption of all executors to no more than the preset resource budget; and concurrency constraints limit the number of subtasks running at the same time to no more than the executor pool and the concurrency capacity corresponding to each executor.

[0094] Process B4: Construct a unified constraint optimization model based on dependency relationships, capability constraints, and resource constraints.

[0095] It should be noted that the unified constraint optimization model is used to jointly solve the task decomposition results, execution body allocation results, and execution order corresponding to the target task under the premise of satisfying multiple constraints.

[0096] In this embodiment, the unified constraint optimization model includes decision variables, constraints, and optimization objectives. The decision variables include the allocation relationship between subtasks and executors, and the execution order of subtasks. The constraints include at least capability constraints, dependency constraints, context capacity constraints, and resource constraints. Capability constraints limit the task processing capabilities required by the executor for the corresponding subtask; dependency constraints limit the execution order of dependent subtasks in the directed acyclic graph; context capacity constraints limit the active context usage of multiple subtasks assigned to the same executor during execution to no more than the context capacity recorded in the executor's capability model; and resource constraints limit the number of executors running simultaneously and the resource consumption during execution to no more than a preset resource budget.

[0097] In this embodiment, the optimization objective of the unified constraint optimization model is:

[0098] Minimize(w1·Makespan+w2·Cost+w3·Transfer)(1)

[0099] In formula (1), Makespan represents the completion time of the target task, Cost represents the resource consumption during the execution of the target task, Transfer represents the amount of information transmitted across execution entities, and w1, w2, and w3 represent the weight coefficients of the corresponding optimization targets.

[0100] The Transfer parameter is determined based on the amount of information transferred along the cross-executor dependency edges in the directed acyclic graph of the tasks. When two subtasks with a dependency relationship are assigned to different executors, the amount of information transferred along their corresponding dependency edges is included in Transfer; when two subtasks with a dependency relationship are assigned to the same executor, the amount of information transferred along their corresponding dependency edges is not included in Transfer.

[0101] In one implementation, Transfer is measured by the sum of the association weights of cross-execution dependency edges in the task's directed acyclic graph. The association weights are determined by the amount of data transmitted along the dependency edges and the semantic relevance.

[0102] It is understandable that by jointly optimizing the completion time, resource consumption, and cross-executor information transmission volume of the target task, it is possible to obtain the task decomposition results, execution entity allocation results, and execution order while satisfying capability constraints, dependency constraints, context capacity constraints, and resource constraints.

[0103] Step S103: Construct semantic context propagation constraints based on the task's directed acyclic graph.

[0104] It is understandable that semantic context propagation constraints determine the propagation range of context information along the dependency edges based on the semantic relationships between subtasks, and constrain the context information that each executor can maintain during execution based on the propagated context state.

[0105] It should be noted that semantic context propagation constraints are constructed based on the task's directed acyclic graph, including (processes C1 to C4):

[0106] Process C1: Obtain subtasks with dependencies in the directed acyclic graph of tasks.

[0107] Process C2: Obtain the task description and input / output information corresponding to the subtasks respectively.

[0108] Understandably, the task description is used to characterize the processing objective and content of a subtask. Input / output information is used to characterize the data types, data fields, and output structure received by the subtask. The task description and input / output information together determine whether dependent subtasks belong to the same processing procedure or the same inference chain.

[0109] Process C3: Determine the semantic relationships between subtasks based on the task description and input / output information.

[0110] In one implementation, the task descriptions and input / output information of two dependent subtasks are respectively feature-encoded to obtain corresponding semantic features, and the semantic association is determined based on the similarity between the two semantic features.

[0111] Understandably, semantic relationships are used to characterize the degree of influence of the processing content and output information of upstream subtasks on the execution process of downstream subtasks.

[0112] Process C4: Construct semantic context propagation constraints based on semantic associations and dependencies.

[0113] In the specific implementation of C4, the context propagation relationship between subtasks is first determined based on the dependency relationship; the association constraint relationship between subtasks is determined based on the semantic association relationship; and finally, the semantic context propagation constraint is constructed based on the context propagation relationship and the association constraint relationship.

[0114] It should be noted that determining the context propagation relationship between subtasks based on dependencies involves: determining the propagation path of context information based on dependencies; then determining the context retention state corresponding to each subtask based on the propagation path; then determining the active context occupancy of each executor at any time during execution based on the context retention state; and finally determining the context propagation relationship based on the active context occupancy.

[0115] The context retention state indicates whether the context information generated by the upstream subtask still needs to be used by one or more incomplete downstream subtasks. When all the corresponding downstream subtasks have been completed, or when the downstream subtasks no longer need the corresponding context information, the context retention state of the corresponding context information is updated to the release state.

[0116] Active context occupancy includes the context requirement of the subtask currently being executed by the executor, as well as the amount of upstream context information that has been passed along the propagation path and is still in a reserved state. Semantic context propagation constraints are used to limit the active context occupancy of the executor at any given time from not exceeding the context capacity recorded in the executor's capability model.

[0117] By retaining and releasing context information according to its context retention state, we can avoid continuously storing upstream information that is no longer in use in the execution context, and at the same time avoid prematurely discarding context information that needs to be used before downstream subtasks have been completed.

[0118] Understandably, determining the association constraints between subtasks based on semantic association involves: determining the semantic association degree of each dependent edge based on the semantic association; determining the association weight of each dependent edge based on the data transmission volume and semantic association degree of the dependent edge; determining the grouping relationship between semantically related subtasks based on the association weight; and finally determining the association constraints based on the grouping relationship.

[0119] Among them, data transmission volume is used to characterize the amount of intermediate information that needs to be transmitted when upstream and downstream subtasks are assigned to different executors. Semantic relevance is used to characterize the degree of relevance between two subtasks in terms of task objectives, input / output information, and inference content. Relevance weight is used to characterize the information transmission impact when subtasks at both ends of the dependency edge are assigned to different executors.

[0120] When the amount of data transmitted through a dependent edge increases, or the semantic correlation between the subtasks at both ends of the dependent edge increases, the association weight of the dependent edge can be increased. Association weights enable subtasks with large data transmission volumes or those in the same inference chain to form corresponding grouping relationships during model solving.

[0121] Step S104: Construct semantic grouping constraints based on the directed acyclic graph of tasks. The semantic grouping constraints constrain the assignment of related subtasks to the same execution body or different execution bodies based on the semantic relationship between subtasks.

[0122] Semantic grouping constraints can be determined based on association constraints. When the association weights satisfy the same group condition, the subtasks at both ends of the constraint dependency edge are assigned to the same execution entity; when the association weights do not satisfy the same group condition, or the context capacity, capability information, or concurrency capability of the same execution entity cannot meet the execution requirements of the two subtasks, the subtasks at both ends of the dependency edge are allowed to be assigned to different execution entities, and the corresponding input and output information is passed between the execution entities.

[0123] It should be noted that semantic grouping constraints determine the grouping relationship of subtasks not solely based on data transmission volume, but also on both data transmission volume and semantic relevance. Even if the data transmission volume between two subtasks is small, if the two subtasks belong to the same inference chain and their semantic relevance satisfies the grouping condition, they can be assigned to the same execution entity to maintain contextual continuity during the inference process.

[0124] When multiple related subtasks are assigned to the same execution entity, the unified constraint optimization model also needs to determine whether the active context occupancy of the execution entity exceeds the context capacity based on the semantic context propagation constraint. If it exceeds the context capacity, the subtask grouping relationship, decomposition granularity, or execution entity allocation relationship is adjusted to ensure that the semantic grouping constraint and the semantic context propagation constraint are satisfied simultaneously.

[0125] Step S105: Solve the unified constraint optimization model. Under the conditions of satisfying atomicity constraints, semantic context propagation constraints, semantic grouping constraints, and execution body capability constraints, obtain the task decomposition results, execution body allocation results, and execution order corresponding to the target task.

[0126] In one implementation, when the number of subtask nodes in the directed acyclic graph of the task is less than a preset size threshold, constraint propagation and branch-and-bound methods can be used to solve the unified constraint optimization model; when the number of subtask nodes reaches the preset size threshold, priority scheduling and constraint propagation methods can be used. In other implementations, integer programming, constraint programming, genetic search, simulated annealing, or graph partitioning methods can also be used to solve the model.

[0127] In the specific implementation of step S105, the decomposition granularity is first determined based on atomicity constraints; then the executable order of subtasks is determined based on dependencies; next, candidate executors for each subtask are selected based on capability constraints; then the propagation state of context information and the grouping relationship of related subtasks are determined based on semantic context propagation constraints and semantic grouping constraints; finally, the task decomposition result, executor allocation result, and execution order are determined within the resource constraints.

[0128] In practical applications, after obtaining the execution body allocation results and execution order, each subtask is dispatched to the corresponding execution body in the execution body pool according to the execution order, and the execution results and running status returned by the execution body are obtained.

[0129] For downstream subtasks with dependencies, the output information of the upstream subtask and the context information in a reserved state are passed to the corresponding execution body of the downstream subtask.

[0130] In some embodiments, the execution results and running status of each executor are obtained; combined with Figure 2 The content shown involves determining the exception type when an execution exception is determined based on the execution result and running status; identifying the affected subtasks and corresponding reconstruction strategies based on the exception type; constructing a residual task graph based on the affected subtasks; reconstructing a unified constraint optimization model for the residual task graph based on the reconstruction strategy; and solving the reconstructed unified constraint optimization model.

[0131] Understandably, execution results can include subtask output information, output validation results, and execution confidence information. Runtime status can include context truncation information, resource consumption information, tool invocation status, execution duration, and execution return status. Based on the execution results and runtime status, execution anomalies can be identified as capability mismatch, insufficient context capacity, missing input information, insufficient resource budget, tool invocation anomalies, execution timeouts, or output validation anomalies.

[0132] When the exception type is capability mismatch, the rebuild strategy may include assigning the affected subtask to another execution entity with the corresponding capability; when the exception type is insufficient context capacity, the rebuild strategy may include further decomposing the affected subtask or assigning the affected subtask to an execution entity with a larger context capacity; when the exception type is missing input information, the rebuild strategy may include adjusting dependencies or execution order; when the exception type is insufficient resource budget, the rebuild strategy may include adjusting the execution entity allocation relationship or decomposition granularity; when the exception type is tool invocation exception, the rebuild strategy may include re-invoking the tool or replacing the tool.

[0133] It should be noted that the residual task graph includes incomplete subtask nodes, dependency edges related to incomplete subtasks, and output information that completed subtasks still need to provide to downstream subtasks. When reconstructing the unified constraint optimization model, the task decomposition results, execution body allocation results, and execution order unaffected by execution anomalies are retained, and only the decomposition granularity, allocation relationship, execution order, and resource constraints related to affected subtasks in the residual task graph are updated.

[0134] After solving the reconstructed unified constraint optimization model, the updated execution body allocation results and execution order are obtained. Subtasks in the residual task graph are then executed according to these updated results and order. By resolving the residual task graph, the re-execution of all target tasks can be avoided when a single subtask fails.

[0135] In another embodiment, the executor capability model can be updated based on the historical execution results of each executor handling different task types. The updates may include execution success information, average resource consumption, average context usage, and average execution time corresponding to the task type. The updated executor capability model is used for constructing capability constraints for subsequent target tasks and selecting candidate executors.

[0136] Combination Figure 2 As shown, after all subtasks in the directed acyclic graph (DAG) have been executed, the output information of each subtask is aggregated according to dependencies to form the task execution result corresponding to the target task. During the aggregation process, the output information of each subtask is obtained according to the topological order of the DAG, and the output information is combined, verified, and converted in format according to the output requirements of the target task.

[0137] Taking automated data analysis tasks as an example, the target task can be recursively decomposed into sub-tasks such as data cleaning, feature construction, model training, model evaluation, and report generation. The output information of the data cleaning sub-task serves as the input information of the feature construction sub-task, the output information of the feature construction sub-task serves as the input information of the model training sub-task, the output information of the model training sub-task serves as the input information of the model evaluation sub-task, and the output information of the model evaluation sub-task serves as the input information of the report generation sub-task.

[0138] In the above application scenario, atomicity constraints are determined based on the context and resource requirements of each subtask; an execution entity capability model is established based on the capability information, context capacity information, resource consumption information, and concurrency capability information of each execution entity in the execution entity pool; semantic context propagation constraints and semantic grouping constraints are constructed based on the dependencies, semantic relationships, and data transmission volume between subtasks; and the execution entity and execution order corresponding to each subtask are determined through a unified constraint optimization model. When a model training subtask executes abnormally due to insufficient context capacity, a residual task graph is constructed based on the model training subtask and its downstream subtasks, and the execution entity allocation results are updated according to the reconstruction strategy.

[0139] In this embodiment of the invention, atomicity constraints limit the stopping granularity of recursive decomposition, an executor capability model limits candidate executors corresponding to subtasks, semantic context propagation constraints manage the context retention state and active context occupancy on dependency paths, and semantic grouping constraints determine the grouping relationships of interrelated subtasks. This ensures that the task decomposition results, executor allocation results, and execution order are solved within a unified constraint optimization model. When execution anomalies occur, the affected portion is re-solved using the residual task graph, reducing the resource consumption caused by overall replanning.

[0140] Corresponding to the intelligent task decomposition and execution body allocation method based on constraint satisfaction provided in the above embodiments of the present invention, see also... Figure 3 The diagram shows a structural block diagram of an intelligent task decomposition and execution body allocation system based on constraint satisfaction, provided by an embodiment of the present invention.

[0141] The system includes: a task decomposition unit 301, an execution capability modeling unit 302, a first constraint modeling unit 303, a second constraint modeling unit 304, and a constraint solving and allocation unit 305.

[0142] The task decomposition unit 301 is used to receive the target task, recursively decompose the target task, construct a directed acyclic graph of the task consisting of multiple subtask nodes and dependent edges, and determine the atomicity constraint of the leaf subtasks in the directed acyclic graph of the task. When a leaf subtask cannot be completed independently by a single executor within the resource constraints, the leaf subtask is decomposed again until all leaf subtasks satisfy the atomicity constraint, so as to determine the decomposition granularity of the target task.

[0143] The execution entity capability modeling unit 302 is used to establish the execution entity capability model and construct a unified constraint optimization model based on the task directed acyclic graph and the execution entity capability model. The joint solution variables of the unified constraint optimization model are the decomposition granularity, the allocation relationship between subtasks and execution entities, and the execution order of subtasks.

[0144] The first constraint modeling unit 303 is used to construct semantic context propagation constraints based on the task directed acyclic graph. The semantic context propagation constraints determine the propagation range of context information along the dependency edges based on the semantic association between subtasks, and constrain the context information that each executor can maintain during execution based on the propagated context state.

[0145] The second constraint modeling unit 304 is used to construct semantic grouping constraints based on the task directed acyclic graph. The semantic grouping constraints constrain the assignment of related subtasks to the same execution body or different execution bodies based on the semantic relationship between subtasks.

[0146] The constraint solving and allocation unit 305 is used to solve the unified constraint optimization model. Under the conditions of satisfying atomicity constraints, semantic context propagation constraints, semantic grouping constraints, and execution body capability constraints, it obtains the task decomposition results, execution body allocation results, and execution order corresponding to the target task.

[0147] In this embodiment of the invention, atomicity constraints limit the stopping granularity of recursive decomposition, an executor capability model limits candidate executors corresponding to subtasks, semantic context propagation constraints manage the context retention state and active context occupancy on dependency paths, and semantic grouping constraints determine the grouping relationships of interrelated subtasks. This ensures that the task decomposition results, executor allocation results, and execution order are solved within a unified constraint optimization model. When execution anomalies occur, the affected portion is re-solved using the residual task graph, reducing the resource consumption caused by overall replanning.

[0148] Combination Figure 3 The content shown, task decomposition unit 301, includes:

[0149] The first acquisition module is used to acquire the context requirements and resource requirements of the leaf sub-tasks in the directed acyclic graph of tasks.

[0150] The judgment module is used to determine whether the leaf subtasks meet the preset atomicity constraints based on the context requirements and resource requirements.

[0151] The first determining module is used to determine whether a leaf subtask can be completed independently by a single executor within resource constraints when the leaf subtask satisfies the preset atomicity constraints.

[0152] The second determining module is used to determine that a leaf subtask cannot be completed independently by a single executor within resource constraints when the leaf subtask does not meet the preset atomicity constraints.

[0153] Combination Figure 3 The content shown, the execution body capability modeling unit 302, includes:

[0154] The second acquisition module is used to acquire the capability information, context capacity information, resource consumption information, and concurrency capability information of each execution entity in the execution entity pool.

[0155] The module is used to build an execution entity capability model based on capability information, context capacity information, resource consumption information, and concurrency capability information.

[0156] Combination Figure 3 The content shown, the execution body capability modeling unit 302, includes:

[0157] The third determination module is used to determine the dependencies between subtasks based on the directed acyclic graph of the task.

[0158] The fourth determination module is used to determine the capability constraints corresponding to each executor based on the executor capability model.

[0159] The fifth determination module is used to determine the resource constraints corresponding to each subtask based on the decomposition granularity.

[0160] The first building module is used to construct a unified constraint optimization model based on dependencies, capability constraints, and resource constraints.

[0161] Combination Figure 3 The content shown, the first constraint modeling unit 303, includes:

[0162] The third acquisition module is used to acquire subtasks with dependencies in the directed acyclic graph of tasks.

[0163] The fourth acquisition module is used to acquire the task description and input / output information corresponding to the subtasks respectively.

[0164] The sixth determination module is used to determine the semantic relationships between subtasks based on the task description and input / output information.

[0165] The second building module is used to construct semantic context propagation constraints based on semantic associations and dependencies.

[0166] Combination Figure 3 The content shown, the second building module, includes:

[0167] The seventh module is used to determine the context propagation relationship between subtasks based on dependencies.

[0168] The eighth determination module is used to determine the association constraints between subtasks based on semantic association relationships.

[0169] The third building module is used to construct semantic context propagation constraints based on context propagation relationships and association constraint relationships.

[0170] Combination Figure 3The content shown, the seventh determination module, includes:

[0171] The first determination submodule is used to determine the propagation path of context information based on dependencies.

[0172] The second determination submodule is used to determine the context retention state corresponding to each subtask based on the propagation path.

[0173] The third determination submodule is used to determine the active context occupancy of each executor at any time during execution based on the context retention state.

[0174] The fourth determination submodule is used to determine the context propagation relationship based on the active context occupancy.

[0175] Combination Figure 3 The content shown, the eighth determining module, includes:

[0176] The fifth determination submodule is used to determine the semantic correlation degree corresponding to each dependency edge based on the semantic correlation relationship.

[0177] The sixth determination submodule is used to determine the association weight of each dependent edge based on the data transmission volume and semantic relevance of the dependent edge.

[0178] The seventh module is used to determine the grouping relationship between semantically related subtasks based on the association weight.

[0179] The eighth module is used to determine the associated constraint relationship based on the grouping relationship.

[0180] Combination Figure 3 The system also includes the following, as shown:

[0181] The acquisition unit is used to acquire the execution results and running status of each executor.

[0182] The first determining unit is used to determine the exception type corresponding to the execution exception when it is determined that there is an execution exception based on the execution result and the running status.

[0183] The second determination unit is used to determine the affected subtasks and the corresponding reconstruction strategies based on the exception type.

[0184] Construction unit, used to build a residual task graph based on the affected subtasks.

[0185] The reconstruction unit is used to reconstruct the unified constraint optimization model of the residual task graph according to the reconstruction strategy, and to solve the reconstructed unified constraint optimization model.

[0186] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and relevant parts can be referred to the descriptions in the method embodiments. The systems and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0187] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0188] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for intelligent task decomposition and execution body allocation based on constraint satisfaction, characterized in that, The method includes: The target task is received, and the target task is recursively decomposed to construct a directed acyclic graph of the task consisting of multiple subtask nodes and dependency edges. The atomicity constraint of the leaf subtasks in the directed acyclic graph of the task is determined. When the leaf subtask cannot be completed independently by a single executor within the resource constraints, the leaf subtask is decomposed again until all leaf subtasks satisfy the atomic constraint, so as to determine the decomposition granularity of the target task. An execution entity capability model is established, and a unified constraint optimization model is constructed based on the task directed acyclic graph and the execution entity capability model. The joint solution variables of the unified constraint optimization model are the decomposition granularity, the allocation relationship between subtasks and execution entities, and the execution order of subtasks. A semantic context propagation constraint is constructed based on the directed acyclic graph of the task. The semantic context propagation constraint determines the propagation range of context information along the dependency edge based on the semantic association between subtasks, and constrains the context information that each executor can maintain during execution based on the propagated context state. Semantic grouping constraints are constructed based on the directed acyclic graph of the task, wherein the semantic grouping constraints constrain the assignment of related subtasks to the same execution body or different execution bodies based on the semantic association between subtasks; Solving the unified constraint optimization model, under the conditions of satisfying the atomicity constraint, the semantic context propagation constraint, the semantic grouping constraint, and the execution entity capability constraint, yields the task decomposition result, execution entity allocation result, and execution order corresponding to the target task.

2. The method according to claim 1, characterized in that, The atomic constraint determination for the leaf subtasks in the directed acyclic graph of the task includes: Obtain the context requirements and resource requirements of the leaf subtasks in the directed acyclic graph of the task. Determine whether the leaf subtask satisfies the preset atomicity constraint based on the context requirement and the resource requirement; When the leaf subtask satisfies the preset atomicity constraint, it is determined that the leaf subtask can be completed independently by a single executor within the resource constraints; When the leaf subtask does not satisfy the preset atomicity constraint, it is determined that the leaf subtask cannot be completed independently by a single executor within the resource constraints.

3. The method according to claim 1, characterized in that, The establishment of the execution entity capability model includes: Obtain the capability information, context capacity information, resource consumption information, and concurrency capability information corresponding to each execution entity in the execution entity pool; The execution entity capability model is established based on the capability information, the context capacity information, the resource consumption information, and the concurrency capability information.

4. The method according to claim 1, characterized in that, The step of constructing a unified constraint optimization model based on the task's directed acyclic graph and the executor capability model includes: Determine the dependencies between subtasks based on the directed acyclic graph of the task; The capability constraints corresponding to each executor are determined based on the executor capability model. The resource constraints corresponding to each subtask are determined based on the decomposition granularity. A unified constraint optimization model is constructed based on the dependencies, capability constraints, and resource constraints.

5. The method according to claim 1, characterized in that, The step of constructing semantic context propagation constraints based on the task's directed acyclic graph includes: Obtain the subtasks with dependencies in the directed acyclic graph of the task; Obtain the task description and input / output information corresponding to each subtask; Determine the semantic relationships between the subtasks based on the task description and the input / output information; Semantic context propagation constraints are constructed based on the semantic associations and dependencies.

6. The method according to claim 5, characterized in that, The step of constructing semantic context propagation constraints based on the semantic associations and dependencies includes: Determine the context propagation relationship between the subtasks based on the dependencies; Determine the association constraints between the subtasks based on the semantic associations; Semantic context propagation constraints are constructed based on the context propagation relationship and the association constraint relationship.

7. The method according to claim 6, characterized in that, Determining the context propagation relationship between the subtasks based on the dependency relationship includes: Determine the propagation path of context information based on the dependencies; Determine the context retention state corresponding to each subtask based on the propagation path; The active context occupancy of each executor at any point during execution is determined based on the context retention state. The context propagation relationship is determined based on the active context occupancy.

8. The method according to claim 6, characterized in that, Determining the association constraints between the subtasks based on the semantic association includes: Determine the semantic correlation degree corresponding to each dependency edge based on the semantic correlation relationship; The association weight of each dependency edge is determined based on the data transmission volume corresponding to the dependency edge and the semantic relevance. The grouping relationship between semantically related subtasks is determined based on the association weights; The associated constraint relationship is determined based on the grouping relationship.

9. The method according to claim 1, characterized in that, After solving the unified constraint optimization model, the process also includes: Obtain the execution results and running status corresponding to each of the aforementioned executors; When it is determined that an execution exception exists based on the execution result and the running status, the exception type corresponding to the execution exception is determined; Determine the affected subtasks and corresponding reconstruction strategies based on the anomaly type; Construct a residual task graph based on the affected subtasks; The unified constraint optimization model is reconstructed based on the reconstruction strategy for the residual task graph, and the reconstructed unified constraint optimization model is solved.

10. A smart task decomposition and execution body allocation system based on constraint satisfaction, characterized in that, The system includes: The task decomposition unit is used to receive the target task, recursively decompose the target task, construct a directed acyclic graph of the task consisting of multiple subtask nodes and dependency edges, and determine the atomicity constraint of the leaf subtasks in the directed acyclic graph of the task. When the leaf subtask cannot be completed independently by a single executor within the resource constraints, the leaf subtask is decomposed again until all leaf subtasks satisfy the atomicity constraint, so as to determine the decomposition granularity of the target task. An execution entity capability modeling unit is used to establish an execution entity capability model and construct a unified constraint optimization model based on the task directed acyclic graph and the execution entity capability model. The joint solution variables of the unified constraint optimization model are the decomposition granularity, the allocation relationship between subtasks and execution entities, and the execution order of subtasks. The first constraint modeling unit is used to construct semantic context propagation constraints based on the directed acyclic graph of the task. The semantic context propagation constraints determine the propagation range of context information along the dependency edges based on the semantic association between subtasks, and constrain the context information that each executor can maintain during execution based on the propagated context state. The second constraint modeling unit is used to construct semantic grouping constraints based on the directed acyclic graph of the task, wherein the semantic grouping constraints constrain the assignment of related subtasks to the same execution body or different execution bodies based on the semantic association between subtasks; The constraint solving and allocation unit is used to solve the unified constraint optimization model and, under the conditions of satisfying the atomicity constraint, the semantic context propagation constraint, the semantic grouping constraint, and the execution body capability constraint, obtain the task decomposition result, execution body allocation result, and execution order corresponding to the target task.