Multi-agent communication method and device, equipment and medium

By configuring the Transformer layer to record the hidden states of intermediate layers and generate state difference trajectories, the problem of information loss in large language models in multi-agent systems is solved. This achieves efficient information transmission and supplementation of hidden information in the reasoning process, thereby improving the communication efficiency and stability of multi-agent systems.

CN120856739APending Publication Date: 2025-10-28PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511148946.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-15
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

Existing large language models suffer from information loss and non-transferable reasoning processes when transmitting information in multi-agent systems, especially in tasks involving multi-step logical reasoning and abstract judgment, which limits the level of intelligent collaboration in the system.

Method used

Configure the target Transformer layer of the first and second agents, record the hidden state of the intermediate layer corresponding to each token, generate the state difference trajectory, and package the token sequence and state difference trajectory into data to be sent, inputting it into the second agent to preserve the inference dynamics and avoid information loss.

Benefits of technology

Without compromising the universality of natural language, it supplements the implicit information in the reasoning process, enhances the depth and breadth of information transmission, solves the problem of non-transferable thought processes, and improves the communication efficiency and stability of multi-agent systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120856739A_ABST
    Figure CN120856739A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of artificial intelligence, and provides a multi-agent communication method and device, equipment and a medium, which are applied to financial and medical health care service scenes, and can configure a target Transform layer of a first agent and a target Transform layer of a second agent to avoid information redundancy or inference interference caused by improper layer selection. A target Transform layer of a first agent is utilized to record an intermediate layer hidden state corresponding to each token output by the first agent when executing a target task, and a state difference track is generated according to the intermediate layer hidden state corresponding to each token, so that reasoning dynamics are reserved, and information loss caused by single-path pruning is avoided; and packaging the token sequence and the state difference track into the to-be-sent data, and inputting the to-be-sent data into the second agent, thereby supplementing invisible information in the reasoning process on the premise of not breaking the universality of the natural language, and solving the problem that the thinking process in the traditional natural language communication cannot be transmitted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and in particular to a multi-agent communication method, apparatus, device, and medium. Background Technology

[0002] Currently, many task scenarios involve the collaborative work of multiple intelligent agents. For example, in the financial field, risk assessment requires multiple intelligent agents to perform tasks such as auditing, data analysis, and risk assessment; in the medical field, assisting in disease detection requires multiple intelligent agents to perform tasks such as image recognition, medical record text analysis, and experimental data verification.

[0003] In existing technologies, large language model (LLM) multi-agent systems generally use natural language as the communication medium for information transmission. On the surface, they have good interpretability and versatility, but in reality, there is significant information loss.

[0004] Specifically, when large language models generate natural language, they need to compress their internal high-dimensional continuous hidden state vectors into discrete token sequences. This process inevitably loses a large number of potential reasoning paths and thought processes. For example, when an agent explores multiple possible answers during reasoning but can only sample one expression to convey to other agents, this expression is essentially a form of "single-path pruning," preventing the receiver from reconstructing the original complex thought chain. This communication compression problem is particularly prominent in tasks involving multi-step logical reasoning, abstract judgment, or strategy negotiation, severely restricting the improvement of the overall intelligent collaborative level of the system. Summary of the Invention

[0005] In view of the above, it is necessary to provide a multi-agent communication method, apparatus, device and medium, which aims to solve the problems of information loss and non-transferability of reasoning process in communication between multiple agents.

[0006] A multi-agent communication method, the multi-agent communication method comprising:

[0007] In response to a communication command initiated by the first agent to the second agent, the target Transformer layer of the first agent and the target Transformer layer of the second agent are configured.

[0008] When the first agent executes the target task, the target Transformer layer of the first agent is used to record the hidden state of the intermediate layer corresponding to each token output by the first agent when executing the target task;

[0009] Generate a state difference trajectory based on the hidden state of the intermediate layer corresponding to each token;

[0010] Obtain the token sequence output by the first intelligent agent, and package the token sequence and the state difference trajectory into data to be sent;

[0011] The data to be sent is input into the second intelligent agent.

[0012] A multi-agent communication device, the multi-agent communication device comprising:

[0013] A configuration unit is configured to configure the target Transformer layer of the first agent and the target Transformer layer of the second agent in response to a communication command initiated by the first agent to the second agent.

[0014] The recording unit is used to record the hidden state of the intermediate layer corresponding to each token output by the first agent when the first agent performs the target task, using the target Transformer layer of the first agent.

[0015] The generation unit is used to generate a state difference trajectory based on the intermediate hidden state corresponding to each token.

