Interaction method and device for multiple agents, equipment and storage medium
Patent Information
- Application Number
- CN202611013657.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-08
- Publication Date
- 2026-10-30
AI Technical Summary
[0005]本申请提供一种用于多智能体的交互方法、装置、设备及存储介质,用以解决现有技术无法实现跨应用智能体之间的交互目的识别与任务协同,且缺乏对复杂业务场景的动态适配能力的技术问题
[0064]本申请提供的用于多智能体的交互方法、装置、设备及存储介质,该方法中,第二智能体获取用户请求之后,对该用户请求进行交互行为识别,生成请求报文,进而基于该请求报文中的交互任务类型,确定对应的第一智能体,并基于上述通信协议,对请求报文进行封装处理,继而通过通信协议中的接口调用机制,调用对应的通信接口将封装后的请求报文发送至第一智能体,第一智能体对接收到的请求报文进行解析,并基于解析结果中的交互任务类型,调用对应的组件智能体执行交互任务。该方法实现了跨应用智能体之间的交互目的识别与任务协同,显著减少用户操作步骤与交互延迟,并且,该方法通过配置交互任务类型与组件智能体的对应的关系,即可实现复杂业务场景的动态适配。
Smart Images

Figure CN123020591A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to an interaction method, apparatus, device and storage medium for multiple agents. Background Technology
[0002] In smart terminal devices, when users initiate business requests through interactive interfaces such as voice assistants and intelligent customer service, they usually need to switch frequently between multiple applications to complete complex operations.
[0003] In existing technologies, intelligent agent interaction includes attempts at intra-application intelligent agent interaction and cross-application communication. Intra-application intelligent agent interaction processes user requests through preset rules, suitable for fixed scenarios, but its interaction logic remains confined to a single application, failing to achieve cross-application collaboration. In attempts at cross-application communication, some technologies achieve data transfer between applications through APIs (Application Programming Interfaces) or preset protocols. However, such solutions typically require users to manually switch applications or input repetitive information, resulting in fragmented interaction flows and a lack of dynamic adaptability to complex business scenarios. For example, a user might need to input a transfer request in a voice assistant app, then manually open a bank app and re-enter the recipient's information, leading to redundant and error-prone steps.
[0004] Therefore, existing technologies have technical problems such as being unable to achieve the recognition of interaction purposes and task collaboration between cross-application intelligent agents, and lacking the ability to dynamically adapt to complex business scenarios. Summary of the Invention
[0005] This application provides an interaction method, apparatus, device, and storage medium for multiple agents, which solves the technical problems that the prior art cannot realize the recognition of interaction purpose and task collaboration between agents across applications, and lacks the ability to dynamically adapt to complex business scenarios.
[0006] In a first aspect, this application provides a multi-agent interaction method applied to a first agent, wherein a communication protocol is configured between the first agent and a second agent, and the method includes:
[0007] Based on the communication protocol, a request message sent by the second intelligent agent is received, which includes an interactive task;
[0008] Parse the request message and, based on the interaction task type in the parsing result, call the corresponding component agent to execute the interaction task.
[0009] In one possible implementation, the above request message includes an interactive task type, and parsing the request message includes:
[0010] Determine the multiple sub-task types corresponding to the interactive task type from the task mapping table, as well as the execution order of the multiple sub-task types;
[0011] Based on multiple subtask types and the execution order of each subtask type, the parsing results are generated.
[0012] In one possible implementation, based on the interaction task type in the parsing result, the corresponding component agent is invoked to execute the interaction task, including:
[0013] Determine component agents that match multiple subtask types from a pre-defined mapping table;
[0014] Verify whether multiple component agents are in an available state;
[0015] When the verification results indicate that multiple component agents are in an available state, the component agents are invoked to perform interactive tasks in the order of execution.
[0016] In one possible implementation, the method further includes:
[0017] If the verification result indicates that there is a first component agent that is in an unavailable state, determine whether there is a backup component agent based on the corresponding subtask type from the mapping table;
[0018] If so, the backup component agent will be used as the component agent to be called, and the component agents will be called in the order of execution to perform the interaction task;
[0019] If not, a task failure message is generated and returned to the second agent. The task failure message includes the identifier and status information of the first agent.
[0020] In one possible implementation, after invoking the corresponding component agent to perform the interaction task, the method further includes:
[0021] Based on the communication protocol, the execution result of the interactive task is fed back to the second intelligent agent, so that the second intelligent agent can generate display information based on the execution result and display the display information to the user.
[0022] In one possible implementation, based on a communication protocol, the execution result of the interactive task is fed back to the second intelligent agent, including:
[0023] Based on the communication protocol, the execution result is encapsulated into a feedback data packet, and the feedback data packet is sent to the second intelligent agent;
[0024] The page redirection mechanism is triggered by the feedback data packet to return from the first agent to the display interface of the second agent. After the second agent generates display information based on the feedback data packet, the display information is presented to the user through the display interface.
[0025] Secondly, this application provides a multi-agent interaction method applied to a second agent, wherein a communication protocol is configured between the second agent and a first agent, and the method includes:
[0026] Obtain user requests, identify interactive behaviors in user requests, and generate request messages, which include the type of interactive task;
[0027] Determine the first intelligent agent corresponding to the type of interactive task, and encapsulate the request message based on the communication protocol;
[0028] The corresponding communication interface is invoked through the interface call mechanism in the communication protocol to send the encapsulated request message to the first intelligent agent.
[0029] In one possible implementation, the method further includes:
[0030] Receive the execution result of the interactive task sent by the first intelligent agent;
[0031] The results of the execution are used to generate and display information to the user.
[0032] Thirdly, this application provides an interaction device for multiple agents, applied to a first agent, wherein a communication protocol is configured between the first agent and a second agent, and the device includes:
[0033] The receiving module is used to receive request messages sent by the second intelligent agent based on the communication protocol.
[0034] The parsing module is used to parse request messages;
[0035] The calling module is used to call the corresponding component agent to execute the interactive task based on the interactive task type in the parsing result.
[0036] In one possible implementation, the above request message includes an interactive task type, and the device further includes: a determining module and a generating module;
[0037] The determination module is used to determine multiple sub-task types corresponding to the interactive task type from the task mapping table, as well as the execution order of the multiple sub-task types;
[0038] The generation module is used to generate parsing results based on multiple subtask types and the execution order of each subtask type.
[0039] In one possible implementation, the device further includes: a verification module;
[0040] The determination module is also used to determine component agents that match multiple subtask types from a preset mapping table;
[0041] The verification module is used to verify whether multiple component agents are in a usable state.
[0042] The calling module is specifically used to call each component agent to perform interactive tasks in the order of execution when the verification result indicates that multiple component agents are in an available state.
[0043] In one possible implementation, the determining module is further configured to determine, based on the corresponding subtask type, whether a backup component agent exists from the mapping table if the verification result indicates that a first component agent is in an unavailable state.
[0044] The calling module is also used to, if so, select the backup component intelligence as the component intelligence to be called, and call each component intelligence to perform the interaction task in the order of execution;
[0045] The generation module is also used to generate task failure information if not, and return the task failure information to the second agent. The task failure information includes the identifier and status information of the first component agent.
[0046] In one possible implementation, the above-mentioned device further includes: a feedback module;
[0047] The feedback module is used to feed back the execution results of the interactive task to the second intelligent agent based on the communication protocol, so that the second intelligent agent can generate display information based on the execution results and display the display information to the user.
[0048] In one possible implementation, the above-mentioned device further includes: an encapsulation module and a triggering module;
[0049] The encapsulation module is used to encapsulate the execution results into feedback data packets based on the communication protocol.
[0050] The feedback module is also used to send feedback data packets to the second intelligent agent;
[0051] The triggering module is used to trigger a page jump mechanism through feedback data packets to return from the first agent to the display interface of the second agent, so that after the second agent generates display information based on the feedback data packets, the display information is presented to the user through the display interface.
[0052] Fourthly, this application provides an interaction device for multiple agents, applied to a second agent, wherein a communication protocol is configured between the second agent and a first agent, and the device includes:
[0053] The acquisition module is used to acquire user requests;
[0054] The identification module is used to identify the interactive behavior of user requests and generate a request message, which includes the interactive task type.
[0055] The determination module is used to determine the first agent corresponding to the type of interactive task, and send the request message to the first agent based on the communication protocol.
[0056] In one possible implementation, the above-mentioned apparatus further includes: a receiving module and a generating module;
[0057] The receiving module is used to receive the execution results of the interactive tasks sent by the first intelligent agent;
[0058] The generation module is used to generate display information based on the execution results and then present that information to the user.
[0059] Fifthly, embodiments of this application provide an electronic device, including: a memory and a processor;
[0060] The aforementioned memory stores instructions executed by the computer;
[0061] The processor executes computer execution instructions stored in the memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect, as well as the second aspect and / or various possible implementations of the second aspect.
[0062] In a sixth aspect, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect, as well as the second aspect and / or various possible implementations of the second aspect.
[0063] In a seventh aspect, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect, as well as the second aspect and / or various possible implementations of the second aspect.
[0064] This application provides a method, apparatus, device, and storage medium for multi-agent interaction. In this method, after a second agent receives a user request, it identifies the interactive behavior of the request, generates a request message, and then determines the corresponding first agent based on the interactive task type in the request message. Based on the aforementioned communication protocol, it encapsulates the request message and then sends the encapsulated request message to the first agent through the interface call mechanism in the communication protocol. The first agent parses the received request message and, based on the interactive task type in the parsing result, calls the corresponding component agent to execute the interactive task. This method achieves interaction purpose identification and task collaboration between cross-application agents, significantly reducing user operation steps and interaction latency. Furthermore, by configuring the correspondence between interactive task types and component agents, this method can achieve dynamic adaptation to complex business scenarios. Attached Figure Description
[0065] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0066] Figure 1 An interactive schematic diagram of an interaction method for multiple agents provided in an embodiment of this application;
[0067] Figure 2 A flowchart illustrating an interaction method for multiple agents provided in an embodiment of this application;
[0068] Figure 3 Schematic diagrams of the structure of the first and second intelligent agents provided in the embodiments of this application;
[0069] Figure 4 This is a schematic diagram illustrating an application scenario of a multi-agent system provided in an embodiment of this application.
[0070] Figure 5 A schematic diagram of the structure of the multi-agent interaction device provided in this application;
[0071] Figure 6 A schematic diagram of the structure of the multi-agent interaction device provided in this application;
[0072] Figure 7 A schematic diagram of the structure of the electronic device provided in this application.
[0073] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0074] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0075] 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. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of the relevant data all comply with the relevant laws, regulations, and standards of the relevant countries and regions, have taken necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation access points for users to choose to authorize or refuse.
[0076] Furthermore, the technical solution involved in this application, which involves big data analysis of user information (including but not limited to personal biometrics, identity data, consumption data, asset data, electronic terminal operation data, etc.) and the use of artificial intelligence technology for automated decision-making, and makes decisions that have a significant impact on personal rights based on the results of automated decision-making, provides users with corresponding operation entry points for users to choose to agree to or reject the results of automated decision-making; if the user chooses to reject, the process will proceed to the expert decision-making process.
[0077] It should be noted that the interaction method, apparatus, device and storage medium for multi-agent communication provided in this application can be used in the field of fintech, or in any field other than fintech. The application field of the interaction method, apparatus, device and storage medium for multi-agent communication in this application is not limited.
[0078] In smart terminal devices, when users initiate business requests through interactive interfaces such as voice assistants and intelligent customer service, they usually need to switch frequently between multiple applications to complete complex operations.
[0079] For example, when using a phone's built-in smart voice assistant to perform financial transactions such as "transferring money" or "repaying credit cards," the voice assistant must first identify the user's interaction purpose and generate operation instructions. These instructions then guide the user to manually open the bank's app and navigate through the steps to the target transaction page. This process suffers from cumbersome steps, delayed transmission of user intent, and fragmented cross-application interaction experiences.
[0080] In existing technologies, intelligent agent interaction includes attempts at intra-application intelligent agent interaction and cross-application communication. Intra-application intelligent agent interaction processes user requests through preset rules and is suitable for fixed scenarios, but its interaction logic is still limited to the single application and cannot achieve cross-application collaboration.
[0081] In attempts at cross-application communication, some technologies achieve data transfer between applications through API interfaces or preset protocols. However, such solutions usually require users to manually switch applications or enter repetitive information, resulting in fragmented interaction processes and a lack of dynamic adaptability to complex business scenarios. For example, a user might need to enter a transfer request in a voice assistant app, then manually open the bank app and re-enter the recipient's information, leading to redundant and error-prone steps.
[0082] Therefore, existing technologies have the technical problem of being unable to achieve the recognition of interaction objectives and task collaboration between intelligent agents across applications.
[0083] The interaction method for multi-agent systems provided in this application aims to solve the above-mentioned technical problems of the prior art.
[0084] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0085] Figure 1 This is an interactive schematic diagram illustrating a multi-agent interaction method provided in an embodiment of this application. The interaction objects in this method include a first intelligent agent and a second intelligent agent, and a communication protocol is configured between the first and second intelligent agents. The first intelligent agent can be, for example, an intelligent agent of a financial app, and the second intelligent agent can be, for example, a built-in intelligent agent of a terminal, used to receive user requests or instructions. Figure 1 As shown, the method includes:
[0086] S101. The second intelligent agent obtains the user request, identifies the interactive behavior of the user request, and generates a request message, which includes the interactive task type.
[0087] Specifically, the user wakes up the second intelligent agent on the terminal and inputs a user request into it. This request includes, but is not limited to, raw instructions input by the user through voice, text, or a graphical interface, such as "transfer money." After receiving the user request, the second intelligent agent uses natural language processing technology to parse the structured data generated from the user input, including the interaction task type and task parameters. The interaction task type could be, for example, a money transfer, and the task parameters could be, for example, the recipient's name and the amount.
[0088] S102. The second intelligent agent determines the first intelligent agent corresponding to the type of interactive task, and encapsulates the request message based on the communication protocol, and calls the corresponding communication interface through the interface call mechanism in the communication protocol.
[0089] Among them, the communication protocol is used to define the interface specifications for communication between intelligent agents and support cross-application data transfer, such as the A2A (Agent-to-Agent) protocol.
[0090] Specifically, based on the type of interaction task, the target application required to execute the task corresponding to that interaction task type is determined, and the interaction agent of the target application is determined as the first agent. The first agent is deployed in the target application (such as a bank app) to receive and parse interaction requests.
[0091] After determining the first intelligent agent, the request message is encapsulated based on the communication protocol, and the corresponding communication interface is invoked through the interface call mechanism in the communication protocol to send the encapsulated request message to the first intelligent agent.
[0092] The request message is encapsulated based on the communication protocol. The encapsulated request message is a structured data unit that conforms to the communication protocol. The encapsulated request message includes, but is not limited to, the interaction task type, task parameters, and verification information. For example, the encapsulated request message is a JSON (JavaScript Object Notation) format data packet defined by the A2A protocol.
[0093] In addition, the interface calling mechanism is the communication interface calling method defined in the communication protocol, such as RESTful API (Representational State Transfer Application Programming Interface).
[0094] For example, within the framework of a standardized communication protocol, the second agent encapsulates the parsed request message into a data packet (such as JSON format) defined by the communication protocol, and sends the data packet to the first agent of the target application through an interface call mechanism (such as a RESTful API). This process ensures cross-application communication compatibility and data integrity through the data structures and interface specifications defined by the communication protocol.
[0095] This method achieves standardization and efficiency in cross-application communication by combining standardized data packets with an interface call mechanism. Specifically, the protocol-defined data packet format ensures the structured and consistent nature of intent requests, avoiding communication failures caused by incompatible data formats; the interface call mechanism, through preset communication paths, reduces the complexity of cross-application calls, thereby further reducing communication latency and improving system stability.
[0096] S103, the second agent sends the encapsulated request message to the first agent through the communication interface.
[0097] As described in step S102 above, after calling the communication interface based on the interface call mechanism, the encapsulated request message is sent to the first intelligent agent through the communication interface. For example, after a user initiates a "transfer and remittance" request, the second intelligent agent encapsulates the intent message into a JSON data packet of the A2A protocol and calls the first intelligent agent of the bank APP through a preset API interface to complete the data transmission.
[0098] S104. The first intelligent agent parses the request message and, based on the interaction task type in the parsing result, calls the corresponding component intelligent agent to execute the interaction task.
[0099] Among them, the component intelligent agent is a sub-module that executes specific business logic, such as the remittance component intelligent agent and the repayment component intelligent agent.
[0100] The communication protocol defines the data packet structure, encoding format, and semantic rules for interaction data between agents. After receiving a request message, the first agent parses the request message based on the communication protocol. The parsing result includes, but is not limited to, the interaction task type. Each interaction task type is configured with a component agent to execute the corresponding interaction task. The first agent retrieves at least one component agent corresponding to the interaction task type from the configuration library and calls each component agent to execute the interaction task.
[0101] For example, after the first agent of the target application receives the request message, it dynamically schedules the corresponding component agents (such as the remittance component agent) according to the type of interaction task. The component agents further refine the task (such as payee query, payment card verification), and finally complete the transaction execution. Throughout the process, standardized communication protocols ensure the compatibility of cross-application data transmission, dynamic scheduling mechanisms enable flexible adaptation of business logic, and the collaboration of component agents completes complex transaction tasks.
[0102] Understandably, when a new business scenario arises, the corresponding component intelligent agent can be configured for the interaction task type based on the interaction task type corresponding to the business scenario, thereby enabling rapid adaptation to the new business scenario.
[0103] This embodiment provides an interaction method for multiple agents. The method's execution entities include a first agent and a second agent, which are configured with a communication protocol, resolving the issue of insufficient communication compatibility between agents. Specifically, after obtaining a user request, the second agent identifies the user request's interactive behavior, generates a request message, and then determines the corresponding first agent based on the interactive task type in the request message. Based on the aforementioned communication protocol, the second agent encapsulates the request message and then sends the encapsulated request message to the first agent through the interface call mechanism in the communication protocol. The first agent parses the received request message and, based on the interactive task type in the parsing result, calls the corresponding component agent to execute the interactive task. This method achieves interaction purpose identification and task collaboration between cross-application agents, significantly reducing user operation steps and interaction latency. Furthermore, by configuring the correspondence between interactive task types and component agents, this method can achieve dynamic adaptation to complex business scenarios.
[0104] Figure 2 This is a flowchart illustrating an interaction method for multiple agents provided in an embodiment of this application, as shown below. Figure 2 As shown, in this embodiment... Figure 1 Based on the embodiments, a possible method for a first intelligent agent to invoke a component intelligent agent to perform an interactive task is described in detail. This method is applied to the first intelligent agent. The method includes:
[0105] S201. Based on the communication protocol, receive the request message sent by the second intelligent agent.
[0106] The request message includes, but is not limited to, an interaction task type identifier, user authentication information, and a task number field. The interaction task type identifier is a unique code used to identify the user's task category; for example, "001" indicates a transfer, and "002" indicates a repayment. User authentication information is data used to verify the user's identity, such as a user ID, token, or biometric data. Furthermore, the aforementioned task number field contains data fields that include core task parameters, such as the recipient's name, amount, and timestamp.
[0107] Request messages conforming to the communication protocol achieve accurate transmission and security by including an interaction task type identifier, user authentication information, and a task number field. For example, when encapsulating data packets, user agent 1 encapsulates the interaction task type identifier "001" (transfer) along with transaction parameter fields (such as recipient's name and amount) and attaches user authentication information (such as a token) to ensure that user agent 2 of the target application can accurately parse the request and verify user permissions.
[0108] This method achieves precise delivery of user requests and enhanced security through refined design of data packet content. The introduction of interactive task type identifiers avoids ambiguity in interactive task identification, the addition of user authentication information prevents unauthorized access, and the structured storage of task number segments improves data parsing efficiency.
[0109] S202. Determine the multiple sub-task types corresponding to the interactive task type from the task mapping table, as well as the execution order of the multiple sub-task types.
[0110] The task mapping table stores the correspondence between interactive task types and multiple sub-task types, as well as the execution order of each sub-task type.
[0111] The request message is parsed to obtain the interaction task type. Based on the task mapping table, multiple sub-task types corresponding to the interaction task type are determined, and a sub-task type sequence is generated according to the execution order of each sub-task type.
[0112] When expanding the task scenario, the subtask type corresponding to the new task scenario is configured in the task mapping table to achieve dynamic adaptation to complex business scenarios.
[0113] S203. Based on multiple subtask types and the execution order of each subtask type, generate the parsing results.
[0114] Based on the parsed data obtained directly from parsing the request message, and the subtask type sequence obtained in step S202 above, a parsing result is generated. The parsed data includes, but is not limited to, the interaction task type identifier, user authentication information, and the task number field.
[0115] S204. Determine multiple component agents that match the subtask type from the preset mapping table.
[0116] The preset mapping table is used to store the correspondence between interactive task types and component agents. For example, "transfer" corresponds to "remittance component agent".
[0117] For example, the interaction task type is "Place an order." The sub-task types corresponding to "Place an order" are determined from a preset mapping table, including: verifying inventory, locking inventory, deducting coupons, and creating a payment order. Each sub-task type corresponds to a different component agent; for example, verifying inventory and locking inventory correspond to the inventory agent, while deducting coupons and creating a payment order correspond to the payment agent.
[0118] S205. Verify whether multiple component agents are in an available state; if the verification result indicates that multiple component agents are in an available state, execute the following step S206; if the verification result indicates that there is a first component agent in an unavailable state, execute the following step S207.
[0119] Specifically, it determines whether the running status of multiple component agents is available. The running status can be, for example, online, offline, or busy. The available status indicates the online status of the component agent.
[0120] Before dynamically scheduling component agents, the first agent of the target application matches the component agents corresponding to each subtask type through a mapping table (e.g., "transfer" is mapped to the "remittance component agent") and verifies the availability status of each component agent. For example, when a user initiates a "transfer" request, user agent 2 queries the mapping table to confirm that the "remittance component agent" needs to be called, and then checks whether its status is "online". If the status is abnormal, as shown in step S207 below, the backup scheduling logic is triggered.
[0121] This method achieves accuracy and reliability in component agent scheduling through a mapping table and an availability verification mechanism. The mapping table ensures precise matching between interaction task types and components, avoiding scheduling errors; availability verification prevents transaction failures due to component unavailability, thereby improving system robustness.
[0122] S206. Call the intelligent agents of each component to perform interactive tasks in the order of execution.
[0123] When the verification result of step S205 indicates that multiple component agents are in an available state, each component agent is invoked to perform the interaction task according to the execution order corresponding to each component agent in the parsing result.
[0124] S207. Based on the corresponding subtask type, determine from the mapping table whether there is a backup component agent; if yes, proceed to step S208; if no, proceed to step S209.
[0125] For the first component agent whose running status is unavailable, the mapping table is consulted to determine whether this component agent corresponds to a backup component agent, which possesses the functions of the aforementioned component agent. For example, in the mapping table, the backup component agent corresponding to the remittance component agent is the payment interface component agent, which is capable of completing the transfer task.
[0126] This method invokes a backup intelligent component when the first intelligent component malfunctions, ensuring the smooth execution of business processes and improving user experience. Furthermore, by storing the correspondence between the first and backup intelligent components in a mapping table, this method ensures complete functional compatibility between the backup and the malfunctioning first intelligent component, preventing business interruptions caused by a single intelligent component malfunction. This enhances the stability and resilience of intelligent component interactions.
[0127] S208. Use the spare component intelligence as the component intelligence to be called, and call each component intelligence to perform the interaction task in the execution order.
[0128] The backup component agent is used as the component agent to be called, and a call sequence of multiple component agents is generated based on the execution order corresponding to each subtask type. Then, multiple component agents are called to perform interactive tasks according to the call sequence.
[0129] This method, based on the execution order corresponding to each subtask type, calls the backup component intelligence of the first component intelligence, as well as other component intelligences, to execute interactive tasks according to the business process, further ensuring the smooth execution of tasks.
[0130] S209. Generate task failure information and return the task failure information to the second intelligent agent.
[0131] The task failure information includes the identifier and status information of the first component intelligent agent.
[0132] If no backup component agent corresponding to the first component agent exists in the mapping table, task failure information is generated based on the identifier and status information of the first component agent. This task failure information may also include the time of task failure and the subtask type. The specific content of the task failure information is determined based on business requirements, and this application does not impose any restrictions on it.
[0133] This method provides feedback to the user when the interactive task fails to execute, which helps the user understand the reason for the task failure and take timely and targeted remedial measures.
[0134] S210. Based on the communication protocol, the execution result of the interactive task is fed back to the second intelligent agent, so that the second intelligent agent can generate display information based on the execution result and display the display information to the user.
[0135] The displayed information is user-oriented interactive feedback, such as "transfer successful" or "transaction failed".
[0136] After the component agent completes the interactive task, the first agent of the target application feeds back the execution result (such as "transfer successful") to the second agent (such as a voice assistant) through a communication protocol, and generates information to be displayed to the user. For example, user agent 2 encapsulates the "transfer successful" result into a protocol data packet and sends it to the voice assistant, and organizes and generates a voice feedback message "transfer completed". The execution result may include, for example, task failure information.
[0137] This method achieves closed-loop interaction in cross-application transactions by generating feedback and display information on the execution results. Users can obtain the task execution status in real time through the receiving end of the user request (such as a voice assistant) without having to manually view the target application's page, significantly improving the continuity of interaction and user experience.
[0138] Optionally, a method is provided here to send execution results to a second intelligent agent and display user information through the second intelligent agent. The method includes: encapsulating the execution results into a feedback data packet based on a communication protocol and sending the feedback data packet to the second intelligent agent; triggering a page jump mechanism through the feedback data packet to return from the first intelligent agent to the display interface of the second intelligent agent, so that after the second intelligent agent generates display information based on the feedback data packet, the display information is displayed to the user through the display interface.
[0139] The page navigation mechanism enables seamless switching between application pages. Based on the communication protocol, the execution result of the interactive task is encapsulated into a feedback data packet, which triggers the page navigation mechanism. For example, after user agent 2 encapsulates the "transfer successful" result into a protocol data packet, it automatically calls the navigation module, allowing the user to return from the bank app's transaction page to the voice assistant's interactive interface without manual operation.
[0140] This method achieves a seamless closed loop for cross-application transactions by combining feedback data packets with a redirection mechanism. Users can obtain task execution results through the receiving end of the user request without manually exiting the target application, significantly improving the smoothness of interaction and ease of operation.
[0141] The multi-agent interaction method provided in this embodiment receives request messages sent by a second agent based on a communication protocol, determines multiple sub-task types corresponding to the interaction task type from a task mapping table, and the execution order of these sub-task types. Then, based on the multiple sub-task types and their corresponding execution order, a parsing result is generated, and the component agents matching the multiple sub-task types are determined from a preset mapping table. This method, by decomposing the interaction task and clarifying the execution order of each sub-task type, provides a clear logical link for task execution, which is beneficial to improving task execution efficiency. Furthermore, this method ensures accurate matching between sub-task types and component agent functions, thereby guaranteeing smooth task execution.
[0142] Furthermore, the method verifies whether multiple component agents are in an available state. If the verification result indicates that all component agents are in an available state, the interactive tasks are executed by each component agent in the execution order. If the verification result indicates that a first component agent is in an unavailable state, the method determines whether a backup component agent exists based on the corresponding subtask type from the mapping table. If a corresponding backup component agent exists in the mapping table, it is used as the component agent to be invoked, and the interactive tasks are executed by each component agent in the execution order. This method ensures the accuracy and reliability of component agent scheduling through the mapping table and availability verification mechanism.
[0143] In addition, if a corresponding backup component agent exists in the mapping table, task failure information is generated and returned to the second agent so that the user can obtain the reason for the task failure in a timely manner and take targeted remedial measures.
[0144] After the task is completed, the execution result of the interactive task is fed back to the second intelligent agent, so that the second intelligent agent can generate display information based on the execution result and display the display information to the user. This allows the user to obtain the task execution result through the first intelligent agent without having to manually search the target application's page, which significantly improves the user experience.
[0145] Figure 3 The diagram shows the structure of the first and second intelligent agents provided in the embodiments of this application. Figure 3 As shown, Figure 1-2 The first and second intelligent agents shown in the embodiment are two independent intelligent agent units, and they complete cross-intelligent agent data interaction through a standardized A2A communication protocol.
[0146] like Figure 3 As shown, the two types of intelligent agents share the same underlying architecture and have aligned functional layers. Both are equipped with a unified technical foundation to achieve task parsing, component scheduling, and external business integration capabilities. The first intelligent agent 301 and the second intelligent agent 302 differ only in the service subject, deployment carrier, and business scenario. The complete architecture of the first intelligent agent 301, from top to bottom, consists of: the first user interaction layer 3011, the first component scheduling layer 3012, the first large model inference layer 3013, and the first intelligent agent development tool layer 3014. It also connects to external APIs and enterprise-level business applications through the MCP (Model Context Protocol) intermediate interaction layer.
[0147] The architecture of the second intelligent agent 302 is the same as that of the first intelligent agent 301, including: a second user interaction layer 3021, a second component scheduling layer 3022, a second large model inference layer 3023, and a second intelligent agent development tool layer 3024. This second intelligent agent 302 is a terminal-native built-in intelligent agent, deployed on the user's mobile phone, computer, or other local terminal devices. It is the first entry point for receiving user commands, directly accepting various user inputs such as raw requests, voice commands, text operations, and interface interactions from the terminal user, and is the request initiator of this interaction method. Examples of second intelligent agents include general AI (Artificial Intelligence) assistants built into the terminal system and intelligent assistants built into the operating system.
[0148] For the first intelligent agent 301, the first user interaction layer 3011 serves as the top-level control and scheduling unit. It does not directly collect raw operation commands from end users but instead listens to the communication interface of the A2A communication protocol and receives encapsulated request messages from the second intelligent agent 302. The first user interaction layer 3011 has built-in message authentication and verification logic to verify the legality of the message source, access permissions, and message integrity. Furthermore, the first user interaction layer 3011 also undertakes the task result feedback scheduling function. After completing the interaction task processing at each internal layer, it generates a result message and sends it to the lower layer for protocol encapsulation, then pushes it back to the second intelligent agent 302.
[0149] It should be noted that the first user interaction layer 3011 is the sole entry and exit point for cross-agent interactions between the first intelligent agent 301 and the second intelligent agent 302. All request messages from the second intelligent agent 302 and result messages sent to the second intelligent agent 302 are distributed through this layer. After receiving a request message, the first user interaction layer 3011 parses the request message and sends the parsed message data to the first component scheduling layer 3012.
[0150] The first component scheduling layer 3012 integrates multiple sets of dedicated intelligent components for vertical businesses, with each intelligent component corresponding to a different business interaction task.
[0151] After receiving the parsed message data, the first component scheduling layer 3012 extracts the interaction task type identifier from the message data. Based on this identifier, it matches and calls the corresponding business component agent to execute the specialized interaction task. During task execution, the component agent can call the large model inference layer to complete semantic processing and connect to external business systems via the underlying tool layer.
[0152] For example, when the interaction task type is a financial account query, the first component scheduling layer 3012 schedules the account query component agent. When the interaction task type is a financial management calculation, the first component scheduling layer 3012 schedules the financial management calculation component agent.
[0153] The first large model inference layer 3013 is used to provide general large model inference support for the upper-layer intelligent agents. This first large model inference layer 3013 has the functions of complex business semantic parsing, multi-turn interactive logic reasoning, natural language generation of business results, and task meaning. Figure 2 Secondary verification capability. When the component agent needs to perform natural language understanding, question-and-answer generation, or complex logic deduction when processing business tasks, the first component scheduling layer 3012 calls the first large model inference layer 3013 to complete the inference calculation and sends the inference result back to the corresponding component agent.
[0154] For example, the first large model inference layer 3013 deploys calling interfaces for multiple inference models. When the first large model inference layer 3013 receives a calling request from the first component scheduling layer 3012, it sends the standardized text to be inferred, business parameters, and interaction context data to the corresponding inference model calling interface based on the task inference type, business scenario identifier, and data dimension label in the calling request. This calls the matching target inference model to perform dedicated inference operations and outputs a structured inference result that is accurately adapted to the current business task. The calling request can be generated by the first component scheduling layer 3012 based on the currently executed interaction task type, the business processing requirements of the component agent, and user interaction context information.
[0155] The First Agent Development Tool Layer 3014 serves as the underlying foundation for the First Agent system, with the agent development kit as its physical carrier. The First Agent Development Tool Layer 3014 includes standardized A2A protocol encoding / decoding tools, message encapsulation / parsing templates, and cross-agent message routing rules.
[0156] Furthermore, the first intelligent agent development tool layer 3014 interfaces downwards with the MCP model context protocol, establishing data channels with external APIs and enterprise-level business applications, supporting upper-layer intelligent agents in retrieving business backend data and executing business operations. The first intelligent agent development tool layer 3014 also provides unified scheduling interfaces, data format standards, and communication capabilities to the upper three layers, ensuring standardized message parsing and external interface call processes.
[0157] For the second intelligent agent 302, the second user interaction layer 3021 is the direct interaction entry point for the end user. It is responsible for collecting various raw request commands issued by the user, such as text, voice, and touch operations. It is used to receive all the user's input data and distribute it down to the lower layer to complete the task objective recognition. In addition, the second user interaction layer 3021 is also used to receive the task processing results returned from the lower layer and convert the results into visual and playable interactive content to be displayed to the end user.
[0158] It should be noted that the second user interaction layer 3021 does not directly interact with the first intelligent agent; it only serves as a carrier unit for user input and output. All cross-intelligent agent interaction actions are completed by the lower component scheduling layer.
[0159] The second component scheduling layer 3022 integrates an interactive behavior recognition component, a message generation component, an A2A protocol encapsulation component, and a communication interface scheduling component. It is used to receive the original user request sent by the second user interaction layer 3021, and rely on the lower second-largest model inference layer 3023 to complete the interactive behavior recognition, generate a standardized request message carrying the interactive task type; match the target first intelligent agent according to the interactive task type in the message, call the underlying development tools to complete the message encapsulation, and schedule the A2A protocol communication interface to send the encapsulated message to the first intelligent agent; at the same time, it receives the result message returned by the first intelligent agent, parses it, and pushes it up to the second user interaction layer for display.
[0160] The second component scheduling layer 3022 is the core execution layer for cross-agent data interaction between the second agent 302 and the first agent 301. All messages sent to or received from the first agent are initiated and processed by the second component scheduling layer 3022.
[0161] The first major model inference layer 3013 is used to provide the upper second component scheduling layer 3022 with the ability to perform semantic parsing of user requests, recognition of interactive behaviors, and classification of interactive task types.
[0162] For example, after receiving the user's original request text data and / or voice data, the first major model inference layer 3013 performs semantic decomposition and business intent judgment, and then outputs a standardized interaction task type identifier to be sent back to the upper layer message generation component as the basis for filling the core fields of the request message.
[0163] The second intelligent agent development tool layer 3024 serves as the underlying foundation for the second intelligent agent, fully unified with the protocol standard of the first intelligent agent development tool layer 3014. It incorporates A2A protocol encapsulation and decoding tools to provide a standardized communication interface call mechanism. Furthermore, the second intelligent agent development tool layer 3024 interfaces downwards with the MCP protocol, enabling independent calls to terminal-local general APIs and lightweight applications to complete simple local tasks. It also provides the second component scheduling layer 3022 with underlying capabilities for protocol encapsulation, message routing, and cross-agent transmission, ensuring that encapsulated request messages can be transmitted to the first intelligent agent 301 according to the A2A protocol specification.
[0164] Figure 4 This is a schematic diagram illustrating an application scenario of a multi-agent system provided in an embodiment of this application. For example... Figure 4As shown, "Little A" is the name of the second intelligent agent deployed on the user terminal. The first intelligent agent is the financial intelligent agent built into Bank B, and the two complete cross-agent interaction through the A2A protocol.
[0165] refer to Figure 4 When a user sends the command "transfer money" through the terminal's A-level dialogue interface, the second user interaction layer of the second intelligent agent A captures this original user request and, through the second component scheduling layer, calls the lower-level second-largest model inference layer to complete the interaction behavior recognition. It identifies the user's request as a bank transfer transaction and determines the interaction task type as "interbank / same-bank transfer financial processing task." Subsequently, the A-level interface displays a list of recommended bank applications and asks the user to specify a bank. The recommended bank applications include, for example, "Bank A, Bank B, and Bank C."
[0166] like Figure 4 As shown, the user's subsequent supplementary instruction "transfer 100 yuan using Bank B" is integrated by the second component scheduling layer to generate a standardized request message carrying the interactive task type.
[0167] The second component scheduling layer matches the corresponding financial intelligent agent built into the Bank B APP based on the interaction task type "Bank B transfer" in the request message. Furthermore, the second component scheduling layer calls the A2A protocol tool in the underlying second intelligent agent development tool layer to encapsulate and process the request message.
[0168] For example, the encapsulation process includes, but is not limited to, adding terminal identity verification fields, message routing addresses, interaction permission identifiers, and user transfer context (transfer amount, recipient, etc.) protocol header information.
[0169] Subsequently, through the A2A protocol's preset interface call mechanism, the dedicated communication interface corresponding to the Bank B agent is addressed, and the communication interface is scheduled. Then, the encapsulated request message is transmitted to the first user interaction layer of the Bank B APP's first agent through the scheduled A2A communication interface, and the feedback message "Okay, opening Bank B" is output synchronously on the interaction interface.
[0170] Understandably, if the user adds supplementary transfer details, such as "transfer 100 yuan to Zhang San using Bank B", the second intelligent agent repeats the above process. Figure 1 In the embodiment, steps S101-S103 involve updating the request message and re-encapsulating it before sending it to the first intelligent agent of Bank B's APP.
[0171] The first user interaction layer of the first intelligent agent built into Bank B's APP receives the request message and verifies it. If the verification is successful, it parses the message to extract the interaction task type "Bank B transfer" and the transfer parameters. These parameters can include, for example, the amount and recipient information.
[0172] Subsequently, the first user interaction layer sends the parsed business data to the first component scheduling layer. The first component scheduling layer schedules the internal transfer business component intelligent agent according to the type of interaction task. The transfer business component intelligent agent then calls the first major model inference layer as needed to complete the verification of payment information and the semantic verification of transfer rules.
[0173] In addition, by connecting to the MCP protocol through the first intelligent agent development tool layer, the ICBC enterprise-level business API is called to redirect to the bank transfer processing page, pre-fill the transfer amount, receiving account and other information, and complete the transfer interaction task.
[0174] Figure 5 This is a schematic diagram of the structure of the multi-agent interaction device provided in this application. Figure 5 As shown, the multi-agent interaction device 50 provided in this embodiment is applied to a first agent. A communication protocol is configured between the first agent and the second agent. The device includes:
[0175] The receiving module 501 is used to receive request messages sent by the second intelligent agent based on the communication protocol;
[0176] Parsing module 502 is used to parse request messages;
[0177] Module 503 is used to invoke the corresponding component agent to execute the interactive task based on the interactive task type in the parsing result.
[0178] In one possible implementation, the above request message includes an interactive task type, and the device further includes: a determining module 504 and a generating module 505;
[0179] The determination module 504 is used to determine multiple sub-task types corresponding to the interactive task type from the task mapping table, as well as the execution order of the multiple sub-task types;
[0180] The generation module 505 is used to generate parsing results based on multiple subtask types and the execution order of each subtask type.
[0181] In one possible implementation, the device further includes: a verification module 506;
[0182] The determination module 504 is also used to determine multiple component agents that match the subtask types from a preset mapping table;
[0183] Verification module 506 is used to verify whether multiple component agents are in an available state;
[0184] Module 503 is called specifically to invoke each component agent to perform interactive tasks in the order of execution when the verification result indicates that multiple component agents are in an available state.
[0185] In one possible implementation, the determining module 504 is further configured to determine, based on the corresponding subtask type, whether there is a backup component agent when the verification result indicates that there is a first component agent in an unavailable state;
[0186] The calling module 503 is also used to, if so, use the spare component intelligence as the component intelligence to be called, and call each component intelligence to perform the interaction task in the order of execution;
[0187] The generation module 505 is also used to generate task failure information if not, and return the task failure information to the second agent. The task failure information includes the identifier and status information of the first agent.
[0188] In one possible implementation, the above-mentioned device further includes: a feedback module 507;
[0189] Feedback module 507 is used to feed back the execution result of the interactive task to the second intelligent agent based on the communication protocol, so that the second intelligent agent can generate display information based on the execution result and display the display information to the user.
[0190] In one possible implementation, the above-mentioned device further includes: an encapsulation module 508 and a trigger module 509;
[0191] The encapsulation module 508 is used to encapsulate the execution result into a feedback data packet based on the communication protocol;
[0192] The feedback module 507 is also used to send feedback data packets to the second intelligent agent;
[0193] Trigger module 509 is used to trigger a page jump mechanism through feedback data packets to return from the first intelligent agent to the display interface of the second intelligent agent, so that after the second intelligent agent generates display information based on the feedback data packets, the display information is displayed to the user through the display interface.
[0194] This embodiment provides a multi-agent interaction device that can execute the methods provided in the above method embodiments. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0195] Figure 6 This is a schematic diagram of the structure of the multi-agent interaction device provided in this application. Figure 6As shown, the multi-agent interaction device 60 provided in this embodiment is applied to a second agent. A communication protocol is configured between the second agent and the first agent. The device includes:
[0196] Module 601 is used to obtain user requests;
[0197] The identification module 602 is used to identify the interactive behavior of the user request and generate a request message, which includes the interactive task type.
[0198] The determination module 603 is used to determine the first intelligent agent corresponding to the interactive task type, and send the request message to the first intelligent agent based on the communication protocol.
[0199] In one possible implementation, the above-mentioned device further includes: a receiving module 604 and a generating module 605;
[0200] The receiving module 604 is used to receive the execution result of the interactive task sent by the first intelligent agent;
[0201] The generation module 605 is used to generate display information based on the execution results and display the display information to the user.
[0202] This embodiment provides a multi-agent interaction device that can execute the methods provided in the above method embodiments. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0203] Figure 7 A schematic diagram of the structure of the electronic device provided in this application. Figure 7 As shown, the electronic device 70 provided in this embodiment includes at least one processor 701 and a memory 702. Optionally, the device 70 further includes a communication component 703. The processor 701, memory 702, and communication component 703 are connected via a bus 704.
[0204] In a specific implementation, at least one processor 701 executes computer execution instructions stored in memory 702, causing at least one processor 701 to perform the above-described method.
[0205] The specific implementation process of processor 701 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0206] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0207] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0208] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0209] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0210] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.
[0211] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0212] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.
[0213] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0214] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0215] In addition, the functional units in the various embodiments of the present invention 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.
[0216] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a 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, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0217] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0218] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.
[0219] It should be further noted that although the steps in the flowchart 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 flowchart may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0220] It should be understood that the above-described device embodiments are merely illustrative, and the device of this application can also be implemented in other ways. For example, the division of units / modules in the above embodiments is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units, modules, or components may be combined, or integrated into another system, or some features may be ignored or not executed.
[0221] Furthermore, unless otherwise specified, the functional units / modules in the various embodiments of this application can be integrated into one unit / module, or each unit / module can exist physically separately, or two or more units / modules can be integrated together. The integrated units / modules described above can be implemented in hardware or as software program modules.
[0222] When integrated units / modules are implemented in hardware, the hardware can be digital circuits, analog circuits, etc. The physical implementation of the hardware structure includes, but is not limited to, transistors, memristors, etc. Unless otherwise specified, the processor can be any suitable hardware processor, such as a CPU, GPU, FPGA, DSP, and ASIC, etc. Unless otherwise specified, the storage unit can be any suitable magnetic or magneto-optical storage medium, such as Resistive Random Access Memory (RRAM), Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Enhanced Dynamic Random Access Memory (EDRAM), High-Bandwidth Memory (HBM), Hybrid Memory Cube (HMC), etc.
[0223] If the integrated unit / module is implemented as a software program module and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). 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 memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0224] In the above embodiments, the descriptions of each embodiment have their own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments. The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.
[0225] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0226] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method for interaction among multiple agents, characterized in that, Applied to a first intelligent agent, wherein a communication protocol is configured between the first and second intelligent agents, the method includes: Based on the communication protocol, a request message sent by the second intelligent agent is received, the request message including an interactive task; The request message is parsed, and based on the interaction task type in the parsing result, the corresponding component agent is invoked to execute the interaction task.
2. The method according to claim 1, characterized in that, The request message includes an interactive task type, and parsing the request message includes: Determine multiple sub-task types corresponding to the interactive task type from the task mapping table, as well as the execution order of the multiple sub-task types; Based on the multiple subtask types and the execution order corresponding to each subtask type, a parsing result is generated.
3. The method according to claim 2, characterized in that, The step of invoking the corresponding component agent to execute the interaction task based on the interaction task type in the parsing result includes: Determine the component agents that match the multiple subtask types from the preset mapping table; Verify whether the multiple component agents are in an available state; When the verification result indicates that all of the component agents are in an available state, the component agents are invoked to execute the interaction task in the execution order.
4. The method according to claim 3, characterized in that, The method further includes: If the verification result indicates that there is a first component agent that is unavailable, determine whether there is a backup component agent based on the corresponding subtask type from the mapping table; If so, the backup component agent is used as the component agent to be called, and each component agent is called to perform the interaction task according to the execution order; If not, a task failure message is generated and returned to the second agent. The task failure message includes the identifier and status information of the first agent.
5. The method according to any one of claims 1-4, characterized in that, After invoking the corresponding component agent to execute the interaction task, the method further includes: Based on the communication protocol, the execution result of the interactive task is fed back to the second intelligent agent, so that the second intelligent agent generates display information based on the execution result and displays the display information to the user.
6. The method according to claim 5, characterized in that, The step of feeding back the execution result of the interactive task to the second intelligent agent based on the communication protocol includes: Based on the communication protocol, the execution result is encapsulated into a feedback data packet, and the feedback data packet is sent to the second intelligent agent; The feedback data packet triggers a page redirection mechanism to return from the first agent to the display interface of the second agent, so that after the second agent generates display information based on the feedback data packet, the display information is presented to the user through the display interface.
7. A method for interaction among multiple agents, characterized in that, The method, applied to a second intelligent agent, wherein a communication protocol is configured between the second and first intelligent agents, includes: Obtain user requests, identify interactive behaviors in the user requests, and generate request messages, the request messages including interactive task types; The first intelligent agent corresponding to the interaction task type is determined, and the request message is encapsulated based on the communication protocol. The corresponding communication interface is invoked through the interface call mechanism in the communication protocol to send the encapsulated request message to the first intelligent agent.
8. The method according to claim 7, characterized in that, The method further includes: Receive the execution result of the interactive task sent by the first intelligent agent; Based on the execution result, display information is generated and presented to the user.
9. An interaction device for multiple agents, characterized in that, Applied to a first intelligent agent, wherein a communication protocol is configured between the first and second intelligent agents, the device includes: The receiving module is used to receive a request message sent by the second intelligent agent based on the communication protocol. The parsing module is used to parse the request message; The calling module is used to call the corresponding component agent to execute the interactive task based on the interactive task type in the parsing result.
10. An interaction device for multiple agents, characterized in that, The device, which is used in a second intelligent agent and configured with a communication protocol between the second and first intelligent agents, includes: The acquisition module is used to acquire user requests; The identification module is used to identify the interactive behavior of the user request and generate a request message, wherein the request message includes the interactive task type; The determining module is used to determine the first intelligent agent corresponding to the interaction task type, and send the request message to the first intelligent agent based on the communication protocol.
11. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 8.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 8.
13. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 8.
