Business processing method and device of intelligent agent, computer device and storage medium

By breaking down the problem into multiple sequentially executed steps and assembling context and validation logic before each step, the problem of missing logic or overlapping errors in agent execution is solved, improving processing accuracy and user experience.

CN121349643BActive Publication Date: 2026-04-17BEIJING LINGYI VISION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING LINGYI VISION TECH CO LTD
Filing Date
2025-12-18
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing intelligent agents are prone to logical gaps or overlapping errors when performing tasks, leading to deviations in processing results and affecting accuracy.

Method used

The target problem is broken down into multiple sequential processing steps, and a context is assembled before each step to execute the corresponding processing step rules and result verification logic. This ensures that each step is executed independently and works together to avoid logical omissions or the accumulation of errors.

Benefits of technology

It improves the accuracy of intelligent agents in handling problems, reduces the risk of logical omissions or overlapping errors, and enhances user interaction experience and business value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121349643B_ABST
    Figure CN121349643B_ABST
Patent Text Reader

Abstract

This application discloses a business processing method, apparatus, computer device, and storage medium for intelligent agents. The method includes: acquiring a target problem input by a user; splitting the corresponding execution chain into multiple sequentially executed processing steps; determining the currently executed target processing step; determining the target context corresponding to the target processing step based on the context assembly rules; executing the target processing step according to the target context and the processing step rules; validating the step execution result according to result verification logic; if the verification passes, writing the step execution result into a context repository, updating the target processing step, and returning to the step of executing the target context for assembling the target processing step, until all processing steps are completed, generating and outputting the processing result of the target problem. Implementing the method provided in this application can improve the accuracy of intelligent agents in processing problems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to business processing methods, apparatus, computer equipment and storage media for intelligent agents. Background Technology

[0002] With the rapid development of artificial intelligence technology, intelligent agents (AI) have gradually become one of the main ways for humans to interact with large language models, and their intelligent characteristics have been widely used in many business fields.

[0003] Existing intelligent agents have been widely used in various scenarios such as professional question answering, information aggregation and organization, intelligent customer service, role-playing, and enterprise process automation, significantly improving user experience and work efficiency.

[0004] However, current intelligent agents are prone to logical gaps or overlapping errors when performing tasks, which can lead to deviations in the execution results and affect the accuracy of the intelligent agent in handling problems. Summary of the Invention

[0005] This application provides a business processing method, apparatus, computer equipment, and storage medium for intelligent agents, which can improve the accuracy of intelligent agents in processing problems.

[0006] In a first aspect, embodiments of this application provide a business processing method for an intelligent agent, comprising:

[0007] The target problem for obtaining user input;

[0008] The execution chain corresponding to the target problem is broken down into multiple sequentially executed processing steps;

[0009] The target processing step to be executed is determined from the plurality of processing steps;

[0010] Based on the context assembly rules corresponding to the target processing step, the target context corresponding to the target processing step is determined from the context repository corresponding to the execution chain;

[0011] Obtain the target execution template corresponding to the target processing step from a plurality of preset execution templates. The target execution template includes processing step rules and result verification logic.

[0012] The target processing steps are executed according to the target context and the processing step rules to obtain the step execution result;

[0013] The execution result of the step is verified according to the result verification logic;

[0014] If the verification of the execution result of the step passes, the execution result of the step is written into the context repository, and the next processing step of the target processing step in the multiple processing steps is updated to the target processing step. Then, the step of determining the target context corresponding to the target processing step from the context repository corresponding to the execution chain according to the context assembly rule corresponding to the target processing step is returned to be executed until all processing steps are completed, and the processing result of the target problem is generated and output.

[0015] In some embodiments, after verifying the result of the step execution according to the result verification logic, the method further includes:

[0016] If the verification of the result of the step fails, the error handling process corresponding to the target processing step is triggered.

[0017] In some embodiments, the step of splitting the execution chain corresponding to the target problem into multiple sequentially executed processing steps includes:

[0018] The target problem is semantically understood, and whether the target problem is a complex problem is determined according to a preset complex problem determination rule;

[0019] If the target problem is a complex problem, then the preset first execution chain is determined as the execution chain corresponding to the target problem, and the execution chain is broken down into memory usage identification steps, business type identification steps, problem completion identification steps, planning steps, tool identification and invocation steps, and result identification and display steps;

[0020] If the target problem is not a complex problem, then the preset second execution chain is determined as the execution chain corresponding to the target problem, and the execution chain is broken down into memory usage identification steps, business type identification steps, problem completion identification steps, tool identification and invocation steps, and result identification and display steps.

[0021] In some embodiments, when the target processing step is the business type identification step, the target context includes the target question; the step of executing the target processing step according to the target context and the processing step rules to obtain the step execution result includes:

[0022] The target problem is semantically matched with multiple preset candidate business types to determine the matching confidence level for each candidate business type.

[0023] The candidate business type with the highest matching confidence is determined as the target business type, and the target business type is used as the result of the step.

[0024] In some embodiments, when the target processing step completes the problem identification step, the target context includes the target problem and the target business type corresponding to the target problem obtained based on the business type identification step; the step of executing the target processing step according to the target context and the processing step rules to obtain the step execution result includes:

[0025] Based on the preset correspondence between business types and key elements, determine at least one target key element corresponding to the target business type, and determine the knowledge base corresponding to the target business type;

[0026] Based on at least one of the target key elements and the knowledge base, the completeness of the target question is verified to obtain the completeness verification result.

[0027] When the completeness check result is "passed", the completeness check result is determined as the result of the step execution.

