Communication method and communication system between applications
By using the agent management service module to locate target agents and identify their intentions, and encapsulating the information into a message body, the problem of obtaining accurate IP addresses or domain names for communication between multiple applications is solved, thus achieving efficient inter-application communication and system scalability.
Patent Information
- Application Number
- CN202411102252.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2026-02-13
AI Technical Summary
When multiple applications communicate, they need to obtain the accurate IP address or domain name of other applications in order to communicate. Furthermore, if one application changes its IP address or domain name, other applications will not be able to communicate if they do not change their IP address or domain name accordingly.
By acquiring user input messages, we obtain agent description information and task information. We then use the agent management service module to locate the target agent and identify its intent, encapsulate the information into a message body, and realize semantic addressing of the agent without needing to obtain an accurate IP address or domain name.
It improves the efficiency of inter-application communication, allowing applications to continue communicating even when IP addresses or domain names change, thus enhancing the system's scalability and flexibility.
Smart Images

Figure CN121523923A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of communication, in particular to a method and system for inter-application communication. BACKGROUND
[0002] With the improvement of the accuracy of large language models, the number of applications based on large language models is increasing. Currently, some development frameworks for large language model applications have appeared, aiming to structure and standardize the calling relationship between computer code and large language models. However, the above frameworks are only for single-machine applications, and the traditional addressing method, IP addressing or domain name addressing, is still used for communication between multiple applications.
[0003] When multiple applications communicate through the traditional addressing method, each application needs to accurately obtain the IP address or domain name of other applications to communicate. If the accurate information of other applications cannot be obtained, the application cannot communicate with other applications. Moreover, when an application modifies the IP address or domain name, other applications will also be unable to communicate with the application if they do not modify accordingly. SUMMARY
[0004] Embodiments of the present application provide a method and system for inter-application communication to at least solve the problem that in related technologies, each application needs to obtain accurate information of other applications to communicate when multiple applications communicate.
[0005] According to an embodiment of the present application, a method for inter-application communication is provided, comprising: obtaining agent description information and task information corresponding to a message input by a user according to the message, and sending the agent description information and the task information to an agent management service module; encapsulating target agent positioning information and intent information sent by the agent management service module into a message body; determining a second application where the target agent is located according to the message body, and sending the message body to the second application, so that the second application performs a business operation corresponding to the intent information in the message body.
[0006] According to another embodiment of the present application, a communication system is provided, comprising: a first application and a second application; the first application is configured to obtain agent description information and task information corresponding to a message input by a user according to the message, and send the agent description information and the task information to an agent management service module; encapsulate target agent positioning information and intent information sent by the agent management service module into a message body; determine a second application where the target agent is located according to the message body, and send the message body to the second application, so that the second application performs a business operation corresponding to the intent information in the message body.
[0007] According to still another embodiment of the present application, a computer readable storage medium is also provided, in which a computer program is stored, wherein the computer program is configured to perform the steps of any of the above method embodiments when executed.
[0008] According to still another embodiment of the present application, an electronic device is also provided, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the computer program to perform the steps of any of the above method embodiments.
[0009] According to still another embodiment of the present application, a computer program product is also provided, comprising a computer program and instructions, which are executed by a processor to implement the steps of any of the above method embodiments.
[0010] Through the above embodiments of the present application, when communicating between applications, the agent description information and the task information corresponding to the message input by the user can be acquired, and then the second application where the message receiver is located can be determined through the agent description information and the task information. That is, without acquiring the accurate information such as the IP address or domain name of the second application, the second application can be determined based on the message input by the user, and thus the problem that in the related art, each application needs to acquire the accurate information of other applications to communicate can be solved, and the efficiency of the inter-application communication can be improved. BRIEF DESCRIPTION OF DRAWINGS
[0011] Figure 1 is a hardware structure diagram of a computer terminal for implementing the inter-application communication method according to an embodiment of the present application;
[0012] Figure 2 is a network architecture diagram of a communication system according to an embodiment of the present application;
[0013] Figure 3 is a structure block diagram of an internal structure of an agent according to an embodiment of the present application;
[0014] Figure 4 is a principle diagram of message transmission in an agent according to an embodiment of the present application;
[0015] Figure 5 is a flowchart of the inter-application communication method according to an embodiment of the present application;
[0016] Figure 6 is a flowchart of target agent positioning according to an embodiment of the present application;
[0017] Figure 7 is a whole flowchart of the inter-application communication method according to an embodiment of the present application;
[0018] Figure 8 is a structural block diagram of a communication system according to an embodiment of the present application. DETAILED DESCRIPTION
[0019] Hereinafter, embodiments of the present application will be described in detail with reference to the accompanying drawings and in conjunction with embodiments.
[0020] It should be noted that the terms "first", "second", and the like in the description of the present application and the claims, and the above-described accompanying drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence.
[0021] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal, or a similar computing device. Taking the case of running on a computer terminal, Figure 1 is a hardware structural diagram of a computer terminal running an inter-application communication method according to an embodiment of the present application. As shown in Figure 1 , the computer terminal can include one or more (only one is shown in Figure 1 ) processors 102 (the processor 102 can include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the above-mentioned computer terminal can further include a transmission device 106 for communication function and an input and output device 108. Those skilled in the art can understand that Figure 1 the structure shown is only schematic, which does not limit the structure of the above-mentioned computer terminal. For example, the computer terminal can further include more or fewer components than those shown in Figure 1 , or have a different configuration from that shown in Figure 1 .
[0022] The memory 104 can be used to store computer programs, for example, software programs of application software and modules, such as the computer program corresponding to the inter-application communication method in the embodiments of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implements the above-mentioned method. The memory 104 can include a high-speed random access memory, and can further include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory 104 can further include a memory remotely arranged with respect to the processor 102, which can be connected to the computer terminal through a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0023] The transmission device 106 is configured to receive or send data via a network. The network can include a wireless network provided by a communication provider of a computer terminal. In an example, the transmission device 106 includes a network adapter (NIC) that can be connected to other network devices through a base station to communicate with the Internet. In an example, the transmission device 106 can be a radio frequency (RF) module configured to communicate with the Internet in a wireless manner.
[0024] For any networking system, the system can be divided into different applications according to functions. For example, the network management system can be divided into assurance applications, network viewing applications, and question and answer applications. Each application includes multiple functions. For example, the assurance applications include major event assurance, network monitoring, and fault troubleshooting functions. Different functions can form an intelligent agent.
[0025] The embodiment of the present application can run on the network architecture of the communication system as shown in FIG. 1. Figure 2 The communication system mainly includes a plurality of applications (only two applications A and B are shown in FIG. 1), an intelligent agent management service module, and a message bus for communication between the applications A and B. When the applications A and B create intelligent agents, the intelligent agent management agent module is used to register intelligent agent information, IP addresses, and port numbers of program processes in the intelligent agent management service module for subsequent intelligent agent positioning and communication processes. The intelligent agent management service module is configured to store intelligent agent information, provide intelligent agent positioning information, and identify message intents. Figure 2 Figure 2 The message distribution modules in the applications A and B send task information and intelligent agent descriptions corresponding to the received messages to the intelligent agent management service module through the intelligent agent management agent module.
[0026] The intelligent agent management service module fills in intelligent agent selection prompts and intent recognition prompts based on the stored intelligent agent information and the received task information and intelligent agent descriptions, and selects intelligent agents that best match the semantic descriptions using a large language model to achieve intelligent agent positioning and identify the sender intents of the messages.
[0027] The intelligent agent management service module makes the communication system in the embodiment of the present application capable of addressing intelligent agents through semantic information such as intelligent agent names, roles, and functions, without the need for accurate information such as IP addresses or domain names to address intelligent agents.
[0028] The intelligent agent management service module makes the communication system in the embodiment of the present application capable of addressing intelligent agents through semantic information such as intelligent agent names, roles, and functions, without the need for accurate information such as IP addresses or domain names to address intelligent agents.
[0029] Each application specifically includes: an agent management agent module, a message distribution module, a sending module, a receiving module, and multiple agents ( Figure 2 Only three agents, A, B, and C, are shown in the diagram.
[0030] The agent management agent module has the function of interacting with the agent management service module.
[0031] The message distribution module is responsible for distributing decision messages to a specific agent, which can be within this application or from another application.
[0032] In this embodiment, the message distribution module can communicate with the agent management service module. After transmitting communication information to the agent management service module, the agent management service module finds the most suitable agent and returns the agent's information to the message distribution module, which then forwards the message. When the information of an agent changes, only the information in the agent management service module needs to be updated synchronously, and subsequent communication can continue without other agents being aware of the change.
[0033] The receiving module is used to receive messages from other applications.
[0034] The sending module is used to send messages from this application to other applications.
[0035] In this embodiment, the agent management agent module, message distribution module, sending module, and receiving module require the application to introduce an SDK (Software Development Kit).
[0036] The communication system in this embodiment of the invention has no special requirements for the storage of agent information and message transmission protocols. Agent information storage can be implemented based on the registration center or database in the existing platform, and communication can be achieved through common remote communication methods such as HTTP / HTTPS, RPC, or Kafka. Furthermore, the message forwarding, registration, and remote communication modules are merged into a single SDK. Adding an agent that implements a specific function only requires importing this SDK to achieve communication, greatly increasing the scalability of large-scale distributed systems.
[0037] Compared to other communication systems, the communication system in this embodiment not only transmits data but also adds semantic intent and contextual information, proposing a message body structure based on intent recognition. This structure includes information such as sender, receiver, current information, contextual information, and sender intent. The sender intent is obtained by a large language model and includes notification, withdrawal, request, and inquiry. The contextual information includes not only previous dialogue information but also user preferences, external conditions, and commitments. Through this information, the agent can better understand and respond to complex scenarios.
[0038] An intelligent agent is used to implement a specific business function. Figure 3 This is a structural block diagram of the internal structure of an intelligent agent according to an embodiment of the present invention, such as... Figure 3 As shown, the application assistant includes agent A, agent B, and agent C, among which agents A and C can interact with the LLM.
[0039] The intelligent agent mainly consists of an Assistant Agent and a Proxy Agent (such as Agent A and Agent C). The Assistant Agent implements the interaction with the LLM and has built-in prompt words from the large language model to implement specific functions; the Proxy Agent is responsible for the execution of business code and has built-in operation functions corresponding to the output of the large language model.
[0040] Assistant Agent and Proxy Agent provide the receive and send functions respectively to realize information exchange. An agent can consist of one Proxy Agent and N Assistant Agents (such as an agent C), where N is a non-negative integer, to implement point-to-point, group chat, state machine and other dialogue functions for computation or large language models.
[0041] In this embodiment, the intelligent agent may also contain only a Proxy Agent, such as... Figure 3 The B agent shown.
[0042] Message transmission in intelligent agents, such as Figure 4 As shown, when the agent receives the message body input by the message distribution module, the ProxyAgent extracts the historical dialogue information and the current dialogue information from the message body, and calls the receive function of the Assistant Agent through the send function to pass the message to the Assistant Agent.
[0043] The Assistant Agent selects information from the prompt words to fill in and complete them, then inputs the completed prompt words into the large language model to obtain the results. It then uses the `send` method to call the Proxy Agent's `receive` method to return the results. The Proxy Agent matches the results with the corresponding built-in operation functions, triggering the execution of the appropriate operation. After the operation is completed, the specified recipient and the agent's `send` function send the results to the message distribution module, initiating a new agent localization and message communication process.
[0044] This embodiment provides an inter-application communication method running on the above-mentioned computer terminal or network management system architecture. The inter-application communication method involves a semantic addressing mode. This mode does not need to know the exact information of the application. It can locate the communication object only based on the object description (i.e., agent description information) or user intent. Furthermore, when the application's IP address or domain name changes, it can still communicate without corresponding modifications.
[0045] Figure 5 This is a flowchart of an inter-application communication method according to an embodiment of the present invention. The method is applied to a first application, which is an application that receives user messages, such as... Figure 5 As shown, the process includes the following steps:
[0046] Step S502: Based on the message input by the user, obtain the agent description information and task information corresponding to the message, and send the agent description information and task information to the agent management service module;
[0047] Before step S502 in this embodiment, the method further includes: registering the configuration files, Internet Protocol addresses, and port numbers of the program processes of each application in the communication system to the agent management service module. The configuration files include information about the agents corresponding to each application. The information of the agents includes at least one of the following: name, description, role, department, responsibilities, skills, and knowledge base.
[0048] In one embodiment, such as Figure 2 As shown, the agent registration process in the network architecture of the communication system includes: registering agent information, Internet Protocol (IP) addresses, and application process port numbers to the agent management service module through the agent management agent module. The agent information includes: name, description, role, department, responsibilities, skills, and knowledge base.
[0049] Taking a network fault diagnosis agent as an example, the agent information includes the following:
[0050] Agent name: Troubleshooting Expert (the unique identifier of the intelligent agent);
[0051] Description: An expert with extensive experience in root cause analysis of failures;
[0052] Responsibility: Diagnose the root cause of the fault and notify human resources of the diagnosis results;
[0053] role: the agent that executes the action;
[0054] organization: ensures application security;
[0055] Skills: Alarm diagnosis, performance diagnosis;
[0056] Knowledge: Faults include cell outages, and serious faults include single-board malfunctions.
[0057] IP: xxx (application server IP address);
[0058] port: xxx (application port number).
[0059] Step S504: Encapsulate the target agent location information and intent information sent by the agent management service module into a message body;
[0060] Before step S504 in this embodiment, the method further includes: the agent management service module identifying the target agent's location information and intent information from the user's input message.
[0061] In one embodiment, the message body further encapsulates at least one of the following information: current dialogue information corresponding to the message entered by the user this time, historical dialogue information corresponding to the messages entered by the user previously, the sender information of the message body, and the receiver information of the message body.
[0062] To achieve efficient communication between intelligent agents, the communication system of this invention defines a message body. The encapsulated message body includes at least the following attributes:
[0063] Context: Historical dialogue information corresponding to the messages previously entered by the user, including summaries of previous conversations, extracted user preferences, environmental information, etc.
[0064] message: The current conversation information corresponding to the message entered by the user, including task information message and intent information.
[0065] sender: The message (body) sender, intelligent agent, or application front-end.
[0066] receiver: The message (body) receiver, intelligent agent or application front-end, whose content is the obtained receive_agent.
[0067] In one embodiment, based on Figure 2 The communication system's target agent localization and intent recognition process, as well as the message communication process, are as follows: When the application receives a message from the application front-end or other sources (i.e., a message input by the user), it sends the message to the message distribution module. First, the target agent localization process is executed, followed by the message communication process, thus completing the target agent localization and message communication. The target agent localization and intent recognition process comprises two parts: agent localization and intent recognition.
[0068] Figure 6 This is a flowchart of target agent localization according to an embodiment of the present invention, the process including the following steps:
[0069] In step S601, the message distribution module sends the message to the agent management service module through the agent management agent module. The message includes agent description information receiver.
[0070] In step S602, the agent management service module fills the received agent description information and the saved agent information into the prompt words, and sends the prompt words to the large language model to achieve target agent localization.
[0071] In this embodiment, the agent management service module has a set of agent selection prompts. After the agent management service module fills the received agent description information and the saved agent information into the agent selection prompts, it can use the large language model to find the most matching agent.
[0072] In one embodiment, the target agent location information is determined by the large language model based on agent selection prompts sent by the agent management service module; the agent selection prompts are as follows:
[0073] The current receiver is: {receiver}
[0074] You only have the following agents; do not output agents not listed:
[0075] {agents}
[0076] Use the following format:
[0077] Thought: We should always consider which agent is the best match for the current receiver;
[0078] Action: The name of the best-matching agent. Only one of [{agent_names}] is needed; simply enter the name.
[0079] Observation: The result obtained using the selected agent.
[0080] Where {receiver} represents the agent's description information;
[0081] {agents} represents the information of the top 10 agents obtained after using a fuzzy query in the database. Using a fuzzy query for initial filtering can improve the accuracy of matching in large language models.
[0082] [{agent_names}] is a list of names of the 10 selected agents.
[0083] In step S603, the intelligent agent management service module identifies the sender's intent information from the received message.
[0084] In this embodiment, intent information includes, but is not limited to, the following categories:
[0085] Notification: Providing information or facts without requiring a direct response from the other party;
[0086] Withdraw: To revoke or correct a previously sent message;
[0087] Request: Seek help, action, or resources from the other party;
[0088] Inquiry: Seeking information, opinions, or confirmation from the other party;
[0089] Confirmation: To confirm the accuracy of information or an arrangement;
[0090] Suggestion: Offer your viewpoints or solutions for the other party to consider;
[0091] Agreement: expressing approval or acceptance of something;
[0092] Oppose: to express a different opinion or to reject a suggestion;
[0093] Warning: To alert the other party to potential problems or dangers.
[0094] In this embodiment, the agent management service module also includes a set of intent recognition prompts. After filling the prompts with task information from the application front-end and all intent information stored in the agent management service module, a large language model is used to analyze and determine the most relevant intent. The task information is included in the received message.
[0095] In one embodiment, the identified intent information is determined by the large language model based on intent recognition prompts sent by the agent management service module. The intent recognition prompts are as follows:
[0096] The current message is: {message}
[0097] Analyze the message to determine which of the following is its intended message, and do not output any unlisted intentions:
[0098] [{intentions}];
[0099] Use the following format:
[0100] Thought: Always consider which intention best matches the intention the current message wants to convey;
[0101] Action: The most matching intent. Only one of [{intention_names}] is needed; simply enter the name.
[0102] Observation: The degree to which the selected intent matches the intent expressed by the current message, with a value between 0 and 100.
[0103] Where {message} is for entering task information;
[0104] {intentions} is where you fill in the intent information;
[0105] [{intention_names}] is the list of intention names to be entered.
[0106] After completing the target agent localization process described above, the message distribution module now possesses the following information:
[0107] message: Task information;
[0108] receiver: Description information of the agent;
[0109] receive_agent: Target agent location information;
[0110] intention: Identified intent information.
[0111] By leveraging the intent recognition capabilities of intelligent agent management services, it can determine whether the current message represents one of the following intents: notification, withdrawal, request, inquiry, confirmation, suggestion, agreement, objection, or warning. Based on this, the agent can then take different actions depending on the intent. This approach allows the agent to handle different operations like a human, thereby enabling complex coordinated operations between intelligent systems.
[0112] Step S506: Determine the second application where the target intelligent agent resides based on the message body, and send the message body to the second application so that the second application executes the business operation corresponding to the intent information in the message body. The second application is the application used to perform the specific function; it may be the same application as the first application or a different application.
[0113] After encapsulating the message body, the message distribution module matches the message receiver with the application's set of intelligent agents. If the receiver is an intelligent agent belonging to the application, the message body is sent to that agent. Otherwise, it is sent to the application's sending module, which then forwards the message body to the message bus. Simultaneously, each application also has a receiver that retrieves message bodies belonging to its intelligent agents from the message bus and sends them to the message distribution module. The message distribution module calls the receiver's intelligent agent's `receive` function based on the current receiver, passing the message body to the agent for processing. When the message receiver is the application's frontend, the result is returned.
[0114] In one embodiment, when the second application and the first application are different applications, sending the message body to the second application includes: sending the message body to the message bus through the message sending module according to the Internet Protocol address of the first application and the port number of the program process of the first application, so that the second application can obtain the message body from the message bus through the receiving module.
[0115] In one embodiment, when the second application is the same as the first application, sending the message body to the second application includes: determining the target intelligent agent to receive the message body based on the message body, and sending the message body to the target intelligent agent through the message distribution module of the first application.
[0116] In one embodiment, after sending the message body to the second application, the method further includes: the second application determining the business operation corresponding to the identified intent information encapsulated in the message body, and executing the business operation through the target intelligent agent.
[0117] In one embodiment, determining the business operation corresponding to the identified intent information includes: determining a target prompt word for interacting with a large language model based on the identified intent information; executing the business operation through a target agent and obtaining the business operation result.
[0118] In this embodiment, after obtaining the business operation result, the method further includes: encapsulating the message body and the business operation result into a new message body, and storing the dialogue message corresponding to the execution of the business operation and the business operation result as historical messages.
[0119] Through the above steps, when communicating between applications, the system can obtain the agent description information and task information corresponding to the user's input message. The agent description information and task information can be used to achieve agent addressing, i.e., target agent location information. Furthermore, the identified intent information enables the agent to better respond to complex scenarios. The target agent location information and the identified intent information are then encapsulated into a message body. Based on the message body, the second application where the message recipient is located is determined. This standardizes message communication between applications. Therefore, it can solve the problem in related technologies where, when multiple applications communicate, one application needs to obtain accurate information from other applications before it can communicate, thus improving the overall efficiency of the application.
[0120] The intent information recognition function of the agent management service module can determine whether the current message is one of the intents such as notification, withdrawal, request, inquiry, confirmation, suggestion, agreement, objection, and warning. The agent management service module will take different actions for different intents, thereby realizing complex coordination operations between agents.
[0121] Figure 7 This is an overall flowchart of the inter-application communication method according to an embodiment of the present invention, which can be implemented using the following methods:
[0122] Step S701, Begin;
[0123] Step S702: The application's front-end interface obtains the message;
[0124] Specifically, the messages received by the front-end interface include: text messages entered by the user on the front-end interface, email messages received by the front-end interface, and environmental messages, such as the message: "The outage of the community is a serious fault."
[0125] Step S703: Determine the agent description information and task information corresponding to the message based on the obtained message, and locate the agent based on the agent description information and task information;
[0126] For example, a user enters a text message in the application's front-end interface.
[0127] In step S7031, the application determines the required agent based on the input text message, obtains the corresponding agent description information (receiver), and sends the input text message (i.e., task information) and agent description information to the message distribution module. That is, the message distribution module receives the following information:
[0128] Message: The outage of the community service is a serious fault;
[0129] receiver: an expert in troubleshooting;
[0130] In step S7032, after receiving the input text message and agent description information, the message distribution module interacts with the agent management service module to send the input text message and agent description information to the agent management service module.
[0131] In step S7033, after the agent management service module obtains the input text message and agent description information, it fills the agent description information and the agent information stored in the agent management service module into the agent selection prompt, as follows:
[0132] "The current recipient is: an expert in troubleshooting;"
[0133] Only output the following agents; do not output agents not listed:
[0134] Troubleshooting Expert: An expert with extensive experience in root cause analysis of faults (diagnoses the root cause of alarms and notifies human staff of the diagnosed root cause);
[0135] …
[0136] Network monitoring expert: Conducts routine network monitoring and identifies significant alarms and abnormal changes in network metrics. (When an expert proactively inquires about potential major network faults, the query results are communicated to the relevant expert; upon receiving information about the occurrence and recovery of a major fault, this information is communicated to other experts.)
[0137] Use the following format:
[0138] Thought: We should always consider which agent is the best match for the current receiver;
[0139] Action: The name of the most matching agent. Only one of [{Troubleshooting Expert, ..., Network Monitoring Expert}] is needed; simply enter the name.
[0140] Observation: The result obtained using the selected agent;
[0141] This allows us to locate the receiving intelligent agent, i.e., the troubleshooting expert.
[0142] Step S7034: Send the agent selection prompt to the LLM to determine the target agent's location information through the LLM, that is, determine that the target agent is a troubleshooting expert.
[0143] Step S704: The agent management service module identifies the sender's intent corresponding to the message, i.e., the message intent;
[0144] In step S7041, the intelligent agent management service module fills in the task information and all intent information into intent recognition prompt words, uses a large language model to determine the message intent, wherein the message intent includes but is not limited to one of the following: notification, withdrawal, request, inquiry, confirmation, suggestion, agreement, objection, warning, and fills in the intent recognition prompt words according to the determined message intent.
[0145] The prompts after filling in the information are as follows:
[0146] The current message is: the outage in the community is a serious malfunction;
[0147] Analyze the message to determine which of the following is its intended message, and do not output any unlisted intentions:
[0148] Notification: Providing information or facts without requiring a direct response from the other party;
[0149] Withdraw: To revoke or correct a previously sent message;
[0150] Request: Seek help, action, or resources from the other party;
[0151] Inquiry: Seeking information, opinions, or confirmation from the other party;
[0152] Confirmation: To confirm the accuracy of information or an arrangement;
[0153] Suggestion: Offer your viewpoints or solutions for the other party to consider;
[0154] Agreement: expressing approval or acceptance of something;
[0155] Opposition: Expressing a different opinion or rejecting a suggestion;
[0156] Warning: To alert the other party to potential problems or dangers.
[0157] Use the following format:
[0158] Thought: Always consider which intention best matches the intention the current message wants to convey;
[0159] Action: The most matching intent. Only one of the following is required: [Inform, Withdraw, Request, Inquire, Confirm, Suggest, Agree, Disagree, Warning]; simply enter the name.
[0160] Observation: The degree to which the selected intent matches the intent expressed by the current message, with a value between 0 and 100;
[0161] The intent behind the "receiving service cancellation information in the community" message, which pertains to a serious fault, is to inform the user.
[0162] Step S7042: Send the intent recognition prompt to the LLM so that the intent information can be determined by the LLM, that is, the intent information is a notification.
[0163] Step S705: The message distribution module encapsulates the target agent location information and intent information sent by the agent management service module into a message body;
[0164] In this embodiment, the message body also encapsulates the following information: historical dialogue information, current dialogue information, message sender, and message receiver.
[0165] Step S706: Determine whether the message recipient is in this application based on the message body;
[0166] Specifically, when the receiver is an intelligent agent, it can be determined whether it is in the application based on the intelligent agent information stored in the message distribution module. If yes, proceed to step S707; otherwise, proceed to step S709. When the receiver is a front-end interface, it can be determined whether it is in the application based on the name of the source application into which the historical dialogue information is placed when the application encapsulates the message body. If yes, proceed to step S707; otherwise, proceed to step S709.
[0167] Step S707: Determine whether to return a result;
[0168] If the recipient is specified as a front-end interface and is in this application, the result is returned and the process proceeds to step S708; if the recipient is not specified as a front-end interface, no result is returned and the process proceeds to step S710.
[0169] Step S708: Return the results to the front end and display them.
[0170] Step S709: Send the message body to the message bus so that the message body can be sent to the remote target intelligent agent via the message bus;
[0171] When the recipient is not within this application, the message distribution module sends the message body to the sending module, which then sends the message body to the message bus. The receiving module in the remote application receives the message body belonging to that application from the message bus and sends the message body to the message distribution module, which then sends the message body to the designated target agent.
[0172] Step S710: The target agent that received the message body performs the operation;
[0173] Specifically, upon receiving the message body, the application locates the target intelligent agent based on the message body and sends the message body to the target intelligent agent to execute the corresponding business operation. When the target intelligent agent executes the business operation, the ProxyAgent obtains the necessary information based on the intent information, and the Assistant Agent fills the necessary information into specific prompt words based on the intent information, interacts with the large language model, and returns the output of the large language model to the ProxyAgent. The ProxyAgent then determines whether to directly return the result or perform other operations.
[0174] The Proxy Agent uses the received message body and the returned result to encapsulate a new message body, stores the current round of dialogue information and results as historical messages, adjusts the sender to the intelligent agent that performed the business operation, and adjusts the receiver to the front-end interface or other intelligent agents.
[0175] In one embodiment, if the troubleshooting expert agent receives the aforementioned notification message containing "Cell outage is a serious fault," the Proxy Agent, based on the notification intent, searches the knowledge base (i.e., the agent's knowledges field) and inputs historical messages, the current message, the notification intent, and the knowledge base content into the Assistant Agent. The Assistant Agent then uses this information to populate and update the knowledge base with prompts. For example:
[0176] New knowledge: Service outages in residential areas are considered serious faults;
[0177] The original knowledge base stated that faults include community outages, and serious faults include single-board anomalies.
[0178] Use the following format:
[0179] Thought: We should always consider how to add new knowledge or update the existing knowledge base;
[0180] Action: Adding, updating, or modifying knowledge in the existing knowledge base;
[0181] Observation: The latest knowledge from the knowledge base;
[0182] Task: Combine new knowledge with existing knowledge in the knowledge base to output the latest knowledge from the knowledge base;
[0183] Context:
[0184] Based on the large model, the latest knowledge base can be obtained: cell outage is a serious fault, and board malfunction is also a serious fault. The Proxy Agent updates this information to the knowledges field and returns a "OK, updated" message.
[0185] If the troubleshooting expert subsequently receives a message with the intent to inquire, such as "What kind of fault is the community outage?", the ProxyAgent will input historical messages, current messages, the intent to inform, and knowledge base content into the Assistant Agent. The Assistant Agent will then use this information to populate the prompt words and generate an answer to the question. For example:
[0186] Background information: Community outage is a serious fault, and single board malfunction is also a serious fault.
[0187] Use the following format:
[0188] Thought: Always consider how to answer the current question;
[0189] Observation: The answer to the current question;
[0190] Current question: What type of fault is the community service outage?
[0191] Context: The outage of a community service center constitutes a serious fault.
[0192] The large model output shows that the cell outage is a serious fault.
[0193] If a troubleshooting expert receives a message with the intent "A cell has reported a cell outage alarm; please diagnose whether there is a fault in the cell," the Proxy Agent will input historical messages, current messages, the intent to inform, knowledge base information, and skill information into the Assistant Agent. The Assistant Agent will then fill in the prompt words based on this information and select the corresponding skill to execute.
[0194] as follows:
[0195] Background information: Community outage is a serious fault, and single board malfunction is also a serious fault.
[0196] Only use the following skills; do not use skills not listed:
[0197] Alarm Diagnosis: Diagnose Alarm Root Causes (ne:'string') - This skill is used to diagnose the root causes of alarms, providing a reference for troubleshooting.
[0198] Performance Diagnostics: Diagnose Performance Root Causes (ne:'string') - This skill is used to diagnose the root causes of performance degradation, providing a reference for troubleshooting.
[0199] Use the following format:
[0200] Thought: Always consider how to operate;
[0201] Action: The action to be taken only needs to be one of [Alarm Diagnosis, Performance Diagnosis], just enter the name;
[0202] Action Input: The input for the action to be taken, in the format of a simple Python dictionary;
[0203] Observation: The result of the action to be taken;
[0204] Current task: Community A has reported a service outage alarm. Please diagnose whether there is a fault in the community.
[0205] Context: The outage of a cell service is a serious fault;
[0206] The output of the large language model is as follows:
[0207] Thought: When dealing with alarms about service outages in a community, the primary task is to diagnose the root cause of the alarm in order to quickly locate the problem and restore service.
[0208] Action: Alarm diagnosis;
[0209] Action Input: {"ne":"A"};
[0210] The Assistant Agent parses the alarm diagnosis skill that needs to be executed, with the skill input parameter being {"ne":"A"}, and returns it to the ProxyAgent. The ProxyAgent executes the skill and returns the result.
[0211] Step S711, End.
[0212] Compared to existing inter-application communication solutions, the embodiments of this invention have the following advantages: intelligent message routing, requiring only the name, function, or description of the agent for addressing; increased message intent information, enabling agents to better understand and respond to complex scenarios; unified message format, simplified wiring, standardized message communication between agents of the large language model, and improved overall application performance; the communication system in the embodiments of this invention can use any registration center product and remote communication protocol, and can seamlessly integrate different software and hardware platforms; it is suitable for any application using a large language model, such as intelligent question-and-answer applications, operation and maintenance support applications, and fault diagnosis applications; the message forwarding, registration, and remote communication modules can be extracted as SDKs, and applications can implement communication functions by importing the SDK, improving application development efficiency and scalability, and supporting large-scale distributed systems.
[0213] The communication system of this invention can be executed in any networked system.
[0214] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.
[0215] This embodiment also provides a communication system for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the systems described in the following embodiments are preferably implemented in software, hardware implementations, or a combination of software and hardware, are also possible and contemplated.
[0216] Figure 8 This is a structural block diagram of a communication system according to an embodiment of the present invention, such as... Figure 8 As shown, the communication system 800 includes: a first application 810 and a second application 820.
[0217] The first application 810 is used to obtain intelligent agent description information and task information corresponding to the user input message, and send the intelligent agent description information and task information to the intelligent agent management service module; encapsulate the target intelligent agent location information and intent information sent by the intelligent agent management service module into a message body; determine the second application where the target intelligent agent is located based on the message body, and send the message body to the second application so that the second application executes the business operation corresponding to the intent information in the message body. The first application is functionally equivalent to application A in the above embodiment.
[0218] The second application 820 is the application where the message body recipient resides. Functionally, the second application is equivalent to application B in the above embodiment.
[0219] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0220] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed.
[0221] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0222] Embodiments of the present invention also provide an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.
[0223] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0224] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0225] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the methods described in various embodiments of this application.
[0226] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0227] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A communication method between applications, characterized in that, Applied to the first application, including: Based on the message input by the user, obtain the agent description information and task information corresponding to the message, and send the agent description information and task information to the agent management service module; The target intelligent agent location information and intent information sent by the intelligent agent management service module are encapsulated into a message body; The second application where the target intelligent agent is located is determined based on the message body, and the message body is sent to the second application so that the second application executes the business operation corresponding to the intent information in the message body.
2. The method according to claim 1, characterized in that, in, The message body also encapsulates at least one of the following information: current dialogue information corresponding to the message entered by the user this time, historical dialogue information corresponding to the messages entered by the user previously, the sender information of the message body, and the receiver information of the message body.
3. The method according to claim 1, characterized in that, in, The target agent location information is determined by the large language model based on the agent selection prompts sent by the agent management service module; the intent information is determined by the large language model based on the intent recognition prompts sent by the agent management service module.
4. The method according to claim 1, characterized in that, Before obtaining the agent description information and task information corresponding to the user input message, the method further includes: The configuration files, Internet Protocol addresses, and port numbers of the program processes of each application in the communication system are registered to the intelligent agent management service module. The configuration files include information about the intelligent agents corresponding to each application. The information of the intelligent agents includes at least one of the following: name, description, role, department, responsibilities, skills, and knowledge base.
5. The method according to claim 1, characterized in that, When the second application and the first application are different applications, sending the message body to the second application includes: Based on the Internet Protocol address of the first application and the port number of the program process of the first application, the message body is sent to the message bus through the message sending module, so that the second application can obtain the message body from the message bus through the receiving module.
6. The method according to claim 1, characterized in that, If the second application is the same as the first application, after sending the message body to the second application, the method further includes: The target intelligent agent to receive the message body is determined based on the message body, and the message body is sent to the target intelligent agent through the message distribution module of the first application; The business operation corresponding to the intent information encapsulated in the message body is determined, and the business operation is executed by the target intelligent agent.
7. The method according to claim 6, characterized in that, Determining the business operation corresponding to the intent information encapsulated in the message body includes: Based on the intent information, target prompt words for interacting with the large language model are determined; The target intelligent agent executes the business operation and obtains the business operation result.
8. The method according to claim 7, characterized in that, After obtaining the business operation result, the method further includes: The message body and the business operation result are encapsulated into a new message body, and the dialogue message corresponding to the execution of the business operation and the business operation result are stored as historical messages.
9. A communication system, characterized in that, include: First application and second application; The first application is configured to obtain agent description information and task information corresponding to the message input by the user, and send the agent description information and task information to the agent management service module; encapsulate the target agent location information and intent information sent by the agent management service module into a message body; determine the second application where the target agent is located based on the message body, and send the message body to the second application so that the second application executes the business operation corresponding to the intent information in the message body.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method described in any one of claims 1 to 8.
11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method described in any one of claims 1 to 8.
12. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the steps of the method described in any one of claims 1 to 8.