A multi-agent communication key management method and system adaptive to dynamic topology

By introducing a dynamic group controller and a logical key tree architecture into the multi-agent system, the problems of low scalability and high failure risk of centralized GC are solved, achieving efficient and secure key management and improving the system's performance in large-scale, highly dynamic environments.

CN122137536APending Publication Date: 2026-06-02BEIJING XINLIAN SHUAN TECHNOLOGY CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING XINLIAN SHUAN TECHNOLOGY CO LTD
Filing Date
2026-03-25
Publication Date
2026-06-02

Smart Images

  • Figure CN122137536A_ABST
    Figure CN122137536A_ABST
Patent Text Reader

Abstract

This invention discloses a multi-agent communication key management method and system adapted to dynamic topologies, relating to the field of multi-agent communication security technology. It addresses the problems of low scalability and high failure risk in the existing centralized key generation and distribution processes of agent keys. The invention includes: the role of the GC can be elected and rotated among multiple agents, avoiding physical single points of failure; and it establishes a multi-agent group key system based on a logical key tree. When an agent joins or leaves, only logarithmic-level key updates are required, reducing the communication overhead of key distribution from O(N) to O(logN), significantly improving the system's efficiency and scalability when handling large-scale, highly dynamic groups.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of multi-agent communication security technology, and in particular to a multi-agent communication key management method and system adapted to dynamic topology. Background Technology

[0002] A multi-agent system (MAS) is a distributed system composed of multiple agents capable of autonomous decision-making and collaborative communication. With the rapid development of multi-agent collaboration technology driven by Large Language Models (LLM), the interaction between agents has evolved from the traditional command-response model to a highly autonomous, dynamically collaborative, and complex system. In the LLM multi-agent collaboration framework, each agent, as a module with autonomous understanding, reasoning, and decision-making capabilities, needs to complete collaborative tasks through frequent, structured, and context-rich communication, such as joint planning, strategy negotiation, distributed knowledge integration, and real-time coordinated execution. This open, dynamic, and semantically dense communication method places stricter demands on security. The communication content not only includes critical instructions and task data but also involves logical chains and collaborative intentions; its confidentiality, integrity, and authenticity directly affect the reliability of the collaborative system.

[0003] In closed systems with fixed members, communication keys can be managed through pre-configuration or offline negotiation. However, in LLM multi-agent collaborative scenarios, the system often exhibits highly dynamic and open characteristics: agents may be dynamically instantiated, join, or leave the collaborative network based on task requirements, and their identities, roles, and permissions may change as the task progresses. To ensure the continuous secure operation of the system, the key management mechanism must support efficient and fine-grained dynamic updates. When a new agent joins, it should be seamlessly integrated into the existing communication loop, but should not be able to access historical interactions prior to joining; when an agent leaves or has its permissions revoked, it must be immediately isolated to prevent it from accessing any future collaborative content. Traditional centralized key distribution mechanisms face significant scalability bottlenecks, high key synchronization latency, and high update overhead in large-scale, highly dynamic, and low-latency LLM multi-agent collaborative environments, making it difficult to adapt to the security requirements of frequent agent reorganization and semantic communication. Therefore, an efficient, secure, and scalable dynamic key management scheme is urgently needed.

[0004] Based on the problems encountered in the application of the aforementioned technologies, several group key negotiation schemes have been developed to address the issue of secure multi-member communication. A common approach involves a centralized Group Controller (GC) responsible for generating and distributing all keys. The process is roughly as follows: ① All agents share a unique long-term key with the GC beforehand; ② When a group communication key (i.e., a session key) needs to be created or updated, the GC generates a new key; the GC uses each agent's long-term key to encrypt the new session key and sends it to each legitimate agent member. This approach provides a certain level of security, but it also has the following drawbacks: 1. Huge key update overhead: Whenever an agent joins or leaves, the GC needs to regenerate and distribute keys for all remaining members. For a group with N members, the communication overhead is proportional to N. When the number of members is large or changes frequently, the system overhead becomes unacceptable, resulting in low group size and scalability. 2. Wasted computational resources: When agents join or leave, all members need to perform decryption operations to obtain new keys. This is a heavy burden for resource-constrained agents (such as low power consumption and low computing power), further limiting the scalability of the solution. 3. Centralization bottleneck and risks: Heavy reliance on a single GC (GC) poses a single point of failure risk. Once the GC is attacked or fails, secure communication throughout the entire system will be paralyzed.

[0005] Therefore, how to solve the problems of low scalability and high failure risk in the existing centralized GC agent key generation and distribution process has become a key area that needs further research and optimization. Summary of the Invention