[0016] A packaging unit is used to acquire the token sequence output by the first intelligent agent and package the token sequence and the state difference trajectory into data to be sent.

[0017] An input unit is used to input the data to be sent to the second intelligent agent.

[0018] A computer device, the computer device comprising:

[0019] Memory, storing at least one instruction; and

[0020] The processor executes instructions stored in the memory to implement the multi-agent communication method.

[0021] A computer-readable storage medium storing at least one instruction, which is executed by a processor in a computer device to implement the multi-agent communication method.

[0022] As can be seen from the above technical solutions, the present invention can configure the target Transformer layer of the first agent and the target Transformer layer of the second agent, avoiding information redundancy or inference interference caused by improper layer selection; it uses the target Transformer layer of the first agent to record the intermediate layer hidden state corresponding to each token output by the first agent when performing the target task, and generates a state difference trajectory based on the intermediate layer hidden state corresponding to each token, thus preserving the inference dynamics and avoiding information loss due to single-path pruning; it packages the token sequence and state difference trajectory into data to be sent and inputs it into the second agent, supplementing the implicit information of the inference process without breaking the universality of natural language, and solving the problem that thought processes cannot be transmitted in traditional natural language communication. Attached Figure Description

[0023] Figure 1 This is a flowchart of a preferred embodiment of the multi-agent communication method of the present invention.

[0024] Figure 2 This is a functional block diagram of a preferred embodiment of the multi-agent communication device of the present invention.

[0025] Figure 3 This is a schematic diagram of the structure of a computer device that implements a preferred embodiment of the multi-agent communication method of the present invention. Detailed Implementation

[0026] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0027] like Figure 1 The diagram shown is a flowchart of a preferred embodiment of the multi-agent communication method of the present invention. The order of the steps in this flowchart can be changed, and some steps can be omitted, depending on different requirements.

[0028] The multi-agent communication method is applied to one or more computer devices. The computer device is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions. Its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.

[0029] The computer device can be any electronic product that can interact with the user, such as a personal computer, tablet computer, smartphone, personal digital assistant (PDA), game console, interactive network television (IPTV), smart wearable device, etc.

[0030] The computer equipment may also include network equipment and / or user equipment. The network equipment includes, but is not limited to, a single network server, a server group consisting of multiple network servers, or a cloud based on cloud computing consisting of a large number of hosts or network servers.

[0031] The server can be a standalone server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.

[0032] Artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0033] Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.

[0034] The network in which the computer device is located includes, but is not limited to, the Internet, wide area network, metropolitan area network, local area network, and virtual private network (VPN).

[0035] S10, in response to a communication command initiated by the first agent to the second agent, configure the target Transformer layer of the first agent and the target Transformer layer of the second agent.

[0036] In this embodiment, the first intelligent agent and the second intelligent agent can be any two intelligent agents that communicate with each other from among multiple intelligent agents used for tasks to be performed in different fields.

[0037] For example, in the financial field, when conducting risk assessment, the first intelligent agent and the second intelligent agent can be used to perform tasks such as auditing, data analysis, and risk assessment, respectively; in the medical field, when assisting in disease detection, the first intelligent agent and the second intelligent agent can be used to perform tasks such as image recognition, medical record text analysis, and experimental data verification, respectively.

[0038] In this embodiment, the first intelligent agent and the second intelligent agent can be large language models (LLMs) that communicate with each other.

[0039] In this embodiment, configuring the target Transformer layer of the first agent and the target Transformer layer of the second agent includes:

[0040] Select the Transformer layer used for reasoning and guidance from the first agent as the target Transformer layer of the first agent;

[0041] The Transformer layer in the second agent that corresponds to the target Transformer layer of the first agent is determined as the target Transformer layer of the second agent.

[0042] The target Transformer layer is marked as a reused selected layer.

[0043] For example, experiments can be conducted to determine which Transformer layer is best suited for extracting and injecting state differences for each language model.

[0044] By marking the target Transformer layer as the reused selected layer, the reused selected layer can be directly reused in all subsequent tasks, thereby reducing computational costs and maintaining performance consistency.

[0045] Among them, the target Transformer layer was verified to be the most valuable for guiding inference, and the target Transformer layer is usually a mid-to-high-level Transformer layer of the agent.

[0046] S11, when the first agent executes the target task, the target Transformer layer of the first agent is used to record the hidden state of the intermediate layer corresponding to each token output by the first agent when executing the target task.

[0047] In this embodiment, the hidden state of the intermediate layer can be used to reflect the semantic features and contextual relationships of the text.

