Task execution method

By introducing a rapid reflection process and quantitative evaluation into the scenario agent of the large language model, the illusion problem in the execution of professional domain tasks by the large language model is solved, achieving higher accuracy and stability and improving user experience.

CN121638470APending Publication Date: 2026-03-10GREAT WALL MOTOR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-26
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Large language models may exhibit hallucination phenomena in complex multi-turn dialogue scenarios in specialized fields, leading to inaccurate and unstable task execution and affecting user experience.

Method used

When executing tasks through scenario agents, it determines whether a rapid reflection process needs to be triggered, uses quantitative indicators to evaluate the initial execution results, and generates strategy correction suggestions when the results are not met, re-executes the task to obtain the target execution results, thus forming a closed-loop optimization mechanism.

Benefits of technology

It improves the accuracy and reliability of task execution, enhances the robustness and adaptability of the scene agent in complex task scenarios, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121638470A_ABST
    Figure CN121638470A_ABST
Patent Text Reader

Abstract

The invention provides a task execution method, and relates to the technical field of computers, and the method comprises the steps: in a process of executing a task corresponding to a user request by a scene agent, judging whether a rapid reflection process needs to be triggered or not according to the user request, avoiding the additional analysis of all task execution, and reducing the resource waste. Under the condition that rapid reflection needs to be triggered, an initial execution result is evaluated through a quantitative index, so that significant errors are found in time. When it is found that the quantitative index does not reach the reference standard, a strategy correction suggestion is generated through recorded data of the whole execution process, the strategy correction suggestion is directly applied in the execution of this round, an original reasoning chain is covered, tasks are executed again, and a target execution result is obtained, so that errors can be corrected in time, and the efficiency is improved. And error results are effectively prevented from being transmitted to subsequent steps, and the accuracy and reliability of task execution are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and more particularly to a task execution method. Background Technology

[0002] By combining tool invocation mechanisms, the inference results of the Large Language Model (LLM) can be associated with external functional modules or system capabilities to build scenario proxies, enabling functions such as information question answering, instruction generation, task decomposition, and task orchestration. This achieves a unified understanding and execution of user requests, improving the flexibility and consistency of task execution.

[0003] However, in complex multi-turn dialogue scenarios within specialized fields, large language models may still exhibit illusions during reasoning. This means they may generate seemingly reasonable but actually erroneous content when lacking concrete evidence, or introduce logical biases in the reasoning chain. These issues can affect the accuracy and stability of the scenario's agent in executing tasks, ultimately impacting user experience. Therefore, there is an urgent need for a task execution method capable of effectively verifying and adjusting the task execution process. Summary of the Invention

[0004] In view of the above problems, this disclosure provides a task execution method that overcomes or at least partially solves the problem of inaccuracy in current task execution methods. The technical solution is as follows: A task execution method, the method comprising: When executing the task corresponding to the user request through the scenario agent corresponding to the user request, it is determined whether a rapid reflection process needs to be triggered based on the user request. The scenario agent is a domain intelligent agent that integrates a large language model and tool invocation capabilities, and is used to execute tasks in the domain where the user request is located. If it is determined that a rapid reflection process needs to be triggered, determine whether the quantitative indicators of the initial execution results of the scenario agent execution task meet the reference standards. The quantitative indicators are used to characterize the correlation between the initial execution results and the user request. When the quantitative indicators do not meet the reference standards, obtain the recorded data when the task is executed. The recorded data includes the data corresponding to the entire execution process when the scenario agent executes the task. Based on the recorded data, a strategy correction suggestion is generated, and the task corresponding to the user request is executed again according to the strategy correction suggestion to obtain the target execution result. The strategy correction suggestion is used to correct the execution strategy when the scenario agent executes the task.

[0005] In the above scheme, firstly, when the user request-corresponding task is executed through a scenario agent, it is determined whether a rapid reflection process needs to be triggered based on the user request. The scenario agent is a domain-specific agent integrating a large language model and tool invocation capabilities, used to execute tasks within the domain of the user request. Then, if a rapid reflection process is triggered, it is determined whether the quantitative indicators of the initial execution result of the scenario agent meet a reference standard. If the quantitative indicators do not meet the reference standard, recorded data during task execution is obtained. The quantitative indicators characterize the correlation between the initial execution result and the user request, and the recorded data includes data corresponding to the entire execution process of the scenario agent. Finally, a strategy correction suggestion is generated based on the recorded data, and the user request-corresponding task is executed again based on the strategy correction suggestion to obtain the target execution result. The strategy correction suggestion is used to correct the execution strategy of the scenario agent. Thus, by introducing a scenario agent integrating a large language model and tool invocation capabilities to execute tasks within the domain of the user request, and by recording data of the entire task execution process when a rapid reflection process needs to be triggered, traceable evidence is provided for subsequent analysis, ensuring that problem localization is based on the actual execution process rather than predictions or inferences made before task execution. Then, the execution results are objectively evaluated using quantitative indicators and reference standards to avoid implicit illusions caused by subjective semantic rationality judgments alone. When the evaluation results fail to meet the standards, strategy correction suggestions for the execution strategy are generated based on recorded data, and the scenario agent is driven to re-execute the task, forming a closed-loop optimization mechanism. Therefore, through a recordable, evaluable, and reflective execution process, the persistent illusion of large language models can be transformed into a detectable and correctable technical problem, thereby significantly improving the stability, reliability, and user experience of task execution results.

[0006] Optionally, before executing the task corresponding to the user request through the scenario proxy, the method further includes: The scenario proxy corresponding to the user request is determined from the preset mapping relationship; the preset mapping relationship includes the mapping relationship between historical user requests and scenario proxies. or, The user request is input into a pre-trained scene recognition model to determine the scene agent corresponding to the user request.

[0007] In this way, by mapping historical user requests to scene agents, or by analyzing user requests using a pre-trained scene recognition model to determine the corresponding scene agent, user requests can be assigned to the most suitable domain agent for execution, thus avoiding biases caused by general processing. Therefore, this not only improves the targeting and accuracy of task execution, but also reduces unnecessary agent switching and repetitive reasoning processes, indirectly improving task processing efficiency and system resource utilization efficiency.

[0008] Optionally, before executing the task corresponding to the user request through the scenario proxy, the method further includes: Upon receiving an original request from a user, obtain the context information corresponding to the original request within a first time period; the first time period includes the moment when the original request was received, and the context information is information related to the original request input by the user; Identify typos and pronouns in the original request, and correct them based on context information to obtain the user request.

[0009] In this way, by obtaining the contextual information within the time period corresponding to the original request and identifying and correcting typos and pronouns in the original request, the resulting user request can eliminate ambiguity and complete the necessary semantics, thereby avoiding task comprehension deviations caused by unclear input expressions. This allows subsequent scenario proxies to execute tasks based on clear request semantics, reducing the probability of misparsing and repeated interactions. Optionally, the task corresponding to the user request can be executed through the scenario proxy corresponding to the user request, including: Obtain the prompt word template and match multiple candidate prompt words from the preset prompt word library according to the user's request; Fill multiple candidate prompts into the prompt template to obtain the current prompt; Based on the current prompt word, the scene proxy executes the task corresponding to the user's request.

[0010] In this way, by matching candidate prompt words from the prompt word library based on user requests and combining them with prompt word templates to generate the current prompt word, the scene agent can execute the task corresponding to the user request under the constraints of unified and standardized prompt words. This reduces the execution fluctuations caused by differences in prompt construction and improves the stability, consistency and controllability of task execution results. Optionally, determine whether to trigger a rapid reflection process based on user requests, including: Identify the number of intents corresponding to user requests; When the number of intentions exceeds a certain threshold, it is determined that a rapid reflection process needs to be triggered. When the number of intentions is less than or equal to the number threshold, it is determined that a rapid reflection process does not need to be triggered.