[0006] The embodiments of the present invention provide a multi-agent communication key management method and system that adapts to dynamic topology, which can solve the problems of low scalability and high failure risk in the existing centralized GC agent key generation and distribution process.

[0007] To achieve the above objectives, the embodiments of the present invention adopt the following technical solutions:

[0008] Firstly, a method for managing multi-agent communication keys that adapts to dynamic topologies is provided, such as... Figure 5 As shown, it includes:

[0009] S1, Dynamic Group Controller (D-GC).

[0010] S2. When a group of multiple agents starts up for the first time or needs to reset the group key, the D-GC determined by the current election constructs the initial logical key tree (LKT). In this key tree, an agent corresponds to a leaf node position, and all the keys on the path from this leaf node to the root node are the path keys held by this agent.

[0011] S3. When D-GC receives a joining request from the agent to be joined, it allocates a position for the agent to be joined in LKT and feeds back the complete key path corresponding to the allocated position to the agent to be joined.

[0012] Specifically, S1 includes: identifying agents from the group as D-GCs through an election mechanism model, wherein the election mechanism model includes: , , ;in, This represents the overall score of the i-th agent, where i is a positive integer. This represents the reputation metric of the i-th agent. This represents the capability index of the i-th agent. It is a positive constant. It is the weight of the reputation sub-item. Indicates the success rate of the interaction. Indicates online time, Represents the computational power of the agent and the corresponding coefficients , Represents the remaining memory of the agent and the corresponding coefficients. , Represents network bandwidth and corresponding coefficients , This represents the agent's current remaining battery power and the corresponding coefficient. ; It is a standardized load metric used to represent the average CPU utilization of an agent. It is a standardized distance metric used to represent the average network distance between an agent and the group center.

[0013] S2 includes: the initial group communication key generated by the D-GC determined in the current election. And through D-GC's private key to Perform digital signature; construct an initial empty LKT structure, which is a logical key tree structure containing only the root node; D-GC publishes initial group information, which includes at least: , The digital signature and D-GC identity certificate. Private keys for each agent can be pre-allocated by a trusted third party; for example, agents can come with their initial private key information and corresponding encryption algorithms at the factory. These pre-set private keys are essentially part of the agent's identity information. It should be noted that... The session key is used for group communication; the long-term master key is a key that each agent previously shared with the D-GC, used for authentication and initial key distribution.

[0014] After D-GC publishes the initial group information, the agents that receive the initial group information send a join request to D-GC; D-GC assigns leaf keys and / or intermediate keys to the agents in the group, and fills the initial empty LKT structure in a preset order, the preset order including: starting from the leaf nodes of the initial empty LKT structure, filling the path keys upwards until the root node.

[0015] S3 includes: using the long-term master key of the agent to be joined for authentication; if the authentication is successful, a position is assigned to the agent to be joined in the LKT and the key path corresponding to the assigned position is fed back to the agent to be joined.

[0016] If the verification is successful, a temporary and forward-secure channel with the agent to be added will be established before assigning a position in LKT. For example, a secure channel can be established using DH key exchange or RSA encryption algorithm.

[0017] The process of allocating a position for an agent to join in the LKT includes: the D-GC generating a new key for the agent to join in the LKT and updating the intermediate key and root key affected by the new key; the D-GC sending the key path to the agent to join through the channel established with the agent to join; and updating the intermediate key and root key affected by the new key to the existing agents in the group.

[0018] The process of an agent leaving the group includes: D-GC generating an update seed (Nonce); updating the path key (including the root key on the path) held by the agent to be leaving using the Nonce; obtaining the new key through a Key Derivation Function (KDF), where the new key is a different key derived from the original key using KDF, represented as K_new = KDF(K_old, Nonce), where K_new is the new key and K_old is the original path key held by the agent to be leaving; D-GC signing the message containing the Nonce and update instruction using its private key, and then multicasting the signed message; the multicast targets agents corresponding to keys other than the path key held by the agent to be leaving in LKT; and the agent receiving the signed message performing the same KDF operation as D-GC to obtain the new key. The Nonce itself can be understood as the salt in the key derivation function. When an agent is about to leave the group, the exit process needs to be initiated. Since an agent has left the group, the old key can no longer be used. A new key needs to be generated using KDF. Agents that have not left the group will use the same KDF operation as D-GC to obtain a new key, such as K_new = KDF(K_old, Nonce).