[0028] When the completeness check result is a failure, supplementary prompt information is generated and output.

[0029] Receive supplementary information input by the user based on the supplementary prompt information;

[0030] Write the supplementary information into the context repository, update the target question in the context repository according to the supplementary information, and return to execute the step of performing a question completeness check on the target question based on at least one of the target key elements and the knowledge base to obtain a completeness check result.

[0031] In some embodiments, when the target processing step is the planning step, the target context includes the target problem and the target business type corresponding to the target problem obtained based on the business type identification step; the step of executing the target processing step according to the target context and the processing step rules to obtain the step execution result includes:

[0032] Based on the target problem and the target business type, the target problem is decomposed into multiple sub-tasks;

[0033] The logical dependencies between subtasks are analyzed by reasoning through the thought chain, and the subtasks are sorted according to the dependencies to obtain a subtask queue, and the subtask queue is determined as the execution result of the step.

[0034] The step of verifying the execution result of the step according to the result verification logic includes:

[0035] The feasibility and integrity of the subtask queue are verified through a self-reflection mechanism.

[0036] If both the feasibility check and the integrity check pass, the result of the step execution is determined to have passed the check; otherwise, the result of the step execution is determined to have failed the check.

[0037] In some embodiments, when the target processing step is the tool identification and invocation step, the target context includes the target problem, the target business type corresponding to the target problem obtained based on the business type identification step, and at least one subtask corresponding to the target problem; the step of executing the target processing step according to the target context and the processing step rules to obtain the step execution result includes:

[0038] For each subtask, the task description of the subtask is parsed to determine the function type and input parameters of the required tools;

[0039] Call the target tool corresponding to the function type and the target business type from the preset tool registry or the preset external tool interface;

[0040] Based on the input parameters and the target tool, the sub-tasks are executed to obtain the step processing results corresponding to each sub-task.

[0041] Secondly, embodiments of this application also provide a business processing device for an intelligent agent, comprising:

[0042] The acquisition module is used to acquire the target question input by the user;

[0043] The step processing module is used to break down the execution chain corresponding to the target problem into multiple sequentially executed processing steps; and to determine the target processing step to be executed from the multiple processing steps.

[0044] The context preparation module is used to determine the target context corresponding to the target processing step from the context repository corresponding to the execution chain according to the context assembly rules corresponding to the target processing step.

[0045] The text logic engine module is used to obtain the target execution template corresponding to the target processing step from a plurality of preset execution templates. The target execution template includes processing step rules and result verification logic.

[0046] The step execution module is used to execute the target processing step according to the target context and the processing step rules to obtain the step execution result; to verify the step execution result according to the result verification logic; if the verification of the step execution result passes, the step execution result is written into the context repository, and the next processing step of the target processing step in the multiple processing steps is updated to the target processing step, and the step of determining the target context corresponding to the target processing step from the context repository corresponding to the execution chain according to the context assembly rule corresponding to the target processing step is returned to execute, until all processing steps are executed, and the processing result of the target problem is generated and output.

[0047] Thirdly, embodiments of this application also provide a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described method.

[0048] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, the computer program including program instructions that, when executed by a processor, can implement the above-described method.

[0049] This application provides a business processing method, apparatus, computer device, and storage medium for intelligent agents. The method includes: acquiring a target question input by a user; splitting an execution chain corresponding to the target question into multiple sequentially executed processing steps; determining the currently executed target processing step from the multiple processing steps; determining the target context corresponding to the target processing step from a context repository corresponding to the execution chain according to a context assembly rule corresponding to the target processing step; acquiring a target execution template corresponding to the target processing step from a set of preset execution templates, the target execution template including processing step rules and result verification logic; executing the target processing step according to the target context and the processing step rules to obtain a step execution result; verifying the step execution result according to the result verification logic; if the step execution result passes verification, writing the step execution result into the context repository, updating the next processing step of the target processing step in the multiple processing steps to the target processing step, and returning to execute the step of determining the target context corresponding to the target processing step from the context repository corresponding to the execution chain according to the context assembly rule corresponding to the target processing step, until all processing steps are executed, generating and outputting the processing result of the target question. After obtaining the target problem, the intelligent agent in this embodiment of the application will break down the execution chain corresponding to the target problem into multiple sequentially executed processing steps. Each step is executed independently and cooperates with each other. The corresponding context is dynamically assembled before each processing step and the corresponding result verification logic is executed after each processing step. This avoids the problem of missing logic or the accumulation of errors and improves the accuracy of the intelligent agent in handling the problem. Attached Figure Description

[0050] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0051] Figure 1 A flowchart illustrating the business processing method of the intelligent agent provided in the embodiments of this application;

[0052] Figure 2 A schematic diagram of a sub-process of the business processing method for an intelligent agent provided in an embodiment of this application;

[0053] Figure 3 A schematic block diagram of a business processing device for an intelligent agent provided in the embodiments of this application;

[0054] Figure 4A schematic block diagram of a computer device provided in an embodiment of this application. Detailed Implementation

[0055] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0056] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0057] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0058] It should also be further understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0059] This application provides a business processing method, apparatus, computer equipment, and storage medium for intelligent agents.

[0060] The execution subject of the intelligent agent's business processing method can be the intelligent agent's business processing device provided in the embodiments of this application, or a computer device that integrates the intelligent agent's business processing device. The intelligent agent's business processing device can be implemented in hardware or software. The computer device can be a terminal or a server, and the intelligent agent provided in this application is deployed in the computer device. The method provided in this embodiment is specifically implemented through the intelligent agent provided in this application. When the computer device is a terminal, the user can directly interact with the intelligent agent through the terminal. When the computer device is a server, the user needs to interact with the intelligent agent in the server through the corresponding user terminal. The server can be a cloud server or a local server.

