Target constraint and evidence backflow execution graph rectification method, system, medium and device
By constructing an agent execution graph and performing local replanning and correction, the problem of insufficient quality control in complex tasks is solved, the efficiency and stability of task execution are improved, and the cost is reduced.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HANGZHOU SHENGCHENGJI TECHNOLOGY CO LTD
- Filing Date
- 2026-04-28
- Publication Date
- 2026-07-24
Smart Images

Figure CN122452801A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of artificial intelligence task execution control technology, and specifically relates to a method, system, medium and device for correcting deviations in execution graphs based on target constraints and evidence feedback. Background Technology
[0002] With the development of large language models, multimodal models, and the ability to invoke external tools, more and more business systems are beginning to adopt the agent approach to handle complex tasks. Common techniques in the current field include: directly inputting the user's natural language task into the model to generate results in one step; executing multi-stage tasks through fixed prompt word chains; completing tasks through role-based division of labor among planning agents, execution agents, and reflective agents; and orchestrating model invocation, retrieval, tool execution, and result output through predefined workflows.
[0003] However, in real-world business scenarios involving content generation, document processing, and quotation processing, tasks typically involve multiple constraints, including target requirements, style limitations, factual boundaries, format constraints, platform rules, resource budgets, the scope of applicable materials, and quality evaluation standards. With multiple task inputs, there is a need for quality control in task execution, and this quality control requires correction. Existing correction methods often involve retrying the entire round or regenerating the entire document, which not only increases the cost of model and tool calls but also causes correctly executed parts to be overwritten, results to fluctuate more, and repeated errors to accumulate. Summary of the Invention
[0004] This invention provides a method, system, medium, and device for correcting deviations in execution graphs based on target constraints and evidence feedback, which addresses the technical problem of poor quality control in existing input tasks. Based on the defect attribution object, it determines the scope of local replanning and performs replanning and local correction on the local subgraphs corresponding to the scope of local replanning, thereby improving the efficiency, stability, and traceability of quality control in the execution process of complex tasks.
[0005] To achieve the above objectives, the present invention is implemented through the following technical solution:
[0006] The execution graph correction method based on target constraints and evidence feedback includes the following steps:
[0007] Step 1: Receive user task input, parse the task input, and generate a runtime object collection; the runtime object collection includes target object, constraint object, evaluation object, resource budget object, and material reference object;
[0008] Step 2: Automatically construct the agent execution graph based on the runtime object set; the execution graph consists of multiple execution nodes and the relationships between nodes, including dependency relationships, parallel relationships, and evidence backflow relationships;
[0009] Step 3: Control the execution of each execution node in the execution graph and generate intermediate result objects with source tracing information;
[0010] Step 4: Perform defect detection on intermediate result objects or stage results, and form defect attribution objects based on the defect detection results; wherein, the defect attribution objects are used to characterize the mapping relationship between defect types and corresponding execution nodes, constraint sources or material sources;
[0011] Step 5: Based on the defect attribution object, determine the scope of local replanning, and perform replanning and local correction on the local subgraphs corresponding to the scope of local replanning;
[0012] Step 6: Output the final task results and save the execution graph configuration, defect type and correction path of this round of execution as a reusable template.
[0013] Optionally, in step 2, the execution graph is constructed as follows:
[0014] Match a set of candidate nodes based on task type;
[0015] Determine the main link node based on the target object;
[0016] Insert validation nodes, style correction nodes, or budget control nodes based on the constraint objects;
[0017] Determine the node budget allocation based on the budget object;
[0018] The number of detection nodes and the threshold are determined based on the evaluation object;
[0019] Determine the relevant nodes and data flow of the material based on the object referenced by the material;
[0020] Generate an execution graph and record nodes, edges, budgets, and input / output relationships.
[0021] Furthermore, in step 2, the evidence repatriation relationship is executed as follows:
[0022] When insufficient evidence support, evidence conflicts, or incomplete evidence coverage are detected in the execution graph, the defect detection results, evidence binding anomaly information, and target paragraph location information of the execution graph are sent back to the evidence extraction node or material screening node through the backflow path in the execution graph to trigger a feedback processing mechanism for local supplementary evidence, material replacement, or evidence rebinding.
[0023] Optionally, in step 3, the execution of each execution node and the generation of intermediate result objects are performed as follows:
[0024] The nodes in the execution graph run sequentially or in parallel according to dependencies, priorities, and budget constraints. Each node receives input from an upstream object and outputs at least one intermediate result object. The specific steps are:
[0025] The material filtering node outputs a set of candidate material objects;
[0026] The evidence extraction node outputs the evidence object;
[0027] The outline generation node outputs a structural outline object;
[0028] The draft generation node outputs a draft fragment object;
[0029] The style alignment node outputs a style correction object;
[0030] The detection node outputs a verification report object;
[0031] Each intermediate result object contains source tracking information, including source node, referenced material, constraint application record and version number, which facilitates subsequent detection, replacement, rollback and attribution;
[0032] Furthermore, a comprehensive quality score is applied to the intermediate results. The comprehensive quality score is obtained by weighted summation of completeness score, consistency score, style matching score, and evidence support score.
[0033] The overall quality score is compared with a dynamic threshold, which is dynamically adjusted based on task complexity and budget remaining percentage indicators.
[0034] When the overall quality score falls below the dynamic threshold, defect detection and subsequent processes are triggered.
[0035] Optionally, in step 4, defect detection identification includes the identification of defect types such as missing facts, factual conflicts, incomplete structure, style deviation, content duplication, platform rule conflicts, budget overruns, insufficient evidence support, missing fields, and logical jumps.
[0036] Defect detection is accomplished through rule engine detection, model scoring detection, multi-model cross-evaluation, material-output reference chain verification, and consistency comparison between intermediate objects. Based on the defect detection results, defect attribution objects are formed.
[0037] Specifically, the attribution process includes: obtaining defect detection results; determining a set of candidate attribution nodes based on defect type; retrieving source tracing information, constraint tracing information, and evidence binding information from intermediate result objects; prioritizing candidate nodes based on attribution criteria; and generating defect attribution objects.
[0038] The candidate attribution node set is determined based on the defect type, and then the final attribution node is determined by combining the evidence binding, constraint tracing and source tracing fields in the intermediate result object;
[0039] Furthermore, the attribution priority calculation involves calculating an attribution priority score A_i for each candidate attribution node i, expressed by the formula:
[0040] A_i=λ1×M_i+λ2×E_i+λ3×C_i+λ4×S_i+λ5×R_i;
[0041] Where A_i is the attribution priority score of candidate node i; M_i is the matching degree between defect type and node function type; E_i is the evidence_binding anomaly degree; C_i is the constraint_trace conflict degree; S_i is the source_trace anomaly degree; R_i is the historical attribution correction validity correction value; λ1, λ2, λ3, λ4, and λ5 are the corresponding weights;
[0042] Among them, M_i is generated based on the preset defect-node mapping table. If the node belongs to the high priority node of this type of defect, a higher value is assigned; E_i can be calculated based on the proportion of empty evidence, the deviation of evidence relevance, and the degree of insufficient evidence coverage; C_i can be calculated based on the number of constraint violations, the degree of violation, or the level of violation criticality; S_i can be calculated based on the source missing, source conflict, the proportion of low-credibility sources, or the case of out-of-bounds citation; R_i can be calculated based on the proportion of similar defects that were successfully corrected after being attributed to this node in the past.
[0043] Optionally, in step 5, the scope of local replanning is determined based on the defect attribution object, using the following steps:
[0044] The starting node is the target node pointed to by the defect attribution object;
[0045] Traverse backwards along the execution graph to identify key dependent nodes that provide the necessary input to the target node;
[0046] Extend backward along the execution graph to identify downstream nodes that are directly affected by the output of the target node;
[0047] The subgraph consisting of the target node, key dependent nodes, and downstream nodes is defined as the scope of local replanning, forming the minimum necessary subgraph;
[0048] Furthermore, the identification of key dependency nodes and downstream nodes is carried out in the following manner:
[0049] For upstream candidate nodes, the upstream inclusion judgment value is calculated based on their dependency strength with the target node, the correlation between the output content and the defect field, the degree of abnormality of the output result, and whether they have passed the verification stably. When the upstream inclusion judgment value exceeds the preset upstream threshold, the upstream candidate node is identified as a key dependency node.
[0050] For downstream candidate nodes, a downstream inclusion criterion value is calculated based on their usage ratio of the target node's output, the impact of the target node's anomaly on the quality of their results, and the possibility of defect propagation. When the downstream inclusion criterion value exceeds the preset downstream threshold, the downstream candidate node is identified as an included node.
[0051] Optionally, in step 5, the local subgraph undergoes replanning and local correction, specifically:
[0052] For local subgraph replanning, the following steps are used:
[0053] Determine the minimum necessary subgraph based on the defect attribution object;
[0054] Lock down the affected nodes and their necessary upstream and downstream links;
[0055] Retain valid intermediate result objects from unaffected nodes;
[0056] Adjust the node configuration, budget, or input objects of a local link;
[0057] Re-execute the local link;
[0058] Replace the old results with the new results and re-validate;
[0059] For local correction of a local subgraph, the following actions are performed:
[0060] Partial re-execution, partial replacement, material replacement, budget adjustment, node insertion, node skipping, node order adjustment, result merging, and version rollback;
[0061] When performing local correction, valid intermediate result objects of unaffected nodes located outside the scope of local replanning are retained, and only the node links within the local subgraph are adjusted and re-executed.
[0062] Optionally, in step 6, the target object, constraint object, material type, execution graph structure, node budget allocation, common defect types and corresponding correction paths of this round of tasks are stored as historical templates;
[0063] The task type identification, execution graph structure, node order and parallel relationship, node budget allocation, common defect types, correction path, applicable constraints, applicable material types, and success rate or stability score of this round of tasks are condensed into reusable templates.
[0064] Upon receiving a new task, the target object and constraint object of the current task are extracted, and similarity calculation is performed between them and the objects recorded in the historical templates. The similarity calculation includes: target object similarity, constraint object similarity, material type similarity, output type similarity, and platform adaptation requirement similarity.
[0065] The target constraint and evidence backflow execution graph correction system is used to execute the above-mentioned target constraint and evidence backflow execution graph correction method, including:
[0066] The task parsing and modeling module is used to receive user task input, perform semantic parsing, parameter decomposition and feature extraction on the user task input, and generate a set of runtime objects adapted to the intelligent agent task operation.
[0067] The execution graph automatic construction module is connected to the task parsing and modeling module. It is used to receive a set of runtime objects and automatically build an execution graph for the intelligent agent based on the attribute association logic, execution sequence logic and data interaction logic of each runtime object.
[0068] The node operation management module is connected to the execution graph automatic construction module. It is used to schedule and control the execution nodes in the execution graph to run in an orderly manner according to the preset node relationship and execution sequence. It collects the running data and output data of each execution node in real time and generates intermediate result objects carrying full-link source tracing information. The source tracing information is used to record the generation execution node, called resources and referenced material traceability information corresponding to the intermediate result.
[0069] The defect detection and attribution module is connected to the node operation and control module. It is used to receive intermediate result objects and task execution phase results, perform defect detection according to preset constraint standards, evaluation rules and target thresholds to identify various execution defects in intermediate results and phase results, and build and generate defect attribution objects based on the defect detection and identification results.
[0070] The local replanning and correction module is connected to the defect detection and attribution module. It is used to retrieve the defect attribution object, locate the local business scope where the task execution deviates based on the defect mapping relationship, determine the matching and suitable local replanning scope, and perform task strategy reconfiguration, execution path replanning and targeted local correction and optimization operations on the local subgraph of the execution graph corresponding to the local replanning scope to eliminate various defects in task execution.
[0071] The result output template accumulation module is connected to the local replanning and correction module and the execution graph automatic construction module. It is used to output the final result of the task after local correction and optimization. At the same time, it collects the original configuration information of the execution graph corresponding to the entire execution process of this round of tasks, the data of various defect types detected and identified, and the local correction path data. It integrates and solidifies multiple types of data into a reusable correction template, which is stored in the library for subsequent task execution correction and calling of similar intelligent agents.
[0072] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is used to implement the above-mentioned target constraint and evidence backflow execution graph correction method.
[0073] A target constraint and evidence feedback execution graph correction device, comprising:
[0074] Memory, processor, and computer program stored in the memory and executable on the processor;
[0075] When the processor executes the program, it implements the above-mentioned execution graph correction method for target constraints and evidence feedback.
[0076] The beneficial effects of this invention are:
[0077] This invention transforms user tasks into a set of runtime objects including objectives, constraints, budgets, evaluation criteria, and material reference relationships. Based on this set of runtime objects, it automatically constructs an execution graph corresponding to the current task. During the execution graph's execution, it generates traceable intermediate result objects. Based on these intermediate result objects and stage results, it performs defect detection and maps the detection results to corresponding execution nodes, material sources, constraint sources, or task stages. Then, based on the defect attribution results, it determines the scope of local replanning, performs local replanning and local re-execution on relevant node subgraphs, correcting only the problem-related local links, and finally outputs a task result that meets the evaluation requirements. Furthermore, it preserves the execution graph configuration, defect types, and correction paths as reusable templates, improving the efficiency, stability, and traceability of quality control during complex task execution. Attached Figure Description
[0078] 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 some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0079] Figure 1 This is a schematic diagram of the device structure of the present invention;
[0080] Figure 2 This is a schematic diagram of the workflow of the present invention;
[0081] Figure 3 This is a schematic diagram of the execution diagram correction device for the target constraint and evidence feedback of the present invention.
[0082] Figure 4 This is a schematic diagram of the computer-readable storage medium structure of the present invention. Detailed Implementation
[0083] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0084] Example 1
[0085] like Figure 1 As shown, this embodiment provides a target constraint and evidence feedback execution graph correction device, including:
[0086] The task parsing and modeling module is used to receive user task input, perform semantic parsing, parameter decomposition and feature extraction on the user task input, and generate a set of runtime objects adapted to the intelligent agent task operation.
[0087] The execution graph automatic construction module is connected to the task parsing and modeling module. It is used to receive a set of runtime objects and automatically build an execution graph for the intelligent agent based on the attribute association logic, execution sequence logic and data interaction logic of each runtime object.
[0088] The node operation management module is connected to the execution graph automatic construction module. It is used to schedule and control the execution nodes in the execution graph to run in an orderly manner according to the preset node relationship and execution sequence. It collects the running data and output data of each execution node in real time and generates intermediate result objects carrying full-link source tracing information. The source tracing information is used to accurately record the generation execution node, called resources and referenced material traceability information corresponding to the intermediate result.
[0089] The defect detection and attribution module is connected to the node operation and control module. It is used to receive intermediate result objects and task execution phase results, carry out full-dimensional defect detection work according to preset constraint standards, evaluation rules and target thresholds, accurately identify various execution defects in intermediate results and phase results, and build and generate defect attribution objects based on defect detection and identification results.
[0090] The local replanning and correction module is connected to the defect detection and attribution module. It is used to retrieve the defect attribution object, accurately locate the local business scope where the task execution deviates based on the defect mapping relationship, determine the matching and suitable local replanning scope, and perform task strategy reconfiguration, execution path replanning and targeted local correction and optimization operations on the local subgraph of the execution graph corresponding to the local replanning scope to eliminate various defects in task execution.
[0091] The result output template accumulation module is connected to the local replanning and correction module and the execution graph automatic construction module. It is used to output the final compliance result of the task after local correction optimization. At the same time, it collects the original configuration information of the execution graph corresponding to the entire execution process of this round of tasks, the data of various defect types detected and identified, and the local correction path data. It integrates and solidifies multiple types of data into a reusable standardized correction template, which is stored in the database for direct use in subsequent similar intelligent agent tasks to perform correction.
[0092] Example 2
[0093] like Figure 2As shown, this embodiment provides a method for correcting deviations in the execution graph of target constraints and evidence backflow, including the following steps:
[0094] Step 1: Receive user task input, parse the task input, and generate a runtime object collection; the runtime object collection includes target object, constraint object, evaluation object, resource budget object, and material reference object;
[0095] The target object represents the expected outcome of the task; the constraint object represents the limiting conditions that the execution process or output results should meet; the resource budget object represents the range of resources that can be consumed in the execution of the task; the evaluation object represents the criteria for judging the task results; and the material reference object represents the sources of materials, evidence fragments, or knowledge items that are allowed to be referenced during execution.
[0096] Step 2: Automatically construct the agent execution graph based on the runtime object set; the execution graph consists of multiple execution nodes and the relationships between nodes, including dependency relationships, parallel relationships, and evidence backflow relationships;
[0097] Step 3: Control the operation of each execution node in the execution graph and generate intermediate result objects with source tracing information; the intermediate result objects are used to represent the stage results output by each node in the execution graph.
[0098] Step 4: Perform defect detection on intermediate result objects or stage results, and form defect attribution objects based on the defect detection results; wherein, the defect attribution objects are used to characterize the mapping relationship between defect types and corresponding execution nodes, constraint sources or material sources;
[0099] Step 5: Based on the defect attribution object, determine the scope of local replanning, and perform replanning and local correction on the local subgraphs corresponding to the scope of local replanning;
[0100] Step 6: Output the final task results and save the execution graph configuration, defect type and correction path of this round of execution as a reusable template.
[0101] Example 3
[0102] Based on Embodiment 2, in step 1, task input and parsing involves receiving user input task text, attachments, historical context, user preferences, and a set of optional materials.
[0103] The task receiving and parsing process includes:
[0104] Semantic parsing: Extracting task objectives, output format, and user requirements;
[0105] Conditional extraction: Identify style, length, restricted areas, rules, budget, and priority;
[0106] Material binding: Identifies permitted references, historical content, and knowledge fragments;
[0107] Task classification: categorize tasks into predefined task types or identify similar task types using a model;
[0108] Object creation: Creates a collection of runtime objects.
[0109] The parsing is performed by combining a rule engine with a language model: obvious structured information is extracted using rules, while implicit goals, soft styles, priorities, and other information are extracted using models, and the results are uniformly written into a runtime object.
[0110] Example 4
[0111] Based on Example 2, in step 2, the execution graph is constructed such that the execution nodes include: material selection node, evidence extraction node, key point summarization node, outline generation node, draft generation node, style alignment node, conflict detection node, integrity detection node, compliance verification node, platform adaptation node, result assembly node, and template accumulation node; the node relationships include: dependency relationship, parallel relationship, priority relationship, substitution relationship, failure recovery relationship, and backflow relationship.
[0112] Evidence feedback refers to the process of sending the defect detection results, evidence binding anomaly information, and target paragraph location information back to the evidence extraction node, material screening node, or relevant upstream node when insufficient evidence support, evidence conflict, or incomplete evidence coverage is detected. This triggers a feedback processing mechanism for local evidence supplementation, material replacement, evidence rebinding, or regeneration of relevant paragraphs.
[0113] The steps for constructing an execution graph include:
[0114] Match a set of candidate nodes based on task type;
[0115] Determine the main link node based on the target object;
[0116] Insert validation nodes, style correction nodes, or budget control nodes based on the constraint objects;
[0117] Determine the node budget allocation based on the budget object;
[0118] The number of detection nodes and the threshold are determined based on the evaluation object;
[0119] Determine the relevant nodes and data flow of the material based on the object referenced by the material;
[0120] Generate an execution graph and record nodes, edges, budgets, and input / output relationships.
[0121] Node priority can be determined by a combination of target weight, constraint risk weight, defect risk weight, and evidence importance weight.
[0122] Example 5
[0123] Based on Example 2, in step 3, during node execution and intermediate result object generation, each node in the execution graph runs sequentially or in parallel according to dependencies, priorities, and budget constraints. Each node receives input from an upstream object and outputs at least one intermediate result object. The specific steps are as follows:
[0124] The material filtering node outputs a set of candidate material objects;
[0125] The evidence extraction node outputs the evidence object;
[0126] The outline generation node outputs a structural outline object;
[0127] The draft generation node outputs a draft fragment object;
[0128] The style alignment node outputs a style correction object;
[0129] The detection node outputs a verification report object.
[0130] Each intermediate result object includes source tracking information, including the source node, referenced materials, constraint application records, and version number, to facilitate subsequent detection, replacement, rollback, and attribution.
[0131] To improve the interpretability and reproducibility of intermediate result evaluation, the system can calculate a comprehensive quality score for intermediate result objects or interim results.
[0132] The overall quality score Q is represented as:
[0133] Q=w1×S1+w2×S2+w3×S3+w4×S4;
[0134] Wherein: S1 is the completeness score; S2 is the consistency score; S3 is the style matching score; S4 is the evidence support score; w1, w2, w3, and w4 are the weights of each dimension, and the weight values can be configured according to the task type, output platform, target object, budget object, or historical success rate.
[0135] The integrity score can be calculated based on the structural slot coverage required by the target object;
[0136] Consistency scores can be calculated based on semantic consistency, logical dependency consistency, or reference relationship consistency among intermediate result objects;
[0137] Style matching score can be calculated based on the deviation between the style feature representation of the intermediate result object and the style representation in the constraint object;
[0138] The evidence support score can be calculated based on the number of evidences, relevance, and coverage in evidence_binding.
[0139] When the comprehensive quality score Q is lower than the preset threshold in the evaluation object, the system triggers the defect detection and attribution process.
[0140] For different task types, the weights can be dynamically set using a preset configuration table or historical learning results. For example, for the short video oral script task, it can be set as: w1 = 0.30; w2 = 0.25; w3 = 0.20; w4 = 0.25. When executed once: S1 = 0.88; S2 = 0.81; S3 = 0.72; S4 = 0.65;
[0141] Then the comprehensive quality score is:
[0142] Q = 0.30 × 0.88 + 0.25 × 0.81 + 0.20 × 0.72 + 0.25 × 0.65;
[0143] ]END]]Q = 0.264 + 0.2025 + 0.144 + 0.1625;
[0144] Q = 0.773.
[0145] If the comprehensive score threshold Q_th in the evaluation object corresponding to this task is 0.80, then since Q < Q_th, the system enters the defect detection and attribution process.
[0146] The threshold can be a fixed threshold or a dynamic threshold. The dynamic threshold can be adjusted according to task complexity, remaining budget, historical success rate, or platform requirements.
[0147] For example, the dynamic threshold Q_th can be expressed as:
[0148] Q_th = Q_base + α × C - β × B;
[0149] Where Q_base is the base threshold; C is the task complexity index; B is the budget pressure relief index or the remaining budget ratio index; α, β are adjustment coefficients.
[0150] For example, when Q_base = 0.78, α = 0.04, β = 0.03, C = 0.50, B = 0.20, then:
[0151] Q_th = 0.78 + 0.04 × 0.50 - 0.03 × 0.20;
[0152] Q_th = 0.78 + 0.02 - 0.006;
[0153] Q_th = 0.794.
[0154] The comprehensive score can be calculated using a linear weighting method, or it can be generated using hierarchical scoring, segmented scoring, model scoring, rule scoring, or a combination of rule scoring and model scoring. The threshold can be a fixed threshold or dynamically adjusted based on historical task success rate, budget consumption, or task complexity.
[0155] Example 6
[0156] Based on Example 2, in step 4, the defect types include at least: missing facts, conflicting facts, incomplete structure, style deviation, duplicate content, conflicting platform rules, budget overrun, insufficient evidence support, missing fields, and logical jumps.
[0157] Defect detection is accomplished in the following ways:
[0158] The rule engine performs checks such as length, format, and field integrity.
[0159] Model scoring and evaluation, such as style matching, consistency, and platform adaptability;
[0160] Dual-model or multi-model cross-evaluation;
[0161] Material - Output Reference Chain Verification;
[0162] Consistency comparison between intermediate objects.
[0163] Based on the defect detection results, defect attribution objects are formed, which not only determine whether there are problems in the results, but also map the problems to specific nodes, specific material layers, specific constraints or specific task stages;
[0164] The attribution process includes:
[0165] Obtain defect detection results;
[0166] Determine the set of candidate attribution nodes based on the defect type;
[0167] Retrieve source tracking information, constraint tracking information, and evidence binding information from intermediate result objects;
[0168] Candidate nodes are prioritized based on attribution criteria.
[0169] Generate defect attribution objects.
[0170] First, a set of candidate attribution nodes is determined based on the defect type. Then, the final attribution node is determined by combining the `evidence_binding`, `constraint_trace`, and `source_trace` fields from the intermediate result object. Further, attribution priority is calculated for each candidate attribution node `i`, with an attribution priority score A_i, expressed by the formula:
[0171] A_i=λ1×M_i+λ2×E_i+λ3×C_i+λ4×S_i+λ5×R_i;
[0172] Where A_i is the attribution priority score of candidate node i; M_i is the matching degree between defect type and node function type; E_i is the evidence_binding anomaly degree; C_i is the constraint_trace conflict degree; S_i is the source_trace anomaly degree; R_i is the historical attribution correction validity correction value; λ1, λ2, λ3, λ4, and λ5 are the corresponding weights.
[0173] Among them, M_i can be generated based on the preset defect-node mapping table. If the node belongs to the high priority node of this type of defect, a higher value is assigned; E_i can be calculated based on the proportion of empty evidence, the deviation of evidence relevance, and the degree of insufficient evidence coverage; C_i can be calculated based on the number of constraint violations, the degree of violation, or the level of violation criticality; S_i can be calculated based on the source missing, source conflict, the proportion of low-credibility sources, or the case of out-of-bounds citation; R_i can be calculated based on the proportion of similar defects that were successfully corrected after being attributed to this node in the past.
[0174] If A_i is the maximum value for a node in the candidate node set, then that node is determined as the primary attribution node.
[0175] If the difference between the top two candidate nodes is less than the preset difference threshold ΔA, multiple nodes can be jointly recorded as the target_node_id set in the attribution object to support joint correction.
[0176] For example, for the "insufficient evidence support" defect, the following values can be set: λ1=0.30; λ2=0.30; λ3=0.15; λ4=0.15; λ5=0.10. If the calculated values for the evidence extraction node are: M_i=0.95; E_i=0.90; C_i=0.20; S_i=0.40; R_i=0.80, then:
[0177] A_i=0.30×0.95+0.30×0.90+0.15×0.20+0.15×0.40+0.10×0.80;
[0178] A_i=0.285+0.27+0.03+0.06+0.08;
[0179] A_i=0.725.
[0180] If the attribution priority score of the material screening node under the same defect is 0.69, the system can determine the evidence extraction node as the primary attribution node and the material screening node as the secondary attribution node. The defect-attribution mapping is shown in Table 1 below:
[0181] Table 1 Defect-Attribution Mapping Table
[0182] Defect-attribution can be achieved through a pre-defined rule table, or it can be generated through statistical learning, historical task attribution records, or a combination of both.
[0183] Example 7
[0184] Based on Example 2, in step 5, only the local links related to the defect are adjusted according to the defect attribution object, instead of retrying the entire round.
[0185] The scope of local replanning is determined based on the defect attribution object, and the scope of local replanning is determined in the following way:
[0186] The target node in the defect attribution object is used as the starting node;
[0187] Backtrack along the execution graph until you reach the critical dependency node;
[0188] Extend backward along the execution graph until reaching the downstream node directly affected by the output of the target node;
[0189] The subgraph consisting of the above nodes is defined as the scope of local replanning.
[0190] Key dependent nodes may include material selection nodes, evidence extraction nodes, outline generation nodes, rule interpretation nodes, or other nodes that provide necessary input to the target node.
[0191] If an upstream node has a path connection to the target node, but its output has been validated and is not directly related to the current defect, it will not be included in the scope of local replanning.
[0192] If a downstream node only uses part of the target node's output, then only the paths corresponding to the affected sub-results can be included in the scope of local replanning.
[0193] The scope of local replanning can be viewed as the minimum necessary subgraph consisting of the target node, necessary upstream dependent nodes, and necessary downstream affected nodes.
[0194] The reprogramming method for determining subgraph boundaries is to calculate the upstream inclusion determination value U_j and the downstream inclusion determination value D_k respectively.
[0195] For an upstream candidate node j, its inclusion determination value U_j can be expressed as:
[0196] U_j=μ1×Dep_j+μ2×Rel_j+μ3×Def_j-μ4×Pass_j;
[0197] Where Dep_j represents the dependency strength between node j and the target node; Rel_j represents the correlation between the output content of node j and the current defect field or defect object; Def_j represents the degree of anomaly in the output result of node j; Pass_j represents whether node j has stably passed the verification; μ1, μ2, μ3, and μ4 are weight coefficients. When U_j ≥ θ_u, node j is included in the minimum necessary subgraph.
[0198] For a downstream candidate node k, its inclusion determination value D_k can be expressed as: D_k=ν1×Use_k+ν2×Impact_k+ν3×Prop_k;
[0199] Where Use_k represents the proportion of the target node's output used by node k; Impact_k represents the degree of impact of the target node's anomaly on the quality of node k's result; Prop_k represents the probability or strength of the defect propagating to the downstream node; ν1, ν2, and ν3 are weighting coefficients.
[0200] When D_k≥θ_d, node k is included in the minimum necessary subgraph.
[0201] If a node only performs auxiliary functions such as log recording, cache storage, result archiving, or other functions that do not affect the current defect correction results, it may not be included in the scope of local replanning, even if it has a data path with the target node.
[0202] If a node is not directly connected to the target node, but its output is jointly depended on by multiple key input fields of the target node, and its anomaly exceeds the threshold, it can also be added to the minimum necessary subgraph.
[0203] For example, to address the deficiency of "insufficient evidence in the second paragraph," the system can use the draft fragment node as the target node, the evidence extraction node and the material screening node as upstream candidate nodes, and the assembly link corresponding to the paragraph in the result assembly node as the downstream candidate path. If the U_j of the evidence extraction node is 0.82 and the U_j of the material screening node is 0.77, and θ_u is set to 0.70, then both are included in the subgraph. If the path corresponding to the result assembly node is D_k=0.76 and θ_d=0.65, then the downstream link is included, while other irrelevant paragraph paths are not included.
[0204] After determining the scope of the local replanning, adjustments are made only to the local subgraphs. The local correction action is as follows:
[0205] Partial re-execution; partial replacement; material replacement; budget adjustment; node insertion; node skipping; node order adjustment; result merging; version rollback.
[0206] The local replanning steps include:
[0207] Determine the minimum necessary subgraph based on the defect attribution object;
[0208] Lock down the affected nodes and their necessary upstream and downstream links;
[0209] Retain valid intermediate result objects from unaffected nodes;
[0210] Adjust the node configuration, budget, or input objects of a local link;
[0211] Re-execute the local link;
[0212] Replace the old result with the new result and revalidate.
[0213] This approach avoids completely rerunning the entire content, table, or task, reducing the overhead of model and tool calls and improving result stability and correction efficiency.
[0214] Defect → Attribution → Corrective Action Comparison Example: Local corrective actions can be performed according to the format of "Defect Type — Attribution Node — Minimum Necessary Subgraph — Corrective Action". For example:
[0215] Example 1: Insufficient supporting evidence;
[0216] Defect type: Insufficient supporting evidence;
[0217] Main attribution node: Evidence extraction node; Auxiliary attribution node: Material selection node; Minimum necessary subgraph: Material selection node → Evidence extraction node → Corresponding draft fragment node → Related paragraph links in the result assembly node;
[0218] Corrective actions: Replace some material references, increase the evidence extraction budget, insert supplementary evidence nodes, regenerate the corresponding paragraphs, and do not rerun other paragraphs that have already passed the verification.
[0219] Example 2: Style deviation;
[0220] Defect type: Inconsistent style;
[0221] Primary attribution node: Style alignment node; Secondary attribution node: Draft generation node;
[0222] Minimum necessary subgraph: Draft generation node → Style alignment node → Related paragraph links in the platform adaptation node;
[0223] Corrective actions: Re-execute style alignment, switch style templates, and rewrite the opening or closing sentences locally if necessary, while preserving the structure and chain of evidence.
[0224] Example 3: Incomplete structure;
[0225] Defect type: Incomplete structure;
[0226] Main attribution node: Outline generation node;
[0227] Minimum necessary subgraph: Outline generation node → Draft generation node for corresponding missing paragraph → Result assembly node;
[0228] Corrective actions: fill in missing structural slots, add new paragraphs in certain areas, and reassemble the result without changing the other complete parts.
[0229] Example 4: The pricing rules were calculated incorrectly;
[0230] Defect type: Rule consistency error;
[0231] Primary attribution node: rule interpretation node; Secondary attribution node: numerical calculation node;
[0232] Minimum necessary subgraph: the corresponding column link in the rule interpretation node → numerical calculation node → result verification node;
[0233] Corrective actions: re-parse the rule document, correct the rule interpretation objects, recalculate the corresponding columns, and retain the image recognition results and irrelevant fields unchanged.
[0234] Local correction actions can also be used in conjunction with version rollback. That is, when the score of the new correction result is lower than that of the old version, the system can roll back to the old version and execute it again using an alternative correction path.
[0235] Example 8
[0236] Based on Example 2, in step 6, the target object, constraint object, material type, execution graph structure, node budget allocation, common defect types and corresponding correction paths of this round of tasks are stored as historical templates;
[0237] After the task is completed, the execution status of this round of tasks will be summarized into a reusable template. The reusable template includes one or more of the following information: task type identifier, execution graph structure, node order and parallel relationship, node budget allocation, common defect types, correction path, applicable constraints, applicable material types, success rate or stability score.
[0238] The template reuse similarity judgment mechanism extracts the target object and constraint object of the current task after receiving a new task, and calculates the similarity with the corresponding objects recorded in the historical templates.
[0239] Similarity includes: target object similarity, constraint object similarity, material type similarity, output type similarity, and platform adaptation requirement similarity;
[0240] The overall similarity Sim is represented as:
[0241] Sim=a1×T1+a2×T2+a3×T3+a4×T4+a5×T5;
[0242] Where T1 is the similarity of the target object; T2 is the similarity of the constraint object; T3 is the similarity of the material type; T4 is the similarity of the output type; and T5 is the similarity of the platform requirements.
[0243] a1~a5 are the corresponding weights. The above similarity can be obtained through object field comparison, embedding vector similarity, cosine similarity, Euclidean distance or rule-weighted matching.
[0244] When the overall similarity is higher than a preset threshold, the system determines that the current task and the corresponding historical template are similar tasks, and uses the template as the initial reference for the construction of the execution graph.
[0245] Another approach is to use vector similarity calculation to standardize the text fields in the target and constraint objects, then concatenate them into target and constraint description strings, respectively, and finally use an embedding model to generate corresponding semantic vectors. For example:
[0246] Concatenate the task_type, output_type, target_audience, and desired_effect fields in the target object into a target description string G_cur;
[0247] Concatenate the fields such as style_constraint, length_constraint, platform_rule, and factual_boundary in the constraint object into a constraint description string C_cur;
[0248] The target description string and constraint description string recorded in the corresponding historical template are denoted as G_tpl and C_tpl, respectively. Then:
[0249] T1 can be calculated based on the cosine similarity of the semantic vectors of G_cur and G_tpl;
[0250] T2 can be calculated based on the cosine similarity of the semantic vectors of C_cur and C_tpl;
[0251] T3 can be calculated based on the enumeration matching results of source_type or the overlap of multi-value sets;
[0252] T4 can be calculated based on the consistency of output_type or hierarchical similarity;
[0253] T5 can be calculated based on the weighted matching results of the platform field, rhythm field, and length field.
[0254] Cosine similarity can be expressed as:
[0255] Cos(x,y)=(x·y) / (||x||×||y||);
[0256] Here, x and y are the embedding vectors describing the two objects, respectively. To avoid inconsistencies in similarity metrics across different dimensions, the system can normalize the similarity of each sub-item to the [0,1] interval before performing a weighted summation.
[0257] For example, for a certain task, we get: T1=0.91; T2=0.84; T3=1.00; T4=0.95; T5=0.80; if we set: a1=0.30; a2=0.25; a3=0.15; a4=0.15; a5=0.15; then:
[0258] Sim=0.30×0.91+0.25×0.84+0.15×1.00+0.15×0.95+0.15×0.80;
[0259] Sim=0.273+0.21+0.15+0.1425+0.12;
[0260] Sim=0.8955.
[0261] If the preset template matching threshold Sim_th=0.85, then since Sim>Sim_th, it can be determined that the current task matches the corresponding template, and the template will be used as one of the reference templates for the execution graph construction.
[0262] In other implementations, template matching can be performed either as a single static match or by dynamically updating the template score based on historical hit results.
[0263] For example, if a template's average success rate in the most recent N matches is higher than a preset threshold, its priority can be increased; if its performance after a match is consistently poor, its priority can be reduced or template elimination can be triggered.
[0264] Example 9
[0265] Based on Embodiments 2-8, another implementation method is that the scenario input for the intelligent agent performing the content generation task is that the user inputs a content generation task, which includes: topic description, target audience, output platform, style requirements, length requirements, prohibited expressions, citationable materials, and publication time or usage scenario; for example:
[0266] Generate a script for a short video platform on the topic of "How Entrepreneurs Build AI Content Systems". The script should be direct, clear, thought-provoking, and avoid being vague or using obvious marketing slogans. The length should be kept under 90 seconds and may include references to past notes and knowledge entries.
[0267] Object generation occurs after parsing the task.
[0268] Target audience: Short video scripts, entrepreneurs, target completion rate;
[0269] Constraints: Duration within 90 seconds, direct style, no marketing language;
[0270] Budget targets: model calls not exceeding N times, total token budget not exceeding T;
[0271] Evaluation criteria: Completeness greater than threshold A, style matching greater than threshold B, platform adaptability greater than threshold C;
[0272] Sources of material: user history notes, knowledge base entries, and recent project discussion minutes.
[0273] The evaluation object can be judged separately using the threshold of each sub-item, or the scores of each sub-item can be aggregated into a comprehensive quality score Q according to the preset weight, and the comprehensive threshold Q_th can be used as the criterion for whether to trigger the defect detection and correction process.
[0274] The execution diagram is constructed as follows: material selection node, evidence extraction node, key point summarization node, outline generation node, draft generation node, style alignment node, consistency detection node, platform adaptation node, and result assembly node.
[0275] The node execution is as follows: the material screening node filters out materials related to "AI content system", "entrepreneurs", and "execution structure"; the evidence extraction node extracts evidence fragments that can support the viewpoint; the key point summarization node forms a set of core arguments; the outline generation node outputs the paragraph structure; the draft generation node generates the first draft; the style alignment node corrects the writing style; the consistency check node checks the consistency between arguments and evidence, and the logic between paragraphs; the platform adaptation node adjusts the rhythm, sentence length and opening hooks; and the result assembly node forms the final draft.
[0276] The quality score is to comprehensively evaluate the draft generation result. For example: the integrity score S1 = 0.88; the consistency score S2 = 0.81; the style matching score S3 = 0.72; the evidence support score S4 = 0.65; if we take: w1 = 0.30; w2 = 0.25; w3 = 0.20; w4 = 0.25; then:
[0277] Q = 0.30×0.88 + 0.25×0.81 + 0.20×0.72 + 0.25×0.65;
[0278] Q = 0.773.
[0279] If the comprehensive threshold Q_th = 0.80 is set in the evaluation object, then since Q < Q_th, it enters the defect detection stage.
[0280] Defect detection and attribution is that if it is detected that there is "strong opinion but insufficient evidence support" in the second paragraph, then through the evidence_binding and source_trace information in the intermediate result object, the problem is attributed to the evidence extraction node and the corresponding draft fragment node.
[0281] Further sort the candidate nodes according to the attribution priority formula.
[0282] For example, if the calculation result for the evidence extraction node is A_1 = 0.725 and the calculation result for the material screening node is A_2 = 0.690, then it is determined that the evidence extraction node is the main attribution node and the material screening node is the auxiliary attribution node.
[0283] The determination of the local replanning scope is to take the draft fragment node as the target node, trace back forward to the evidence extraction node and the material screening node, and expand backward to the links in the result assembly node directly affected by this paragraph to form a local replanning subgraph, without including the links of other paragraphs that have passed the verification.
[0284] For example, it can be calculated that: the evidence extraction node U_j = 0.82; the material screening node U_j = 0.77; the result assembly related link D_k = 0.76.
[0285] If θ_u = 0.70 and θ_d = 0.65 are set, then the above nodes and links are included in the local subgraph.
[0286] Local rectification is to only replan the local subgraph: replace a part of the material reference object; increase the budget of the evidence extraction node; insert a supplementary evidence extraction node; regenerate the second paragraph draft; keep other paragraphs that have passed the detection unchanged.
[0287] The template is summarized as follows: After the task is completed, the following is recorded: Applicable task type: short video knowledge broadcasting; Common execution diagram structure; Common defect types: insufficient evidence, slow pace; Effective correction methods: supplementing evidence nodes + platform adaptation enhancement; Corresponding style template.
[0288] Example 10
[0289] Based on Examples 2-8, the execution of the intelligent agent for the quotation processing task is as follows: the user inputs the quotation generation or quotation revision task, and the agent provides a table image, rule document, and basic price description.
[0290] Object generation is done by the system:
[0291] Target: Output a structured quotation form;
[0292] Constraints: Fields are complete, format is consistent, and price calculation rules are correct;
[0293] Budget targets: Image recognition call limit, recalculation limit;
[0294] Evaluation criteria: Field completeness, rule consistency, and table format readability;
[0295] Referenced materials: images, rule documents, historical quotation templates.
[0296] The execution graph is constructed as follows: image recognition node, table structure restoration node, field mapping node, rule interpretation node, numerical calculation node, result verification node, and output assembly node.
[0297] Defect detection and attribution: When the result verification node finds that the unit price calculation basis of a certain column is inconsistent with the rule document, the system attributes the defect to the rule interpretation node and the numerical calculation node based on the rule interpretation object, field mapping object and calculation trajectory information, rather than to the image recognition node.
[0298] Calculate the attribution priority score for both the rule interpretation node and the numerical calculation node, and select the node with the higher score as the primary attribution node.
[0299] Local replanning and correction: Only the local links of rule interpretation nodes, numerical calculation nodes and related columns are re-executed, while other identification and table structure parts remain unchanged.
[0300] This embodiment illustrates that the present invention is not limited to content generation, but is applicable to the execution of complex multi-stage tasks.
[0301] Example 11
[0302] Based on Examples 2-8, the intelligent agent execution for the knowledge audio generation task is as follows: the user inputs a knowledge audio topic and target audience information, and the system parses the task into target objects, style objects, duration constraints, speech rate constraints, knowledge boundary constraints, and material reference objects; it constructs an execution graph including nodes such as data screening, knowledge extraction, script generation, conversational rewriting, rhythm detection, emotion curve adjustment, and pre-audio generation verification; when "insufficient conversational style" or "too fast knowledge jumps" is detected, only the corresponding node link is locally corrected, while the output of other nodes that have passed is retained.
[0303] If a "flat mood curve" defect is detected, the problem can be attributed to the rhythm detection node and the mood curve adjustment node. Only the corresponding audio script segment link will be locally corrected, without redoing the knowledge extraction and basic script generation parts.
[0304] Furthermore, the optional implementation methods based on the above embodiments are not limited to the following specific implementation methods:
[0305] The execution graph can be constructed from rule templates or derived from models;
[0306] Defect detection can be accomplished using a single model, multiple models, rule engines, or a hybrid approach.
[0307] Defect attribution rules can be given by a predefined rule table or learned from historical attribution samples;
[0308] The scope of local replanning can be determined either by fixed backtracking rules or dynamically based on execution graph dependency analysis;
[0309] The overall score can be calculated using linear weighting, segmented scoring, or model fusion scoring.
[0310] Template matching can be achieved through field matching, embedding vector similarity, or a combination of these methods.
[0311] Template scores can be saved statically or updated dynamically based on historical hit results;
[0312] Runtime objects can be stored using JSON, object models, or graph database structures;
[0313] The execution node can run in a single-machine environment or a distributed service environment.
[0314] In a standalone environment, the task parsing module, execution graph construction module, node execution module, defect detection module, attribution module, and template accumulation module can be deployed on the same server or in the same process.
[0315] In a distributed environment, each execution node can be deployed as an independent service and communicate via HTTP, RPC, WebSocket, message queue or event bus; the execution graph scheduling module is responsible for distributing task objects, aggregating intermediate result objects and maintaining node status.
[0316] Intermediate result objects, defect attribution objects, template objects, and version information can be stored in JSON, Protocol Buffer, key-value pairs, relational database table structures, or graph structures. Their storage location can be a local cache, a relational database, an object storage system, a graph database, or a distributed storage system.
[0317] The node calling protocol, object storage format, and service deployment method can be replaced according to business scale, cost requirements, and latency requirements, without changing the present invention's provisions on runtime objectification, defect attribution, determination of minimum necessary subgraphs, and local correction.
[0318] Example 12
[0319] Based on the above embodiments, such as Figure 3 As shown, this embodiment provides a target constraint and evidence feedback execution graph correction device, including:
[0320] Memory, processor, and computer programs stored in memory and capable of running on the processor;
[0321] When the processor executes the program, it implements the above-mentioned target constraint and evidence backflow execution graph correction method.
[0322] In addition, such as Figure 4 As shown, this embodiment also provides a computer-readable storage medium (i.e., a memory module) storing a computer program thereon. When the computer program is executed by a processor, it is used to implement the above-mentioned target constraints and evidence backflow execution graph correction.
[0323] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope described in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A target constraint and evidence feedback execution graph correction method, characterized in that, Includes the following steps: Step 1: Receive user task input, parse the task input, and generate a runtime object collection; the runtime object collection includes target object, constraint object, evaluation object, resource budget object, and material reference object; Step 2: Automatically construct the agent execution graph based on the runtime object set; the execution graph consists of multiple execution nodes and the relationships between nodes, including dependency relationships, parallel relationships, and evidence backflow relationships; Step 3: Control the execution of each execution node in the execution graph and generate intermediate result objects with source tracing information; Step 4: Perform defect detection on intermediate result objects or stage results, and form defect attribution objects based on the defect detection results; wherein, the defect attribution objects are used to characterize the mapping relationship between defect types and corresponding execution nodes, constraint sources or material sources; Step 5: Based on the defect attribution object, determine the scope of local replanning, and perform replanning and local correction on the local subgraphs corresponding to the scope of local replanning; Step 6: Output the final task results and save the execution graph configuration, defect type and correction path of this round of execution as a reusable template.
2. The target constraint and evidence feedback execution graph correction method according to claim 1, characterized in that, In step 2, the execution graph is constructed as follows: Match a set of candidate nodes based on task type; Determine the main link node based on the target object; Insert validation nodes, style correction nodes, or budget control nodes based on the constraint objects; Determine the node budget allocation based on the budget object; The number of detection nodes and the threshold are determined based on the evaluation object; Determine the relevant nodes and data flow of the material based on the object referenced by the material; Generate an execution graph and record nodes, edges, budgets, and input / output relationships. Furthermore, in step 2, the execution method of the evidence feedback relationship is as follows: When the execution graph is found to have insufficient evidence support, evidence conflict, or incomplete evidence coverage, the defect detection results, evidence binding anomaly information, and target paragraph location information of the execution graph are sent back to the evidence extraction node or material screening node through the backflow path in the execution graph to trigger a feedback processing mechanism for local supplementary evidence, material replacement, or evidence rebinding.
3. The target constraint and evidence backflow execution graph correction method according to claim 1, characterized in that, In step 3, the execution of each execution node and the generation of the intermediate result object are carried out in the following manner: The nodes in the execution graph run sequentially or in parallel according to dependencies, priorities, and budget constraints. Each node receives input from an upstream object and outputs at least one intermediate result object. The specific steps are: The material filtering node outputs a set of candidate material objects; The evidence extraction node outputs the evidence object; The outline generation node outputs a structural outline object; The draft generation node outputs a draft fragment object; The style alignment node outputs a style correction object; The detection node outputs a verification report object; Each intermediate result object contains source tracking information, including source node, referenced material, constraint application record and version number, which facilitates subsequent detection, replacement, rollback and attribution; Furthermore, a comprehensive quality score is applied to the intermediate result object, which is obtained by weighted summation of completeness score, consistency score, style matching score, and evidence support score. The overall quality score is compared with a dynamic threshold, which is dynamically adjusted based on task complexity and budget remaining percentage indicators. When the overall quality score is lower than the dynamic threshold, defect detection and subsequent processes are triggered.
4. The target constraint and evidence feedback execution graph correction method according to claim 1, characterized in that, In step 4, the identification of defects includes the identification of defect types such as missing facts, conflicting facts, incomplete structure, style deviation, duplicate content, conflicting platform rules, budget overrun, insufficient evidence support, missing fields, and logical jumps. Defect detection is accomplished through rule engine detection, model scoring detection, multi-model cross-evaluation, material-output reference chain verification, and consistency comparison between intermediate objects. Based on the defect detection results, defect attribution objects are formed. Specifically, the attribution process includes: obtaining defect detection results; determining a set of candidate attribution nodes based on defect type; retrieving source tracing information, constraint tracing information, and evidence binding information from intermediate result objects; prioritizing candidate nodes based on attribution criteria; and generating defect attribution objects. The candidate attribution node set is determined based on the defect type, and then the final attribution node is determined by combining the evidence binding, constraint tracing and source tracing fields in the intermediate result object; Furthermore, the attribution priority calculation involves calculating an attribution priority score A_i for each candidate attribution node i, expressed by the formula: A_i=λ1×M_i+λ2×E_i+λ3×C_i+λ4×S_i+λ5×R_i; Where A_i is the attribution priority score of candidate node i; M_i is the matching degree between defect type and node function type; E_i is the evidence_binding anomaly degree; C_i is the constraint_trace conflict degree; S_i is the source_trace anomaly degree; R_i is the historical attribution correction validity correction value; λ1, λ2, λ3, λ4, and λ5 are the corresponding weights; Among them, M_i is generated based on the preset defect-node mapping table. If the node belongs to the high priority node of this type of defect, a higher value is assigned; E_i can be calculated based on the proportion of empty evidence, the deviation of evidence relevance, and the degree of insufficient evidence coverage; C_i can be calculated based on the number of constraint violations, the degree of violation, or the level of violation criticality; S_i can be calculated based on the source missing, source conflict, the proportion of low-credibility sources, or the case of out-of-bounds citation; R_i can be calculated based on the proportion of similar defects that were successfully corrected after being attributed to this node in the past.
5. The target constraint and evidence feedback execution graph correction method according to claim 1, characterized in that, In step 5, the scope of local replanning is determined based on the defect attribution object, using the following steps: The starting node is the target node pointed to by the defect attribution object; Backtracking forward along the execution graph, identify key dependent nodes that provide necessary input to the target node; Extend backward along the execution graph to identify downstream nodes that are directly affected by the output of the target node; The subgraph consisting of the target node, key dependent nodes, and downstream nodes is defined as the scope of local replanning, forming the minimum necessary subgraph; Furthermore, the identification of the key dependent nodes and the identification of the downstream nodes are carried out in the following manner: For upstream candidate nodes, the upstream inclusion judgment value is calculated based on their dependency strength with the target node, the correlation between the output content and the defect field, the degree of abnormality of the output result, and whether they have passed the verification stably. When the upstream inclusion judgment value exceeds the preset upstream threshold, the upstream candidate node is identified as a key dependency node. For downstream candidate nodes, a downstream inclusion criterion value is calculated based on their usage ratio of the target node's output, the impact of the target node's anomaly on the quality of their results, and the possibility of defect propagation. When the downstream inclusion criterion value exceeds the preset downstream threshold, the downstream candidate node is identified as an included node.
6. The target constraint and evidence feedback execution graph correction method according to claim 1, characterized in that, In step 5, the local subgraph undergoes replanning and local correction, specifically: For local subgraph replanning, the following steps are used: Determine the minimum necessary subgraph based on the defect attribution object; Lock down the affected nodes and their necessary upstream and downstream links; Retain valid intermediate result objects from unaffected nodes; Adjust the node configuration, budget, or input objects of a local link; Re-execute the local link; Replace the old results with the new results and re-validate; For local correction of a local subgraph, the following actions are performed: Partial re-execution, partial replacement, material replacement, budget adjustment, node insertion, node skipping, node order adjustment, result merging, and version rollback; Specifically, when performing local correction, valid intermediate result objects of unaffected nodes located outside the scope of the local replanning are retained, and only the node links within the local subgraph are adjusted and re-executed.
7. The target constraint and evidence feedback execution graph correction method according to claim 1, characterized in that, In step 6, the target object, constraint object, material type, execution graph structure, node budget allocation, common defect types and corresponding correction paths of this round of tasks are stored as historical templates; The task type identifier, execution graph structure, node order and parallel relationship, node budget allocation, common defect types, correction path, applicable constraints, applicable material types, and success rate or stability score of this round of tasks are condensed into the reusable template. Upon receiving a new task, the target object and constraint object of the current task are extracted, and similarity calculation is performed between them and the objects recorded in the historical templates. The similarity calculation includes: similarity of target object, similarity of constraint object, similarity of material type, similarity of output type, and similarity of platform adaptation requirements.
8. A target constraint and evidence backflow execution graph correction system, used to execute the target constraint and evidence backflow execution graph correction method according to any one of claims 1-7, characterized in that, include: The task parsing and modeling module is used to receive user task input, perform semantic parsing, parameter decomposition and feature extraction on the user task input, and generate a set of runtime objects adapted to the intelligent agent task operation. The execution graph automatic construction module is connected to the task parsing and modeling module. It is used to receive a set of runtime objects and automatically build an execution graph for the intelligent agent based on the attribute association logic, execution sequence logic and data interaction logic of each runtime object. The node operation management module is connected to the execution graph automatic construction module. It is used to schedule and control the execution nodes in the execution graph to run in an orderly manner according to the preset node relationship and execution sequence. It collects the running data and output data of each execution node in real time and generates intermediate result objects carrying full-link source tracing information. The source tracing information is used to record the generation execution node, called resources and referenced material traceability information corresponding to the intermediate result. The defect detection and attribution module is connected to the node operation and control module. It is used to receive intermediate result objects and task execution phase results, perform defect detection according to preset constraint standards, evaluation rules and target thresholds to identify various execution defects in intermediate results and phase results, and build and generate defect attribution objects based on the defect detection and identification results. The local replanning and correction module is connected to the defect detection and attribution module. It is used to retrieve the defect attribution object, locate the local business scope where the task execution deviates based on the defect mapping relationship, determine the matching and suitable local replanning scope, and perform task strategy reconfiguration, execution path replanning and targeted local correction and optimization operations on the local subgraph of the execution graph corresponding to the local replanning scope to eliminate various defects in task execution. The result output template accumulation module is connected to the local replanning and correction module and the execution graph automatic construction module. It is used to output the final result of the task after local correction and optimization. At the same time, it collects the original configuration information of the execution graph corresponding to the entire execution process of this round of tasks, the data of various defect types detected and identified, and the local correction path data. It integrates and solidifies multiple types of data into a reusable correction template, which is stored in the library for subsequent task execution correction and calling of similar intelligent agents.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it is used to implement the target constraint and evidence backflow execution graph correction method according to any one of claims 1-7.
10. An execution graph correction device for target constraints and evidence feedback, characterized in that, include: Memory, processor, and computer program stored in the memory and executable on the processor; When the processor executes the program, it implements the target constraint and evidence backflow execution graph correction method according to any one of claims 1-7.