[0019] Secondly, a multi-agent communication key management system adapted to dynamic topology is provided, comprising: a dynamic group controller (D-GC) and ordinary agents; each agent is assigned a unique identity and holds a long-term master key shared with the D-GC, and also has a corresponding key in the logical key tree (LKT). The dynamic group controller (D-GC) is elected by the agents in the group and is used to construct the initial logical key tree (LKT), where an agent corresponds to a leaf node position in the key tree, and all keys on the path from this leaf node to the root node serve as the path keys held by this agent; when the D-GC receives a join request from an agent to join, it assigns a position to the agent to join in the LKT and feeds back the complete key path corresponding to the assigned position to the agent to join.

[0020] In this embodiment of the invention, the role of the GC (Controller) can be elected and rotated among multiple agents, avoiding physical single points of failure. Furthermore, a multi-agent group key system based on a logical key tree is established. When an agent joins or leaves, only logarithmic key updates are required, reducing the communication overhead for key distribution from O(N) to O(logN). This significantly improves the system's efficiency and scalability when handling large-scale, highly dynamic groups. Thus, it solves the problems of low scalability and high failure risk in the existing centralized GC agent key generation and distribution process. Attached Figure Description

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

[0022] Figure 1 This is a structural diagram of the dynamic key management system provided in an embodiment of the present invention;

[0023] Figure 2 This is a schematic diagram of the logical key tree structure provided in an embodiment of the present invention;

[0024] Figure 3 This is a schematic diagram of the D-GC election process provided in an embodiment of the present invention;

[0025] Figure 4 A flowchart is added to the intelligent agent provided in the embodiments of the present invention;

[0026] Figure 5 This is a schematic diagram of the method flow provided in an embodiment of the present invention. Detailed Implementation

[0027] To enable those skilled in the art to better understand the technical solutions of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Embodiments of the present invention will be described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention. Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in the specification of the present invention means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or couplings. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items. It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the meaning consistent with their meaning in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless defined as herein.

[0028] This invention provides a multi-agent communication key management scheme adapted to dynamic topologies. The main design principles include: establishing a group key management architecture based on a Logical Key Tree (LKT): associating the group key with the individual agent keys through a logical tree structure. The group's session key serves as the root key, and the individual agent keys serve as leaf node keys. Efficient key updates and distribution are achieved by managing the intermediate node keys on the tree. Joining mechanism: When an agent joins, only the keys on the path from its corresponding leaf node to the root node need to be updated, and the updated key material is efficiently distributed to relevant members, ensuring backward security. Exit mechanism: When an agent exits, only the affected key paths are updated, and new keys are distributed to the remaining members, ensuring that the exited agent cannot decrypt subsequent communications, achieving forward security.

[0029] The dynamic key management system proposed in this embodiment logically includes a dynamic group controller (D-GC) and ordinary intelligent agents. For example... Figure 1As shown. Ordinary Agent: The basic communication unit in the system. Each agent is assigned a unique identity and holds a long-term master key shared with the D-GC (used for authentication and initial key distribution), as well as a set of keys belonging to itself in the key tree. Dynamic Group Controller (D-GC): A logical entity whose role is assumed by a single high-reputation, high-resource agent elected by the system. The D-GC is responsible for agent authentication, handling agent joining and leaving requests, maintaining the structure of the logical key tree, generating and updating keys, and distributing key update messages to group members. The key tree is a logical structure in which the root node's key... This refers to the session key shared by the entire group, such as Figure 2 As shown. Each agent (e.g., A1, A2) corresponds to a leaf node and holds all the keys along a path from its leaf node to the root node (e.g., A1 holds...). , and ).

[0030] In this embodiment, the election process for the Dynamic Group Controller (D-GC) includes: to avoid physical single points of failure and improve system robustness, a dynamic group controller election mechanism based on reputation and resources is designed. The system periodically triggers elections. All agents vote based on a comprehensive evaluation index of the candidates' reputation and resource status (such as computing power, power, and network stability), and the agent with the highest comprehensive score is selected as the D-GC. The specific calculation formula is as follows: ,in, It is a standardized reputation metric. These are standardized capability indicators. It is a standardized load metric. It is a standardized distance metric. It is a small positive constant used to prevent the denominator from being zero or too small, which would result in an infinitely large score, and to ensure that the denominator is always greater than zero.