[0011] In this way, by using whether the number of intents contained in a user request exceeds a threshold as the criterion for triggering the rapid reflection process, simple and complex requests can be distinguished. Introducing the rapid reflection process in multi-intent request scenarios helps reduce the risk of missed executions or execution conflicts. Conversely, not triggering the reflection process in single-intent or low-complexity request scenarios avoids the additional computational overhead of repeatedly performing reflection analysis on simple tasks. Therefore, while ensuring task execution quality, the reflection mechanism can be triggered on demand, improving the rationality of resource utilization and overall execution efficiency. Optionally, based on the policy correction suggestions, the task corresponding to the user request can be executed again to obtain the target execution result, including: Based on the policy modification suggestions, the task corresponding to the user request is executed again to obtain the modified execution result; Determine whether the quantitative indicators of the modified execution results meet the reference standards; If the quantitative indicators of the modified execution results do not meet the reference standards, new strategy correction suggestions are generated based on the recorded data of the modified execution results. The task corresponding to the user request is executed again based on the new strategy revision suggestions until the quantitative indicators of the task execution result reach the reference standard and the target execution result is obtained, or the number of modifications exceeds the threshold of the first time; the number of modifications is the number of times the task corresponding to the user request is executed based on the strategy revision suggestions.

[0012] This approach allows for the re-execution of tasks corresponding to user requests under the guidance of strategy correction suggestions. After each execution, the results are evaluated based on quantitative indicators and reference standards, creating an iterative closed loop of execution, evaluation, correction, and re-execution. This ensures that the execution strategy is gradually adjusted and converges towards the target requirements, improving the matching degree and accuracy between the final execution result and the user request. Furthermore, when the execution result repeatedly fails to meet the reference standards, limiting the number of corrections and terminating further corrections avoids infinite interactions and boundless iterations caused by repeated attempts, preventing uncontrolled process complexity and continuous resource consumption.

[0013] Optionally, the method also includes: determining the initial execution result as the target execution result when it is determined from the user's request that a rapid reflection process does not need to be triggered, or when the quantitative indicators reach the reference standard.

[0014] In this way, when there is no need to trigger a rapid reflection process or when the quantitative indicators of the execution result have reached the reference standard, the initial execution result can be directly determined as the target execution result. This allows the processing flow to end in a timely manner as long as the result quality meets the requirements, thereby avoiding unnecessary reflection analysis and repeated execution, reducing additional computational overhead, improving overall response efficiency, and avoiding resource waste.

[0015] Optionally, before determining whether the quantitative indicators of the initial execution results of the scenario agent task meet the reference standard, the method further includes: Determine whether additional user requests are needed based on the recorded data; If it is determined from the recorded data that additional user requests need to be added, the number of additions is determined; the number of additions is the number of times the user adds a user request. If the number of attempts to replenish is less than or equal to the threshold for the second attempt, a replenishment prompt will be returned. Upon receiving supplementary data, return the steps for executing the task through the scenario agent until the target execution result is obtained, or the number of supplementary data attempts exceeds the threshold for the second attempt. If it is determined from the recorded data that no additional user requests are needed, determine whether the quantitative indicators of the initial execution results of the scenario agent task meet the reference standards.

[0016] This approach allows for the initial assessment of missing information in user requests based on recorded data generated during task execution. It then guides users to supplement information a limited number of times as needed, ensuring the task execution continues as information becomes increasingly complete. This avoids repeated failures caused by directly entering the result evaluation phase without sufficient critical information. Furthermore, by limiting the number of supplementation attempts, the process is terminated promptly if multiple attempts fail to meet the task's requirements, preventing boundless, repetitive queries and interaction loops. Therefore, this approach ensures task execution is based on sufficient and semantically clear information while effectively preventing process control issues and resource waste caused by unlimited interactions, thus improving the overall orderliness and controllability of the execution process.

[0017] Optionally, determine whether the quantitative indicators of the initial execution results of the scenario agent task meet the reference standards, including: Identify at least one user intent corresponding to the user request; When the initial execution results show that each user intent has been executed, the quantitative indicators of the initial execution results are determined to have reached the reference standard.

[0018] In this way, by using the user intent identified in the user request as the quantitative criterion and whether the execution result covers each user intent as the criterion for whether the standard is met, the evaluation process of the execution result has a clear and verifiable judgment standard, which improves the accuracy and consistency of the result evaluation.

[0019] Optionally, after obtaining the target execution result, the method may also include: Return the target execution result; Obtain the user's feedback information for the user request within the second time period; the time interval between the first moment in the second time period and the moment when the target execution result is returned is less than the preset time interval. When the feedback is negative, retrieve the user's historical data for the third time period; the last moment of the third time period is earlier than the first moment of the second time period. Historical strategy correction suggestions are generated based on historical data, and the historical data and historical strategy correction suggestions are added to the failure case dataset; the failure case dataset is used to optimize the prompt word templates corresponding to the scene agent.

[0020] In this way, after returning the target execution result, user feedback is collected within a preset time period. When negative feedback occurs, historical strategy correction suggestions are generated by combining the user's historical data. At the same time, relevant data is included in the failure case dataset, so that negative feedback information can be systematically accumulated and reused. The failure case dataset can be used to continuously optimize the prompt word templates corresponding to the scene agent, enabling the scene agent to have stronger adaptability and error correction capabilities when handling similar user requests in the future, thereby improving the stability and overall robustness of task execution. Optionally, when the feedback is positive, the recorded data is added to the success case dataset; the success case dataset is used to provide data support for building user preference tags.

[0021] In this way, when the feedback is positive, the recorded data during the corresponding task execution process is included in the success case dataset, which can retain high-quality successful execution samples, providing reliable data support for building user preference labels, thereby improving the accuracy of user preference modeling and indirectly enhancing the personalized processing capabilities in subsequent task execution.

[0022] Optionally, the scenario agent is a scenario agent in the field of vehicle intelligent cockpit.

[0023] By limiting the scenario agent to the field of vehicle intelligent cockpit, user requests can be processed in combination with the characteristics of in-vehicle usage scenarios, thereby ensuring the accuracy of the scenario agent's response to user requests and improving the matching degree and practicality of task execution results.

[0024] A task execution device, the device comprising: The determination module is used to determine whether a rapid reflection process needs to be triggered when the user request is executed through the scenario agent corresponding to the user request. The scenario agent is a domain agent that integrates a large language model and tool invocation capabilities to execute tasks in the domain of the user request. The determination module is also used to determine whether the quantitative indicators of the initial execution results of the scenario agent execution task meet the reference standard when it is determined that a rapid reflection process needs to be triggered. The quantitative indicators are used to characterize the correlation between the initial execution results and the user request. The acquisition module is used to acquire recorded data during task execution when the quantitative indicators do not meet the reference standards. The recorded data includes data corresponding to the entire execution process when the scenario agent executes the task. The execution module is used to generate strategy correction suggestions based on the recorded data, and then re-execute the task corresponding to the user request based on the strategy correction suggestions to obtain the target execution result. The strategy correction suggestions are used to correct the execution strategy when the scenario agent executes the task.

[0025] Optional, determine the module, specifically used for: Before executing the task corresponding to the user request through the scenario proxy corresponding to the user request, the scenario proxy corresponding to the user request is determined from the preset mapping relationship using the user request; the preset mapping relationship includes the mapping relationship between historical user requests and scenario proxies; or, Before executing the task corresponding to the user request through the scene agent corresponding to the user request, the user request is input into a pre-trained scene recognition model to determine the scene agent corresponding to the user request.