[0048] This embodiment ensures that the extraction and injection of state difference trajectories are focused on the level with the most reasoning value, improves the targeting and efficiency of communication optimization, and effectively avoids information redundancy or reasoning interference caused by improper layer selection, thus ensuring the stability of the method.

[0049] S12, Generate state difference trajectories based on the hidden state of the intermediate layer corresponding to each token.

[0050] In this embodiment, generating the state difference trajectory based on the intermediate hidden state corresponding to each token includes:

[0051] Calculate the vector difference between the intermediate hidden states corresponding to every two adjacent tokens;

[0052] By sequentially concatenating the vector differences of the intermediate hidden states corresponding to every two adjacent tokens in the token output order, the state difference trajectory is obtained.

[0053] For example, for the generated i-th token and (i-1)-th token, the vector difference (i.e., the state difference vector) of the corresponding intermediate hidden states is equal to the hidden state of the i-th token minus the hidden state of the (i-1)-th token. The state difference trajectory is formed by the state difference vectors of all adjacent tokens, which records only the changes and does not include the complete hidden state.

[0054] The state difference trajectory is used to describe the dynamic evolution of the internal state of the first agent in each generation step.

[0055] The state difference trajectory focuses only on the differences between tokens, significantly reducing redundant information.

[0056] The state difference trajectory generated in this embodiment is more lightweight (only records the differences) than directly sharing the hidden state, and eliminates the interference of the first agent's specific context (i.e., it is context-independent), thus realizing the effective transmission of general information.

[0057] The above embodiments preserve the reasoning dynamics during the agent generation process (such as the change in thinking from multi-path exploration to conclusion convergence), and avoid information loss caused by single-path pruning.

[0058] S13, obtain the token sequence output by the first intelligent agent, and package the token sequence and the state difference trajectory into data to be sent.

[0059] In this embodiment, the token sequence refers to the natural language token sequence generated by the first intelligent agent based on the target task.

[0060] For example, in a corporate credit rating task within the financial sector, the token sequence could be: "The company's current ratio decreased by 15% in 2023 compared to the previous year, indicating a weakening of its short-term solvency and a liquidity risk." Here, "the company," "2023," "current ratio," "decreased by 15%," "short-term solvency," "weakened," "exists," and "liquidity risk" are all tokens constituting the token sequence, conveying the assessment of the company's financial condition in natural language.

[0061] For example, in the medical field, for image lesion analysis tasks, the token sequence could be "A ground-glass nodule is visible in the lower lobe of the patient's left lung, with indistinct borders and a diameter of approximately 8 mm, considered potentially malignant." Here, "lower lobe of the left lung," "ground-glass nodule," "indistinct borders," and "approximately 8 mm in diameter" are all tokens constituting the token sequence, conveying the image analysis conclusion in natural language.

[0062] In this embodiment, packaging the token sequence and the state differential trajectory into data to be sent includes:

[0063] Obtain the temporal correspondence between the token sequence and the state difference trajectory;

[0064] The token sequence and the state difference trajectory are matched according to the time sequence correspondence.

[0065] The token sequence and the state difference trajectory after time-series mapping are packaged into communication content to obtain the data to be sent.

[0066] For example, each token corresponds to a state difference vector, that is, the i-th token is bound to the i-th state difference vector, which can ensure that the token sequence and the state difference trajectory correspond one-to-one in time.

[0067] Through the above embodiments, it is possible to supplement the implicit information of the reasoning process without breaking the universality (i.e., interpretability) of natural language, thereby enhancing the depth and breadth of information transmission and solving the problem that thought processes cannot be transmitted in traditional natural language communication.

[0068] S14, input the data to be sent to the second intelligent agent.

[0069] In this embodiment, inputting the data to be sent to the second intelligent agent includes:

[0070] While maintaining the aforementioned timing correspondence, the data to be sent is input to the second intelligent agent.

[0071] In the above embodiments, by maintaining the temporal correspondence, data association can be maintained during transmission, avoiding temporal misalignment between the token and the differential trajectory. Simultaneously, the lightweight nature of the state differential trajectory (only recording changes) reduces the bandwidth pressure of long text transmissions, effectively improving communication efficiency.

[0072] In this embodiment, after inputting the data to be sent to the second intelligent agent, the method further includes:

[0073] The token sequence is used as a prompt to initiate the forward propagation reasoning process of the second agent;

[0074] When reasoning about any token, the state difference trajectory is weighted in the target Transformer layer of the second agent to obtain intermediate data, and the intermediate data is injected into the hidden state of the arbitrary token.

