Intelligent agent interaction method and device, computer equipment and readable storage medium
By identifying the target task through requirement description information and generating task execution summary information using dynamic scripts and application interfaces, the problem of traditional intelligent agents being unable to quickly adapt to display and interaction requirements is solved, achieving rapid adaptation and efficient development.
Patent Information
- Application Number
- CN202511187933.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-22
- Publication Date
- 2025-12-19
AI Technical Summary
Traditional intelligent agents cannot quickly adapt to different display and interaction needs, resulting in the need to reconfigure and deploy API tools after changes in business requirements, making it impossible to quickly respond to new display needs.
By recognizing the input requirement description information, the target task is obtained. Using dynamic scripts and target application interfaces, task execution summary information is generated. The dynamic scripts can be adjusted online to adapt to the display requirements of different tasks without the need to redeploy the tools.
It enables intelligent agents to quickly adapt to different task display requirements, improves the system's adaptability and development efficiency, and ensures interaction efficiency and flexibility.
Smart Images

Figure CN121166232A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence application technology, and in particular to an intelligent agent interaction method, device, computer equipment, computer-readable storage medium, and computer program product. Background Technology
[0002] With the development of artificial intelligence technology, many large-scale model applications have emerged. As a type of large-scale model application, intelligent agents can operate effectively in a variety of complex environments, from simple automated tasks to complex collaborative work.
[0003] In traditional technologies, intelligent agents can only call specific application programming interface (API) tools through prompts. These API tools are predefined, and the agents receive the result data returned by the tools and then return the result data according to the format defined by the front end. When business requirements change, there will be new display requirements, and traditional intelligent agents cannot quickly adapt to different display and interaction requirements. Summary of the Invention
[0004] Therefore, it is necessary to provide an intelligent agent interaction method, device, computer equipment, computer-readable storage medium, and computer program product that can quickly adapt to different display and interaction needs, addressing the aforementioned technical problems.
[0005] Firstly, this application provides an intelligent agent interaction method, including:
[0006] The target task is obtained by identifying the input requirement description information;
[0007] Based on the target task, obtain the corresponding target dynamic script and target application interface; the target dynamic script is configured with an output mode adapted to the target task;
[0008] Execute the target dynamic script to obtain the script execution result of the output mode, obtain the target data corresponding to the target task according to the target application interface, and generate the task execution summary information corresponding to the target task according to the script execution result and the target data;
[0009] Displays the task execution summary information corresponding to the target task.
[0010] Secondly, this application also provides an intelligent agent interaction device, comprising:
[0011] The task identification module is used to identify the input requirement description information and obtain the target task;
[0012] The tool determination module is used to obtain the corresponding target dynamic script and target application interface based on the target task; the target dynamic script is configured with an output mode adapted to the target task.
[0013] An execution module is used to execute the target dynamic script, obtain the script execution result of the output mode, obtain the target data corresponding to the target task according to the target application interface, and generate task execution summary information corresponding to the target task according to the script execution result and the target data.
[0014] The display module is used to display the task execution summary information corresponding to the target task.
[0015] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method of the first aspect.
[0016] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method of the first aspect.
[0017] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the method of the first aspect.
[0018] The aforementioned intelligent agent interaction method, device, computer equipment, computer-readable storage medium, and computer program product identify the input requirement description information to obtain the target task. Based on the target task, they obtain the corresponding target dynamic script and target application interface, execute the target dynamic script, obtain the script execution result in a preset output mode, obtain the target data corresponding to the target task based on the target application interface, generate task execution summary information corresponding to the target task based on the script execution result and target data, and display the task execution summary information. Utilizing the flexibility of online adjustment of dynamic scripts and the ability to configure output modes adapted to different tasks, the script execution result and target data can be combined to form task execution summary information that satisfies the output mode. Corresponding dynamic scripts can be obtained according to different tasks, thereby obtaining output modes adapted to the display requirements of different tasks. This allows for rapid adaptation to the display requirements of different tasks without the need for tool redeployment, improving the adaptability and development efficiency of the intelligent agent. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1This is a diagram illustrating the application environment of an agent interaction method in one embodiment.
[0021] Figure 2 This is a flowchart illustrating an intelligent agent interaction method in one embodiment;
[0022] Figure 3 This is a schematic diagram of a user inputting an email check interface in an intelligent agent interaction interface in one embodiment;
[0023] Figure 4 This is a schematic diagram of an interface in one embodiment where user input information is used to identify multiple tasks in an intelligent agent interaction interface.
[0024] Figure 5 This is a schematic diagram of the interface for retrieving email task execution summary information and detailed information in the intelligent agent interaction interface in one embodiment;
[0025] Figure 6 This is a schematic diagram of an interface in one embodiment that displays a task execution summary and detailed task execution information of a sales order in the agent's interactive interface;
[0026] Figure 7 This is a schematic diagram of the interface in one embodiment of the intelligent agent interaction interface, which displays the task execution summary information and task execution details of the delivery notification.
[0027] Figure 8 This is a schematic diagram of an interface in one embodiment that displays a task execution summary and detailed task execution information for an email composing task.
[0028] Figure 9 This is a flowchart illustrating the agent interaction method in another embodiment;
[0029] Figure 10 This is a schematic diagram illustrating the script execution engine processing in one embodiment;
[0030] Figure 11 This is a schematic diagram illustrating the interaction between the intelligent agent interaction method and the process of composing an email notification in one embodiment.
[0031] Figure 12 This is a structural block diagram of an intelligent agent interaction device in one embodiment;
[0032] Figure 13 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0033] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0034] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0035] In related technologies, intelligent agents can only use prompts to make the large model output the specific API (Application Programming Interface) tool to be called (the API tool needs to be defined and developed in advance). After calling the tool, the agent can only receive the structured data returned by the tool execution, which is then summarized and output by the large model. When the requirements change, the API tool after the requirement change needs to be reconfigured and deployed to meet the new display requirements, which makes it impossible to quickly adapt to the display and interaction requirements of different tasks.
[0036] The intelligent agent interaction method provided in this application embodiment can be applied to, for example... Figure 1In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed on a cloud or other network server. An intelligent agent is deployed on terminal 102 or server 104. The intelligent agent identifies the input requirement description information to obtain the target task, obtains the corresponding target dynamic script and target application interface based on the target task, executes the target dynamic script to obtain the script execution result of the preset output mode, obtains the target data corresponding to the target task based on the target application interface, generates task execution summary information corresponding to the target task based on the script execution result and target data, and displays the task execution summary information. The process involves identifying the requirement description information to obtain the target task, obtaining the dynamic script and target application interface based on the target task, configuring the output mode in the target dynamic script, obtaining the script execution result of the output mode by executing the dynamic script, and then combining the script execution result and target data to form the task execution summary information of the output mode. It can obtain corresponding dynamic scripts according to different tasks to obtain an output mode adapted to the target task display requirements. Furthermore, the dynamic script supports online adjustment without redeployment, improving the system's adaptability and development efficiency. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, drones, low-altitude aircraft, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, and projection equipment. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted displays. Head-mounted displays can be virtual reality (VR) devices, augmented reality (AR) devices, and smart glasses. Server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0037] In one exemplary embodiment, such as Figure 2 As shown, an intelligent agent interaction method is provided, which can be applied to... Figure 1 Taking an intelligent agent on a terminal or server as an example, the explanation includes the following steps 202 to 208. Wherein:
[0038] Step 202: Identify the input requirement description information to obtain the target task.
[0039] The requirement description can be any natural language description. Input can be voice or text. If voice input is used, the input voice description will be converted into text format using speech recognition.
[0040] In one exemplary implementation, the agent can obtain the user's requirement description information entered through a text input box, and then call a large language model to perform intent recognition on the input requirement description information to obtain the target task.
[0041] In another exemplary implementation, the agent can acquire voice description information entered by the user through a voice input control, call a speech recognition model to convert the voice description information into text-based demand description information, and then call a large language model to perform intent recognition on the input demand description information to obtain the target task. The number of target tasks can be one or more. "Multiple" refers to two or more. When there are multiple target tasks, the dependencies of each target task are obtained to form a task sequence. When executing the task sequence, each target task is executed sequentially according to the order of tasks in the sequence.
[0042] Step 204: Obtain the corresponding target dynamic script and target application interface according to the target task; the target dynamic script is configured with an output mode adapted to the target task.
[0043] Dynamic scripts are script code that is parsed and executed at runtime (rather than during compilation). Their core characteristics are high flexibility, real-time modification and execution, and the ability to run without prior compilation. They typically rely on interpreted languages such as JavaScript, Python, and Lua.
[0044] Output schema refers to the output pattern adapted to display requirements. It is used to explicitly define the data format, field types, constraints, and nesting relationships returned by the interface. Field types define the data type of each field, such as string, number, boolean, etc. Field constraints impose additional restrictions on fields, such as length, range, and format. Nesting relationships describe the structure of sub-objects or array elements within an object. Output schema can also include one or more of the following: required fields, enumeration values, default values, and custom extensions. Required fields mark fields that must exist. Enumeration values limit the range of field values. Default values are the default values when a field is not provided. Custom extensions add business-related metadata, such as field descriptions and version numbers.
[0045] The dynamic script library stores dynamic scripts that implement various functions. The application interface pool stores application interfaces used to retrieve various application data. The dynamic scripts can be configured with output modes adapted to various task display requirements.
[0046] For example, the agent retrieves the corresponding target dynamic script from the dynamic script library and the target application interface from the application interface pool based on the target task. For instance, if the target task is to query emails, the agent retrieves the email query application interface from the application interface pool and the email query dynamic script from the dynamic script library.
[0047] For example, the agent generates a function call request based on the target task, and this function call request carries a tool identifier. Further, the function call request may also carry tool description information and tool parameters. The tool identifier is used to uniquely identify the tool and can be the tool name, such as `get_weather`. The tool description explains the tool's function and applicable scenarios. The tool description uses natural language to describe the tool's purpose, input / output logic, etc. For example, "description": Get the real-time weather of a specified city, including temperature and humidity. Tool parameters can be in JSON (JavaScript Object Notation) Schema format, used to declare parameter names, types, required fields, and constraints. Based on the tool identifier in the function call request, the agent retrieves the corresponding target dynamic script from the dynamic script library and the corresponding target application interface from the application interface pool.
[0048] The tools invoked in a function call request can include dynamic scripts and application interfaces. Taking querying customer emails as an example, the tool identifier could be a dynamic script identifier, such as `query_customer_email`, and the tool description could be "Query customer order emails". Tool parameters can include the customer identifier.
[0049] Step 206: Execute the target dynamic script to obtain the script execution result in the output mode. Obtain the target data corresponding to the target task according to the target application interface, and generate the task execution summary information corresponding to the target task based on the script execution result and the target data.
[0050] Task execution summary information is used to represent the result of task execution. This summary can include key information about the result, partial information, or a general description of the result. For example, when checking emails, the summary could include the email title and part of the email content; alternatively, it could include the email title and a brief summary of the email content.
[0051] For example, the intelligent agent executes the target dynamic script and obtains the script execution result in a preset output mode. The script execution result may include the display style, field data and blank positions corresponding to the fields. The target data corresponding to the target task can be obtained according to the target application interface. The target data is filled into the blank positions corresponding to the fields to obtain the task execution result. Then, task execution summary information can be generated based on the task execution result.
[0052] Step 208: Display the task execution summary information corresponding to the target task.
[0053] The intelligent agent's interactive interface displays a task execution summary information corresponding to the target task. This summary information can be displayed in card format. The cards can be tool-call type CUI cards (Conversational User Interface Cards). A CUI card is a functional module in a conversational user interface that triggers external tools or API calls through structured interactions. Its core design goal is to break down complex tasks into executable tool call steps and present operation options or results intuitively in card format, achieving seamless integration between natural language and programmatic functions.
[0054] In this embodiment, the input requirement description information is identified to obtain the target task. Based on the target task, the corresponding target dynamic script and target application interface are obtained. The target dynamic script is executed to obtain the script execution result in a preset output mode. The target data corresponding to the target task is obtained based on the target application interface. Based on the script execution result and target data, task execution summary information corresponding to the target task is generated and displayed. Utilizing the flexibility of online adjustment of dynamic scripts and the ability to configure output modes adapted to different tasks, the script execution result and target data can be combined to form task execution summary information that satisfies the output mode. Corresponding dynamic scripts can be obtained according to different tasks, and the dynamic scripts are configured with output modes, thus obtaining output modes adapted to the display requirements of different tasks. This allows the script execution result to automatically align with the front-end data requirements, enabling rapid adaptation to the display requirements of different tasks without the need for tool redeployment, improving the adaptability and development efficiency of the intelligent agent.
[0055] In an exemplary embodiment, the method further includes: when the target dynamic script corresponding to the target task encounters an anomaly, obtaining a target historical dynamic script selected from the historical dynamic scripts corresponding to the target task; executing the target historical dynamic script to obtain the script execution result; obtaining target data corresponding to the target task according to the target application interface, and generating task execution summary information corresponding to the target task based on the script execution result and the target data. Replacing the target dynamic script with a historical dynamic script when an anomaly occurs and obtaining the corresponding script execution result ensures the smooth execution of the target task and maintains interaction efficiency.
[0056] In an exemplary embodiment, if there is only one target task, the agent's interface directly displays the task execution summary information corresponding to that target task. The agent can wait for the user to re-enter new requirement description information before continuing to analyze the requirement description information to identify new tasks for execution. Figure 3 As shown, the intelligent agent obtains the user's input description information, "Check if any customers have requested goods via email today," from the input box of the agent's interactive interface. The agent analyzes the description information to obtain the task of checking emails, and then calls the dynamic script and application interface to generate task execution summary information. The task execution summary information includes: Company M's goods request form: Dear Company N: This batch of goods is required to be delivered on May 30th, and the specific goods request information is as follows...
[0057] In an exemplary embodiment, the method further includes: when there are multiple target tasks, determining a task sequence corresponding to the multiple target tasks; generating task execution summary information for each target task in the task sequence; and displaying the task execution summary information for each target task in sequence according to the order of the target tasks in the task sequence. Specifically, generating the task execution summary information for each target task includes: obtaining the corresponding target dynamic script and target application interface according to the target task; executing the target dynamic script to obtain the script execution result in the output mode; obtaining the target data corresponding to the target task according to the target application interface; and generating the task execution summary information for each target task based on the script execution result and the target data.
[0058] After identifying multiple target tasks from the requirement description information, these target tasks are sorted according to their execution dependencies to obtain a task sequence. For example, if the target tasks include task A, task B, and task C, and task B depends on the output of task A, and task C depends on the output of task B, then the resulting task sequence is ABC. Tasks A, B, and C are executed sequentially according to steps 202 to 206 to obtain their respective task execution summary information. Then, the task execution summary information corresponding to tasks A, B, and C is displayed sequentially in the order of tasks A, B, and C. Figure 4 As shown, the target tasks include checking emails, generating sales orders, and pushing out shipping notifications. The task execution summary information for checking emails, generating sales orders, and pushing out shipping notifications will be displayed sequentially.
[0059] When there are multiple target tasks, the task execution summary information is displayed sequentially according to the execution order of the target tasks, so that users can quickly obtain more information.
[0060] To save user interaction and obtain detailed task execution results, the intelligent agent can automatically display detailed task execution information after completing the task, allowing users to obtain more detailed information without intervention. In an exemplary embodiment, the target dynamic script is further configured with a triggering method and a corresponding behavior type; the method further includes: obtaining the detailed task execution information corresponding to the target task from the business system based on the task execution summary information, the triggering method, and the corresponding behavior type; displaying the task execution summary information corresponding to the target task in a first area of the intelligent agent's conversational interface, and displaying the detailed task execution information corresponding to the target task in a second area of the intelligent agent's conversational interface.
[0061] Triggering methods can include click-triggered, loading-triggered, etc. Behavior types can be configured differently based on different task types. Behavior types can include opening links, opening emails, opening Markdown content, etc. For example, if the task type is checking emails, the behavior type could be opening emails. If the task type is visiting a website, the behavior type could be opening links. If the task type is viewing a table, the behavior type could be opening Markdown content. Markdown is a lightweight markup language designed to achieve "easy-to-read and easy-to-write" plain text formatting through concise symbolic syntax, and can be converted into structured HTML (Hypertext Markup Language) or other rich text formats.
[0062] This intelligent agent interaction method can be applied to various information management systems, such as Enterprise Resource Planning (ERP) systems, enterprise management systems, financial systems, human resource systems, and supply chain systems.
[0063] Business systems can be ERP systems, email systems, financial systems, human resources systems, supply chain systems, or other systems that provide various business functions.
[0064] Task execution details can include the detailed process and results after the task is completed. For example, when viewing the task of receiving orders from Company M, the task execution details can include the detailed content of the order emails from Company M that were found.
[0065] The conversational interface of an intelligent agent can include a first area and a second area. The first and second areas can be divided vertically, horizontally, or similarly. For example, the first area could be the left area, and the second area the right area.
[0066] like Figure 5As shown, taking email retrieval as an example, the task of retrieving emails includes searching for customer email content based on keywords and providing a preview. This scenario requires first querying the customer's email address and authentication information, logging into the email account, searching for emails based on keywords, returning to the email list, automatically previewing the first email, and allowing other emails to be opened and previewed. The trigger method is loading trigger, and the behavior type is opening an email. The agent then obtains the detailed task execution information corresponding to the retrieved emails from the email system based on the task execution summary information, the loading trigger, and the corresponding opened emails. This detailed task execution information includes the content of the retrieved emails that meet the requirements. The summary information of the retrieved emails is displayed in the first area (left area), and the detailed content of the emails is displayed in the second area (right area).
[0067] like Figure 6 As shown, the task execution summary information and task execution details for sales orders are displayed. Figure 5 The system generates sales orders from requisition forms. The task execution summary of a sales order can include the sales order number, ordering customer, and material information. Detailed task information for a sales order can include basic information, sales information, and financial information. Basic information can include document number, document type, business type, order date, and document status. Sales information can include sales organization, sales department, sales group, salesperson, ordering customer, contact person, contact information, contact address, receiving customer, receiving contact person, receiving address, and settlement customer. Financial information can include settlement currency, exchange rate table, exchange rate date, exchange rate, and payment method. Furthermore, the detailed task information for a sales order provides functional controls to provide specific functions. These functional controls can include functions such as adding, approving, business operation, associated generation, linked query, printing, refreshing, and exiting.
[0068] like Figure 7 As shown, the task execution summary and detailed task execution information are displayed, based on the shipping notification. Figure 6The system generates shipping notifications from sales orders. The task execution summary information of the shipping notification may include the shipping notification number, recipient information, material information, delivery address, and order date. The detailed task execution information of the shipping notification may include basic information, sales information, and financial information. Basic information may include document number, document type, business type, order date, and document status. Sales information may include sales organization, sales department, sales group, salesperson, ordering customer, contact person, contact information, contact address, receiving customer, receiving contact person, delivery address, and settlement customer. Financial information may include settlement currency, exchange rate table, exchange rate date, exchange rate, and payment method. Furthermore, the detailed task information of the shipping notification also provides functional controls to provide specific functions. These functional controls may include add, delete, save, submit, submit and add, link query, print, refresh, and exit.
[0069] like Figure 8 As shown, the task execution summary and detailed information for the email composing task are displayed. Figure 7 The task involves composing a confirmation email for a shipping notification. The task summary information for composing an email can include a portion of the email content. Detailed task information for composing an email can include the recipient's email address, the email content, etc. For example, the email content can include confirmation information for the shipping notification.
[0070] By pre-configuring trigger methods and corresponding behavior types in dynamic scripts, the corresponding trigger methods and behavior types can be automatically executed after the dynamic scripts are completed. This allows the task execution summary information to be displayed in the first area and the detailed task execution information to be displayed in the second area, making it convenient for users to view the detailed information. Furthermore, it enables fully automatic task execution without the need for user operation, thus saving user time and effort.
[0071] In an exemplary embodiment, the method further includes: in response to a trigger operation of a view details control in the task summary information, obtaining detailed task execution information corresponding to the target task from the business system based on the task execution summary information corresponding to the target task; displaying the task execution summary information corresponding to the target task in a first area of the dialogic interface of the agent, and displaying the detailed task execution information corresponding to the target task in a second area of the dialogic interface of the agent.
[0072] The "View Details" control can be configured in different forms as needed. For example, it can be a specified piece of content from the task execution summary information. The user can trigger the "View Details" command by touching or clicking on the specified content in the task execution summary information. In one possible implementation, the specified content can be the topic name in the task execution summary information. The "View Details" control can be a special symbol, such as "+" or ">", which triggers the "View Details" command when clicked. The "View Details" control can also be configured as a "View Details" control.
[0073] Task execution details can include the detailed process and results after the task is completed.
[0074] Based on user-triggered actions, the system can display a task execution summary in the first area and detailed task execution information in the second area, allowing users to easily view the details. It also enables fully automated task execution without requiring user intervention, thus saving users time and effort.
[0075] In an exemplary embodiment, the method further includes: obtaining the trigger operation of the target control in the task execution details, calling the business system to respond to the trigger operation, and executing the function corresponding to the target control.
[0076] The task execution details may include one or more functional controls, such as Figure 6 or Figure 7 The system provides functional controls. Users can select one as the target control to trigger an operation. The system will then invoke the business system to respond to the triggered operation and execute the function corresponding to the target control. Taking an ERP system as an example, and the target task as creating a sales order, the functional controls configured on the sales order creation interface can include adding, approving, business operations, and generating related orders. If the user clicks the add control, the ERP system will respond and display that a new sales order has been created.
[0077] For example, the agent obtains the trigger operation of the target control in the task execution details, calls the corresponding business system to process the trigger operation, and executes the function corresponding to the target control. This enables the agent to call the business system to respond to the user's operation, realizing the linkage between the agent and the business system and improving the interaction efficiency.
[0078] In an exemplary embodiment, the task execution summary information includes a task indicator control; the task indicator control is used to prompt the next task of the target task; the method further includes: generating a next task in response to a trigger operation on the task indicator control; obtaining a corresponding target dynamic script and target application interface according to the next task; the target dynamic script is configured with an output mode adapted to the next task; executing the target dynamic script of the next task to obtain the script execution result of the output mode of the next task; obtaining the target data corresponding to the next task according to the target application interface of the next task; generating task execution summary information corresponding to the next task according to the script execution result and the target data; and displaying the task execution summary information corresponding to the next task.
[0079] Task indicator controls can be displayed using preset styles. Preset styles can include text and geometric icons, or text, geometric icons, and colors. Displaying tasks using preset styles improves the recognizability of task indicator controls and makes them easier for users to identify.
[0080] For example, when the agent detects that the user has triggered the task indicator control, it responds to the triggering operation of the task indicator control by generating an execution instruction for the next task, generating a corresponding function call request based on the next task, obtaining the target dynamic script corresponding to the next task from the dynamic script library based on the tool identifier corresponding to the next task in the function call request, obtaining the target application interface corresponding to the next task from the application interface pool based on the tool identifier corresponding to the next task in the function call request, executing the target dynamic script of the next task, obtaining the script execution result of the output mode of the next task, obtaining the target data corresponding to the next task based on the target application interface of the next task, and generating task execution summary information corresponding to the next task based on the script execution result and the target data; and displaying the task execution summary information corresponding to the next task.
[0081] Understandably, the agent's processing of the next task is the same as that of the target task. The dynamic script corresponding to the next task is configured with a triggering method and a corresponding behavior type, which allows it to automatically obtain detailed task execution information for the next task and display it in the agent's conversational interface.
[0082] In an exemplary embodiment, the target dynamic script of the next task is further configured with a corresponding triggering method and a corresponding behavior type; the method further includes: obtaining detailed task execution information of the next task from the business system according to the task execution summary information, triggering method and corresponding behavior type of the next task; displaying the task execution summary information of the next task in the first area of the agent's conversational interface, and displaying the detailed task execution information of the next task in the second area of the agent's conversational interface.
[0083] In an exemplary embodiment, if the dynamic script corresponding to the next task is not configured with a triggering method and behavior type, it can carry a details view control. After the user triggers the details view control, detailed task execution information is displayed. The method further includes: responding to the triggering operation of the details view control in the task execution summary information of the next task, obtaining detailed task execution information from the business system based on the task execution summary information corresponding to the next task; displaying the task execution summary information corresponding to the next task in a first area of the agent's conversational interface, and displaying the detailed task execution information corresponding to the next task in a second area of the agent's conversational interface.
[0084] In one exemplary embodiment, the task execution summary information of the next task may also include a task indication control, which is used to prompt the next task after the next task. After being triggered by the user, the agent can execute the next task after the next task.
[0085] In an exemplary embodiment, the method may further include: acquiring task execution status information and displaying the task execution status information. The task execution status information may be ready to execute, executing, or completed. By displaying the task execution status information, users can be promptly informed of the task execution status.
[0086] In an exemplary embodiment, the method may further include: acquiring new display requirements; acquiring corresponding dynamic scripts based on the new display requirements; acquiring target data for the new display requirements based on the dynamic scripts; acquiring session context data; and obtaining display data corresponding to the new display requirements based on the session context data and the target data. The session context data may be historical data of content interaction between the user and the agent over a period of time. Display data is obtained by reorganizing the data based on the session context data and the target data. The dynamic script can access information within the business system (such as an ERP system) through its internal SDK (Software Development Kit) to reorganize the data and meet the display requirements for rich information.
[0087] In one exemplary embodiment, such as Figure 9 and Figure 10 As shown, an intelligent agent interaction method includes:
[0088] (1) The agent obtains the user input question (i.e. requirement description information), identifies the question to obtain the target task, generates a function call request based on the target task, finds the application interface from the application interface tool pool based on the function call request, finds the corresponding target dynamic script from the dynamic script library based on the tool parameters and tool identifier of the function call request, and finds the corresponding script execution engine.
[0089] (2) The target dynamic script is injected into the data formatting layer through the script execution engine. The target dynamic script is executed to obtain the script execution result. The target data corresponding to the target task is obtained according to the application interface. The script execution result and the target data are generated into a structured JSON that conforms to the front-end agreement according to the output schema and action template (triggering method and behavior type) agreed with the front-end. The structured JSON data is associated with the front-end card and used for front-end card content rendering and display, such as CUI cards of the tool-call type. Then the front-end will use the output unified JSON format to render to the front-end card renderer. Through action triggering, the instruction is passed to the business system to drive the business system to execute the corresponding functional logic. In this way, a three-data-driven process based on dynamic script is constructed to realize the complete operation from metadata input to front-end display and business interaction.
[0090] The intelligent agent provides a dual-channel tool invocation mechanism. One is a structured channel (i.e., obtaining application interfaces from the application interface pool), which outputs standardized tool requests (such as tool names and parameters) through large model function calling. The other is a dynamic script channel (i.e., obtaining dynamic scripts from the dynamic script library), which supports the intelligent agent to directly call dynamic script nodes and generate structured JSON data. The two channels are independent of each other and can be parallelized to improve response efficiency.
[0091] In one exemplary embodiment, a three-layer automated mapping system is established to address the human-computer interaction gap problem, enabling automated interaction of Manus-like business processes. The method further includes: automatically binding data to the display interface based on output patterns; associating the display interface with action templates; and associating action templates with the business system.
[0092] Among them, (1) the data is automatically bound to the display interface based on the output mode, that is, data → interface binding.
[0093] The `type` parameter, "tool-call," indicates a Function Calling result display type. The front-end will automatically parse and display data of this type upon receiving the result. The content bound to the data and display interface can include whether the tool automatically collapses after output, the tool's call status (e.g., success or failure), a description of the tool's behavior (e.g., querying), a title (e.g., XX Technology), loading status, description content (e.g., XX tables found, XX records in total), and style / theme (e.g., sent to XX email address).
[0094] Example: {
[0095] type: "tool-call", / / CUI card type, directly fixed.
[0096] content: [{
[0097] autoFold: true, / / Whether to automatically collapse the tool after output is complete
[0098] status: "loading", / / Tool status: loading, error, success
[0099] preText: "Query in progress...", / / Tool behavior description text
[0100] preTextPrefix: "Call",
[0101] preTextSuffix: "Task Flow",
[0102] title: "XX Technology | Mailing List", / / Title text
[0103] desc: "Found xx tables, xx rows of data", / / Description text
[0104] theme: "email", / / Specifies the theme for rendering the card content on the front end. Normally not needed; the email subject is passed when displaying the email.
[0105] themeTitle: "Send email to: xw@163.com", / / Theme Title
[0106] footer: "Based on the above summary, XX Technology's email list contains xx records, of which xx records come from xx tables." / / Bottom data, content can be plain text or Markdown text}
[0107] By automatically binding data to the display interface, the problem of manually binding the data returned by the tool to the front-end component, which is required in traditional solutions, is solved.
[0108] (2) Associate the display interface with the action template, i.e., interface → action mapping, which can be done through declarative action protocol.
[0109] Supported behavior types defined by the `action` value include opening links (e.g., www.xxx.com), opening Markdown (e.g., finding XX tables in XX Technology's email list), and opening emails. Trigger methods defined by `trigger` include click triggers and loading triggers, which can be used to achieve similar functionality to Manus—not only thinking but also displaying intuitive results of task execution. Manus, developed by the Chinese team Monica.im, is the world's first general-purpose AI Agent (autonomous intelligent agent), emphasizing its ability to not only think and plan but also to execute tasks and directly deliver results.
[0110] Example: dispatch: [{ / / Overall behavior description
[0111] action: "openLink", / / Behavior type, openLink: open a link, openMd: open markdown, openEmail: open an email. On the web, this behavior defaults to opening the content in the right-hand drawer.
[0112] trigger: "onClick", / / Trigger method, default is onClick, onShow: triggers when displayed, onClick: triggers when clicked.
[0113] payload: {
[0114] url: "https: / / www.xxx.com", / / Link when action is openLink
[0115] title: 'xxx receipt'
[0116] content: "## XX Technology | xx tables found in the mailing list" / / Markdown content when action is openMd
[0117] By associating the display interface with action templates, the need for hard-coding the binding between user operations and business actions can be resolved.
[0118] (3) Associate the action template with the business system, i.e., action → system (preset actions are executed automatically).
[0119] It supports defining quick actions (such as a button to send an email) through operations, specifying feedback content, allowing the agent to re-enter the next round of thinking and action based on user feedback. Actions define the action type (such as sending a message), triggers define the triggering method (such as a click), and payloads define the text (which may include: the actual dialogue content displayed on the interface, or key-value pairs carried in the extra field of the interface when sending a message). These designs can leverage dynamic scripts to enhance the flexibility and adaptability of the system design, improving development efficiency.
[0120] Example: operations: [ {
[0121] btnText: "Send email",
[0122] type: "primary", / / Button type, default is primary, primary: theme emphasis button, default: normal button
[0123] dispatch: [{
[0124] action: "sendMsg",
[0125] trigger: "onClick",
[0126] payload: {
[0127] text: "The actual conversation content sent and displayed on the screen", / / If no value is passed, the above btnText is used by default.
[0128] extra: {}, / / Additional key-value pairs carried in the extra field of the interface when sending messages, for subsequent business processing.
[0129] By associating action templates with business systems, pre-defined actions can be executed automatically, enabling business functions to be completed without manual intervention.
[0130] In one exemplary embodiment, such as Figure 11 As shown, an intelligent agent interaction method includes:
[0131] (1) The intelligent agent obtains the user's input demand description information, which is "Check if any customers have requested goods via email today. If so, generate a sales order directly, submit it for review automatically, then ship the goods, and finally send a shipping notification email to the customer". The demand description information is identified to obtain multiple target tasks, including checking emails, automatically creating sales orders based on email content, pushing out shipping notifications, composing notification emails and sending them to customers.
[0132] (2) The agent processes each of the multiple target tasks separately, obtains the corresponding target dynamic script and target application interface according to the target task, the target dynamic script is configured with the output mode, triggering method and corresponding behavior type adapted to the target task, executes the target dynamic script, obtains the script execution result of the output schema, obtains the target data corresponding to the target task according to the target application interface, and generates the task execution summary information and task execution details corresponding to the target task according to the script execution result and target data.
[0133] (3) The intelligent agent displays the task execution summary information and task execution details of each task in the order of checking emails, automatically creating sales orders based on email content, pushing out delivery notices, composing notification emails and sending them to customers.
[0134] Among them, the intelligent agent can call the business object operation interface of the ERP system to support tasks such as creating sales orders and pushing out delivery notices.
[0135] The stability of function calling execution engine tools based on large models has been significantly improved, resulting in more than doubling of overall business process performance and reducing the entire process time from 95 seconds to 44 seconds. Dynamic scripts handle complex processing logic, schema validation ensures output quality, and a 3D mapping system enables fully automated interaction, greatly improving human-computer interaction efficiency.
[0136] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0137] Based on the same inventive concept, this application also provides an intelligent agent interaction device for implementing the intelligent agent interaction method described above. The solution provided by this device is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more intelligent agent interaction device embodiments provided below can be found in the limitations of the intelligent agent interaction method described above, and will not be repeated here.
[0138] In one exemplary embodiment, such as Figure 12 As shown, an intelligent agent interaction device is provided, including: a task recognition module 1210, a tool determination module 1220, an execution module 1230, and a display module 1240, wherein:
[0139] The task identification module 1210 is used to identify the input requirement description information to obtain the target task;
[0140] The tool determination module 1220 is used to obtain the corresponding target dynamic script and target application interface according to the target task; the target dynamic script is configured with an output mode adapted to the target task.
[0141] The execution module 1230 is used to execute the target dynamic script, obtain the script execution result of the output mode, obtain the target data corresponding to the target task according to the target application interface, and generate the task execution summary information corresponding to the target task according to the script execution result and the target data.
[0142] Display module 1240 is used to display task execution summary information corresponding to the target task.
[0143] In an exemplary embodiment, the task identification module 1210 is further configured to determine a task sequence corresponding to multiple target tasks when there are multiple target tasks.
[0144] The tool determination module 1220 is also used to obtain the corresponding target dynamic script and target application interface for each target task in the task sequence; the execution module 1230 is also used to execute the target dynamic script, obtain the script execution result in the output mode, obtain the target data corresponding to the target task according to the target application interface, and generate the task execution summary information corresponding to the target task according to the script execution result and the target data.
[0145] The display module 1240 is also used to sequentially display the task execution summary information corresponding to each target task according to the arrangement order of each target task in the task sequence.
[0146] In one exemplary embodiment, the target dynamic script is further configured with a triggering method and a corresponding behavior type;
[0147] The execution module 1230 is also used to obtain detailed task execution information corresponding to the target task from the business system based on the task execution summary information, the triggering method and the corresponding behavior type;
[0148] The display module 1240 is also used to display task execution summary information corresponding to the target task in a first area of the dialog interface of the agent, and to display detailed task execution information corresponding to the target task in a second area of the dialog interface of the agent.
[0149] In an exemplary embodiment, the execution module 1230 is further configured to, in response to a trigger operation of viewing details control in the task execution summary information, obtain detailed task execution information from the business system based on the task execution summary information;
[0150] The display module 1240 is also used to display task execution summary information corresponding to the target task in a first area of the dialog interface of the agent, and to display detailed task execution information corresponding to the target task in a second area of the dialog interface of the agent.
[0151] In an exemplary embodiment, the execution module 1230 is further configured to obtain the trigger operation of the target control in the task execution details, call the business system to respond to the trigger operation, and execute the function corresponding to the target control.
[0152] In one exemplary embodiment, the task execution summary information includes a task indication control; the task indication control is used to prompt the next task of the target task;
[0153] The task identification module 1210 is also used to generate the next task in response to a trigger operation on the task indicator control;
[0154] The tool determination module 1220 is also used to obtain the corresponding target dynamic script and target application interface according to the next task; the target dynamic script is configured with an output mode adapted to the next task;
[0155] The execution module 1230 is also used to execute the target dynamic script of the next task, obtain the script execution result of the output mode of the next task, obtain the target data corresponding to the next task according to the target application interface of the next task, and generate the task execution summary information corresponding to the next task according to the script execution result and the target data.
[0156] The display module 1240 is also used to display task execution summary information corresponding to the next task.
[0157] Each module in the aforementioned intelligent agent interaction device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0158] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 13 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements an intelligent agent interaction method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0159] Those skilled in the art will understand that Figure 13 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 to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0160] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method described above.
[0161] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the above-described method.
[0162] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the methods described above.
[0163] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0164] Those skilled in the art will understand 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 can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0165] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0166] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. An agent interaction method, characterized by, The method comprises: identifying input requirement description information to obtain a target task; obtaining a corresponding target dynamic script and a target application interface according to the target task; the target dynamic script is configured with an output mode adapted to the target task; executing the target dynamic script to obtain a script execution result of the output mode, obtaining target data corresponding to the target task according to the target application interface, and generating task execution summary information corresponding to the target task according to the script execution result and the target data; displaying the task execution summary information corresponding to the target task.
2. The method of claim 1, wherein, The method further comprises: when the target task includes multiple target tasks, determining a task sequence corresponding to the multiple target tasks; generating task execution summary information corresponding to each target task in the task sequence; displaying the task execution summary information corresponding to each target task in the task sequence in turn according to the arrangement order of the target tasks in the task sequence.
3. The method of claim 1, wherein, The target dynamic script is further configured with a triggering mode and a corresponding behavior type. The method further comprises: obtaining task execution detailed information corresponding to the target task from a business system according to the task execution summary information, the triggering mode and the corresponding behavior type; displaying the task execution summary information corresponding to the target task in a first area of a conversational interface of the agent and displaying the task execution detailed information corresponding to the target task in a second area of the conversational interface of the agent.
4. The method of claim 1, wherein, The method further comprises: obtaining task execution detailed information from a business system according to the task execution summary information in response to a triggering operation on a detail viewing control in the task execution summary information; displaying the task execution summary information corresponding to the target task in a first area of a conversational interface of the agent and displaying the task execution detailed information corresponding to the target task in a second area of the conversational interface of the agent.
5. The method according to claim 3 or 4, characterized in that, The method further comprises: obtaining a triggering operation on a target control in the task execution detailed information, calling a business system to respond to the triggering operation, and executing a function corresponding to the target control.
6. The method of claim 1, wherein, The task execution summary information includes a task indication control; the task indication control is used to prompt a next task of the target task; the method further comprises: generating a next task in response to a triggering operation on the task indication control; obtaining a corresponding target dynamic script and a target application interface according to the next task; the target dynamic script is configured with an output mode adapted to the next task; executing the target dynamic script of the next task to obtain a script execution result of the output mode of the next task, obtaining target data corresponding to the next task according to the target application interface of the next task, and generating task execution summary information corresponding to the next task according to the script execution result and the target data; displaying the task execution summary information corresponding to the next task.
7. An agent interaction apparatus characterized by comprising: The device comprises: a task identification module configured to identify input requirement description information to obtain a target task; A tool determining module is configured to acquire a target dynamic script and a target application interface corresponding to the target task according to the target task; the target dynamic script is configured with an output mode adapted to the target task; An executing module is configured to execute the target dynamic script to obtain a script execution result of the output mode, acquire target data corresponding to the target task according to the target application interface, and generate task execution summary information corresponding to the target task according to the script execution result and the target data; A displaying module is configured to display the task execution summary information corresponding to the target task.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that, The processor executes the computer program to implement the steps of the method in any one of claims 1 to 6.
9. A computer-readable storage medium having stored thereon a computer program, characterized in that The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 6.