[0061] Figure 1 This is a flowchart illustrating the business processing method of the intelligent agent provided in the embodiments of this application. For example... Figure 1 As shown, the method includes the following steps S110-S180.

[0062] S110, The target problem for obtaining user input.

[0063] In this embodiment, the user can open the dialog box of the intelligent agent provided in this application embodiment, and then enter the target question in the dialog box so that the intelligent agent can obtain the target question.

[0064] For example, a user might type "Please help me retrieve the information and resume of the employee I interviewed last day" in the agent's dialog box.

[0065] S120. The execution chain corresponding to the target problem is broken down into multiple sequentially executed processing steps.

[0066] In this embodiment, the execution chain corresponding to the target problem is fixedly divided into multiple sequentially executed processing steps, wherein the multiple sequentially executed processing steps in this application are the planning steps for the intelligent agent to process the target problem.

[0067] Specifically, in some embodiments, please refer to Figure 2 Step S120 includes:

[0068] S1201. Perform semantic understanding on the target problem and determine whether the target problem is a complex problem according to the preset complex problem determination rules;

[0069] The intelligent agent provided in this embodiment is a large language model, which can understand semantics and determine whether the target problem is a complex problem through the capabilities of the large language model. Specifically, based on the target problem and the target business type obtained based on the business type identification step, the complexity of the target problem is evaluated by the large language model.

[0070] The factors on which the assessment is based include at least one of the following:

[0071] The number of subtasks implied in the target problem (this is a preliminary assessment; the planning steps are a precise breakdown of the subtasks).

[0072] The number and types of tools required to solve the problem;

[0073] The ambiguity and vagueness of the target problem semantics;

[0074] The degree to which the processing complexity matches that of similar historical problems;

[0075] Preset complexity level corresponding to the target business type;

[0076] If the evaluation result exceeds a preset threshold, where different evaluation factors have different preset thresholds, for example, if the number of subtasks implied in the target problem is greater than 1, the number or types of tools required to be called are greater than 1, the ambiguity and vagueness of the target problem semantics are greater than a preset value, or the complexity level corresponding to the target business type is greater than a preset complexity level (in this embodiment, different complexity levels can be preset for different business types), then it is determined to be a complex problem; otherwise, it is determined to be a simple problem (not a complex problem).

[0077] S1202. If the target problem is a complex problem, then the preset first execution chain is determined as the execution chain corresponding to the target problem, and the execution chain is broken down into memory usage identification steps, business type identification steps, problem completion identification steps, planning steps, tool identification and invocation steps, and result identification and display steps.

[0078] S1203. If the target problem is not a complex problem, then the preset second execution chain is determined as the execution chain corresponding to the target problem, and the execution chain is broken down into memory usage identification steps, business type identification steps, problem completion identification steps, tool identification and invocation steps, and result identification and display steps.

[0079] In this embodiment, the second execution chain has fewer planning steps than the first execution chain. Therefore, after the agent obtains the current input question, it intelligently calls the corresponding execution chain according to the needs of the current question. For simple questions, the second execution chain with fewer steps is called, which improves the response speed of the agent.

[0080] S130. Determine the target processing step to be executed from among the plurality of processing steps.

[0081] In this embodiment, the processing steps are executed sequentially according to their execution order. That is, the processing steps in this embodiment are executed in series to ensure that the previous processing step is correct before the next step is executed, thus avoiding the accumulation of errors that could affect the accuracy of the agent.

[0082] S140. Based on the context assembly rules corresponding to the target processing step, determine the target context corresponding to the target processing step from the context repository corresponding to the execution chain.

[0083] In this embodiment, before each processing step, the corresponding context needs to be assembled specifically for the currently executed processing step, thereby improving the accuracy of the step processing.

[0084] In this embodiment, different context assembly rules are pre-set for different types of processing steps. The context repository of the execution chain is a "bus" shared by each processing step in the current execution chain. Each step can read the required data from the "bus" to assemble the corresponding context and achieve orderly connection and information transmission between steps.

[0085] Specifically, before each step is executed, the required context is automatically prepared, including corresponding prompt word templates, knowledge retrieval, instant messages (such as target questions), long / short-term memory, and various other data from business data.

[0086] S150. Obtain the target execution template corresponding to the target processing step from a plurality of preset execution templates. The target execution template includes processing step rules and result verification logic.

[0087] In this embodiment, the agent has different execution templates for different processing steps. The execution template includes processing step rules and result verification logic. The processing step rules guide the agent on how to execute the current step, and the result verification logic is used to verify the current execution result of the agent.

[0088] Specifically, in this embodiment, the execution template uses text logic instead of code logic, which makes it easier for users to adjust the processing step rules and / or result verification logic in the execution template. In this embodiment, the step rules and verification logic in the execution template are implemented through a template engine.

[0089] The result verification logic includes at least one of the following: format verification, result value verification, and logical rationality verification.

[0090] S160. Execute the target processing steps according to the target context and the processing step rules to obtain the step execution result.

[0091] In some embodiments, when the target processing step is the memory usage recognition step, the corresponding processing step rule indicates that a large language model is invoked to determine whether historical memory needs to be invoked based on semantics.

[0092] For example, when the target question is "How is the weather today?", the semantics of this sentence will not call up memory; when the target question is "How is the weather in the area we are going to visit?", the semantics of this sentence will call up memory. If historical memory is called up, the memory to be called up needs to be put into the context repository for easy retrieval in subsequent steps.