[0075] Specifically, injecting the intermediate data into the hidden state of the arbitrary token includes:

[0076] A guided embedding mode is adopted, in which the intermediate data is injected into the hidden state of the arbitrary token as a reasoning clue without overwriting the hidden state of the second intelligent agent itself;

[0077] The intermediate data is used to assist the second agent in understanding the semantic motivation of the first agent.

[0078] The weights used in the weighting process can be determined through fine-tuning via experiments.

[0079] Through the above embodiments, the reasoning logic of the sender (i.e., the first agent) can be reconstructed based on its state difference trajectory, improving the understanding of the deep logic behind natural language and reducing information asymmetry in multi-agent collaboration. Meanwhile, the local injection mode (e.g., injecting only into the mid-to-high-level Transformer layer) avoids excessive interference with the reasoning process of the receiving agent (i.e., the second agent), ensuring the stability and generalization of the second agent's generation capabilities.

[0080] This embodiment employs state-differential trajectories, enabling information transfer between multiple agents to explicitly model the reasoning process for the first time. State-differential encoding not only preserves the readability of the language but also adds the trend of hidden state changes during the generation process. This representation method based on "state changes" avoids the contextual pollution problems that may arise from directly sharing the original hidden states, while achieving efficient compressed expression of the model's thought process. This embodiment is independent of specific input content and unaffected by the sender's local prompts or task configurations, enabling the transmission of one agent's "thought trajectory" to another agent at minimal cost, allowing the receiver to possess a more complete context awareness and thought reconstruction capability.

[0081] Furthermore, this embodiment does not blindly inject states into all model layers. Instead, it selects the mid-to-high-level Transformer layers with the greatest inference guidance value in the model architecture for differential embedding through empirical analysis. This local injection strategy ensures that the model's generation capability is not excessively interfered with, while significantly improving the stability and generalization of communication. In addition, the representation of state differences has strong task and model versatility, and can be used in different types of large models and various complex tasks. This opens up an scalable technical path for the development of multi-agent systems and lays the foundation for building agent clusters with deep understanding and efficient collaboration capabilities.

[0082] This embodiment can be used in tasks involving complex logical reasoning, multi-turn interaction, and multi-agent collaboration, such as cross-institutional credit risk assessment tasks in the financial field, or remote multi-center surgical protocol collaboration tasks in the medical field.

[0083] As can be seen from the above technical solutions, the present invention can configure the target Transformer layer of the first agent and the target Transformer layer of the second agent, avoiding information redundancy or inference interference caused by improper layer selection; it uses the target Transformer layer of the first agent to record the intermediate layer hidden state corresponding to each token output by the first agent when performing the target task, and generates a state difference trajectory based on the intermediate layer hidden state corresponding to each token, thus preserving the inference dynamics and avoiding information loss due to single-path pruning; it packages the token sequence and state difference trajectory into data to be sent and inputs it into the second agent, supplementing the implicit information of the inference process without breaking the universality of natural language, and solving the problem that thought processes cannot be transmitted in traditional natural language communication.

[0084] like Figure 2The diagram shown is a functional block diagram of a preferred embodiment of the multi-agent communication device of the present invention. The multi-agent communication device 11 includes a configuration unit 110, a recording unit 111, a generation unit 112, a packaging unit 113, and an input unit 114. The module / unit referred to in this invention refers to a series of computer program segments that can be executed by a processor and perform a fixed function, and are stored in a memory. In this embodiment, the functions of each module / unit will be described in detail in subsequent embodiments.

[0085] The configuration unit 110 is configured to configure the target Transformer layer of the first agent and the target Transformer layer of the second agent in response to a communication command initiated by the first agent to the second agent.

[0086] In this embodiment, the first intelligent agent and the second intelligent agent can be any two intelligent agents that communicate with each other from among multiple intelligent agents used for tasks to be performed in different fields.

[0087] For example, in the financial field, when conducting risk assessment, the first intelligent agent and the second intelligent agent can be used to perform tasks such as auditing, data analysis, and risk assessment, respectively; in the medical field, when assisting in disease detection, the first intelligent agent and the second intelligent agent can be used to perform tasks such as image recognition, medical record text analysis, and experimental data verification, respectively.

[0088] In this embodiment, the first intelligent agent and the second intelligent agent can be large language models (LLMs) that communicate with each other.

[0089] In this embodiment, the configuration unit 110 configures the target Transformer layer of the first agent and the target Transformer layer of the second agent, including:

[0090] Select the Transformer layer used for reasoning and guidance from the first agent as the target Transformer layer of the first agent;