[0026] Optionally, the acquisition module is also used to acquire context information corresponding to the original request within a first time period before executing the task corresponding to the user request through the scenario proxy corresponding to the user request, upon receiving the original request from the user; the first time period includes the moment when the original request is received, and the context information is information related to the original request input by the user; The execution module is also used to identify typos and pronouns in the original request, and correct typos and pronouns based on context information to obtain the user request.

[0027] Optional, determine the module, specifically used for: Obtain the prompt word template and match multiple candidate prompt words from the preset prompt word library according to the user's request; Fill multiple candidate prompts into the prompt template to obtain the current prompt; Based on the current prompt word, the scene proxy executes the task corresponding to the user's request.

[0028] Optional, determine the module, specifically used for: Identify the number of intents corresponding to user requests; When the number of intentions exceeds a certain threshold, it is determined that a rapid reflection process needs to be triggered. When the number of intentions is less than or equal to the number threshold, it is determined that a rapid reflection process does not need to be triggered.

[0029] Optional, execution module, specifically used for: Based on the policy modification suggestions, the task corresponding to the user request is executed again to obtain the modified execution result; Determine whether the quantitative indicators of the modified execution results meet the reference standards; If the quantitative indicators of the modified execution results do not meet the reference standards, new strategy correction suggestions are generated based on the recorded data of the modified execution results. The task corresponding to the user request is executed again based on the new strategy revision suggestions until the quantitative indicators of the task execution result reach the reference standard and the target execution result is obtained, or the number of modifications exceeds the threshold of the first time; the number of modifications is the number of times the task corresponding to the user request is executed based on the strategy revision suggestions.

[0030] Optionally, the determination module is also used to determine the initial execution result as the target execution result when it is determined from a user request that a rapid reflection process does not need to be triggered, or when the quantitative indicators reach the reference standard.

[0031] Optionally, the determination module is also used for: Before determining whether the quantitative indicators of the initial execution results of the scenario agent's execution tasks meet the reference standards, determine whether it is necessary to supplement user requests based on the recorded data; If it is determined from the recorded data that additional user requests need to be added, the number of additions is determined; the number of additions is the number of times the user adds a user request. If the number of attempts to replenish is less than or equal to the threshold for the second attempt, a replenishment prompt will be returned. Upon receiving supplementary data, return the steps for executing the task through the scenario agent until the target execution result is obtained, or the number of supplementary data attempts exceeds the threshold for the second attempt. If it is determined from the recorded data that no additional user requests are needed, determine whether the quantitative indicators of the initial execution results of the scenario agent task meet the reference standards.

[0032] Optional, determine the module, specifically used for: Identify at least one user intent corresponding to the user request; When the initial execution results show that each user intent has been executed, the quantitative indicators of the initial execution results are determined to have reached the reference standard.

[0033] Optionally, the execution module is also used to return the target execution result after obtaining the target execution result; The acquisition module is also used to acquire the user's feedback information for the user request within the second time period; the time interval between the first moment in the second time period and the moment when the target execution result is returned is less than the preset time interval; The acquisition module is also used to acquire the user's historical data within the third time period when the feedback information is negative; the last moment of the third time period is earlier than the first moment of the second time period. The execution module is also used to generate historical strategy correction suggestions based on historical data, and to add the historical data and historical strategy correction suggestions to the failure case dataset; the failure case dataset is used to optimize the prompt word templates corresponding to the scene agent.

[0034] Optionally, the execution module is also used to add the recorded data to the success case dataset when the feedback information is positive; the success case dataset is used to provide data support for building user preference tags.

[0035] Optionally, the scenario agent is a scenario agent in the field of vehicle intelligent cockpit.

[0036] An electronic device includes a memory for storing a computer program; and a processor for executing the computer program to implement any of the optional task execution methods described above.

[0037] A computer-readable storage medium storing a computer program that, when executed by a processor, implements any of the optional task execution methods described above.

[0038] A computer program product, when run on a computer, causes the computer to perform the aforementioned related steps to achieve any of the optional task execution methods described above.

[0039] By employing the aforementioned technical solution, this disclosure provides a task execution method that, during the execution of a user-requested task by a scenario agent, determines whether a rapid reflection process needs to be triggered based on the user request. This avoids additional analysis for all task executions, reducing resource waste. When rapid reflection is required, the initial execution result is evaluated using quantitative indicators to promptly identify significant errors (such as parameter deviations, tool call failures, or logical contradictions). If the quantitative indicators fail to meet reference standards, strategy correction suggestions are generated using recorded data from the entire execution process. These suggestions are then directly applied in the current execution round, overriding the original inference chain, and the task is re-executed to obtain the target execution result. This not only corrects errors immediately but also effectively prevents erroneous results from being propagated to subsequent steps, improving the accuracy and reliability of task execution. Furthermore, it enhances the robustness and adaptability of the scenario agent in complex, multi-step task scenarios.

[0040] The above description is merely an overview of the technical solution disclosed herein. In order to better understand the technical means of this disclosure and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this disclosure more apparent and understandable, specific embodiments of this disclosure are described below. Attached Figure Description

[0041] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this disclosure. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 One of the flowcharts of the task execution method provided in this disclosure is shown. Figure 2 A second schematic flowchart of the task execution method provided in this embodiment of the present disclosure is shown; Figure 3 The third schematic flowchart of the task execution method provided in this embodiment of the present disclosure is shown; Figure 4 The fourth schematic flowchart of the task execution method provided in this embodiment of the present disclosure is shown; Figure 5 The fifth schematic flowchart of the task execution method provided in this embodiment of the present disclosure is shown; Figure 6 A sixth schematic flowchart of the task execution method provided in this embodiment of the present disclosure is shown; Figure 7 The seventh flowchart of the task execution method provided in this embodiment of the present disclosure is shown; Figure 8 This is illustrated as the eighth flowchart of the task execution method provided in this embodiment of the present disclosure; Figure 9 A flowchart of the task execution method provided in this embodiment is shown as diagram nine; Figure 10 A schematic diagram of the structure of a task execution device provided in an embodiment of this disclosure is shown; Figure 11 A schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure is shown. Detailed Implementation

[0042] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0043] With the continuous development of artificial intelligence technology, large language models (hereinafter referred to as large models) have demonstrated strong capabilities in natural language understanding, semantic reasoning, and text generation, and have been widely applied in various intelligent systems. In these intelligent systems, the inference results of large models can be associated with external functional modules or system capabilities through tool invocation mechanisms to construct corresponding scene agents. These scene agents can then perform functions such as question answering, instruction generation, task decomposition, and task orchestration. For example, in the intelligent cockpit scenario, large models combined with tool invocation can be used to complete question-and-answer interactions and vehicle control (such as driving control and in-vehicle multimedia control).

[0044] While current large-scale models can correctly handle a large number of daily requests, they still exhibit "model illusions" or logical deviations in the inference chain during complex multi-turn dialogues in specialized fields, impacting user experience. To address these issues, related technologies typically reduce knowledge gaps in large models by expanding training data, thus avoiding model illusions. However, since it's impossible to cover all data regardless of how much training data is expanded, current optimization methods cannot fundamentally solve the model illusion problem. This results in scenario proxies built on large models being inaccurate and unstable, further affecting the user experience.