[0093] This embodiment can use logical rationality verification to verify the execution result of the memory usage identification step, and further verify whether the current problem really needs or does not need to call memory.

[0094] In some embodiments, when the target processing step is the business type identification step, the target context includes the target question; the step of executing the target processing step according to the target context and the processing step rules to obtain the step execution result includes:

[0095] The target problem is semantically matched with multiple preset candidate business types to determine the matching confidence level of each candidate business type; the candidate business type with the highest matching confidence level is determined as the target business type, and the target business type is used as the result of the step.

[0096] In this embodiment, multiple different business types are preset. The intelligent agent uses the understanding ability of the large language model to perform semantic matching between the target problem and the multiple preset candidate business types, and determines the most matching business type as the target business type corresponding to the target problem.

[0097] For example, if the target question is "What is the revenue of Company A?", by analyzing the question, it is determined that the question is most matched with the "data analysis" category among the candidate business types. In this case, the target business type is "data analysis".

[0098] This embodiment can use logical rationality verification to verify the execution result of the business type identification step, and further verify whether the currently identified business type is truly matched.

[0099] In some embodiments, when the target processing step is a problem completion identification step, the target context includes the target problem and the target business type corresponding to the target problem obtained based on the business type identification step; the step of executing the target processing step according to the target context and the processing step rules to obtain the step execution result includes:

[0100] Based on the preset correspondence between business types and key elements, at least one target key element corresponding to the target business type is determined, as well as a knowledge base corresponding to the target business type. The target question is then subjected to a completeness check based on at least one target key element and the knowledge base to obtain a completeness check result. When the completeness check result is passed, it is determined as the execution result of the step. When the completeness check result is failed, supplementary information is generated and output. Supplementary information input by the user based on the supplementary information is received. The supplementary information is written into the context repository, the target question in the context repository is updated based on the supplementary information, and the process returns to the step of performing a completeness check on the target question based on at least one target key element and the knowledge base to obtain a completeness check result.

[0101] In this embodiment, the pre-defined correspondence between business types and key elements includes different key elements for different business types, as well as different knowledge bases for different business types.

[0102] For example, the business type identification step identifies the target business type of the question "What is Company A's revenue?" as "Data Analysis". By analyzing the correspondence between business types and key elements, it is found that the key elements corresponding to "Data Analysis" include "indicators" (such as revenue) and "time dimension". Through testing the target question and the knowledge base, it is discovered that the target question lacks the "time dimension". At this point, a supplementary information prompt is generated and output: "Please specify the time range for the query, for example, 'What was Company A's revenue in 2023?'". After receiving the user's supplementary information, further completeness verification is performed based on this information.

[0103] In some embodiments, when the target processing step is the planning step, the target context includes the target problem and the target business type corresponding to the target problem obtained based on the business type identification step; the step of executing the target processing step according to the target context and the processing step rules to obtain the step execution result includes:

[0104] Based on the target problem and target business type, the target problem is decomposed into multiple sub-tasks; the logical dependencies between the sub-tasks are analyzed through thinking chain reasoning, and the multiple sub-tasks are sorted based on the dependencies to obtain a sub-task queue, and the sub-task queue is determined as the execution result of the step;

[0105] The step of verifying the execution result of the step according to the result verification logic includes:

[0106] The feasibility and integrity of the subtask queue are checked through a self-reflection mechanism (such as logical rationality verification); if both the feasibility and integrity verifications pass, the verification of the step execution result is determined to be successful; otherwise, the verification of the step execution result is determined to be unsuccessful.

[0107] In complex problem scenarios, this embodiment can generate an execution plan through self-reflection, thought chain, and goal decomposition, thereby achieving autonomous planning and decision-making.

[0108] In some embodiments, when the target processing step is the tool identification and invocation step, the target context includes the target problem, the target business type corresponding to the target problem obtained based on the business type identification step, and at least one subtask corresponding to the target problem; the step of executing the target processing step according to the target context and the processing step rules to obtain the step execution result includes:

[0109] For each subtask, the task description of the subtask is parsed to determine the function type and input parameters of the required tool; the target tool corresponding to the function type and the target business type is called from the preset tool registry or the preset external tool interface; the subtask is executed based on the input parameters and the target tool to obtain the step processing results corresponding to each subtask.

[0110] This embodiment loads the tools required for each subtask, and then executes the corresponding subtask using the loaded tools.

[0111] In this embodiment, the tool identification and invocation step is connected to the extended interface module. The extended interface module is used to dynamically bind external tools during the execution of the steps (through external tool interfaces) and supports compatibility with the MCP (Model Context Protocol) to enhance cross-system collaboration capabilities. This dynamically improves the agent's analytical capabilities and reduces the agent's size.

[0112] This embodiment can use logical rationality verification to verify the execution results of the tool identification and invocation steps, further verify whether the currently invoked tool is correct, and verify whether the tool was invoked successfully.

[0113] In some embodiments, when the target processing step is the result identification and display step, the corresponding processing step rules aggregate, filter and transform the results of each processing step and the results of each subtask to generate the final result set. The embodiments have different visualization logics for different business types, and the result set is visualized in various forms such as text, pictures, charts, tables, form interfaces, flowcharts, and relationship graphs according to the corresponding business type.

[0114] This embodiment will perform format verification and result value verification on the results of each subtask in the result set.

[0115] S170. Verify the execution result of the step according to the result verification logic.