[0091] The Transformer layer in the second agent that corresponds to the target Transformer layer of the first agent is determined as the target Transformer layer of the second agent.

[0092] The target Transformer layer is marked as a reused selected layer.

[0093] For example, experiments can be conducted to determine which Transformer layer is best suited for extracting and injecting state differences for each language model.

[0094] By marking the target Transformer layer as the reused selected layer, the reused selected layer can be directly reused in all subsequent tasks, thereby reducing computational costs and maintaining performance consistency.

[0095] Among them, the target Transformer layer was verified to be the most valuable for guiding inference, and the target Transformer layer is usually a mid-to-high-level Transformer layer of the agent.

[0096] The recording unit 111 is used to record the hidden state of the intermediate layer corresponding to each token output by the first agent when the first agent performs the target task, using the target Transformer layer of the first agent.

[0097] In this embodiment, the hidden state of the intermediate layer can be used to reflect the semantic features and contextual relationships of the text.

[0098] This embodiment ensures that the extraction and injection of state difference trajectories are focused on the level with the most reasoning value, improves the targeting and efficiency of communication optimization, and effectively avoids information redundancy or reasoning interference caused by improper layer selection, thus ensuring the stability of the method.

[0099] The generation unit 112 is used to generate a state difference trajectory based on the intermediate layer hidden state corresponding to each token.

[0100] In this embodiment, the generation unit 112 generates a state difference trajectory based on the intermediate layer hidden state corresponding to each token, including:

[0101] Calculate the vector difference between the intermediate hidden states corresponding to every two adjacent tokens;

[0102] By sequentially concatenating the vector differences of the intermediate hidden states corresponding to every two adjacent tokens in the token output order, the state difference trajectory is obtained.

[0103] For example, for the generated i-th token and (i-1)-th token, the vector difference (i.e., the state difference vector) of the corresponding intermediate hidden states is equal to the hidden state of the i-th token minus the hidden state of the (i-1)-th token. The state difference trajectory is formed by the state difference vectors of all adjacent tokens, which records only the changes and does not include the complete hidden state.

[0104] The state difference trajectory is used to describe the dynamic evolution of the internal state of the first agent in each generation step.

[0105] The state difference trajectory focuses only on the differences between tokens, significantly reducing redundant information.

[0106] The state difference trajectory generated in this embodiment is more lightweight (only records the differences) than directly sharing the hidden state, and eliminates the interference of the first agent's specific context (i.e., it is context-independent), thus realizing the effective transmission of general information.

[0107] The above embodiments preserve the reasoning dynamics during the agent generation process (such as the change in thinking from multi-path exploration to conclusion convergence), and avoid information loss caused by single-path pruning.

[0108] The packaging unit 113 is used to obtain the token sequence output by the first intelligent agent and package the token sequence and the state difference trajectory into data to be sent.

[0109] In this embodiment, the token sequence refers to the natural language token sequence generated by the first intelligent agent based on the target task.

[0110] For example, in a corporate credit rating task within the financial sector, the token sequence could be: "The company's current ratio decreased by 15% in 2023 compared to the previous year, indicating a weakening of its short-term solvency and a liquidity risk." Here, "the company," "2023," "current ratio," "decreased by 15%," "short-term solvency," "weakened," "exists," and "liquidity risk" are all tokens constituting the token sequence, conveying the assessment of the company's financial condition in natural language.

[0111] For example, in the medical field, for image lesion analysis tasks, the token sequence could be "A ground-glass nodule is visible in the lower lobe of the patient's left lung, with indistinct borders and a diameter of approximately 8 mm, considered potentially malignant." Here, "lower lobe of the left lung," "ground-glass nodule," "indistinct borders," and "approximately 8 mm in diameter" are all tokens constituting the token sequence, conveying the image analysis conclusion in natural language.

[0112] In this embodiment, the packaging unit 113 packages the token sequence and the state differential trajectory into data to be sent, including:

[0113] Obtain the temporal correspondence between the token sequence and the state difference trajectory;

[0114] The token sequence and the state difference trajectory are matched according to the time sequence correspondence.

[0115] The token sequence and the state difference trajectory after time-series mapping are packaged into communication content to obtain the data to be sent.

[0116] For example, each token corresponds to a state difference vector, that is, the i-th token is bound to the i-th state difference vector, which can ensure that the token sequence and the state difference trajectory correspond one-to-one in time.

[0117] Through the above embodiments, it is possible to supplement the implicit information of the reasoning process without breaking the universality (i.e., interpretability) of natural language, thereby enhancing the depth and breadth of information transmission and solving the problem that thought processes cannot be transmitted in traditional natural language communication.