[0045] To address the aforementioned issues, this disclosure provides a task execution scheme. During the execution of a user-requested task by a scenario agent, it determines whether a rapid reflection process needs to be triggered based on the user request. This avoids additional analysis for all task executions, reducing resource waste. When rapid reflection is required, the initial execution results are evaluated using quantitative indicators to promptly identify significant errors (such as parameter deviations, tool call failures, or logical contradictions). If the quantitative indicators fail to meet reference standards, strategy correction suggestions are generated using recorded data from the entire execution process. These suggestions are then directly applied in the current execution round, overriding the original inference chain, and the task is re-executed to obtain the target execution result. This not only corrects errors immediately but also effectively prevents erroneous results from being propagated to subsequent steps, improving the accuracy and reliability of task execution. Furthermore, it enhances the robustness and adaptability of the scenario agent in complex, multi-step task scenarios.

[0046] The task execution method provided in this disclosure is applicable to scenarios that combine tool invocation mechanisms with large model inference results for task proxy execution (such as smart cockpit scenarios, smart home control scenarios, etc.). The task execution method provided in this disclosure can also be executed by a task execution device, which can be hardware or software. When the task execution device is hardware, it can be an electronic device with task execution functionality. When the task execution device is software, it can be installed in the aforementioned electronic device. It can be implemented as multiple software programs or software modules, or as a single software program or software module. No specific limitations are made here.

[0047] Based on the above application scenarios, in order to solve the technical problem that the current task execution methods are not accurate enough, this disclosure provides a task execution method, such as... Figure 1 As shown, Figure 1 This is a schematic flowchart of a task execution method provided in an embodiment of the present disclosure, which may include the following steps S1-S4: S1. When executing the task corresponding to the user request through the scenario agent corresponding to the user request, determine whether a quick reflection process needs to be triggered based on the user request.

[0048] First, the task corresponding to the user request is executed by the scenario proxy corresponding to the user request.

[0049] The scenario agent is a domain-specific intelligent agent integrating a large language model and tool invocation capabilities, used to execute tasks within the domain of the user request. The user request can be the original request from user input (such as text or voice input), or a request obtained after preprocessing the original user input. The domain of the user request can be any domain that can combine tool invocation mechanisms with the inference results of the large model, such as the intelligent cockpit domain for vehicles, smart home control, industrial automation control, and medical assistance. The task within the domain of the user request is the task parsed from the user request. For example, when the user request is within the intelligent cockpit domain, the parsed task might be "turn on the air conditioning" or "turn off the music." In this case, the scenario agent corresponding to the user request is a scenario agent within the intelligent cockpit domain for vehicles. This allows user requests to be processed in conjunction with the characteristics of the in-vehicle usage scenario, thereby ensuring the accuracy of the scenario agent's response to user requests and improving the matching degree and practicality of the task execution results.

[0050] Specifically, upon receiving a user request, the domain corresponding to the request can be determined based on its source. For example, if the user request originates from a receiving device corresponding to a vehicle's smart cockpit, then the domain is determined to be the vehicle smart cockpit domain. Then, a scene proxy can be determined within the corresponding domain based on the user request. Finally, the task corresponding to the user request is executed through the scene proxy.

[0051] In some embodiments, determining the scene proxy within the domain corresponding to the user request based on the user request can be achieved by using the user request to determine the scene proxy corresponding to the user request from a preset mapping relationship. This preset mapping relationship includes the mapping relationship between historical user requests and scene proxies, and is related to the domain corresponding to the user request; that is, each domain can have its own preset mapping relationship used to match the corresponding scene proxy based on the user request. In some embodiments, the preset mapping relationship can be pre-saved historical user requests and the scene proxies matched with those historical user requests.

[0052] In some embodiments, determining the scene proxy in the domain corresponding to the user request based on the user request can also involve inputting the user request into a pre-trained scene recognition model to determine the scene proxy corresponding to the user request. The scene recognition model is trained by matching historical user requests in the domain corresponding to the user request with scene proxies obtained from those historical requests.

[0053] In this way, by mapping historical user requests to scene agents, or by analyzing user requests using a pre-trained scene recognition model to determine the corresponding scene agent, user requests can be assigned to the most suitable domain agent for execution, thus avoiding biases caused by general processing. Therefore, this not only improves the targeting and accuracy of task execution, but also reduces unnecessary agent switching and repetitive reasoning processes, indirectly improving task processing efficiency and system resource utilization efficiency.

[0054] In some embodiments, the method of executing the task corresponding to the user request through the scene agent can be that the user request is input into the scene agent, and the scene agent can automatically call tools to execute the corresponding task according to the user request.

[0055] Then, determine whether a rapid reflection process needs to be triggered based on the user's request.

[0056] Specifically, the method for determining whether a rapid reflection process needs to be triggered based on a user request can be at least one of the following (1)-(3).

[0057] (1) Determine that the intent corresponding to the user request is a complex intent.

[0058] One way to determine whether a user's request corresponds to a complex intent is to input the user's request into a pre-trained intent classification model to determine whether the intent corresponding to the user's request is a complex intent.

[0059] (2) Determine that the user request includes preset keywords.

[0060] (3) An exception occurred when executing the task corresponding to the user request through the scene proxy.

[0061] Among them, exceptions can be those that occur when the scene agent executes a task and makes a tool call (such as an exception when executing a task and making a state call), or exceptions that occur when performing large model inference (such as the confidence of the output result of a large model being less than the relevant threshold).

[0062] S2. If it is determined that a rapid reflection process needs to be triggered, determine whether the quantitative indicators of the initial execution results of the scenario agent execution task meet the reference standards.

[0063] The quantitative metrics are used to characterize the correlation between the initial execution result and the user request. Reference standards may include at least one of the following: the semantic similarity between the initial execution result and the user request is greater than a similarity threshold; the confidence of the initial execution result output by the scenario agent is greater than a confidence threshold; the number of intents executed by the initial execution result is the same as the number of intents corresponding to the user request; and the intents of the initial execution result are the same as the intents corresponding to the user request.

[0064] S3. Obtain the recorded data when the quantitative indicators do not meet the reference standards.

[0065] The recorded data includes data corresponding to the entire execution process of the scenario agent when executing tasks (at least including user requests, task execution records, and initial execution results).

[0066] Specifically, one way to obtain the recorded data during task execution is to call the task execution record data of the scenario agent, thereby obtaining the record data corresponding to the user request.

[0067] S4. Generate strategy correction suggestions based on the recorded data, and re-execute the task corresponding to the user request based on the strategy correction suggestions to obtain the target execution result.

[0068] First, policy correction suggestions are generated based on the recorded data. These suggestions are used to correct the execution strategy when the scenario agent performs tasks.

[0069] Specifically, generating strategy correction suggestions based on recorded data can be achieved by evaluating the task execution records in the data based on the user request, determining whether the task execution record represents the optimal execution path for the task corresponding to the user request. If not, the optimal execution path is identified as the strategy correction suggestion. For example, if the user request is "turn on the air conditioner to 19 degrees," and the task execution record is: turn on the air conditioner → turn on music → turn off music → adjust the air conditioner temperature to 19 degrees, it can be seen that "turn on music → turn off music" is a redundant execution step. Therefore, the optimal execution path, "turn on the air conditioner → adjust the air conditioner temperature to 19 degrees," is identified as the strategy correction suggestion. As another example, if the user request is "turn on the air conditioner to 19 degrees," and the task execution record is: turn on the air conditioner, it can be seen that the task is not completed. Therefore, the optimal execution path, "turn on the air conditioner → adjust the air conditioner temperature to 19 degrees," is also identified as the strategy correction suggestion.

[0070] The method for evaluating task execution records in the recorded data based on user requests can be to input the user request and the task execution records into a pre-trained correction model, determine whether the task execution record is the optimal execution path for the task corresponding to the user request, and output the optimal execution path when the task execution record is not the optimal execution path for the task corresponding to the user request.

[0071] In some embodiments, when it is determined that the task execution record is the optimal execution path for the task corresponding to the user request, the task corresponding to the user request is re-executed until the target execution result is obtained, or the number of task executions exceeds a preset threshold.