[0031] Specifically, reputation metrics ( This reflects the trustworthiness and reliability of the agent over a past period, and is composed of a weighted average of multiple sub-items: ,in, It is the weight of the reputation sub-item, and . Represents the success rate of the interaction. This represents online time.

[0032] Ability indicators ( This quantifies the physical resources and capabilities required for an agent to perform tasks as a D-GC. The agent's computational power is represented by standardized CPU performance, available memory, and network bandwidth. ), the agent's remaining memory ( ), network bandwidth ( ). The remaining battery power of the agent can be calculated. The capabilities of each agent can be calculated using the capability index calculation formula. . .

[0033] Load metrics ( This reflects the current busyness level of the agent, which can be calculated using the average CPU utilization over a short period of time. D-GC, as a critical role, should not be performed by overly busy agents to avoid impacting performance. Distance metric ( This measures the average network distance between the agent and the "group center," expressed as communication latency. The D-GC should not be too far from the core group so that it can communicate with most members more quickly.

[0034] The reputation of an agent is dynamically updated through interactions between agents (such as task collaboration and data forwarding). Other agents continuously monitor the behavior of the D-GC. For example, they monitor whether the D-GC publishes key updates on time, whether the key update messages are valid, and whether there is a denial-of-service attack. Once malicious behavior or an abnormal state is detected in the D-GC, its reputation will rapidly decline, triggering a new GC election, and may even lead to isolation and punishment. A typical D-GC election process is as follows: Figure 3 As shown.

[0035] In this embodiment, the initialization and construction process of LKT includes: when the multi-agent system starts for the first time or when the group key needs to be reset, D-GC will be responsible for the initial construction of LKT, and the process is as follows:

[0036] The newly elected D-GC first randomly generates a cryptographically secure initial group communication key. D-GC uses its private key pair Digital signatures are used to prove their legitimacy.

[0037] ②D-GC initializes a logical key tree structure containing only the root node, and constructs the initial empty LKT structure.

[0038] ③ Publish initial group information: D-GC will encrypt the... Its digital signature and D-GC's identity certificate are broadcast to other intelligent agents. Other intelligent agents use the trust information shared with D-GC to decrypt and verify the credentials. This allows them to securely obtain the initial group communication key.

[0039] ④ Progressive Addition of Agents: When each agent to be added is added, D-GC, based on the balance principle of LKT, finds a suitable position for it in the tree and fills in the path keys upwards from its leaf node until the root node. These intermediate keys and leaf keys (such as...) , These keys are generated and distributed by D-GC. They are also symmetric keys themselves, used for key encryption.

[0040] by Figure 1 For example, if a new agent A5 is added, the process should be as follows:

[0041] ① Agent A5, which is to be added, sends a joining request to D-GC. This request is encrypted or signed using A5's long-term master key to prove its identity;

[0042] ② After D-GC authenticates A5's identity, the two parties perform a verified key negotiation protocol to establish a temporary, forward-secret secure channel. This ensures that even if A5's long-term key is subsequently leaked, the communication content during this joining process will not be decrypted.

[0043] ③Key tree structure update and path key distribution:

[0044] D-GC allocates a new location for A5 in LKT and generates all the necessary new keys along its path (such as...). ) and update the affected intermediate key (such as Become ) and root key ( Become D-GC, through the newly negotiated secure channel, transmits the complete key path of A5 { Securely sent to A5.

[0045] ④ D-GC updates the root key and affected intermediate keys to all existing members. For example, it encrypts new keys using K_12. And multicast to A1 and A2; use and Encrypt new ones separately And broadcast it unicast to A3 and A4.

[0046] In this embodiment, the process of an agent leaving the group includes:

[0047] Taking agent A1 as an example, the process is as follows: ① D-GC generates a public, random update seed (Nonce) to update all keys on A1's original path to ensure forward security. The new key is no longer generated completely randomly, but is derived through a key derivation function (KDF). This method has extremely low computational overhead and is far more efficient than regenerating a random key;

[0048] ② D-GC uses its private key to sign a message containing the nonce and associated update instructions, and then multicasts this signed message. For example, using Encrypt the message and multicast it to A3 and A4; use The message is encrypted and unicast to A2. The remaining legitimate agents, upon receiving the message and verifying the signature, can obtain the new key by performing the same KDF operation locally, without waiting for the GC to distribute the new key itself, thus greatly improving update efficiency.

[0049] This invention proposes a multi-agent group key management method based on a logical key tree. When an agent joins or leaves, only logarithmic-level keys need to be updated, and the communication overhead for key distribution is reduced from O(N) to O(logN), significantly improving the system's efficiency and scalability when handling large-scale, highly dynamic groups. The role of the Group Key (GC) can be rotated among multiple agents through election, avoiding physical single points of failure and improving system robustness. During the key update phase, key derivation transforms the heavy operation of "regenerating keys" into a lightweight operation of "deriving new keys from old keys." The D-GC only needs to update a few core keys; other related path keys can be derived from these core keys and node IDs through derivation functions, reducing the amount of direct key transmission and greatly alleviating the computational and communication burden on resource-constrained agents.

[0050] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on its differences from other embodiments. In particular, the device embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments. The above descriptions are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for managing multi-agent communication keys adapted to dynamic topologies, characterized in that, include: S1. Election of Dynamic Group Controller (D-GC), in which ordinary agents in the group are assigned a unique identity and hold a long-term master key shared with the D-GC. At the same time, a key corresponding to the ordinary agent exists in the Logical Key Tree (LKT). S2. When a group of multiple agents starts up for the first time or needs to reset the group key, the initial LKT is constructed by the D-GC determined by the current election. In this LKT, an agent corresponds to a leaf node position in the key tree, and all the keys on the path from this leaf node to the root node are used as the path keys held by this agent. S3. When D-GC receives a joining request from the agent to be joined, it allocates a position for the agent to be joined in LKT and feeds back the complete key path corresponding to the allocated position to the agent to be joined.

2. The method according to claim 1, characterized in that, S1 includes: Agents are selected from the group to serve as D-GCs through an election mechanism model, which includes: , , ; in, This represents the overall score of the i-th agent, where i is a positive integer. This represents the reputation metric of the i-th agent. This represents the capability index of the i-th agent. It is a positive constant. It is the weight of the reputation sub-item. Indicates the success rate of the interaction. Indicates online time, Represents the computational power of an agent and the corresponding coefficients , Represents the remaining memory of the agent and the corresponding coefficients. , Represents network bandwidth and corresponding coefficients , This represents the agent's current remaining battery power and the corresponding coefficient. ; It is a standardized load metric used to represent the average CPU utilization of an agent. It is a standardized distance metric used to represent the average network distance between an agent and the group center.

3. The method according to claim 1, characterized in that, S2 include: The D-GC determined in the current election generates the initial group communication key. And through D-GC's private key to Perform digital signature; Construct an initial empty LKT structure, which is a logical key tree structure containing only the root node; D-GC publishes initial group information, which includes at least: , Digital signatures and D-GC identity certificates.

4. The method according to claim 3, characterized in that, Also includes: After D-GC publishes the initial group information, the agent that receives the initial group information sends a join request to D-GC; D-GC assigns leaf keys and / or intermediate keys to agents in the group and fills the initial empty LKT structure in a preset order, which includes filling path keys upwards from the leaf nodes of the initial empty LKT structure until the root node.

5. The method according to claim 1, characterized in that, S3 include: Authentication is performed using the long-term master key of the agent to be added; If the verification is successful, a position is assigned to the agent to be added in LKT, and the key path corresponding to the assigned position is fed back to the agent to be added.

6. The method according to claim 5, characterized in that, Also includes: If the verification is successful, a temporary and forward-secret secure channel is established with the agent to be added before assigning a position in the LKT.

7. The method according to claim 5 or 6, characterized in that, The process of assigning positions to agents to be added in LKT includes: D-GC generates a new key for the agent to be added in LKT and updates the intermediate key and root key affected by the new key. D-GC sends the key path to the agent to be joined through the channel established with the agent to be joined; The updated intermediate and root keys, which are affected by the new key, will be updated and then applied to the existing agents in the group.

8. The method according to claim 1, characterized in that, The process of an agent leaving the group includes: An update seed (Nonce) is generated by D-GC, and the path key held by the agent to be exited is updated using the Nonce. The new key is obtained through the key derivation function (KDF). D-GC uses its private key to sign messages containing nonce and update instructions, and then multicasts the signed messages. The multicast targets include agents in LKT that use a key other than the path key held by the agent to be exited. Upon receiving the signed message, the agent performs the same KDF operation as D-GC and obtains the new key.

9. A multi-agent communication key management system adapted to dynamic topology, characterized in that, include: Dynamic Group Controller (D-GC) and ordinary intelligent agent. Ordinary agents are assigned a unique identity and hold a long-term master key shared with D-GC. At the same time, a key corresponding to the ordinary agent exists in the logical key tree (LKT). The Dynamic Group Controller (D-GC) is elected by agents in the group and is used to construct the initial Logical Key Tree (LKT). In the key tree, an agent corresponds to a leaf node position, and all the keys on the path from this leaf node to the root node are the path keys held by this agent. When the D-GC receives a join request from an agent to join, it assigns a position to the agent to join in the LKT and feeds back the complete key path corresponding to the assigned position to the agent to join.