[0118] The input unit 114 is used to input the data to be sent to the second intelligent agent.

[0119] In this embodiment, the input unit 114 inputs the data to be sent to the second intelligent agent in the following ways:

[0120] While maintaining the aforementioned timing correspondence, the data to be sent is input to the second intelligent agent.

[0121] In the above embodiments, by maintaining the temporal correspondence, data association can be maintained during transmission, avoiding temporal misalignment between the token and the differential trajectory. Simultaneously, the lightweight nature of the state differential trajectory (only recording changes) reduces the bandwidth pressure of long text transmissions, effectively improving communication efficiency.

[0122] In this embodiment, after the data to be sent is input into the second agent, the token sequence is used as a prompt word to start the forward propagation reasoning process of the second agent;

[0123] When reasoning about any token, the state difference trajectory is weighted in the target Transformer layer of the second agent to obtain intermediate data, and the intermediate data is injected into the hidden state of the arbitrary token.

[0124] Specifically, injecting the intermediate data into the hidden state of the arbitrary token includes:

[0125] A guided embedding mode is adopted, in which the intermediate data is injected into the hidden state of the arbitrary token as a reasoning clue without overwriting the hidden state of the second intelligent agent itself;

[0126] The intermediate data is used to assist the second agent in understanding the semantic motivation of the first agent.

[0127] The weights used in the weighting process can be determined through fine-tuning via experiments.

[0128] Through the above embodiments, the reasoning logic of the sender (i.e., the first agent) can be reconstructed based on its state difference trajectory, improving the understanding of the deep logic behind natural language and reducing information asymmetry in multi-agent collaboration. Meanwhile, the local injection mode (e.g., injecting only into the mid-to-high-level Transformer layer) avoids excessive interference with the reasoning process of the receiving agent (i.e., the second agent), ensuring the stability and generalization of the second agent's generation capabilities.

[0129] This embodiment employs state-differential trajectories, enabling information transfer between multiple agents to explicitly model the reasoning process for the first time. State-differential encoding not only preserves the readability of the language but also adds the trend of hidden state changes during the generation process. This representation method based on "state changes" avoids the contextual pollution problems that may arise from directly sharing the original hidden states, while achieving efficient compressed expression of the model's thought process. This embodiment is independent of specific input content and unaffected by the sender's local prompts or task configurations, enabling the transmission of one agent's "thought trajectory" to another agent at minimal cost, allowing the receiver to possess a more complete context awareness and thought reconstruction capability.

[0130] Furthermore, this embodiment does not blindly inject states into all model layers. Instead, it selects the mid-to-high-level Transformer layers with the greatest inference guidance value in the model architecture for differential embedding through empirical analysis. This local injection strategy ensures that the model's generation capability is not excessively interfered with, while significantly improving the stability and generalization of communication. In addition, the representation of state differences has strong task and model versatility, and can be used in different types of large models and various complex tasks. This opens up an scalable technical path for the development of multi-agent systems and lays the foundation for building agent clusters with deep understanding and efficient collaboration capabilities.

[0131] This embodiment can be used in tasks involving complex logical reasoning, multi-turn interaction, and multi-agent collaboration, such as cross-institutional credit risk assessment tasks in the financial field, or remote multi-center surgical protocol collaboration tasks in the medical field.

[0132] As can be seen from the above technical solutions, the present invention can configure the target Transformer layer of the first agent and the target Transformer layer of the second agent, avoiding information redundancy or inference interference caused by improper layer selection; it uses the target Transformer layer of the first agent to record the intermediate layer hidden state corresponding to each token output by the first agent when performing the target task, and generates a state difference trajectory based on the intermediate layer hidden state corresponding to each token, thus preserving the inference dynamics and avoiding information loss due to single-path pruning; it packages the token sequence and state difference trajectory into data to be sent and inputs it into the second agent, supplementing the implicit information of the inference process without breaking the universality of natural language, and solving the problem that thought processes cannot be transmitted in traditional natural language communication.

[0133] like Figure 3 The diagram shown is a schematic representation of the structure of a computer device that implements a multi-agent communication method according to the present invention.

[0134] The computer device 1 may include a memory 12, a processor 13, and a bus (the arrow in the figure represents the bus), and may also include a computer program, such as a multi-agent communication program, stored in the memory 12 and executable on the processor 13.

[0135] Those skilled in the art will understand that the schematic diagram is merely an example of computer device 1 and does not constitute a limitation on computer device 1. Computer device 1 can be either a bus topology or a star topology. Computer device 1 may also include more or fewer other hardware or software than shown in the diagram, or different component arrangements. For example, computer device 1 may also include input / output devices, network access devices, etc.