[0072] Then, based on the policy correction suggestions, the task corresponding to the user request is executed again to obtain the target execution result. The method of executing the task corresponding to the user request again based on the policy correction suggestions is the same as the method of executing the task corresponding to the user request through the scenario proxy described above, and will not be repeated here.

[0073] In some embodiments, such as Figure 2 As shown, the above task execution method also includes the following step S5.

[0074] S5. If, based on user requests, it is determined that a rapid reflection process is not necessary, or if the quantitative indicators have reached the reference standards, the initial execution result is set as the target execution result. In this way, when a rapid reflection process is unnecessary or the quantitative indicators for the execution result have already reached the reference standards, directly setting the initial execution result as the target execution result allows the processing flow to end promptly while ensuring the result quality meets requirements. This avoids unnecessary reflection analysis and repeated execution, reduces additional computational overhead, improves overall response efficiency, and prevents resource waste.

[0075] In the above scheme, firstly, when the user request-corresponding task is executed through a scenario agent, it is determined whether a rapid reflection process needs to be triggered based on the user request. The scenario agent is a domain-specific agent integrating a large language model and tool invocation capabilities, used to execute tasks within the domain of the user request. Then, if it is determined that a rapid reflection process needs to be triggered, it is determined whether the quantitative indicators of the initial execution result of the scenario agent's task execution meet a reference standard. If the quantitative indicators do not meet the reference standard, the recorded data during task execution is obtained. The quantitative indicators characterize the correlation between the initial execution result and the user request, and the recorded data includes data corresponding to the entire execution process of the scenario agent's task execution. Finally, a strategy correction suggestion is generated based on the recorded data, and the user request-corresponding task is executed again based on the strategy correction suggestion to obtain the target execution result. The strategy correction suggestion is used to correct the execution strategy of the scenario agent during task execution. Thus, by introducing a scenario agent integrating a large language model and tool invocation capabilities to execute tasks within the domain of the user request, and by recording data of the entire task execution process when a rapid reflection process needs to be triggered, traceable evidence is provided for subsequent analysis, ensuring that problem localization is based on the actual execution process rather than predictions or inferences made before task execution. Then, the execution results are objectively evaluated using quantitative indicators and reference standards to avoid implicit illusions caused by subjective semantic rationality judgments alone. When the evaluation results fail to meet the standards, strategy correction suggestions for the execution strategy are generated based on recorded data, and the scenario agent is driven to re-execute the task, forming a closed-loop optimization mechanism. Therefore, through a recordable, evaluable, and reflective execution process, the persistent illusion of large language models can be transformed into a detectable and correctable technical problem, thereby significantly improving the stability, reliability, and user experience of task execution results.

[0076] In some embodiments, such as Figure 3 As shown, before step S1 above, the task execution method also includes the following steps S01-S02.

[0077] S01. Upon receiving an original request from a user, obtain the context information corresponding to the original request within the first time period.

[0078] The first time period includes the moment the original request was received. Context information refers to user-inputted information related to the original request. For example, context information could be historical dialogue content within the same session as the original request.

[0079] S02. Identify typos and pronouns in the original request, and correct them based on the context information to obtain the user request.

[0080] Specifically, the method of identifying typos and pronouns in the original request and modifying them according to the context information to obtain the user request can be to identify characters or words that do not conform to the specifications in the original request based on a preset dictionary, language model, or spelling rules to determine possible typos and modify them. At the same time, combining the context information of the original request, semantic parsing is performed on the pronouns in the original request. By analyzing the semantic association relationship between the pronouns and the candidate entities in the context, the target entity corresponding to the pronoun is determined and replaced, so as to achieve the identification and disambiguation of typos and pronouns. For example, modify "计算结过" to "计算结果" and modify "其" to the subject mentioned above, etc.

[0081] In the above solution, by obtaining the context information within the corresponding time period of the original request and identifying and correcting the typos and pronouns in the original request, the formed user request can eliminate ambiguity and complete the necessary semantics, thus avoiding the task understanding deviation caused by unclear input expressions, enabling the subsequent scenario agent to execute tasks based on the clear request semantics, and reducing the occurrence probability of misparsing and repeated interactions. In some embodiments, such as Figure 4 As shown, the method of executing the task corresponding to the user request through the scenario agent corresponding to the user request in the above step S1 can be implemented through the following steps S111 - S113.

[0082] S111. Obtain a prompt template and match multiple candidate prompts from a preset prompt library according to the user request.

[0083] Among them, the prompt template is a pre-set template. The data in the preset prompt library can be composed of prompts used by other scenario agents in the field corresponding to the user request.

[0084] Specifically, the method of matching multiple candidate prompts from a preset prompt library according to the user request can be to use relevant tools, such as an embedding model, regression algorithm, etc., to determine multiple (such as 10) prompts most relevant to the user request in the prompt library as candidate prompts.

[0085] [[ID=第十九]]S112. Fill the multiple candidate prompts into the prompt template to obtain the current prompt.

[0086] Specifically, the method of filling the multiple candidate prompts into the prompt template to obtain the current prompt can be to fill the multiple candidate prompts into the corresponding placeholder positions in the prompt template according to the prompt template structure, and perform formatting or combination processing on the filled prompt template to generate the current prompt. It can also be to directly splice the prompt template and the multiple candidate prompts to obtain the current prompt.

[0087] S113. Execute the task corresponding to the user's request based on the current prompt word through the scene proxy.

[0088] Specifically, the method of executing the user's requested task through a scene proxy based on the current prompt word can be that the prompt word is input into the scene proxy, and the scene proxy can automatically call the tool to execute the corresponding task based on the prompt word.

[0089] In the above scheme, candidate prompt words are matched from the prompt word library based on user requests and the current prompt word is generated by combining the prompt word template. This enables the scene agent to execute the task corresponding to the user request under the constraints of unified and standardized prompt words, thereby reducing the execution fluctuations caused by differences in prompt construction and improving the stability, consistency and controllability of task execution results. In some embodiments, such as Figure 5 As shown, the method of determining whether to trigger the rapid reflection process based on the user request in step S1 above can be achieved through the following steps S121-S124.

[0090] S121. Identify the number of intents corresponding to the user request.

[0091] Specifically, the method to identify the number of intents corresponding to a user request can be to analyze the semantic units contained in the user request based on a preset intent number identification model or rule to determine the different intent types involved in the user request, and then determine the number of intents corresponding to the user request based on the number of different intent types.

[0092] S122. Determine whether the number of intents is greater than the quantity threshold. If the number of intents is greater than the quantity threshold, execute step S123. If the number of intents is less than or equal to the quantity threshold, execute step S124.

[0093] The quantity threshold is a preset value, such as a default value or a value set by relevant personnel based on actual conditions. For example, the quantity threshold is 3.

[0094] S123. Determine if a rapid reflection process needs to be triggered.

[0095] S124. Determine that the rapid reflection process does not need to be triggered.

[0096] Specifically, when a user request contains a large number of intents, it indicates that the intent is complex. In this case, performing a quick reflex process can ensure the execution quality of complex intents. When a user request contains a small number of intents, it indicates that the intent is simple, and the execution process is less prone to errors. In this case, not performing a quick reflex process can avoid wasting resources.

[0097] In the above scheme, using whether the number of intents contained in a user request exceeds a threshold as the criterion for triggering the rapid reflection process can distinguish between simple and complex requests. Introducing the rapid reflection process in multi-intent request scenarios helps reduce the risk of missed executions or execution conflicts. Conversely, not triggering the reflection process in single-intent or low-complexity request scenarios avoids the additional computational overhead of repeatedly performing reflection analysis on simple tasks. Therefore, while ensuring task execution quality, it achieves on-demand triggering of the reflection mechanism, improving the rationality of resource utilization and overall execution efficiency. In some embodiments, such as Figure 6 As shown, the method of re-executing the task corresponding to the user request according to the strategy correction suggestion in step S4 above to obtain the target execution result can be achieved through the following steps S421-S424.