[0116] In this embodiment, the result verification logic includes at least one of format verification, result value verification, and logical rationality verification.

[0117] S180. If the verification of the execution result of the step passes, the execution result of the step is written into the context repository, and the next processing step of the target processing step in the multiple processing steps is updated to the target processing step. Then, the execution of step S140 is returned until all processing steps are completed, and the processing result of the target problem is generated and output.

[0118] Furthermore, if the verification of the result of the step fails, the error handling process corresponding to the target processing step is triggered.

[0119] In some embodiments, triggering the error handling process includes at least one of the following methods, the selection of which depends on the type of the target processing step:

[0120] A. When the target processing step is a planning step, the error handling process includes: inputting the failed plan and the reason for the failure into the large language model, requesting it to be corrected and generate a new execution plan, and then re-executing the verification on the new plan;

[0121] B. When the target processing step is the problem completion and identification step, the error handling process includes: generating user-oriented, guiding follow-up questions based on the reason for the verification failure, and pausing the current process until a user response is obtained;

[0122] C. When the target processing step is a business type identification or tool invocation step, the error handling process includes: executing a predefined backup strategy, or recording the error and returning a standardized error result containing error codes and prompts to the upstream.

[0123] Specifically, the construction and execution of the intelligent agent in this embodiment follow the design principle of "divide and conquer processing + textual logic + strict verification". Specifically:

[0124] 1. Step-by-step decomposition: The user input question is broken down into several logical steps, each of which is executed independently and works together to reduce the accumulation of bias caused by the excessively long reasoning chain of a large language model;

[0125] 2. Context preparation: Before each step is executed, the context information required for that step is automatically assembled. The context design includes, but is not limited to, prompt word templates, knowledge retrieval, instant messaging, long-term memory, short-term memory, and business data to ensure the completeness and relevance of the input content of the large language model.

[0126] 3. Result Validation: After each step is executed, the output is ensured to meet expectations through mechanisms such as format validation, result value validation, and logical rationality validation. These validation rules are all expressed in text logic form and implemented through template engine technology, so that developers can define logical rules without relying on complex code.

[0127] 4. Structured Representation: Contextual information and step logic are ultimately transformed into structured text that is easy for large language models to understand, thereby reducing the model's misjudgment rate for complex inputs and improving the stability of the generated results.

[0128] Furthermore, the intelligent agent provided in this application has strong versatility and scalability, and can be widely applied to various artificial intelligence application scenarios, including but not limited to:

[0129] Intelligent knowledge service scenarios:

[0130] By breaking down the knowledge retrieval and question-answering processes into steps, the intelligent knowledge base can be dynamically expanded and multi-round accurate question answering can be achieved. It is applicable to fields such as professional document parsing, enterprise knowledge base consulting, and contract or legal interpretation.

[0131] Intelligent data analysis and visualization scenarios:

[0132] Users only need to input natural language to trigger the system to query, analyze and aggregate data sources, and generate various charts, reports or knowledge graphs step by step. It is suitable for scenarios such as intelligent data querying, business intelligence (BI) analysis, and operation monitoring.

[0133] Intelligent business processing scenarios:

[0134] Users trigger business processes through natural language commands, and the system automatically completes form filling, business rule validation, and result submission. It is suitable for scenarios such as intelligent business acceptance, online customer service, work order processing, and approval workflow automation.

[0135] Intelligent decision-making and planning scenarios:

[0136] The system can generate an execution plan step by step and call the corresponding tools based on the complexity of the problem and context information. It is suitable for project management, production scheduling, task decomposition, strategy deduction and personalized recommendation.

[0137] By applying the above scenarios, this invention can effectively improve the accuracy and reliability of intelligent agents in handling complex tasks, reduce development and maintenance costs, and significantly enhance user interaction experience and business value.

[0138] In summary, after the agent in this embodiment of the application obtains the target problem, it will break down the execution chain corresponding to the target problem into multiple sequentially executed processing steps. Each step is executed independently and cooperates with each other. Furthermore, the corresponding context is dynamically assembled before each processing step, and the corresponding result verification logic is executed after each processing step. This avoids the problem of missing logic or overlapping errors and improves the accuracy of the agent in handling the problem.

[0139] Figure 3 This is a schematic block diagram of a business processing device for an intelligent agent provided in an embodiment of this application. Figure 3 As shown, corresponding to the above-described intelligent agent business processing method, this application also provides an intelligent agent business processing apparatus 300. This intelligent agent business processing apparatus 300 includes a unit for executing the above-described intelligent agent business processing method, and can be configured in a desktop computer, tablet computer, laptop computer, or other terminal. Specifically, please refer to... Figure 3 The business processing device 300 of the intelligent agent includes an acquisition module 301, a step processing module 302, a context preparation module 303, a text logic engine module 304, and a step execution module 305, wherein:

[0140] Module 301 is used to obtain the target question input by the user;

[0141] The step processing module 302 is used to break down the execution chain corresponding to the target problem into multiple sequentially executed processing steps; and to determine the target processing step to be executed from the multiple processing steps.

[0142] The context preparation module 303 is used to determine the target context corresponding to the target processing step from the context repository corresponding to the execution chain according to the context assembly rules corresponding to the target processing step.

[0143] The text logic engine module 304 is used to obtain a target execution template corresponding to the target processing step from a plurality of preset execution templates. The target execution template includes processing step rules and result verification logic.