[0136] It should be noted that the computer device 1 described is merely an example. Other existing or future electronic products that are adaptable to this invention should also be included within the scope of protection of this invention and are incorporated herein by reference.

[0137] The memory 12 includes at least one type of readable storage medium, such as flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 12 can be an internal storage unit of the computer device 1, such as a portable hard drive of the computer device 1. In other embodiments, the memory 12 can be an external storage device of the computer device 1, such as a plug-in portable hard drive, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the computer device 1. Furthermore, the memory 12 can include both internal and external storage units of the computer device 1. The memory 12 can be used not only to store application software and various types of data installed on the computer device 1, such as the code of multi-agent communication programs, but also to temporarily store data that has been output or will be output.

[0138] In some embodiments, the processor 13 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits packaged with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 13 is the control unit of the computer device 1, connecting various components of the computer device 1 via various interfaces and lines. It executes programs or modules stored in the memory 12 (e.g., executing multi-agent communication programs) and calls data stored in the memory 12 to perform various functions of the computer device 1 and process data.

[0139] The processor 13 executes the operating system of the computer device 1 and various installed applications. The processor 13 executes the applications to implement the steps in the various multi-agent communication method embodiments described above, for example... Figure 1 The steps are shown.

[0140] For example, the computer program may be divided into one or more modules / units, which are stored in the memory 12 and executed by the processor 13 to complete the present invention. The one or more modules / units may be a series of computer-readable instruction segments capable of performing a specific function, which describe the execution process of the computer program in the computer device 1. For example, the computer program may be divided into a configuration unit 110, a recording unit 111, a generation unit 112, a packaging unit 113, and an input unit 114.

[0141] The integrated unit implemented as a software functional module described above can be stored in a computer-readable storage medium. This software functional module, stored in a storage medium, includes several instructions to cause a computer device (which may be a personal computer, computer equipment, or network device, etc.) or processor to execute portions of the multi-agent communication method described in the various embodiments of the present invention.

[0142] If the modules / units integrated in the computer device 1 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware devices. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above.

[0143] The computer program includes computer program code, which may be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium may include any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory, etc.

[0144] Furthermore, the computer-readable storage medium may primarily include a stored program area and a stored data area, wherein the stored program area may store the operating system, an application program required for at least one function, etc.; and the stored data area may store data created based on the use of blockchain nodes, etc.

[0145] The blockchain referred to in this invention is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include an underlying blockchain platform, a platform product service layer, and an application service layer.

[0146] The bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, in... Figure 3 The bus is represented by only one straight line, but this does not mean that there is only one bus or one type of bus. The bus is configured to enable communication between the memory 12 and at least one processor 13, etc.

[0147] Although not shown, the computer device 1 may also include a power supply (such as a battery) to power various components. Preferably, the power supply can be logically connected to the at least one processor 13 through a power management device, thereby enabling functions such as charging management, discharging management, and power consumption management. The power supply may also include one or more DC or AC power supplies, recharging devices, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The computer device 1 may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.

[0148] Furthermore, the computer device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a Wi-Fi interface, a Bluetooth interface, etc.), which is typically used to establish a communication connection between the computer device 1 and other computer devices.

[0149] Optionally, the computer device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), and optionally, a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen, etc. The display may also be appropriately referred to as a screen or display unit, used to display information processed in the computer device 1 and to display a visual user interface.

[0150] It should be understood that the embodiments described are for illustrative purposes only and are not limited to this structure in the scope of the patent application.

[0151] It will be understood by those skilled in the art that Figure 3 The structure shown does not constitute a limitation on the computer device 1, and may include fewer or more components than shown, or combine certain components, or have different component arrangements.

[0152] Combination Figure 1 The memory 12 in the computer device 1 stores multiple instructions to implement a multi-agent communication method, and the processor 13 can execute the multiple instructions to achieve:

[0153] In response to a communication command initiated by the first agent to the second agent, the target Transformer layer of the first agent and the target Transformer layer of the second agent are configured.

[0154] When the first agent executes the target task, the target Transformer layer of the first agent is used to record the hidden state of the intermediate layer corresponding to each token output by the first agent when executing the target task;

[0155] Generate a state difference trajectory based on the hidden state of the intermediate layer corresponding to each token;

[0156] Obtain the token sequence output by the first intelligent agent, and package the token sequence and the state difference trajectory into data to be sent;

[0157] The data to be sent is input into the second intelligent agent.