[0098] S421. Based on the policy modification suggestions, re-execute the task corresponding to the user request to obtain the modified execution result.

[0099] Specifically, the task corresponding to the user request is executed again according to the policy correction suggestion, and the modified execution result is obtained in the same way as the task corresponding to the user request is executed again according to the policy correction suggestion in step S4 above, so it will not be repeated here.

[0100] S422. Determine whether the quantitative indicators of the modified execution results meet the reference standards.

[0101] Similarly, see step S2 above, which will not be repeated here.

[0102] S423. If the quantitative indicators of the modified execution results do not meet the reference standards, generate new strategy correction suggestions based on the recorded data of the modified execution results.

[0103] Similarly, see step S4 above, which will not be repeated here.

[0104] S424. Execute the task corresponding to the user request again according to the revised suggestion of the new strategy until the quantitative indicator of the execution result of the task corresponding to the user request reaches the reference standard and the target execution result is obtained, or the number of modifications is greater than the threshold of the first time.

[0105] The "number of modifications" refers to the number of times the user request's corresponding task is executed based on the policy modification suggestions. The "first time" threshold is a preset value, such as a default value or a value set by relevant personnel based on actual circumstances.

[0106] In some embodiments, when the number of modifications exceeds the threshold of the first number, the process ends and an error message is returned.

[0107] The above solution allows for the re-execution of tasks corresponding to user requests under the guidance of strategy correction suggestions. After each execution, the results are evaluated based on quantitative indicators and reference standards, creating an iterative closed loop of execution, evaluation, correction, and re-execution. This ensures that the execution strategy is gradually adjusted and converges towards the target requirements, improving the matching degree and accuracy between the final execution result and the user request. Furthermore, when the execution result repeatedly fails to meet the reference standards, limiting the number of corrections and terminating further corrections avoids infinite interactions and boundless iterations caused by repeated attempts, preventing uncontrolled process complexity and continuous resource consumption.

[0108] In some embodiments, such as Figure 7 As shown, before step S2 above, the task execution method also includes the following steps S61-S66.

[0109] S61. Determine whether a supplementary user request is needed based on the recorded data. If it is determined that no supplementary user request is needed, proceed to step S2. If it is determined that a supplementary user request is needed, proceed to step S62.

[0110] Specifically, determining whether to supplement user requests based on recorded data can be done in several ways. First, by analyzing the consistency between the task execution records, initial execution results, and user requests. If the analysis reveals missing information, misunderstandings, or that the execution results do not cover key elements of the user request, then supplementation is necessary. Second, by comprehensively analyzing the task execution steps, call results, and intermediate states reflected in the recorded data, the extent to which the execution results cover the user request can be assessed. If the coverage is lower than preset requirements, then supplementation is required.

[0111] S62. Determine the number of times to replenish.

[0112] The number of times a user makes a request to supplement another user is the number of times the user has made a request to supplement another user.

[0113] S63. Determine whether the number of replenishments is less than or equal to the second number threshold. If the number of replenishments is less than or equal to the second number threshold, execute step S64. If the number of replenishments is greater than the second number threshold, execute step S66.

[0114] The second threshold is a pre-set value, for example, a default value, or a value set by relevant personnel according to the actual situation.

[0115] S64, Return to supplementary tips.

[0116] S65. Determine whether supplementary data has been received. If supplementary data has been received, return to execute S1; if supplementary data has not been received, execute step S66.

[0117] Specifically, when supplementary data is received from the user, it is determined that the supplementary data has been received; if no supplementary data is received from the user within a preset time period after the supplementary prompt is returned, it is determined that no supplementary data has been received.

[0118] S66, End the process.

[0119] Specifically, if the number of supplementary data attempts exceeds the threshold for the second attempt, or if no supplementary data is received, an error occurs in the process. In this case, the process ends and returns an error message to avoid getting stuck in an infinite loop.

[0120] The above solution first determines whether the user's request is missing information based on the recorded data generated during task execution. It then guides the user to supplement the information a limited number of times, allowing the task execution process to continue as information becomes increasingly complete. This avoids repeated failures caused by directly entering the result evaluation stage when key information is insufficient. Simultaneously, by constraining the number of supplementation attempts, the process is terminated promptly if multiple supplementation attempts still fail to meet the task execution requirements, preventing boundless repeated queries and interaction loops. Therefore, it ensures that task execution is based on sufficient information and clear semantics, effectively avoiding process loss of control and resource waste caused by unlimited interactions, and improving the orderliness and controllability of the overall execution process.

[0121] In some embodiments, such as Figure 8 As shown, the method for determining whether the quantitative indicators of the initial execution result of the scenario agent execution task in step S2 above meet the reference standard can be achieved through the following steps S21-S22.

[0122] S21. Identify at least one user intent corresponding to the user request.

[0123] Specifically, identifying at least one user intent corresponding to a user request can be achieved by performing semantic analysis on the user request, extracting intent-related features based on the contextual information of the user request, and then determining the intent based on the extracted intent-related features, thereby identifying at least one user intent corresponding to the user request. Alternatively, the user request can be directly input into a pre-trained intent recognition model to obtain at least one user intent corresponding to the user request.

[0124] S22. When the initial execution results show that each user intent has been executed, determine that the quantitative indicators of the initial execution results have reached the reference standard.

[0125] In the above scheme, by using the user intent identified in the user request as the quantitative judgment basis, and using whether the execution result covers each user intent as the judgment condition for whether the standard is met, the evaluation process of the execution result has a clear and verifiable judgment standard, which improves the accuracy and consistency of the result evaluation.

[0126] In some embodiments, such as Figure 9 As shown, after step S4 above, the task execution method further includes the following steps S71-S74.

[0127] S71. After obtaining the target execution result, return the target execution result.

[0128] Specifically, after obtaining the target execution result, the target execution result is returned to the user. One way to return the target execution result to the user is to summarize the result and display the summary to the user.

[0129] S72. Obtain the user's feedback information for the user request within the second time period.

[0130] In this second time period, the time interval between the first moment and the moment the target execution result is returned is less than a preset duration. In other words, the second time period is the time after the target execution result is returned to the user. For example, the second time period could be 30 seconds.

[0131] User feedback can be actively input by the user, such as feedback from a rating system; or it can be user feedback collected by a device, such as voice and image information collected by a device after a task is performed, followed by multimodal sentiment analysis to obtain user feedback.

[0132] S73. When the feedback information is negative, obtain the user's historical data within the third time period.

[0133] The last moment of the third time period is earlier than the first moment of the second time period. In other words, the third time period is the period before feedback information is obtained.

[0134] Specifically, the type of feedback information can be identified through analysis tools, algorithms, and models. When the type of feedback information is determined to be negative feedback, the user's historical data within the third time period can be obtained.

[0135] In some embodiments, when the feedback is positive (e.g., very satisfied, okay, no emotion), the recorded data is added to the success case dataset. The success case dataset is used to provide data support for constructing user preference tags. Specifically, when adding recorded data to the success case dataset, the level of the recorded data can be identified first, and then the recorded data can be stored in the success case dataset according to the level.

[0136] In this way, when the feedback is positive, the recorded data during the corresponding task execution process is included in the success case dataset, which can retain high-quality successful execution samples, providing reliable data support for building user preference labels, thereby improving the accuracy of user preference modeling and indirectly enhancing the personalized processing capabilities in subsequent task execution.