[0144] The step execution module 305 is used to execute the target processing step according to the target context and the processing step rules to obtain the step execution result; to verify the step execution result according to the result verification logic; if the verification of the step execution result passes, the step execution result is written into the context repository, and the next processing step of the target processing step in the multiple processing steps is updated to the target processing step, and the step of determining the target context corresponding to the target processing step from the context repository corresponding to the execution chain according to the context assembly rule corresponding to the target processing step is returned to execute, until all processing steps are executed, and the processing result of the target problem is generated and output.

[0145] In some embodiments, the step execution module 305 is further configured to trigger the error handling process corresponding to the target processing step if the verification of the step execution result fails.

[0146] In some embodiments, when the step processing module 302 performs the step of splitting the execution chain corresponding to the target problem into multiple sequentially executed processing steps, it is specifically used for:

[0147] The target problem is semantically understood, and whether the target problem is a complex problem is determined according to a preset complex problem determination rule;

[0148] If the target problem is a complex problem, then the preset first execution chain is determined as the execution chain corresponding to the target problem, and the execution chain is broken down into memory usage identification steps, business type identification steps, problem completion identification steps, planning steps, tool identification and invocation steps, and result identification and display steps;

[0149] If the target problem is not a complex problem, then the preset second execution chain is determined as the execution chain corresponding to the target problem, and the execution chain is broken down into memory usage identification steps, business type identification steps, problem completion identification steps, tool identification and invocation steps, and result identification and display steps.

[0150] In some embodiments, when the target processing step is the business type identification step, the target context includes the target question; when the step execution module 305 executes the step of executing the target processing step according to the target context and the processing step rules to obtain the step execution result, it is specifically used for:

[0151] The target problem is semantically matched with multiple preset candidate business types to determine the matching confidence level for each candidate business type.

[0152] The candidate business type with the highest matching confidence is determined as the target business type, and the target business type is used as the result of the step.

[0153] In some embodiments, when the target processing step completes the problem identification step, the target context includes the target problem and the target business type corresponding to the target problem obtained based on the business type identification step; when the step execution module 305 executes the step of executing the target processing step according to the target context and the processing step rules to obtain the step execution result, it is specifically used for:

[0154] Based on the preset correspondence between business types and key elements, determine at least one target key element corresponding to the target business type, and determine the knowledge base corresponding to the target business type;

[0155] Based on at least one of the target key elements and the knowledge base, the completeness of the target question is verified to obtain the completeness verification result.

[0156] When the completeness check result is "passed", the completeness check result is determined as the result of the step execution.

[0157] When the completeness check result is a failure, supplementary prompt information is generated and output.

[0158] Receive supplementary information input by the user based on the supplementary prompt information;

[0159] Write the supplementary information into the context repository, update the target question in the context repository according to the supplementary information, and return to execute the step of performing a question completeness check on the target question based on at least one of the target key elements and the knowledge base to obtain a completeness check result.

[0160] In some embodiments, when the target processing step is the planning step, the target context includes the target problem and the target business type corresponding to the target problem obtained based on the business type identification step; when the step execution module 305 executes the step of executing the target processing step according to the target context and the processing step rules to obtain the step execution result, it is specifically used for:

[0161] Based on the target problem and the target business type, the target problem is decomposed into multiple sub-tasks;

[0162] The logical dependencies between subtasks are analyzed by reasoning through the thought chain, and the subtasks are sorted according to the dependencies to obtain a subtask queue, and the subtask queue is determined as the execution result of the step.

[0163] At this time, when the step execution module 305 executes the step of verifying the step execution result according to the result verification logic, it is specifically used for:

[0164] The feasibility and integrity of the subtask queue are verified through a self-reflection mechanism.

[0165] If both the feasibility check and the integrity check pass, the result of the step execution is determined to have passed the check; otherwise, the result of the step execution is determined to have failed the check.

[0166] In some embodiments, when the target processing step is the tool identification and invocation step, the target context includes the target problem, the target business type corresponding to the target problem obtained based on the business type identification step, and at least one subtask corresponding to the target problem; when the step execution module 305 executes the step of executing the target processing step according to the target context and the processing step rules to obtain the step execution result, it is specifically used for:

[0167] For each subtask, the task description of the subtask is parsed to determine the function type and input parameters of the required tools;

[0168] Call the target tool corresponding to the function type and the target business type from the preset tool registry or the preset external tool interface;

[0169] Based on the input parameters and the target tool, the sub-tasks are executed to obtain the step processing results corresponding to each sub-task.

[0170] In summary, after the agent in this embodiment of the application obtains the target problem, it will break down the execution chain corresponding to the target problem into multiple sequentially executed processing steps. Each step is executed independently and cooperates with each other. Furthermore, the corresponding context is dynamically assembled before each processing step, and the corresponding result verification logic is executed after each processing step. This avoids the problem of missing logic or overlapping errors and improves the accuracy of the agent in handling the problem.

[0171] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the above-mentioned intelligent agent's business processing device and each unit can be referred to the corresponding description in the foregoing method embodiments. For the sake of convenience and brevity, it will not be repeated here.

[0172] The aforementioned intelligent agent's business processing device can be implemented as a computer program, which can, for example... Figure 4 It runs on the computer device shown.

[0173] Please see Figure 4 , Figure 4 This is a schematic block diagram of a computer device provided in an embodiment of this application. The computer device 400 can be a terminal or a server, and the intelligent agent provided in this application is deployed in the computer device 400.

[0174] See Figure 4 The computer device 400 includes a processor 402, a memory, and a network interface 405 connected via a system bus 401. The memory may include a non-volatile storage medium 403 and internal memory 404.