[0158] Specifically, the processor 13's implementation method for the above instructions can be found in [reference needed]. Figure 1 The descriptions of the relevant steps in the corresponding embodiments are not repeated here.

[0159] It should be noted that all data involved in this case was legally obtained. Software tools or components not belonging to this company that appear in the embodiments of this application are merely illustrative examples and do not represent actual use.

[0160] In the several embodiments provided by this invention, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.

[0161] This invention can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This invention can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This invention can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0162] The modules described as separate components may or may not be physically separate. The components shown as modules 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 modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0163] Furthermore, the functional modules 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. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.

[0164] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0165] Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within the invention. No appended diagram markings in the claims should be construed as limiting the scope of the claims.

[0166] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices described in this invention can also be implemented by a single unit or device through software or hardware. Terms such as "first," "second," etc., are used to indicate names and do not indicate any specific order.

[0167] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A multi-agent communication method, characterized in that, The multi-agent communication method includes: In response to a communication command initiated by the first agent to the second agent, the target Transformer layer of the first agent and the target Transformer layer of the second agent are configured. When the first agent executes the target task, the target Transformer layer of the first agent is used to record the hidden state of the intermediate layer corresponding to each token output by the first agent when executing the target task; Generate a state difference trajectory based on the hidden state of the intermediate layer corresponding to each token; Obtain the token sequence output by the first intelligent agent, and package the token sequence and the state difference trajectory into data to be sent; The data to be sent is input into the second intelligent agent.

2. The multi-agent communication method as described in claim 1, characterized in that, The configuration of the target Transformer layer for the first agent and the target Transformer layer for the second agent includes: Select the Transformer layer used for reasoning and guidance from the first agent as the target Transformer layer of the first agent; The Transformer layer in the second agent that corresponds to the target Transformer layer of the first agent is determined as the target Transformer layer of the second agent. The target Transformer layer is marked as a reused selected layer.

3. The multi-agent communication method as described in claim 1, characterized in that, The step of generating a state difference trajectory based on the intermediate hidden state corresponding to each token includes: Calculate the vector difference between the intermediate hidden states corresponding to every two adjacent tokens; By sequentially concatenating the vector differences of the intermediate hidden states corresponding to every two adjacent tokens in the token output order, the state difference trajectory is obtained.

4. The multi-agent communication method as described in claim 1, characterized in that, The step of packaging the token sequence and the state difference trajectory into data to be sent includes: Obtain the temporal correspondence between the token sequence and the state difference trajectory; The token sequence and the state difference trajectory are matched according to the time sequence correspondence. The token sequence and the state difference trajectory after time-series mapping are packaged into communication content to obtain the data to be sent.

5. The multi-agent communication method as described in claim 4, characterized in that, The step of inputting the data to be sent to the second intelligent agent includes: While maintaining the aforementioned timing correspondence, the data to be sent is input to the second intelligent agent.

6. The multi-agent communication method as described in claim 1, characterized in that, After inputting the data to be sent to the second intelligent agent, the method further includes: The token sequence is used as a prompt to initiate the forward propagation reasoning process of the second agent; When reasoning about any token, the state difference trajectory is weighted in the target Transformer layer of the second agent to obtain intermediate data, and the intermediate data is injected into the hidden state of the arbitrary token.

7. The multi-agent communication method as described in claim 6, characterized in that, The step of injecting the intermediate data into the hidden state of the arbitrary token includes: A guided embedding mode is adopted, in which the intermediate data is injected into the hidden state of the arbitrary token as a reasoning clue without overwriting the hidden state of the second intelligent agent itself; The intermediate data is used to assist the second agent in understanding the semantic motivation of the first agent.

8. A multi-agent communication device, characterized in that, The multi-agent communication device includes: A configuration unit is configured to configure the target Transformer layer of the first agent and the target Transformer layer of the second agent in response to a communication command initiated by the first agent to the second agent. The recording unit is used to record the hidden state of the intermediate layer corresponding to each token output by the first agent when the first agent performs the target task, using the target Transformer layer of the first agent. The generation unit is used to generate a state difference trajectory based on the intermediate hidden state corresponding to each token. A packaging unit is used to acquire the token sequence output by the first intelligent agent and package the token sequence and the state difference trajectory into data to be sent. An input unit is used to input the data to be sent to the second intelligent agent.

9. A computer device, characterized in that, The computer device includes: Memory, storing at least one instruction; and The processor executes instructions stored in the memory to implement the multi-agent communication method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction, which is executed by a processor in a computer device to implement the multi-agent communication method as described in any one of claims 1 to 7.