[0137] S74. Generate historical strategy correction suggestions based on historical data, and add the historical data and historical strategy correction suggestions to the failure case dataset.

[0138] The failed case dataset is used to optimize the prompt word templates corresponding to the scene agent.

[0139] Specifically, the method for generating historical strategy correction suggestions based on historical data is the same as the method for generating strategy correction suggestions in step S4 above, and will not be repeated here.

[0140] In the above scheme, after returning the target execution result, user feedback is obtained within a preset time period. When negative feedback occurs, historical strategy correction suggestions are generated based on the user's historical data. Simultaneously, relevant data is included in the failure case dataset, allowing negative feedback information to be systematically accumulated and reused. The failure case dataset can be used to continuously optimize the prompt word templates corresponding to the scene agent, enabling the scene agent to have stronger adaptability and error correction capabilities when handling similar user requests in the future. It provides a knowledge base for the next round of reflection and prompt word optimization, improving the professionalism of the scene agent and thus enhancing the stability and overall robustness of task execution.

[0141] In some embodiments, after the aforementioned step S74, the task execution method further includes: using the failure case dataset to perform prompt word tuning, that is, performing attribution analysis on the failure case dataset, while intelligently optimizing the prompt words with the goal of optimizing the quantitative indicators, and performing regression evaluation to ensure that the newly generated prompt words will not cause the effect of samples that have already performed well to shift, and finally manually sampling and analyzing the evaluation results. If there are angles that the large model cannot cover, the model needs to be fine-tuned for specific points.

[0142] This disclosed solution introduces a contextual reflection process for complex tasks or multi-turn reasoning. It structurally rewrites historical dialogues, tool call chains, prompts, and short-term memory, eliminating inconsistencies, filling in missing steps, ensuring the integrity of reasoning logic, and rewriting the user's core intent. This avoids interference from old information, thereby improving the accuracy, stability, and reliability of task execution. Simultaneously, it stores and reflects on short-term and long-term memory separately. Short-term memory is used for immediate context alignment, while long-term memory is used to solidify user habits and analyze typical business scenarios. This reduces the probability of scenario agents misunderstanding user preferences or repeating errors, resulting in better task execution consistency and greater adaptability.

[0143] This disclosure embodiment can divide the task execution device into functional modules according to the above method example. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing unit. The integrated modules can be implemented in hardware or as software functional modules. It should be noted that the module division in this disclosure embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.

[0144] In addition, such as Figure 10 As shown, Figure 10 This is a schematic diagram of the structure of a task execution device 700 provided in an embodiment of the present disclosure. The task execution device 700 includes a determination module 701, an acquisition module 702, and an execution module 703.

[0145] The determination module 701 is used to determine whether a rapid reflection process needs to be triggered when the user request is executed through the scenario agent corresponding to the user request. The scenario agent is a domain intelligent agent that integrates a large language model and tool invocation capabilities, and is used to execute tasks in the domain of the user request. The determination module 701 is also used to determine whether the quantitative indicators of the initial execution result of the scenario agent execution task meet the reference standard when it is determined that a rapid reflection process needs to be triggered. The quantitative indicators are used to characterize the correlation between the initial execution result and the user request. The acquisition module 702 is used to acquire the recorded data during task execution when the quantitative indicators do not meet the reference standard. The recorded data includes the data corresponding to the entire execution process when the scenario agent executes the task. The execution module 703 is used to generate strategy correction suggestions based on the recorded data, and to re-execute the task corresponding to the user request based on the strategy correction suggestions to obtain the target execution result. The strategy correction suggestions are used to correct the execution strategy when the scenario agent executes the task.

[0146] In some embodiments, the determining module 701 is specifically used for: Before executing the task corresponding to the user request through the scenario proxy corresponding to the user request, the scenario proxy corresponding to the user request is determined from the preset mapping relationship using the user request; the preset mapping relationship includes the mapping relationship between historical user requests and scenario proxies; or, Before executing the task corresponding to the user request through the scene agent corresponding to the user request, the user request is input into a pre-trained scene recognition model to determine the scene agent corresponding to the user request.

[0147] In some embodiments, the acquisition module 702 is further configured to acquire context information corresponding to the original request within a first time period when receiving the original request from the user before executing the task corresponding to the user request through the scenario agent corresponding to the user request; the first time period includes the moment when the original request is received, and the context information is information related to the original request input by the user; The execution module 703 is also used to identify typos and pronouns in the original request, and to correct typos and pronouns according to the context information to obtain the user request.

[0148] In some embodiments, the determining module 701 is specifically used for: Obtain the prompt word template and match multiple candidate prompt words from the preset prompt word library according to the user's request; Fill multiple candidate prompts into the prompt template to obtain the current prompt; Based on the current prompt word, the scene proxy executes the task corresponding to the user's request.

[0149] In some embodiments, the determining module 701 is specifically used for: Identify the number of intents corresponding to user requests; When the number of intentions exceeds a certain threshold, it is determined that a rapid reflection process needs to be triggered. When the number of intentions is less than or equal to the number threshold, it is determined that a rapid reflection process does not need to be triggered.

[0150] In some embodiments, the execution module 703 is specifically used for: Based on the policy modification suggestions, the task corresponding to the user request is executed again to obtain the modified execution result; Determine whether the quantitative indicators of the modified execution results meet the reference standards; If the quantitative indicators of the modified execution results do not meet the reference standards, new strategy correction suggestions are generated based on the recorded data of the modified execution results. The task corresponding to the user request is executed again based on the new strategy revision suggestions until the quantitative indicators of the task execution result reach the reference standard and the target execution result is obtained, or the number of modifications exceeds the threshold of the first time; the number of modifications is the number of times the task corresponding to the user request is executed based on the strategy revision suggestions.

[0151] In some embodiments, the determining module 701 is further configured to determine the initial execution result as the target execution result if it is determined from a user request that a rapid reflection process does not need to be triggered, or if the quantitative indicators reach a reference standard.

[0152] In some embodiments, the determining module 701 is further configured to: Before determining whether the quantitative indicators of the initial execution results of the scenario agent's execution tasks meet the reference standards, determine whether it is necessary to supplement user requests based on the recorded data; If it is determined from the recorded data that additional user requests need to be added, the number of additions is determined; the number of additions is the number of times the user adds a user request. If the number of attempts to replenish is less than or equal to the threshold for the second attempt, a replenishment prompt will be returned. Upon receiving supplementary data, return the steps for executing the task through the scenario agent until the target execution result is obtained, or the number of supplementary data attempts exceeds the threshold for the second attempt. If it is determined from the recorded data that no additional user requests are needed, determine whether the quantitative indicators of the initial execution results of the scenario agent task meet the reference standards.

[0153] In some embodiments, the determining module 701 is specifically used for: Identify at least one user intent corresponding to the user request; When the initial execution results show that each user intent has been executed, the quantitative indicators of the initial execution results are determined to have reached the reference standard.

[0154] In some embodiments, the execution module 703 is further configured to return the target execution result after obtaining the target execution result; The acquisition module 702 is also used to acquire the user's feedback information corresponding to the user's request within the second time period; the time interval between the first moment in the second time period and the moment when the target execution result is returned is less than the preset time interval; The acquisition module 702 is also used to acquire the user's historical data in the third time period when the feedback information is negative feedback; the last moment of the third time period is earlier than the first moment of the second time period. The execution module 703 is also used to generate historical strategy correction suggestions based on historical data, and to add the historical data and historical strategy correction suggestions to the failure case dataset; the failure case dataset is used to optimize the prompt word templates corresponding to the scene agent.