[0175] The non-volatile storage medium 403 may store an operating system 4031 and a computer program 4032. The computer program 4032 includes program instructions that, when executed, cause the processor 402 to perform a business processing method for an intelligent agent.

[0176] The processor 402 provides computing and control capabilities to support the operation of the entire computer device 400.

[0177] The internal memory 404 provides an environment for the execution of the computer program 4032 in the non-volatile storage medium 403. When the computer program 4032 is executed by the processor 402, the processor 402 can execute a business processing method of an intelligent agent.

[0178] This network interface 405 is used for network communication with other devices. Those skilled in the art will understand that... Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device 400 to which the present application is applied. The specific computer device 400 may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0179] The processor 402 is used to run a computer program 4032 stored in the memory to perform the following steps:

[0180] The target problem for obtaining user input;

[0181] The execution chain corresponding to the target problem is broken down into multiple sequentially executed processing steps;

[0182] The target processing step to be executed is determined from the plurality of processing steps;

[0183] Based on the context assembly rules corresponding to the target processing step, the target context corresponding to the target processing step is determined from the context repository corresponding to the execution chain;

[0184] Obtain the target execution template corresponding to the target processing step from a plurality of preset execution templates. The target execution template includes processing step rules and result verification logic.

[0185] The target processing steps are executed according to the target context and the processing step rules to obtain the step execution result;

[0186] The execution result of the step is verified according to the result verification logic;

[0187] If the verification of the execution result of the step passes, the execution result of the step is written into the context repository, and the next processing step of the target processing step in the multiple processing steps is updated to the target processing step. Then, the step of determining the target context corresponding to the target processing step from the context repository corresponding to the execution chain according to the context assembly rule corresponding to the target processing step is returned to be executed until all processing steps are completed, and the processing result of the target problem is generated and output.

[0188] It should be understood that in the embodiments of this application, the processor 402 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0189] It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program includes program instructions and can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.

[0190] Therefore, this application also provides a storage medium. This storage medium can be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program includes program instructions. When executed by a processor, the program instructions cause the processor to perform the following steps:

[0191] The target problem for obtaining user input;

[0192] The execution chain corresponding to the target problem is broken down into multiple sequentially executed processing steps;

[0193] The target processing step to be executed is determined from the plurality of processing steps;

[0194] Based on the context assembly rules corresponding to the target processing step, the target context corresponding to the target processing step is determined from the context repository corresponding to the execution chain;

[0195] Obtain the target execution template corresponding to the target processing step from a plurality of preset execution templates. The target execution template includes processing step rules and result verification logic.

[0196] The target processing steps are executed according to the target context and the processing step rules to obtain the step execution result;

[0197] The execution result of the step is verified according to the result verification logic;

[0198] If the verification of the execution result of the step passes, the execution result of the step is written into the context repository, and the next processing step of the target processing step in the multiple processing steps is updated to the target processing step. Then, the step of determining the target context corresponding to the target processing step from the context repository corresponding to the execution chain according to the context assembly rule corresponding to the target processing step is returned to be executed until all processing steps are completed, and the processing result of the target problem is generated and output.

[0199] The storage medium can be any computer-readable storage medium capable of storing program code, such as a USB flash drive, portable hard drive, read-only memory (ROM), magnetic disk, or optical disk.

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

[0201] In the several embodiments provided in this application, 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 example, the division of each unit is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.

[0202] The steps in the methods of this application embodiment can be adjusted, merged, or deleted according to actual needs. The units in the apparatus of this application embodiment can be merged, divided, or deleted according to actual needs. Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0203] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.

[0204] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A business processing method for an intelligent agent, characterized in that, The method is applied to an intelligent agent, and the method includes: The target problem for obtaining user input; The execution chain corresponding to the target problem is broken down into multiple sequentially executed processing steps; The target processing step to be executed is determined from the plurality of processing steps; Based on the context assembly rules corresponding to the target processing step, the target context corresponding to the target processing step is determined from the context repository corresponding to the execution chain; Obtain the target execution template corresponding to the target processing step from a plurality of preset execution templates. The target execution template includes processing step rules and result verification logic. The result verification logic includes at least one of format verification, result value verification and logical rationality verification. The target processing steps are executed according to the target context and the processing step rules to obtain the step execution result; The execution result of the step is verified according to the result verification logic; If the verification of the execution result of the step passes, the execution result of the step is written into the context repository, and the next processing step of the target processing step in the multiple processing steps is updated to the target processing step. The step of determining the target context corresponding to the target processing step from the context repository corresponding to the execution chain according to the context assembly rule corresponding to the target processing step continues to be executed until all processing steps are completed, and the processing result of the target problem is generated and output. The step of breaking down the execution chain corresponding to the target problem into multiple sequentially executed processing steps includes: The target problem is semantically understood, and whether the target problem is a complex problem is determined according to a preset complex problem determination rule; If the target problem is a complex problem, then the preset first execution chain is determined as the execution chain corresponding to the target problem, and the execution chain is broken down into memory usage identification steps, business type identification steps, problem completion identification steps, planning steps, tool identification and invocation steps, and result identification and display steps; If the target problem is not a complex problem, then the preset second execution chain is determined as the execution chain corresponding to the target problem, and the execution chain is broken down into memory usage identification steps, business type identification steps, problem completion identification steps, tool identification and invocation steps, and result identification and display steps; When the target processing step is the planning step, the target context includes the target problem and the target business type corresponding to the target problem obtained based on the business type identification step; the step of executing the target processing step according to the target context and the processing step rules to obtain the step execution result includes: Based on the target problem and the target business type, the target problem is decomposed into multiple sub-tasks; The logical dependencies between subtasks are analyzed by reasoning through the thought chain, and the subtasks are sorted according to the dependencies to obtain a subtask queue, which is then determined as the execution result of the step.

