Task planning method and device, electronic equipment, medium and product
By acquiring user interaction statements and generating structured intent objects, and combining business domain task graphs and multi-agent collaboration mechanisms, the problem of not being able to dynamically adjust execution paths in existing technologies has been solved, and adaptive task planning and automatic generation of stable business processes have been achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHENGDU MINGTU TECH CO LTD
- Filing Date
- 2026-04-20
- Publication Date
- 2026-08-04
AI Technical Summary
Existing technologies cannot dynamically adjust execution paths according to real-time needs in complex business process automation scenarios, resulting in process interruptions and a lack of flexible task planning capabilities.
By acquiring user interaction statements, we perform intent recognition and generate structured intent objects. We then combine these with a task graph of the business domain to perform task planning. We utilize a multi-agent collaborative mechanism to achieve adaptive task execution, including planning, execution, verification, and self-healing replanning in abnormal scenarios.
It enables the automatic generation of task execution sequences that fit current needs without relying on static preset processes, improving the dynamic adaptability and execution rationality of task planning, and enhancing the stability and reliability of business processes.
Smart Images

Figure CN122047972B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, specifically to a task planning method, apparatus, electronic device, readable storage medium, and computer program product. Background Technology
[0002] In complex business process automation scenarios in government affairs, finance, customer service, and other fields, automatically planning executable task sequences across systems based on user intent has become crucial for improving business processing efficiency. Existing technologies typically employ task-based dialogue systems, using natural language understanding modules to classify user input intent and fill in slots, then selecting the next system action based on a predefined process tree to drive the business process forward. However, the task planning in existing technologies relies entirely on manually predefined static process trees. The system can only execute along a preset linear path, unable to dynamically adjust the execution path according to real-time needs. When a step is skipped or an anomaly occurs in the business process, it leads to process interruption, lacking flexible task planning capabilities. Summary of the Invention
[0003] In view of the above problems, this application provides a task planning method, apparatus, electronic device, readable storage medium, and computer program product, which can solve the problem that the execution path cannot be dynamically adjusted according to real-time needs in the prior art.
[0004] Firstly, this application provides a task planning method, including:
[0005] Obtain the interactive statements input by the target user;
[0006] The interactive statements are subjected to intent recognition to obtain a list of intent candidates;
[0007] A structured intent object is generated based on the intent candidate list and the multi-turn dialogue data of the target user;
[0008] Load the corresponding business domain task graph based on the structured intent object;
[0009] Task planning is performed based on the task map of the business domain to obtain the task execution sequence.
[0010] In the above technical solution, the method can combine the user's real-time interaction intent with the history of multi-turn dialogue to form a structured intent expression, and complete adaptive task planning based on the matching business domain task graph. Thus, without relying on static preset processes, it can automatically generate task execution sequences that fit the current needs, thereby effectively improving the dynamic adaptability and execution rationality of task planning.
[0011] In some implementations, before obtaining the interactive statement input by the target user, the method further includes:
[0012] Acquire proactive perception data of target users; wherein, the proactive perception data includes at least one of user profiles, historical interaction memories, and to-do tasks;
[0013] When a potential need is detected in the target user based on the proactive sensing data, a guided dialogue is generated and output based on the potential need.
[0014] In the above technical solution, the method can proactively perceive the user's potential needs before the user initiates an interaction, and predict the business intent in advance and output guiding dialogue through information such as user profiles and historical interaction memories, thereby realizing the transformation from passive response dialogue to proactive service and improving the interaction experience and the timeliness of demand identification.
[0015] In some implementations, the situations in which the potential needs of the target user are detected based on the proactive sensing data include:
[0016] The presence of pending tasks was detected through preset business rules and the proactive sensing data;
[0017] Alternatively, the proactively sensed data can be used to predict potential demand based on a prediction model to obtain predicted demand, and the confidence level of the predicted demand exceeds a preset confidence threshold.
[0018] Alternatively, a preset event may be triggered based on the active sensing data.
[0019] Alternatively, a preset task state may be detected based on the active sensing data.
[0020] In the above technical solution, the method can accurately identify users' potential business needs through a multi-dimensional and multi-condition potential demand detection mechanism, combined with various judgment methods such as business rules, prediction models, event triggers and task status.
[0021] In some implementations, generating a structured intent object based on the intent candidate list and the target user's multi-turn dialogue data includes:
[0022] The multi-turn dialogue data of the target user and the intent candidate list are fused to obtain a structured dialogue context;
[0023] A structured intent object is generated based on the structured dialogue context.
[0024] In the above technical solution, the method can improve the coherence and completeness of intent expression, thereby effectively avoiding ambiguity caused by single-round recognition.
[0025] In some implementations, generating a structured intent object based on the structured dialogue context includes:
[0026] When an ambiguous intent or missing key information is identified based on the structured dialogue context, the intent is completed in the structured dialogue context to obtain the target structured context.
[0027] A structured intent object is generated based on the target structured context.
[0028] In the above technical solution, the method can proactively complete the intent to obtain a complete target structured context when there is ambiguity or missing key information in the structured dialogue context, thereby generating an accurate structured intent object.
[0029] In some implementations, the step of performing intent completion on the structured dialogue context to obtain the target structured context includes:
[0030] Obtain dialogue state information; wherein, the dialogue state information includes at least currently confirmed slot value pairs, missing slot information, and user historical preferences;
[0031] Based on the dialogue state information and the structured dialogue context, generate and output an intent clarification question;
[0032] Receive response information from the user regarding the question asked to clarify the intent;
[0033] The structured dialogue context is updated based on the response information, and when the updated structured dialogue context indicates that there is no ambiguity of intent or missing key information, the updated structured dialogue context is determined as the target structured dialogue context.
[0034] In the above technical solution, the method can proactively initiate intent clarification to the user by combining dialogue state information, and gradually improve the structured dialogue context by interactively filling in missing slots and ambiguous information, thereby ensuring that the final target structured context information is complete and the intent is clear.
[0035] In some implementations, the step of performing task planning based on the business domain task graph to obtain a task execution sequence includes:
[0036] High-level business objectives are determined based on the structured intent object;
[0037] The high-level business objectives are decomposed into multiple logical sub-objectives;
[0038] The multiple logical sub-objectives are mapped onto the business domain task graph to obtain a preliminary task sequence;
[0039] Obtain planning status information; wherein, the planning status information includes at least the dialogue status, the result set of currently executed tasks, execution environment parameters, remaining task objectives, and the set of currently executable nodes in the task graph;
[0040] Based on the business domain task graph and the planning status information, the current action space is generated;
[0041] Based on the current action space and the preset reward function, a task execution sequence is generated.
[0042] In the above technical solution, the method can decompose business objectives into layers and intelligently adjust the execution actions in combination with real-time planning status, thereby generating a task sequence that is more in line with the actual scenario and enhancing the dynamic adaptability and execution reliability of task planning.
[0043] In some embodiments, after performing task planning based on the business domain task graph to obtain a task execution sequence, the method further includes:
[0044] The planner agent parses the task execution sequence into specific operable plan steps and assigns a corresponding atomic service to each of the specific operable plan steps.
[0045] The executor agent, based on the specific operable plan steps, calls the corresponding atomic services in sequence to perform the corresponding operations.
[0046] In the above technical solution, the method can achieve precise conversion of tasks into execution actions and service calls through the division of labor among intelligent agents, so that the planning results can be directly implemented and executed, further improving the automation level and execution stability of cross-system business processes.
[0047] In some embodiments, the method further includes:
[0048] Obtain the execution result of each step in the specific operable plan steps;
[0049] The execution result is verified by a validator agent to obtain a verification result; wherein the quality verification includes at least one of the following: result format verification, business logic verification, consistency conflict verification, and integrity verification.
[0050] When the execution result is determined to have passed the quality verification based on the verification result, the generator agent obtains the target context information associated with the specific operable plan steps, and generates a user-oriented natural language response or structured business report based on the execution result of each step in the specific operable plan steps and the target context information.
[0051] Output the natural language response or structured business report.
[0052] In the above technical solution, the method can ensure the accuracy and completeness of business processing results by performing multi-dimensional quality verification of the execution results. At the same time, it can automatically generate natural language responses or business reports adapted to users based on reliable execution data, so that the entire business process forms a closed loop, thereby effectively improving the credibility of the processing results and user experience.
[0053] In some embodiments, the method further includes:
[0054] When it is determined from the verification result that the execution result has failed the quality verification, the failure task information corresponding to the execution result is obtained; wherein, the failure task information includes at least the task step identifier, details of the failure reason, and the set of execution results of all task steps that have been successfully executed.
[0055] A replanning request is generated based on the failed task information;
[0056] In response to the replanning request, the step of re-executing the task planning based on the business domain task graph to obtain the task execution sequence is re-executed.
[0057] In the above technical solution, the method can quickly locate the cause of failure and trigger intelligent replanning when an exception occurs, thereby effectively enhancing the fault tolerance and self-healing ability of the process, and thus ensuring the stable progress of the business process.
[0058] Secondly, this application provides a task planning apparatus, comprising:
[0059] The acquisition unit is used to acquire the interactive statements input by the target user.
[0060] An intent recognition unit is used to recognize the intent of the interactive statement and obtain an intent candidate list.
[0061] The generation unit is used to generate a structured intent object based on the intent candidate list and the multi-turn dialogue data of the target user;
[0062] The loading unit is used to load the corresponding business domain task graph based on the structured intent object;
[0063] The task planning unit is used to plan tasks based on the task map of the business domain to obtain a task execution sequence.
[0064] In the above technical solution, the device can combine the user's real-time interaction intent with the history of multi-turn dialogue to form a structured intent expression, and complete adaptive task planning based on the matching business domain task graph. Thus, without relying on static preset processes, it can automatically generate task execution sequences that fit the current needs, thereby effectively improving the dynamic adaptability and execution rationality of task planning.
[0065] Thirdly, this application provides an electronic device including a memory and a processor, the memory storing a computer program, and the processor running the computer program to cause the electronic device to perform the task planning method described in any one of the first aspects.
[0066] Fourthly, this application provides a readable storage medium storing a computer program, which, when executed by a processor, performs the task planning method described in any one of the first aspects.
[0067] Fifthly, this application provides a computer program product comprising a computer program that, when executed by a processor, performs the task planning method described in any one of the first aspects.
[0068] The beneficial effects of this application are as follows: By actively perceiving and deeply integrating with the context, it can enhance the ability to transform fuzzy intentions into structured objects and improve the accuracy of intention recognition in complex business scenarios; at the same time, by dynamically generating and adjusting the optimal execution path based on real-time status and target, it can effectively improve the rationality of the path and the task completion rate; in addition, through standardized service encapsulation and AgentFlow collaborative scheduling mechanism, it can seamlessly integrate and automatically execute complex business processes across heterogeneous systems, significantly reducing integration costs and reducing manual intervention; finally, through a framework that combines offline training and online evolution, this application can also continuously adapt to new businesses and optimize interaction strategies during the interaction process, thereby effectively reducing long-term maintenance costs and improving the generalization ability to unknown scenarios. Attached Figure Description
[0069] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0070] Figure 1 This is a flowchart illustrating the task planning method in some embodiments of this application;
[0071] Figure 2This is a schematic diagram of the structure of the task planning device in some embodiments of this application;
[0072] Figure 3 This is a schematic diagram of the structure of an electronic device in some embodiments of this application. Detailed Implementation
[0073] The embodiments of the technical solution of this application will now be described in detail with reference to the accompanying drawings. These embodiments are only used to more clearly illustrate the technical solution of this application and are therefore merely examples, and should not be used to limit the scope of protection of this application.
[0074] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.
[0075] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more (including two), similarly, "multiple sets" refers to two or more sets (including two sets), and "multiple pieces" refers to two or more pieces (including two pieces) unless otherwise explicitly defined.
[0076] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0077] In the description of the embodiments in this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.
[0078] Most existing task planning methods rely on manually predefined static process trees for process scheduling. However, these methods can only execute tasks along fixed linear paths and cannot dynamically adjust the execution path based on real-time business status and actual needs. Furthermore, when business processes experience skipped execution steps or execution anomalies, these methods are prone to process interruptions, making it difficult to guarantee business continuity. In summary, existing solutions lack flexible and adaptive dynamic task planning capabilities, making them unsuitable for complex business scenarios and unable to meet the requirements of efficient, stable, and reliable business processing.
[0079] To address the aforementioned technical issues, this application provides a task planning method. This method uses structured intent as its core basis to accurately match and load the corresponding business domain task graph, thereby replacing the traditional manually predefined static process tree. Furthermore, this method can combine real-time business status and the business domain task graph to achieve dynamic and adaptive task planning, thus breaking the limitations of fixed paths. Additionally, this method can utilize a multi-agent collaborative mechanism to complete task execution, result verification, and self-healing replanning in abnormal scenarios, thereby forming an intelligent closed loop throughout the entire process.
[0080] In summary, this method can overcome the aforementioned shortcomings of existing technologies and effectively improve the flexibility of task planning and the stability and reliability of business processing.
[0081] like Figure 1 As shown, some embodiments of this application provide a task planning method, which includes:
[0082] S100. Obtain proactive perception data of the target user; wherein, proactive perception data includes at least one of user profile, historical interaction memory, and to-do tasks.
[0083] In this embodiment, the method can proactively collect data such as user profiles, historical interaction memories, and to-do tasks, thereby breaking through the traditional passive response mode and providing a data foundation for subsequently inferring potential user needs and initiating guided dialogues.
[0084] For example, this method uses a rule engine and lightweight machine learning models (such as logistic regression and time series prediction models) to periodically scan user profiles (such as roles and permissions), historical interaction memories (incomplete processes and frequently used services), and pending task queues to obtain proactive perception data of the target user.
[0085] S200. When a potential need of a target user is detected based on proactive sensing data, a guided dialogue is generated and output based on the potential need.
[0086] In this embodiment, the method can determine whether a user has unexpressed potential business needs based on proactive perception data, and automatically generate natural and business-scenario-appropriate guided dialogues and output them to the user when potential business needs exist.
[0087] For example, this method can generate and output "It was detected that you have an incomplete expense report from last month. Do you want to continue processing it?", thereby achieving proactive interactive guidance.
[0088] In this embodiment, the scenarios in which a potential need of a target user is detected based on proactive sensing data include:
[0089] The system detected pending tasks based on preset business rules and proactively sensed data.
[0090] Alternatively, predictive demand can be obtained by predicting potential demand from proactively sensed data based on a predictive model, and the confidence level of the predicted demand exceeds a preset confidence threshold.
[0091] Alternatively, a preset event may be triggered based on proactive sensing data.
[0092] Alternatively, a preset task state can be detected based on proactive sensing data.
[0093] For example, conditions that trigger the initiation of a guided dialogue may include:
[0094] (1) Time-triggered: Timed scanning, such as scanning to-do tasks at 8 am every day;
[0095] (2) Prediction confidence threshold: When the confidence level of the potential demand output by the prediction model exceeds a preset threshold (e.g., 0.7);
[0096] (3) Event triggering: when a user logs into the system, enters a specific business module, or when the status of the associated business system is updated (such as when the financial system generates a new expense report).
[0097] (4) Status trigger: when a user has an interrupted process session, an incomplete form, or meets the "need to follow up" status defined in the business rules.
[0098] As an optional implementation, the method further includes:
[0099] Determine whether potential needs of the target user are detected based on proactive sensing data;
[0100] If so, proceed with the step of generating and outputting a guided dialogue based on the potential needs.
[0101] As a further optional implementation, determining whether a potential need is detected in the target user based on proactively sensed data includes:
[0102] Determine whether any pending tasks are detected based on preset business rules and proactively sensed data; or
[0103] Based on the predictive model, potential demand is predicted from proactively sensed data to obtain predicted demand, and it is determined whether the confidence level of the predicted demand exceeds a preset confidence threshold; or
[0104] Determine whether a preset event has been triggered based on proactive sensing data; or
[0105] Based on the proactive sensing data, a preset task state was detected;
[0106] If any of the above judgment methods yields a result of "yes", it can be determined that the target user has a potential need.
[0107] For example, this method can identify high-probability potential needs through predefined business rules (such as "to-do items that have not been processed for more than 7 days are considered to be awaiting reminders") and simple predictive models (such as predicting the next action based on historical behavior).
[0108] S300: Obtain the interactive statements input by the target user.
[0109] In this embodiment, the method can receive text, voice or multimodal interaction information input by the user and use it as direct input for subsequent intent understanding, thereby providing the original interaction basis for subsequent intent recognition and parsing.
[0110] In this embodiment, in addition to processing interactive statements in text form, the method can also directly fuse emotions, intonations, or relevant information in images to enrich the dimensions of subsequent intent judgment.
[0111] S400: Perform intent recognition on the interactive statements to obtain a list of intent candidates.
[0112] In this embodiment, the method can use a pre-trained language model that integrates business knowledge graphs to build a context-aware intent recognition engine, and use the intent recognition engine to analyze the literal semantics of interactive statements.
[0113] At the same time, using this intent recognition engine can also combine business background knowledge to gain a deeper understanding of multi-turn dialogues, and finally output an intent candidate list containing fine-grained intent confidence.
[0114] For example, specific ways to integrate business knowledge graphs into a pre-trained language model may include:
[0115] (1) Input-side knowledge fusion and retrieval enhancement: retrieve entities and relational subgraphs related to the current user query and dialogue history from the business knowledge graph, and then concatenate their structured descriptions with the user input and send them into the model to achieve the fusion of business knowledge graph information at the input level;
[0116] (2) Integration at the model architecture level: In the vector embedding layer or intermediate layer of the pre-trained model (such as BERT, GPT), knowledge graph entity embedding is introduced. Through graph attention network (GAT) or knowledge-aware Transformer layer, the model can simultaneously pay attention to text sequence and knowledge graph structure information during encoding.
[0117] In this embodiment, the knowledge graph is primarily used as an external structured knowledge source during the intent recognition process. It can provide background information for entity disambiguation, relation reasoning, and constraint verification, helping the model to more accurately understand business terms and related concepts, thereby improving the accuracy of intent classification and slot filling, rather than simply serving as an additional input feature.
[0118] S500 generates a structured intent object based on the intent candidate list and the target user's multi-turn dialogue data.
[0119] In this embodiment, the method can integrate the intent candidate list with multi-turn dialogue data, filled slots (which are the key information that the user needs to provide in the dialogue), and other global contexts. By processing ambiguous or incomplete requirements through dialogue state tracking and intent completion units, a standardized structured intent object is finally generated. This object includes the intent graph type, sub-intent decomposition, confidence, slot parameters (i.e., structured parameters), and constraint relationships.
[0120] In this embodiment, the method can model the intent clarification process as a Markov decision process, thereby selecting the optimal clarification problem through a policy network and achieving efficient, non-intrusive information completion.
[0121] In this embodiment, a structured intent object representation and an evolvable task chain output specification are adopted to form a machine-understandable and transferable data format, providing a foundation for information interaction and overall optimization at each stage.
[0122] S600: Load the corresponding business domain task graph based on the structured intent object.
[0123] In this embodiment, the method can perform retrieval based on structured intent objects, thereby accurately matching and loading the task graph of the corresponding business domain. The graph nodes in this task graph correspond to atomic services or API interfaces, and the graph edges represent the execution dependencies and logical relationships between services.
[0124] For example, nodes can be: "Query User Information API", "Calculate Reimbursement Amount Service", and "Submit Approval Flow Service". Each node contains metadata (such as unique ID, function description, input / output parameter format, execution time estimate, historical success rate statistics, and business domain).
[0125] For example, graph edges may include:
[0126] (1) Sequential dependency edge: Node A must be executed before node B;
[0127] (2) Data-dependent edge: A certain input parameter of node B depends on the output of node A;
[0128] (3) Conditional selection edge: Based on the output of node A, determine whether to execute node B or node C next;
[0129] (4) Parallel feasible edge: indicates that there is no dependency between node A and node B, and they can be executed in parallel.
[0130] By implementing this method, the approach can use a task graph of the business domain as the basis for planning instead of a traditional manually predefined static process tree.
[0131] S700. Based on the task map of the business domain, perform task planning to obtain the task execution sequence.
[0132] In this embodiment, the method can model task planning as a sequential decision-making problem. Specifically, the method can first complete high-level goal decomposition and preliminary planning based on thought chain reasoning, and then, combined with the real-time planning state, make decisions through a reinforcement learning model within the action space defined by the task graph, thereby evaluating the long-term benefits of different execution paths and generating a dynamically adjustable optimal hybrid task execution sequence. The optimal hybrid task execution sequence can be a parallel hybrid task execution sequence or a serial hybrid task execution sequence.
[0133] In this embodiment, the method can also introduce graph neural networks to learn the representation of the task graph, assisting in evaluating the implicit relationships between nodes and paths. Simultaneously, a heuristic A* search algorithm can be used to improve planning speed while ensuring optimal planning.
[0134] S800 uses a planner agent to parse the task execution sequence into specific operable plan steps and assigns corresponding atomic services to each step in the specific operable plan steps.
[0135] In this embodiment, the method proposes an AgentFlow online collaborative architecture, which includes four specialized agents: a planner agent, an executor agent, a verifier agent, and a generator agent.
[0136] For example, the four agents—planner, executor, verifier, and generator—exchange information and coordinate with each other through asynchronous communication based on message queues or shared memory, and define a unified task execution context object for transfer between the agents.
[0137] In this embodiment, the method can decompose the task execution sequence through a planner agent, thereby transforming it into specific operational steps that can be implemented, and matching and assigning corresponding atomic service APIs for each step, thus clarifying the execution tools and execution logic.
[0138] In this embodiment, the division of labor among the four specialized intelligent agents can be merged or further broken down depending on the scenario. For example, some verification functions can be integrated into the execution phase to form a processing logic that integrates execution and self-checking.
[0139] Implementing this approach enables unified management and efficient scheduling of heterogeneous services by adopting standardized task scheduling protocols and service status management mechanisms, defining unified tool descriptions, status reporting, and scheduling specifications.
[0140] S900: The actuator intelligent agent calls the corresponding atomic services in the order of the steps according to the specific operable plan steps to perform the corresponding operations.
[0141] In this embodiment, the method can complete the actual business operation by having the executor agent follow the planned steps and service sequence assigned by the planner and by calling the interface of the external business system.
[0142] In this embodiment, the actuator agent can also write the execution process and detailed logs into shared memory to provide a basis for subsequent verification and traceability.
[0143] For example, the types of information recorded in shared memory include planning records, execution logs, verification results, and dialogue context.
[0144] The planning record includes the original task sequence, current execution steps, and allocated tools, while the execution log includes the timestamps and input parameters for each tool call.
[0145] The verification results include information such as the verification status of each step.
[0146] The dialogue context contains a summary of the user's dialogue history related to the current task.
[0147] S1000: Obtain the execution results of each step in the specific actionable plan steps.
[0148] In this embodiment, the method can uniformly collect the execution result data (including return content, execution status, business data, etc.) of each planned step from the executor agent and external business system callbacks, and use this as the object for subsequent quality verification.
[0149] S1100: The execution result is verified by the validator agent to obtain the verification result, and steps S1200~S1300 or S1400~S1600 are executed according to the verification result; wherein, the quality verification includes at least one of the following: result format verification, business logic verification, consistency conflict verification, and integrity verification.
[0150] In this embodiment, the method can use a validator agent to perform multi-dimensional verification of the execution results from dimensions such as format compliance, business logic rationality, data consistency, and content integrity, thereby determining whether the results meet the expected business objectives and system constraints.
[0151] For example, the criteria for the validator to determine that the execution result "validation failed" include incorrect result format, violation of business logic, consistency conflict, and substandard quality.
[0152] In this context, "incorrect result format" means that the data returned by the API does not conform to the predefined pattern.
[0153] Business logic violation refers to a result value exceeding a reasonable range;
[0154] Consistency conflict refers to a contradiction between the results of previous steps or known facts;
[0155] Substandard quality refers to a confidence score below the threshold or missing required fields.
[0156] In this embodiment, the verifier agent can also execute subsequent processes based on the verification result branch.
[0157] S1200: When the execution result is determined to have passed the quality verification based on the verification results, the generator agent obtains the target context information associated with the specific operable plan steps, and generates a user-oriented natural language response or structured business report based on the execution result and target context information of each step in the specific operable plan steps.
[0158] In this embodiment, the generator agent can integrate the execution results of each step with the global context information in the shared memory, and generate user-friendly natural language responses or standardized, structured business reports according to business scenario requirements, thereby achieving user-friendly output of execution results.
[0159] S1300 outputs natural language responses or structured business reports.
[0160] In this embodiment, the method can push the natural language response or structured business report generated by the generator agent to the user interface, completing a complete business interaction and task execution loop.
[0161] In this embodiment, the method can also employ online optimization algorithms to optimize the collaborative strategies among functional units, thereby supporting real-time fine-tuning of strategies during task execution.
[0162] For example, the online reinforcement learning algorithm specifically optimizes the planning strategy model in the dynamic programming engine and the clarification question selection strategy model in the intent completion unit online.
[0163] The data from online learning was collected through three channels:
[0164] (1) Real-time interactive flow: including the (state, action, reward, next_state) quadruple for each decision point;
[0165] (2) User feedback channels: including explicit ratings, implicit feedback, and records of manual intervention and correction;
[0166] (3) Performance monitoring indicators: including task success rate, average completion time, and abnormal interruption rate.
[0167] S1400. When it is determined from the verification results that the execution result has failed the quality verification, obtain the failure task information corresponding to the execution result; wherein, the failure task information includes at least the task step identifier, details of the failure reason, and the set of execution results of all task steps that have been successfully executed.
[0168] In this embodiment, the method can automatically collect the identification information of abnormal steps, the specific reasons for failure, and the result set of historically successful execution steps, and retain complete abnormal scene information.
[0169] S1500: Generate a replanning request based on the information of failed tasks.
[0170] In this embodiment, the method can construct a replanning request based on abnormal task information, including the reason for failure, the current execution progress, and the remaining task objectives, and send the request to the planner agent to trigger a dynamic adjustment mechanism.
[0171] For example, when a replanning request is triggered, the validator agent can notify the planner agent by sending a "replanning request" message. This message includes the failed task step ID, details of the failure reason, and a snapshot of all currently available results. Based on this, the planner agent re-evaluates the remaining path and makes local adjustments or a global replanning.
[0172] S1600, In response to the replanning request, re-execute step S700 and subsequent steps.
[0173] In this embodiment, after receiving a replanning request, the planner agent can re-analyze the task sequence, adjust the execution steps, and allocate atomic services by combining the latest execution status and task graph, thereby realizing local or global replanning in abnormal scenarios and ensuring that business processes are not interrupted.
[0174] In this embodiment, the method can also adopt a cloud-edge collaborative deployment approach, deploying some real-time processing logic on the edge side and deploying complex training and large-scale scheduling logic on the cloud, thereby balancing response efficiency and privacy security.
[0175] In the above embodiments, the method can accurately match and load the corresponding business domain task graph based on structured intent, thereby replacing the traditional manually predefined static process tree; at the same time, the method can also combine real-time business status and business domain task graph to achieve dynamic and adaptive task planning, thereby breaking the limitations of fixed paths; in addition, the method can also complete task execution, result verification and self-healing replanning in abnormal scenarios through multi-agent collaboration mechanism, thereby forming an intelligent closed loop of the entire process.
[0176] In some embodiments, step S500 may include:
[0177] S510. The multi-turn dialogue data and intent candidate list of the target user are fused to obtain a structured dialogue context.
[0178] In this embodiment, the method can uniformly encode and fuse multi-turn dialogue history, confirmed slot information and intent candidate list to form a complete and structured dialogue context representation, providing a unified information basis for intent judgment and completion.
[0179] In this embodiment, step S510 simply combines the multi-turn dialogue data and the intent candidate list to obtain the "structured dialogue context," without performing intent completion. Afterward, if intent completion is required, the method performs intent completion on the "structured dialogue context" in step S520 to obtain the intent-completed "target structured context."
[0180] In other words, intent completion is performed after the "structured dialogue context" is generated, but before the final "structured intent object" is generated.
[0181] S520. When the structured dialogue context identifies an ambiguous intent or missing key information, the intent is completed in the structured dialogue context to obtain the target structured context.
[0182] In this embodiment, the method can identify whether there are problems such as ambiguous intent or missing slots in the context through a differentiable dialogue state tracker (i.e., a dialogue state tracking module implemented with a neural network, capable of calculating gradients throughout the process, and trained end-to-end). If such problems exist, intent completion logic is activated, and key information is supplemented through guided interaction to eliminate ambiguity in the requirements.
[0183] In this embodiment, the differentiable dialogue state tracker can employ a neural network model based on recurrent neural networks (RNNs, such as GRU and LSTM), Transformer, or MemoryNetworks. Among them, the Transformer-based dialogue state tracking (DST) model, or a model that models DST as a sequence-to-sequence task, can process multi-turn dialogues end-to-end, thereby outputting a structured dialogue state representation.
[0184] For example, the "complete dialogue context representation" maintained by the dialogue state tracker is typically a dynamically updated structured data object or vector representation, such as:
[0185] (1) User-confirmed slot-value pairs (Slots);
[0186] (2) Encoding vectors of the current dialogue turn, historical user statements and system responses;
[0187] (3) List of current intent hypotheses and their confidence levels;
[0188] (4) A summary of key information extracted from the dialogue history;
[0189] (5) Index of business context information related to the current dialogue.
[0190] To ensure that the final target structured context information is complete and the intent is clear, step S520 may also include:
[0191] S521. Obtain dialogue state information; wherein, the dialogue state information includes at least currently confirmed slot value pairs, missing slot information, and user historical preferences.
[0192] In this embodiment, the method can extract key state information of the current dialogue from the dialogue state tracker, and use this information to identify confirmed information, missing information and user historical preferences, thereby providing a basis for generating accurate clarification questions.
[0193] S522. Based on the dialogue state information and the structured dialogue context, generate and output the intent clarification question.
[0194] In this embodiment, the method can generate efficient and non-intrusive clarification questions based on reinforcement learning strategies and initiate targeted information queries to users, thereby filling in missing information with minimal interaction cost.
[0195] For example, when automatically generating clarifying questions using a reinforcement learning strategy, the definitions of State, Action, and Reward in a reinforcement learning network are as follows:
[0196] (1) State: The current complete dialogue context representation, the current state of the structured intent object (such as filled slots, missing slots, intent confidence), and user history preferences;
[0197] (2) Action: Select a specific question from the predefined clarification question template library, or generate a question text on the spot by the model. The action space may also include "do not ask a question, directly confirm", etc.
[0198] (3) Reward:
[0199] Instant rewards: Users provide valid answers to clarifying questions (positive reward); users express misunderstanding or provide negative feedback (negative reward);
[0200] Long-term reward (sparse reward): Successfully completing the intention and task after the dialogue ends (positive large reward); the dialogue fails due to insufficient information (negative large reward).
[0201] The reward signal can be learned from expert data by manually designing a reward function and combining it with inverse reinforcement learning.
[0202] In the above embodiments, the sources of the reward signal include:
[0203] (1) Direct feedback from users to system questions (explicit: such as "yes", "no"; implicit: such as the relevance of subsequent answers);
[0204] (2) Feedback on whether the task was ultimately completed;
[0205] (3) Optimization objectives implied in manually annotated expert dialogue data.
[0206] S523. Receive the response information entered by the user in response to the question regarding intent clarification.
[0207] In this embodiment, the method can receive user feedback on clarification questions and incorporate it as new interactive information into the context update process.
[0208] S524. Update the structured dialogue context based on the response information, and when the updated structured dialogue context indicates that there is no ambiguity of intent or missing key information, determine the updated structured dialogue context as the target structured context.
[0209] In this embodiment, the method can use user responses to update the dialogue context and re-verify the clarity of intent and the completeness of information until the requirements are unambiguous and complete, and then determine the final target structured context.
[0210] S530. Generate a structured intent object based on the target structured context.
[0211] In this embodiment, the method can generate a standardized structured intent object containing intent type, slot parameters, constraint relationships and confidence level based on a target structured context with complete information and clear intent, thereby providing accurate input for subsequent task planning.
[0212] In the above embodiments, the method can proactively complete the intent to obtain a complete target structured context when the intent is ambiguous or key information is missing in the structured dialogue context, thereby generating an accurate structured intent object.
[0213] In some embodiments, step S700 may include:
[0214] S710. Determine high-level business objectives based on structured intent objects.
[0215] In this embodiment, the method can extract core business requirements from structured intent objects, clarify the high-level business objectives that need to be completed, and use this as the top-level basis for task decomposition and planning.
[0216] S720: Decompose high-level business objectives into multiple logical sub-objectives.
[0217] In this embodiment, the method can utilize the reasoning ability of the large language model to decompose abstract high-level business objectives into several ordered and executable logical sub-objectives, thereby clarifying the task hierarchy and execution logic.
[0218] For example, when using a large language model to decompose thought chains, the prompt words input to the model can include the following elements:
[0219] (1) System role instructions: You are a business process planning expert;
[0220] (2) Structured intent object description: intent diagram, sub-intent, and filled parameters;
[0221] (3) Task Graph Summary: A brief list of available atomic services and their relationships;
[0222] (4) Planning requirements: Please break down the objectives into logical steps and map them to the services mentioned above;
[0223] (5) Output format instructions: Requires outputting a list of steps, with each step associated with a service node ID.
[0224] S730. Map multiple logical sub-goals onto the business domain task graph to obtain a preliminary task sequence.
[0225] In this embodiment, the method can match and map the decomposed logical sub-targets with atomic service nodes in the business domain task graph, and thereby generate a preliminary, serial basic task sequence.
[0226] For example, the generated initial task sequence is a list mapped to graph nodes with a simple order, such as: [{"step":1,"node_id":"N1","description":"Get user information"},{"step":2,"node_id":"N2","description":"Calculate amount"},...].
[0227] In this case, the order may be linear and unoptimized.
[0228] S740. Obtain planning status information; wherein, the planning status information includes at least the dialogue status, the result set of currently executed tasks, execution environment parameters, remaining task objectives, and the set of currently executable nodes in the task graph.
[0229] In this embodiment, the method can collect global planning status data in real time (including dialogue status, historical execution results, runtime environment constraints, remaining objectives, and currently executable nodes) to provide status input for dynamic decision-making.
[0230] For example, the execution environment parameters can be system load and service availability.
[0231] S750: Generate the current action space based on the task map of the business domain and the planning status information.
[0232] In this embodiment, the method can filter out a set of legal and executable next task nodes based on the dependencies and real-time status of the task graph, thereby forming an action space for decision-making.
[0233] For example, this method can identify all currently executable nodes (i.e., all their predecessor nodes have been executed or the conditions are met) from the task graph, thus forming the current action space.
[0234] S760 generates a task execution sequence based on the current action space and a preset reward function.
[0235] In this embodiment, the method can use deep reinforcement learning algorithms such as PPO and DQN, and combine them with a reward function to select the optimal action to be executed from the action space. At the same time, it comprehensively considers indicators such as success rate, execution efficiency, and business cost to generate an optimal and dynamically adjustable task execution sequence.
[0236] In this embodiment, PPO is a deep reinforcement learning algorithm based on policy gradient, used to learn the optimal decision policy; while DQN is a value-based deep reinforcement learning algorithm that selects the optimal behavior by estimating the value of actions.
[0237] For example, the pre-defined reward function can be designed as a weighted sum of multiple objective trade-offs, such as:
[0238] R = w1 * (task completion rate) + w2 * (-total execution time) + w3 * (-resource consumption cost) + w4 * (user satisfaction estimate) + w5 * (system robustness penalty);
[0239] Where R is the total reward value (used by reinforcement learning to evaluate the merits of the current policy);
[0240] w1, w2, w3, w4, and w5 are the weight coefficients for each item (either manually set or learned, used to balance different optimization objectives).
[0241] Task completion rate refers to whether the task has been successfully completed (1 for success, 0 for failure).
[0242] Total execution time refers to the time taken from the start to the end of the task (a negative sign indicates that the shorter the time, the higher the reward).
[0243] Resource consumption cost refers to the overhead of calling services, computing, etc. (a negative sign indicates that the lower the cost, the higher the reward).
[0244] User satisfaction prediction refers to the user experience score predicted based on historical data; this user satisfaction can be predicted by fitting a model to historical data.
[0245] System robustness penalty refers to the negative penalty imposed by anomalies, failures, and instability.
[0246] In the above embodiments, the method can decompose business objectives into layers and intelligently adjust execution actions in combination with real-time planning status, thereby generating a task sequence that is more in line with the actual scenario and enhancing the dynamic adaptability and execution reliability of task planning.
[0247] In some embodiments, to train and optimize the various models described above (especially reinforcement learning models), this method constructs a high-fidelity business simulation environment. The construction of this high-fidelity business simulation environment, combined with a data-driven closed-loop evolutionary system, enables a complete learning loop from offline training to online self-evolution by incorporating real feedback data.
[0248] In this embodiment, the high-fidelity service simulation environment may simulate user behavior in the following ways:
[0249] (1) Rule-based user model: Generate user statements that conform to the syntax according to the business scenario script, and update the internal state according to the rules based on the system response;
[0250] (2) Based on pre-trained user simulator: using a generative model (such as GPT) trained on large-scale dialogue data to receive system actions and generate diverse and reasonable user responses.
[0251] In this embodiment, the high-fidelity business simulation environment can simulate the behavior of various external business systems in the following ways:
[0252] (1) Mock service: Build a Mock server for each atomic API and return a predefined success / failure response and data that conforms to business logic based on the input;
[0253] (2) Probabilistic simulation: To simulate realism, the Mock service can randomly inject delays and return failure or abnormal data with a certain probability.
[0254] In this embodiment, safe exploratory learning in online evolution specifically refers to the following mechanisms:
[0255] (1) Confidence interval exploration: For states with high uncertainty, increase the exploration (such as ε-greedy) when choosing a strategy, but limit the exploration to the range of low estimated risk;
[0256] (2) Offline strategy evaluation: Before deploying a new strategy, evaluate its performance on a simulation environment or historical data, and only go online if the performance is improved and not significantly reduced;
[0257] (3) Parallel operation and shadow mode: The new strategy and the old strategy run in parallel, but the output of the new strategy is only used for recording and evaluation and does not actually affect the user. The strategy will be switched after it stabilizes.
[0258] In this embodiment, the methods for ensuring system stability during online fine-tuning include:
[0259] (1) Incremental learning / elastic weight solidification: Employing techniques to prevent catastrophic forgetting, such as EWC;
[0260] (2) Rollback mechanism: Real-time monitoring of key indicators (such as error rate and response time), and automatic rollback to the previous stable version of the model once the threshold is exceeded;
[0261] (3) Canary release: First deploy the new strategy to a small portion of traffic (such as 1% of users), and then gradually expand the scope.
[0262] like Figure 2 As shown, some embodiments of this application provide a structural schematic diagram of a task planning device. It should be understood that this device is related to... Figure 1 The method executed in the middle corresponds to the steps involved in the aforementioned method. The specific functions and effects of the device can be found in the description above. To avoid repetition, detailed descriptions are omitted here.
[0263] The mission planning device includes:
[0264] The acquisition unit 1710 is used to acquire the interactive statements input by the target user;
[0265] The intent recognition unit 1720 is used to recognize the intent of the interactive statements and obtain a list of intent candidates.
[0266] The generation unit 1730 is used to generate structured intent objects based on the intent candidate list and the multi-turn dialogue data of the target user;
[0267] Loading unit 1740 is used to load the corresponding business domain task graph based on the structured intent object;
[0268] Task planning unit 1750 is used to plan tasks based on the task map of the business domain and obtain the task execution sequence.
[0269] In some embodiments, the task planning device further includes:
[0270] The acquisition unit 1710 is further configured to acquire the active perception data of the target user before acquiring the interactive statement input by the target user; wherein, the active perception data includes at least one of user profile, historical interaction memory and to-do tasks;
[0271] The generation unit 1730 is also used to generate and output guided dialogue based on potential needs when a potential need of a target user is detected based on proactive sensing data.
[0272] In this embodiment, the scenarios in which potential needs of a target user are detected based on proactive sensing data include:
[0273] The system detected pending tasks based on preset business rules and proactively sensed data.
[0274] Alternatively, predictive demand can be obtained by predicting potential demand from proactively sensed data based on a predictive model, and the confidence level of the predicted demand exceeds a preset confidence threshold.
[0275] Alternatively, a preset event may be triggered based on proactive sensing data.
[0276] Alternatively, a preset task state can be detected based on proactive sensing data.
[0277] In some embodiments, the generation unit 1730 includes:
[0278] The fusion subunit 1731 is used to fuse the multi-turn dialogue data and intent candidate list of the target user to obtain a structured dialogue context.
[0279] The first generation subunit 1732 is used to generate a structured intent object based on the structured dialogue context.
[0280] In some embodiments, the first generation subunit 1732 is specifically used to complete the intent of the structured dialogue context when the intent is identified as ambiguous or key information is missing based on the structured dialogue context, to obtain a target structured context; and to generate a structured intent object based on the target structured context.
[0281] In some embodiments, the first generation subunit 1732 is specifically used to obtain dialogue state information; wherein, the dialogue state information includes at least currently confirmed slot value pairs, missing slot information, and user historical preferences; generate and output intent clarification questions based on the dialogue state information and the structured dialogue context; receive user response information input for the intent clarification questions; update the structured dialogue context based on the response information, and when it is identified that there is no intent ambiguity or missing key information based on the updated structured dialogue context, the updated structured dialogue context is determined as the target structured context.
[0282] In some embodiments, the task planning unit 1750 includes:
[0283] Determine subunit 1751, which is used to determine high-level business objectives based on structured intent objects;
[0284] Decomposition subunit 1752 is used to decompose high-level business objectives into multiple logical sub-objectives;
[0285] Mapping subunit 1753 is used to map multiple logical sub-objectives onto a business domain task graph to obtain a preliminary task sequence.
[0286] Acquisition subunit 1754 is used to acquire planning status information; wherein, the planning status information includes at least the dialogue status, the result set of currently executed tasks, execution environment parameters, remaining task objectives, and the set of currently executable nodes in the task graph;
[0287] The second generation subunit 1755 is used to generate the current action space based on the business domain task map and planning status information;
[0288] The second generation subunit 1755 is also used to generate a task execution sequence based on the current action space and a preset reward function.
[0289] In some embodiments, the task planning device further includes:
[0290] The parsing unit 1760 is used to parse the task execution sequence into specific operable plan steps by the planner agent after the task planning is performed according to the task graph of the business domain and the task execution sequence is obtained, and to assign corresponding atomic services to each step in the specific operable plan steps.
[0291] Calling unit 1770 is used to call the corresponding atomic services in the order of steps according to the specific operable plan steps of the executor intelligent agent to perform the corresponding operations.
[0292] In some embodiments, the task planning device further includes:
[0293] The acquisition unit 1710 is also used to acquire the execution result of each step in the specific operable plan steps;
[0294] The verification unit 1780 is used to perform quality verification on the execution result through the verifier agent to obtain the verification result; wherein, the quality verification includes at least one of the following: result format verification, business logic verification, consistency conflict verification, and integrity verification.
[0295] The generation unit 1730 is used to obtain target context information associated with specific operable plan steps through the generator agent when the execution result is determined to have passed the quality verification based on the verification result, and to generate user-oriented natural language responses or structured business reports based on the execution result and target context information of each step in the specific operable plan steps.
[0296] Output unit 1790 is used to output natural language responses or structured business reports.
[0297] In some embodiments, the task planning device further includes:
[0298] The acquisition unit 1710 is also used to acquire the failed task information corresponding to the execution result when it is determined from the verification result that the execution result has failed the quality verification; wherein, the failed task information includes at least the task step identifier, details of the failure reason, and the set of execution results of all task steps that have been successfully executed.
[0299] The generation unit 1730 is also used to generate replanning requests based on the information of failed tasks;
[0300] The task planning unit 1750 is also used to respond to a replanning request and re-execute the steps of task planning based on the business domain task map to obtain the task execution sequence.
[0301] like Figure 3 As shown, this application provides an electronic device 1800, which includes a processor 1801 and a memory 1802. The processor 1801 and the memory 1802 are interconnected and communicate with each other through a communication bus 1803 and / or other forms of connection mechanism (not shown). The memory 1802 stores a computer program that can be executed by the processor 1801. When the computing device is running, the processor 1801 executes the computer program to perform the method in any of the aforementioned optional implementations.
[0302] This application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the method in any of the aforementioned optional implementations.
[0303] The computer-readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0304] This application provides a computer program product, which includes a computer program that, when run by a processor, executes the method in any of the aforementioned optional implementations.
[0305] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and not to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. These modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application, and they should all be covered within the scope of the claims and specification of this application. In particular, as long as there is no conflict, the various technical features mentioned in the embodiments can be combined in any way. This application is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.
Claims
1. A task planning method, characterized in that, include: Obtain the interactive statements input by the target user; The interactive statements are subjected to intent recognition to obtain a list of intent candidates; The list of intent candidates includes fine-grained intent confidence levels; A structured intent object is generated based on the intent candidate list and the multi-turn dialogue data of the target user; The structured intent object includes the intent graph type, sub-intent decomposition, confidence level, structured parameters, and constraint relationships. The corresponding business domain task graph is loaded based on the structured intent object; the graph nodes in the business domain task graph correspond to atomic services or API interfaces, and the graph edges represent the execution dependencies and logical relationships between services; Based on the task map of the business domain, task planning is performed to obtain the task execution sequence; The step of performing task planning based on the business domain task graph to obtain a task execution sequence includes: High-level business objectives are determined based on the structured intent object; The high-level business objectives are decomposed into multiple logical sub-objectives; The multiple logical sub-objectives are mapped onto the business domain task graph to obtain a preliminary task sequence; Obtain planning status information; wherein, the planning status information includes at least the dialogue status, the result set of currently executed tasks, execution environment parameters, remaining task objectives, and the set of currently executable nodes in the task graph; Based on the business domain task graph and the planning status information, the current action space is generated; Based on the current action space and the preset reward function, a task execution sequence is generated.
2. The task planning method according to claim 1, characterized in that, Before obtaining the interactive statements input by the target user, the method further includes: Acquire proactive perception data of target users; wherein, the proactive perception data includes at least one of user profiles, historical interaction memories, and to-do tasks; When a potential need is detected in the target user based on the proactive sensing data, a guided dialogue is generated and output based on the potential need.
3. The task planning method according to claim 2, characterized in that, The situations in which the potential needs of the target user are detected based on the proactive sensing data include: The presence of pending tasks was detected through preset business rules and the proactive sensing data; Alternatively, the proactively sensed data can be used to predict potential demand based on a prediction model to obtain predicted demand, and the confidence level of the predicted demand exceeds a preset confidence threshold. Alternatively, a preset event may be triggered based on the active sensing data. Alternatively, a preset task state may be detected based on the active sensing data.
4. The task planning method according to claim 1, characterized in that, The step of generating a structured intent object based on the intent candidate list and the multi-turn dialogue data of the target user includes: The multi-turn dialogue data of the target user and the intent candidate list are fused to obtain a structured dialogue context; A structured intent object is generated based on the structured dialogue context.
5. The task planning method according to claim 4, characterized in that, The step of generating a structured intent object based on the structured dialogue context includes: When an ambiguous intent or missing key information is identified based on the structured dialogue context, the intent is completed in the structured dialogue context to obtain the target structured context. A structured intent object is generated based on the target structured context.
6. The task planning method according to claim 5, characterized in that, The process of performing intent completion on the structured dialogue context to obtain the target structured context includes: Obtain dialogue state information; wherein, the dialogue state information includes at least currently confirmed slot value pairs, missing slot information, and user historical preferences; Based on the dialogue state information and the structured dialogue context, generate and output an intent clarification question; Receive response information from the user regarding the question asked to clarify the intent; The structured dialogue context is updated based on the response information, and when the updated structured dialogue context indicates that there is no ambiguity of intent or missing key information, the updated structured dialogue context is determined as the target structured dialogue context.
7. The task planning method according to claim 1, characterized in that, After performing task planning based on the business domain task graph to obtain the task execution sequence, the method further includes: The planner agent parses the task execution sequence into specific operable plan steps and assigns a corresponding atomic service to each of the specific operable plan steps. The executor agent, based on the specific operable plan steps, calls the corresponding atomic services in sequence to perform the corresponding operations.
8. The task planning method according to claim 7, characterized in that, The method further includes: Obtain the execution result of each step in the specific operable plan steps; The execution result is verified by a validator agent to obtain a verification result; wherein the quality verification includes at least one of the following: result format verification, business logic verification, consistency conflict verification, and integrity verification. When the execution result is determined to have passed the quality verification based on the verification result, the generator agent obtains the target context information associated with the specific operable plan steps, and generates a user-oriented natural language response or structured business report based on the execution result of each step in the specific operable plan steps and the target context information. Output the natural language response or structured business report.
9. The task planning method according to claim 8, characterized in that, The method further includes: When it is determined from the verification result that the execution result has failed the quality verification, the failure task information corresponding to the execution result is obtained; wherein, the failure task information includes at least the task step identifier, details of the failure reason, and the set of execution results of all task steps that have been successfully executed. A replanning request is generated based on the failed task information; In response to the replanning request, the step of re-executing the task planning based on the business domain task graph to obtain the task execution sequence is re-executed.
10. A task planning apparatus for implementing the task planning method according to any one of claims 1-9, characterized in that, The task planning device includes: The acquisition unit is used to acquire the interactive statements input by the target user. An intent recognition unit is used to recognize the intent of the interactive statement and obtain an intent candidate list; the intent candidate list includes fine-grained intent confidence. The generation unit is used to generate a structured intent object based on the intent candidate list and the multi-turn dialogue data of the target user; the structured intent object includes intent graph type, sub-intent decomposition, confidence level, structured parameters, and constraint relationships; The loading unit is used to load the corresponding business domain task graph according to the structured intent object; the graph nodes in the business domain task graph correspond to atomic services or API interfaces, and the graph edges represent the execution dependencies and logical relationships between services; The task planning unit is used to plan tasks based on the task map of the business domain to obtain a task execution sequence.
11. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory being used to store a computer program, and the processor running the computer program to cause the electronic device to perform the task planning method according to any one of claims 1 to 9.
12. A readable storage medium, characterized in that, The readable storage medium stores a computer program, which, when executed by a processor, performs the task planning method according to any one of claims 1 to 9.
13. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, performs the task planning method according to any one of claims 1 to 9.