[0155] In some embodiments, the execution module 703 is further configured to add the recorded data to the success case dataset when the feedback information is positive; the success case dataset is used to provide data support for constructing user preference tags.

[0156] In some embodiments, the scene agent is a scene agent in the field of vehicle intelligent cockpit.

[0157] Regarding the apparatus in the above embodiments, the specific manner in which each unit performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0158] Figure 11 This is a schematic diagram of the structure of an electronic device 800 provided in an embodiment of this disclosure. For example, as shown... Figure 11 As shown, the electronic device 800 includes a memory 801 and a processor 802. The memory 801 stores executable program code 8011, and the processor 802 is used to call and execute the executable program code 8011 to perform a task execution method.

[0159] This embodiment can divide the task execution system into functional modules based on the above method example. For example, each module can correspond to a separate functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.

[0160] When each functional module is divided according to its corresponding function, the task execution system may include: a determination module, an acquisition module, and an execution module. It should be noted that all relevant content of each step involved in the above method embodiments can be referenced from the functional descriptions of the corresponding functional modules, and will not be repeated here.

[0161] The task execution system provided in this embodiment is used to execute the above-described task execution method, and thus can achieve the same effect as the above-described implementation method.

[0162] When using integrated units, the task execution system may include a processing module and a storage module. The processing module is used to control and manage the actions of the task execution system. The storage module is used to support the execution of program code and data by the task execution system.

[0163] The processing module may be a processor or a controller, which can implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with embodiments of this disclosure. The processor may also be a combination of functions that implement computing capabilities, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc., and the storage module may be a memory.

[0164] This disclosure also provides a vehicle including the above-described task execution system.

[0165] This disclosure also provides a computer-readable storage medium (including but not limited to disk storage, compact disc read-only memory (CD-ROM), optical storage, etc.) storing computer program code. When the computer program code is run on a computer, the computer executes the above-described related method steps to implement a task execution method provided in the above embodiments.

[0166] This disclosure also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned steps to implement a task execution method provided in the above embodiments.

[0167] The beneficial effects of the above embodiments can be referred to the beneficial effects of the corresponding methods provided above, and will not be repeated here.

[0168] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0169] In the embodiments provided in this disclosure, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.

[0170] In the description of this disclosure, it should be understood that if the terms "upper", "lower", "front", "rear", "left" and "right" are used to indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the position or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this disclosure.

[0171] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.

[0172] The above are merely embodiments of this disclosure and are not intended to limit the scope of this disclosure. Various modifications and variations can be made to this disclosure by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the scope of the claims of this disclosure.

Claims

1. A task execution method characterized by, The method comprises: In the case of executing the task corresponding to the user request by the scenario agent corresponding to the user request, determining whether the quick reflection process needs to be triggered according to the user request, wherein the scenario agent is a domain intelligent agent integrating a large language model and a tool calling capability, and is used for executing a task in a field to which the user request belongs; In the case of determining that the quick reflection process needs to be triggered, determining whether a quantitative index of an initial execution result of the scenario agent executing the task reaches a reference standard, wherein the quantitative index is used for representing the correlation between the initial execution result and the user request; In the case of the quantitative index not reaching the reference standard, obtaining record data when the task is executed, wherein the record data comprises data corresponding to the whole execution process when the scenario agent executes the task; Generating a strategy correction suggestion according to the record data, and executing the task corresponding to the user request again according to the strategy correction suggestion to obtain a target execution result, wherein the strategy correction suggestion is used for correcting the execution strategy when the scenario agent executes the task.

2. The task execution method according to claim 1, wherein, Before executing the task corresponding to the user request by the scenario agent corresponding to the user request, the method further comprises: Determining the scenario agent corresponding to the user request from a preset corresponding relationship by using the user request, wherein the preset corresponding relationship comprises a mapping relationship between historical user requests and scenario agents; Or, Inputting the user request into a pre-trained scenario identification model to determine the scenario agent corresponding to the user request.

3. The task execution method according to claim 1, wherein Before executing the task corresponding to the user request by the scenario agent corresponding to the user request, the method further comprises: When receiving an original request from a user, obtaining context information corresponding to the original request in a first time period, wherein the first time period comprises a time point at which the original request is received, and the context information is information input by the user and related to the original request; Identifying errors and pronouns in the original request, and modifying the errors and the pronouns according to the context information to obtain the user request.

4. The task execution method according to claim 1, wherein The execution of the task corresponding to the user request by the scenario agent corresponding to the user request comprises: Obtaining a prompt word template, and matching a plurality of candidate prompt words from a preset prompt word library according to the user request; Filling the plurality of candidate prompt words into the prompt word template to obtain a current prompt word; Executing the task corresponding to the user request by the scenario agent according to the current prompt word.

5. The task execution method according to claim 1, wherein The determination of whether the quick reflection process needs to be triggered according to the user request comprises: Identifying the number of intents corresponding to the user request; In the case of the number of intents being greater than a quantity threshold, determining that the quick reflection process needs to be triggered; In the case of the number of intents being less than or equal to the quantity threshold, determining that the quick reflection process does not need to be triggered.

6. The task execution method according to claim 1, wherein The execution of the task corresponding to the user request again according to the strategy correction suggestion to obtain a target execution result comprises: Executing the task corresponding to the user request again according to the strategy correction suggestion to obtain a modified execution result; determine whether a quantitative indicator of the modification execution result reaches a reference standard; in a case where the quantitative indicator of the modification execution result does not reach the reference standard, generate a new strategy modification suggestion according to record data of the modification execution result; execute the task corresponding to the user request again according to the new strategy modification suggestion until a quantitative indicator of a task execution result corresponding to the user request reaches the reference standard, so as to obtain a target execution result, or a number of modifications is greater than a first number threshold; the number of modifications is a number of times of executing the task corresponding to the user request according to the strategy modification suggestion.

7. The task execution method according to claim 1, wherein The method further comprises: in a case where it is determined according to the user request that the quick reflection process does not need to be triggered, or in a case where the quantitative indicator reaches the reference standard, determine the initial execution result as the target execution result.

8. The task execution method according to claim 6, wherein Before determining whether the quantitative indicator of the initial execution result of the task executed by the scene agent reaches the reference standard, the method further comprises: determine whether the user request needs to be supplemented according to the record data; in a case where it is determined according to the record data that the user request needs to be supplemented, determine a number of supplements; the number of supplements is a number of times of supplementing the user request by the user; when the number of supplements is less than or equal to a second number threshold, return a supplement prompt; when the supplement data is received, return the step of executing the task by the scene agent until the target execution result is obtained, or the number of supplements is greater than the second number threshold; in a case where it is determined according to the record data that the user request does not need to be supplemented, determine whether the quantitative indicator of the initial execution result of the task executed by the scene agent reaches the reference standard.

9. The task execution method according to claim 1, wherein The determination of whether the quantitative indicator of the initial execution result of the task executed by the scene agent reaches the reference standard comprises: identify at least one user intent corresponding to the user request; in a case where the initial execution result displays that each user intent is executed, determine that the quantitative indicator of the initial execution result reaches the reference standard.

10. The task execution method according to claim 1, wherein After the target execution result is obtained, the method further comprises: return the target execution result; obtain feedback information of the user corresponding to the user request in a second time period; a time length between a first time point in the second time period and a time point of returning the target execution result is less than a preset time length; in a case where the feedback information is negative feedback, obtain historical record data of the user in a third time period; a last time point in the third time period is earlier than the first time point in the second time period; generate a historical strategy modification suggestion according to the historical record data, and add the historical record data and the historical strategy modification suggestion to a failure case data set; the failure case data set is used to optimize a prompt word template corresponding to the scene agent.