2. The method according to claim 1, characterized in that, After verifying the result of the step execution according to the result verification logic, the method further includes: If the verification of the result of the step fails, the error handling process corresponding to the target processing step is triggered.

3. The method according to claim 1, characterized in that, When the target processing step is the business type identification step, the target context includes the target question; the step of executing the target processing step according to the target context and the processing step rules to obtain the step execution result includes: The target problem is semantically matched with multiple preset candidate business types to determine the matching confidence level for each candidate business type. The candidate business type with the highest matching confidence is determined as the target business type, and the target business type is used as the result of the step.

4. The method according to claim 1, characterized in that, When the target processing step completes the identification step for the problem, the target context includes the target problem and the target business type corresponding to the target problem obtained based on the business type identification step; The step of executing the target processing steps according to the target context and the processing step rules to obtain the step execution result includes: Based on the preset correspondence between business types and key elements, determine at least one target key element corresponding to the target business type, and determine the knowledge base corresponding to the target business type; Based on at least one of the target key elements and the knowledge base, the completeness of the target question is verified to obtain the completeness verification result. When the completeness check result is "passed", the completeness check result is determined as the result of the step execution. When the completeness check result is a failure, supplementary prompt information is generated and output. Receive supplementary information for inputting supplementary prompts based on the aforementioned information; Write the supplementary information into the context repository, update the target question in the context repository according to the supplementary information, and return to execute the step of performing a question completeness check on the target question based on at least one of the target key elements and the knowledge base to obtain a completeness check result.

5. The method according to claim 1, characterized in that, The step of verifying the execution result of the step according to the result verification logic includes: The feasibility and integrity of the subtask queue are verified through a self-reflection mechanism. If both the feasibility check and the integrity check pass, the result of the step execution is determined to have passed the check; otherwise, the result of the step execution is determined to have failed the check.

6. The method according to claim 1, characterized in that, When the target processing step is the tool identification and invocation step, the target context includes the target question, the target business type corresponding to the target question obtained based on the business type identification step, and at least one subtask corresponding to the target question; The step of executing the target processing steps according to the target context and the processing step rules to obtain the step execution result includes: For each subtask, the task description of the subtask is parsed to determine the function type and input parameters of the required tools; Call the target tool corresponding to the function type and the target business type from the preset tool registry or the preset external tool interface; Based on the input parameters and the target tool, the sub-tasks are executed to obtain the step processing results corresponding to each sub-task.

7. A business processing device for an intelligent agent, characterized in that, include: The acquisition module is used to acquire the target question input by the user; The step processing module is used to break down the execution chain corresponding to the target problem into multiple sequentially executed processing steps; and to determine the target processing step to be executed from the multiple processing steps. The context preparation module is used to determine the target context corresponding to the target processing step from the context repository corresponding to the execution chain according to the context assembly rules corresponding to the target processing step. The text logic engine module is used to obtain the target execution template corresponding to the target processing step from a plurality of preset execution templates. The target execution template includes processing step rules and result verification logic. The result verification logic includes at least one of format verification, result value verification and logical rationality verification. The step execution module is used to execute the target processing steps according to the target context and the processing step rules to obtain the step execution result; and to verify the step execution result according to the result verification logic. If the verification of the execution result of the step passes, the execution result of the step is written into the context repository, and the next processing step of the target processing step in the multiple processing steps is updated to the target processing step. The step of determining the target context corresponding to the target processing step from the context repository corresponding to the execution chain according to the context assembly rule corresponding to the target processing step continues to be executed until all processing steps are completed, and the processing result of the target problem is generated and output. When the step processing module executes the step of splitting the execution chain corresponding to the target problem into multiple sequentially executed processing steps, it is specifically used for: The target problem is semantically understood, and whether the target problem is a complex problem is determined according to a preset complex problem determination rule; If the target problem is a complex problem, then the preset first execution chain is determined as the execution chain corresponding to the target problem, and the execution chain is broken down into memory usage identification steps, business type identification steps, problem completion identification steps, planning steps, tool identification and invocation steps, and result identification and display steps; If the target problem is not a complex problem, then the preset second execution chain is determined as the execution chain corresponding to the target problem, and the execution chain is broken down into memory usage identification steps, business type identification steps, problem completion identification steps, tool identification and invocation steps, and result identification and display steps; When the target processing step is the planning step, the target context includes the target problem and the target business type corresponding to the target problem obtained based on the business type identification step; when the step execution module executes the step of executing the target processing step according to the target context and the processing step rules to obtain the step execution result, it is specifically used for: Based on the target problem and the target business type, the target problem is decomposed into multiple sub-tasks; The logical dependencies between subtasks are analyzed by reasoning through the thought chain, and the subtasks are sorted according to the dependencies to obtain a subtask queue, which is then determined as the execution result of the step.

8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The computer device is equipped with an intelligent agent, and when the processor executes the computer program, it implements the business processing method of the intelligent agent as described in any one of claims 1-6.

9. A storage medium, characterized in that, The storage medium stores a computer program, which includes program instructions that, when executed by a processor, cause the processor to perform the business processing method of the intelligent agent as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Automatic process generation method, related device and system, equipment and storage medium

    CN117472478A

  • Project optimization problem rapid modeling method and system based on large language model

    CN118151910A

  • Data analysis method, device and equipment, readable storage medium and program product

    CN120743709A