Safety consensus control method and device for multi-agent system
By applying the PBFT and RAFT consensus algorithms of blockchain technology to a multi-agent system, combined with the average consensus protocol, Byzantine agents are identified and removed, solving the problems of low detection accuracy and high communication overhead in existing technologies, and achieving efficient and secure consensus control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
- Filing Date
- 2023-09-15
- Publication Date
- 2026-07-21
AI Technical Summary
Existing multi-agent systems suffer from low detection accuracy, high communication overhead, and high network complexity when facing Byzantine attacks, making it difficult to achieve effective security and consistency control.
The PBFT and RAFT consensus algorithms in blockchain technology are used to authenticate the leader node. Combined with the average consensus protocol, the multi-agent system is grouped and authenticated to identify and remove Byzantine agents and achieve secure consistency control.
It improves the detection accuracy of Byzantine agents, reduces communication overhead and network complexity, and ensures the robustness and consistency of multi-agent systems under attack conditions.
Smart Images

Figure CN117336023B_ABST
Abstract
Description
Technical Field
[0001] The embodiments disclosed herein relate to the field of multi-agent systems, and more specifically, to a method and apparatus for secure consistency control of multi-agent systems. Background Technology
[0002] A multi-agent system (MAS) is a collection of multiple interacting agents. These agents can perceive specific data in the environment, communicate with each other, and perform actions to accomplish complex tasks that a single agent cannot. The use of consensus algorithms in MAS ensures the directed flow of information in the network, provides robustness to network topology changes caused by link and node failures, and supports system performance under communication latency. However, malicious attacks can affect the direct relationship between the frequency and structural characteristics of complex networks and the information propagation speed of consensus algorithms, thus harming the performance of network systems with nonlocal information flows. Therefore, in recent years, the security of MAS consensus has become a new hot topic in this field. Summary of the Invention
[0003] The embodiments described herein provide a method for secure consistency control of a multi-agent system, a device for secure consistency control of a multi-agent system, and a computer-readable storage medium storing a computer program.
[0004] According to a first aspect of this disclosure, a secure consensus control method for a multi-agent system is provided. The multi-agent system includes multiple agents. The secure consensus control method includes: establishing a network topology diagram of the multi-agent system based on the communication relationships of the multiple agents; selecting M leader nodes from the multiple agents according to the network topology diagram, wherein the agents other than the M leader nodes are designated as follower nodes; dividing the multiple agents into M agent groups based on the selected leader nodes, such that each agent group includes one leader node; in the case that the multi-agent system includes Byzantine agents, authenticating the M leader nodes using a Practical Byzantine Fault Tolerance consensus mechanism among the M agent groups, and authenticating follower nodes within each agent group based on the RAFT consensus algorithm; identifying nodes that fail authentication as Byzantine agents; removing Byzantine agents from the multi-agent system; and using an average consensus protocol to perform consensus control on normal agents in the multi-agent system. Normal agents are authenticated nodes. M is an integer greater than or equal to 4.
[0005] In some embodiments of this disclosure, authenticating follower nodes based on the RAFT consensus algorithm within each agent group includes: within each agent group, a leader node generates a first encrypted heartbeat packet and sends the first encrypted heartbeat packet to each follower node within the agent group; each follower node verifies the first encrypted heartbeat packet upon receiving it; in response to any follower node successfully verifying the first encrypted heartbeat packet, the follower node digitally signs the first encrypted heartbeat packet using its own private key to generate a second encrypted heartbeat packet and sends the second encrypted heartbeat packet to the leader node as a reply to the first encrypted heartbeat packet; upon receiving the second encrypted heartbeat packet, the leader node sends its log information to the follower node that sent the second encrypted heartbeat packet; and in response to any follower node failing to send the second encrypted heartbeat packet to the leader node, the follower node fails authentication.
[0006] In some embodiments of this disclosure, the leader node generating the first encrypted heartbeat packet includes: the leader node generating an original heartbeat packet; the leader node encrypting the original heartbeat packet using a specified one-way hash function to form a first digital digest; the leader node using the leader node's private key to perform asymmetric encryption on the first digital digest to form a first digital signature; and the leader node encapsulating the first digital signature and the original heartbeat packet together to form the first encrypted heartbeat packet.
[0007] In some embodiments of this disclosure, each follower node verifies the first encrypted heartbeat packet after receiving it, including: the follower node using a pre-obtained public key of the leader node to decrypt the first digital signature of the first encrypted heartbeat packet to derive a first digital digest; the follower node encrypting the original heartbeat packet in the first encrypted heartbeat packet using a specified one-way hash function to form a second digital digest; the follower node comparing the hash value of the first digital digest with the hash value of the second digital digest; in response to the hash value of the first digital digest being the same as the hash value of the second digital digest, the follower node verifies the first encrypted heartbeat packet; and in response to the hash value of the first digital digest being different from the hash value of the second digital digest, the follower node fails to verify the first encrypted heartbeat packet.
[0008] In some embodiments of this disclosure, selecting M leader nodes from multiple agents based on a network topology diagram includes: determining the connectivity of each node in the network topology diagram; identifying the top N nodes with the highest connectivity as candidate nodes, where N is greater than or equal to 4; identifying the candidate nodes that can communicate with each of the other candidate nodes as leader nodes; and, in response to the number of nodes identified as leader nodes being less than 4, sequentially selecting additional candidate nodes in descending order of connectivity, and identifying the additional candidate nodes that can communicate with each of the leader nodes as leader nodes.
[0009] In some embodiments of this disclosure, dividing multiple agents into M agent groups based on the selected leader node includes: assigning the M leader nodes to the M agent groups respectively; dividing follower nodes into first follower nodes that can only communicate with one leader node and second follower nodes that can communicate with multiple leader nodes; assigning each first follower node to the agent group containing the leader node with which it can communicate; and for each second follower node, determining the first follower node with which it can communicate and assigning the second follower node to the agent group containing the first follower node.
[0010] In some embodiments of this disclosure, the secure consistency control method further includes: when the first leader node is determined to be a Byzantine agent, each follower node in the first agent group to which the first leader node belongs is designated as a target follower node, and the following operations are performed: in response to a target follower node being able to communicate only with one second leader node, the target follower node is assigned to the second agent group to which the second leader node belongs; the target follower node copies the log information of the second leader node, adds a digital signature to the copied log information, and broadcasts the digitally signed log information within the second agent group; in response to a target follower node being able to communicate with multiple... The system communicates with the second leader node, determines the number of follower nodes in the second agent group to which each second leader node belongs that can communicate with the target follower node, assigns the target follower node to the second agent group with the largest number of nodes, copies the log information of the second leader node in the second agent group, adds a digital signature to the copied log information, and broadcasts the digitally signed log information within the second agent group; and in response to the target follower node being unable to communicate with the second leader node, the target follower node verifies the digital signature of the log information sent by other follower nodes in the first agent group, and copies the log information after successful verification. Here, the second leader node is a leader node other than the first leader node among the M leader nodes.
[0011] In some embodiments of this disclosure, the multi-agent system achieves secure consistency control when the state value of each agent in the multi-agent system satisfies the following conditions:
[0012]
[0013]
[0014] Where s(0) represents the minimum value of the initial state of a normal agent, S(0) represents the maximum value of the initial state of a normal agent, and x i (t) represents the state value of the i-th agent at time t, and Γ represents the set of all normal agents in the multi-agent system. j (t) represents the state value of agent j at time t, where agent j is a neighbor node of agent i.
[0015] In some embodiments of this disclosure, the multi-agent system is established according to the following formula:
[0016]
[0017] Where, x i (t) represents the state value of the i-th agent at time t. x represents i The first derivative of (t), u i (t) represents the control input of the i-th agent at time t.
[0018] Wherein, when the i-th agent is a normal agent, the control input of the i-th agent is represented as:
[0019]
[0020] Where, N i Let x represent the set of neighboring nodes of the i-th agent. i (t) represents the state value of the i-th agent at time t, and Γ represents the set of all normal agents in the multi-agent system. j (t) represents the state value of the j-th agent at time t, a ij This represents the elements in the adjacency matrix corresponding to the network topology graph, where a ii =0, if the i-th agent can communicate with the j-th agent, then a ij =1, otherwise a ij =0.
[0021] According to a second aspect of this disclosure, a secure consensus control device for a multi-agent system is provided. The multi-agent system includes multiple agents. The secure consensus control device includes at least one processor and at least one memory storing a computer program. When the computer program is executed by the at least one processor, the secure consensus control device causes the following actions: establishing a network topology diagram of the multi-agent system based on the communication relationships of the multiple agents; selecting M leader nodes from the multiple agents based on the network topology diagram, wherein the agents other than the M leader nodes are designated as follower nodes; dividing the multiple agents into M agent groups based on the selected leader nodes, such that each agent group includes one leader node; in the case that the multi-agent system includes Byzantine agents, authenticating the M leader nodes among the M agent groups using a Practical Byzantine Fault Tolerance consensus mechanism, and authenticating follower nodes within each agent group based on the RAFT consensus algorithm; identifying unauthenticated nodes as Byzantine agents; removing Byzantine agents from the multi-agent system; and performing consensus control on the normal agents in the multi-agent system using an average consensus protocol. In this context, a normal intelligent agent is a node that has been authenticated. M is an integer greater than or equal to 4.
[0022] In some embodiments of this disclosure, when executed by at least one processor, the computer program causes a secure consistency control device to authenticate follower nodes within each agent group based on the RAFT consensus algorithm by: within each agent group, a leader node generates a first encrypted heartbeat and sends the first encrypted heartbeat to each follower node within the agent group; each follower node verifies the first encrypted heartbeat upon receiving it; in response to any follower node successfully verifying the first encrypted heartbeat, the follower node digitally signs the first encrypted heartbeat using its own private key to generate a second encrypted heartbeat and sends the second encrypted heartbeat to the leader node as a reply to the first encrypted heartbeat; upon receiving the second encrypted heartbeat, the leader node sends its log information to the follower node that sent the second encrypted heartbeat; and in response to any follower node failing to send the second encrypted heartbeat to the leader node, the follower node fails authentication.
[0023] In some embodiments of this disclosure, when executed by at least one processor, a computer program causes a security and consistency control device to generate a first encrypted heartbeat by: a leader node generating an original heartbeat; the leader node encrypting the original heartbeat using a specified one-way hash function to form a first digital digest; the leader node using its private key to perform asymmetric encryption on the first digital digest to form a first digital signature; and the leader node encapsulating the first digital signature and the original heartbeat together to form the first encrypted heartbeat.
[0024] In some embodiments of this disclosure, when executed by at least one processor, a computer program causes a security consistency control device to verify a first encrypted heartbeat packet by: the follower node using a pre-obtained public key of the leader node to decrypt a first digital signature of the first encrypted heartbeat packet to derive a first digital digest; the follower node encrypting the original heartbeat packet in the first encrypted heartbeat packet using a specified one-way hash function to form a second digital digest; the follower node comparing the hash value of the first digital digest with the hash value of the second digital digest; in response to the hash value of the first digital digest being the same as the hash value of the second digital digest, the follower node verifies the first encrypted heartbeat packet; and in response to the hash value of the first digital digest being different from the hash value of the second digital digest, the follower node fails to verify the first encrypted heartbeat packet.
[0025] In some embodiments of this disclosure, when executed by at least one processor, a computer program causes a security consistency control device to select M leader nodes from a plurality of agents based on a network topology graph by: determining the connectivity of each node in the network topology graph; identifying the top N nodes with the highest connectivity as candidate nodes, where N is greater than or equal to 4; identifying the candidate nodes that can communicate with each of the other candidate nodes as leader nodes; and, in response to the number of nodes identified as leader nodes being less than 4, sequentially selecting additional candidate nodes in descending order of connectivity, and identifying the additional candidate nodes that can communicate with each of the leader nodes as leader nodes.
[0026] In some embodiments of this disclosure, when executed by at least one processor, a computer program causes a security consistency control device to divide a plurality of agents into M agent groups based on a selected leader node by: assigning the M leader nodes to the M agent groups respectively; dividing follower nodes into first follower nodes that can only communicate with one leader node and second follower nodes that can communicate with multiple leader nodes; assigning each first follower node to the agent group containing a leader node that it can communicate with; and for each second follower node, determining a first follower node that it can communicate with and assigning the second follower node to the agent group containing the first follower node.
[0027] In some embodiments of this disclosure, when executed by at least one processor, the computer program causes the security consistency control device to further: if the first leader node is determined to be a Byzantine agent, designate each follower node in the first agent group to which the first leader node belongs as a target follower node, and perform the following operations: in response to a target follower node being able to communicate only with one second leader node, assign the target follower node to the second agent group to which the second leader node belongs, copy the log information of the second leader node, add a digital signature to the copied log information, and broadcast the digitally signed log information within the second agent group; in response to the ... A follower node can communicate with multiple second leader nodes. The number of follower nodes that can communicate with the target follower node within each second agent group to which the second leader node belongs is determined. The target follower node is assigned to the second agent group with the largest number of nodes. The target follower node copies the log information of the second leader node in that second agent group, adds a digital signature to the copied log information, and broadcasts the digitally signed log information within that second agent group. In response to a target follower node being unable to communicate with a second leader node, the target follower node verifies the digital signature of log information sent by other follower nodes in the first agent group, and copies the log information after successful verification. Here, the second leader node is a leader node other than the first leader node among M leader nodes.
[0028] According to a third aspect of this disclosure, a computer-readable storage medium is provided storing a computer program, wherein the computer program, when executed by a processor, implements the steps of the security and consistency control method according to a first aspect of this disclosure. Attached Figure Description
[0029] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings of the embodiments will be briefly described below. It should be understood that the drawings described below only relate to some embodiments of this disclosure and are not intended to limit this disclosure, wherein:
[0030] Figure 1 This is an exemplary flowchart of a security consistency control method for a multi-agent system according to embodiments of the present disclosure;
[0031] Figure 2 This is an exemplary network topology diagram of a multi-agent system;
[0032] Figure 3 yes Figure 2 The diagram shows an exemplary grouping of a multi-agent system.
[0033] Figure 4 yes Figure 2 The diagram shows the network topology of the multi-agent system after removing the Byzantine agents.
[0034] Figure 5 This is an exemplary state response diagram of a multi-agent system when employing the security consistency control method according to embodiments of the present disclosure;
[0035] Figure 6 This is an exemplary state response diagram of a multi-agent system controlled by the average subsequence reduction algorithm;
[0036] Figure 7 This is a schematic block diagram of a security consistency control device for a multi-agent system according to embodiments of the present disclosure.
[0037] It should be noted that the elements in the attached diagram are schematic and not drawn to scale. Detailed Implementation
[0038] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the described embodiments of this disclosure without creative effort are also within the scope of protection of this disclosure.
[0039] Unless otherwise defined, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which this subject matter pertains. It will be further understood that terms such as those defined in commonly used dictionaries shall be interpreted as having meanings consistent with their meanings in the context of the specification and in the relevant art, and shall not be interpreted in an idealized or overly formal form unless otherwise explicitly defined herein. Furthermore, terms such as “first” and “second” are used only to distinguish one component (or part of a component) from another component (or another part of a component).
[0040] Existing security consistency control methods for multi-agent systems can be divided into two categories according to their defense type: detection-based security consistency algorithms and fault-tolerant security consistency algorithms.
[0041] (1) Detection-based security consistency algorithm
[0042] The core of detection-based security consensus algorithms is to design a reliable detection mechanism to detect and isolate malicious nodes. Existing detection-based security consensus control algorithms mainly include adaptive bias fault-tolerant algorithms, uncertain input fault detection algorithms, and resilient consensus algorithms based on motion detectors.
[0043] Among them, the adaptive bias fault-tolerant algorithm dynamically assigns weights to each agent node and calculates the adaptive threshold and state residual, reducing the impact of malicious node attacks on the multi-agent system and achieving secure and consistent control of the multi-agent system.
[0044] Uncertain input fault detection algorithms treat node fault states and malicious behaviors as uncertain inputs affecting multi-agent systems. Three algorithms are designed to detect and identify nodes with fault states and malicious behaviors. Two algorithms, based on fault detection techniques, perform comprehensive detection and identification, thus identifying malicious nodes, provided that normal nodes have access to global information about the multi-agent system's communication network. The third algorithm addresses situations where malicious node state values deviate from a threshold. It uses residual intrusion detection and leverages weakly correlated sub-component networks to locally detect malicious state values outside the threshold range, thereby identifying malicious nodes.
[0045] A resilient consensus algorithm based on a mobile detector is proposed to address the scenario where malicious nodes can launch collusive attacks. This algorithm utilizes a mobile agent as a detector. The algorithm comprises a basic average iterative process and detection algorithms for both normal and mobile nodes. Under this algorithm, the mobile agent can detect malicious nodes in the global network within a finite time, and broadcast the results. Normal nodes isolate the malicious nodes within a finite time, thus isolating them within the multi-agent system and achieving secure consensus control.
[0046] (2) Fault-tolerant and secure consistency algorithms
[0047] Research on fault-tolerant secure consensus algorithms focuses on ensuring that multi-agent systems can still reach consensus under Byzantine attacks and anomalies, aiming to improve the system's robustness and resistance to attacks. Existing fault-tolerant secure consensus algorithms mainly include adversarial secure consensus protocols, average subsequence reduction algorithms, and trusted node-based secure consensus control algorithms.
[0048] Among them, the adversarial security consensus protocol is an elastic consensus protocol based on local exchange rules with elastic first-order consensus and high-order synchronization under continuous time. It is mainly used in multi-agent systems with tree topology. If the number of malicious nodes in the system meets the assumptions, the normal nodes in the system can reach consensus under the control of the security protocol.
[0049] The average subsequence reduction algorithm is designed for agent systems with f malicious nodes in the network topology. Under the condition that the network topology satisfies certain robustness requirements, it makes full use of the information of neighboring nodes and forms a convex combination. It sorts and filters all node information, removes the extreme values of the reordered nodes, performs a weighted average on the remaining node information, and then updates the information of normal nodes. This leads to a family of algorithms.
[0050] In the secure consistency control algorithm based on trusted nodes, trusted nodes are introduced, which means that a small part of the nodes and edges are trusted. These nodes and edges remain intact at all times and are not affected by failures, thereby improving the connectivity and robustness of the network. Then, a secure consistency control protocol is used to achieve the consistency control of the system.
[0051] While existing security and consistency control algorithms can play an important role in multi-agent systems, they also have the following problems.
[0052] (1) Detection accuracy issue
[0053] Detection algorithms may incorrectly label normal behavior as anomalous or fail to detect genuinely anomalous behavior when detecting Byzantine attacks and abnormal behavior. This can lead to false positives or false negatives, affecting the system's reliability and accuracy.
[0054] (2) Communication overhead problem
[0055] Improving the accuracy of detection algorithms typically requires increased computational and communication overhead. These algorithms need to analyze and process large amounts of data to identify anomalous behavior in a system. This is especially true in large-scale multi-agent systems, where the amount of data can be enormous, leading to increased computational complexity. High-accuracy detection algorithms may result in significant performance degradation, thus limiting their practical application.
[0056] (3) Network complexity problem
[0057] Fault-tolerant algorithms require a certain level of connectivity and robustness in the network topology. For example, the average subsequence reduction algorithm requires the network topology to satisfy f+1 robustness (when there are f Byzantine agents in a multi-agent system, the network composed of normal agents needs to satisfy f+1 robustness) in order to perform effective secure consistency control. This places high demands on the network topology. To address this issue, redundancy mechanisms or additional communication are typically introduced to increase network connectivity, thereby achieving fault tolerance. For instance, trust nodes can be introduced to improve network connectivity; however, trust nodes are costly, and if a trust node fails, the system will suffer severe damage and economic losses.
[0058] This disclosure addresses the security issue of Byzantine malicious nodes (which may be referred to as "Byzantine agents" or "Byzantine nodes" in the context) affecting the achievement of system consistency in multi-agent systems, and proposes a secure consistency control method for multi-agent systems. Figure 1 An exemplary flowchart illustrates a security consistency control method for a multi-agent system according to embodiments of the present disclosure. The multi-agent system includes multiple agents.
[0059] exist Figure 1 At frame S102, a network topology diagram of the multi-agent system is established based on the communication relationships among the multiple agents in the multi-agent system. In some embodiments of this disclosure, an agent refers to a first-order agent. A multi-agent system refers to a first-order multi-agent system.
[0060] In some embodiments of this disclosure, the multi-agent system is established according to the following formula:
[0061]
[0062] Where, xi (t) represents the state value of the i-th agent at time t. x represents i The first derivative of (t), u i (t) represents the control input of the i-th agent at time t.
[0063] Wherein, when the i-th agent is a normal agent, the control input of the i-th agent is represented as:
[0064]
[0065] Where, N i Let x represent the set of neighboring nodes of the i-th agent. i (t) represents the state value of the i-th agent at time t, and Γ represents the set of all normal agents in the multi-agent system. j (t) represents the state value of the j-th agent at time t, a ij This represents the elements in the adjacency matrix corresponding to the network topology graph. Here, we do not consider the self-loop phenomenon of agents, and let a... ii Set to 0. If agent i can communicate with agent j, then a ij =1. If the i-th agent cannot communicate with the j-th agent, then a ij =0.
[0066] A first-order multi-agent system is a system composed of multiple agents with mathematical models as shown in Equation (1). The agents communicate with each other by means of predetermined rules to transmit each other's state information.
[0067] Figure 2 An exemplary network topology diagram of a multi-agent system is shown. Figure 2 In this system, the intelligent agent system comprises 12 agents. Each agent is represented by a circle, with the number within the circle indicating its ID. Straight lines connecting the circles represent communication relationships. In one example, the initial state of these 12 agents is set as: x(0) = [1, 13, 2, 10, 4, 16, 5, 3, 7, 8, 9, 6]. T .
[0068] Back Figure 1 In box S104, M leader nodes are selected from the plurality of agents according to the network topology diagram. The agents other than the M leader nodes become follower nodes. M is an integer greater than or equal to 4. The reason for setting M to be greater than or equal to 4 will be described below regarding the steps in box S108.
[0069] In some embodiments of this disclosure, the connectivity of each node in the network topology graph can be determined by combining the degree matrix of the multi-agent system. Here, the connectivity of a node refers to the number of nodes that the node is connected to. The top N nodes with the highest connectivity are determined as candidate nodes. Here, N is greater than or equal to 4. Assume that in a multi-agent system, the maximum connectivity is 6. If there are 4 nodes with a connectivity of 6, these 4 nodes with a connectivity of 6 are determined as candidate nodes. If there are 3 nodes with a connectivity of 6 and 2 nodes with a connectivity of 5, these 3 nodes with a connectivity of 6 and 2 nodes with a connectivity of 5 are determined as candidate nodes. Then, the node among the candidate nodes that can communicate with each of the other candidate nodes is determined as the leader node. That is, the leader node needs to be able to communicate with each other. If the number of nodes determined as leader nodes is less than 4, additional candidate nodes are selected in descending order of connectivity, and the node among the additional candidate nodes that can communicate with each of the leader nodes is determined as the leader node. In the example where there are 4 nodes with a connectivity of 6, if the number of nodes identified as leader nodes is less than 4, then nodes with a connectivity of 5 are added as additional candidate nodes, and a leader node is selected from these additional candidate nodes. This process continues until at least 4 leader nodes are selected.
[0070] exist Figure 2 In the example, nodes 0, 1, 2, and 3 all have a connectivity of 6, making them the four nodes with the highest connectivity. Furthermore, they can communicate with each other in pairs. Therefore, nodes 0, 1, 2, and 3 are determined to be the leader nodes.
[0071] exist Figure 1 At frame S106, the multiple agents are divided into M agent groups based on the selected leader node, such that each agent group includes one leader node. In some embodiments of this disclosure, the M leader nodes are first assigned to the M agent groups. Follower nodes are then divided into first follower nodes that can only communicate with one leader node and second follower nodes that can communicate with multiple leader nodes. Figure 2In the example, nodes 4, 6, 8, and 10 are first follower nodes. Nodes 5, 7, 9, and 11 are second follower nodes. For each first follower node, it is assigned to the agent group containing the leader node with which it can communicate. Therefore, node 4 is assigned to the agent group containing node 0. Node 6 is assigned to the agent group containing node 1. Node 8 is assigned to the agent group containing node 2. Node 10 is assigned to the agent group containing node 3. For each second follower node, a first follower node with which it can communicate is determined, and this second follower node is assigned to the agent group containing the first follower node. For node 5, the first follower node with which it can communicate is node 4; therefore, node 5 is assigned to the agent group containing node 4. For node 7, the first follower node with which it can communicate is node 6; therefore, node 7 is assigned to the agent group containing node 6. For node 9, the first follower node that can communicate with it is node 8. Therefore, node 9 is assigned to the agent group to which node 8 belongs. For node 11, the first follower node that can communicate with it is node 10. Therefore, node 11 is assigned to the agent group to which node 10 belongs. Figure 3 Show Figure 2 The diagram illustrates an exemplary grouping of a multi-agent system. Nodes within the same dashed box belong to the same agent group.
[0072] The embodiments disclosed herein combine the advantages of blockchain technology in distributed information storage, data security, confidentiality, and traceability, and propose to use the consensus mechanism in blockchain technology to detect and identify Byzantine agents in a multi-agent system, promote communication protection and cooperation among agents, and improve the detection accuracy of Byzantine agents.
[0073] When a multi-agent system contains Byzantine agents, the Byzantine agents sometimes send different values to their neighboring nodes and do not follow the control laws of normal agents, applying a different function than equation (2) for state updates. The state update equation of the Byzantine agent can be written in the following form:
[0074] x q (t+1)=f q (x q (t)) (3)
[0075] Where, x q (t) represents the qth intelligent agent as a Byzantine intelligent agent, f q Represents an arbitrary function used for iterative state updates of a Byzantine agent.
[0076] exist Figure 1In box S108, in the case of a multi-agent system including Byzantine agents, the M leader nodes are authenticated using the Practical Byzantine Fault Tolerance (PBFT) consensus mechanism among the M agent groups, and follower nodes are authenticated within each agent group based on the RAFT (Replicated And Fault Tolerant) consensus algorithm.
[0077] In existing technologies, the PBFT consensus mechanism is used in the field of blockchain technology. The PBFT consensus mechanism enables distributed systems to reach consensus even in the presence of malicious or faulty nodes. Consensus is achieved through multiple rounds of voting. In each view, the system selects a primary node to propose a new block or transaction. Other nodes (backup nodes) perform the same operation based on the primary node's proposal and broadcast the voting results to other nodes. Nodes summarize the collected voting results and determine the final block or transaction based on the majority vote, then broadcast this result. All nodes verify this result; if consensus is reached, the block or transaction is confirmed and added to the blockchain. Considering the PBFT consensus mechanism's 33% fault tolerance and the possibility of Byzantine nodes among the leader nodes, the total number of elected leader nodes must be at least four.
[0078] In some embodiments of this disclosure, during the authentication of leader nodes using the PBFT consensus mechanism, if a leader node fails to pass the three-phase (preparation phase, preparation phase, and commit phase) verification process, fails to pass digital signature verification, fails to successfully complete the consensus process, and fails to send a response message to the client, then the leader node is a Byzantine node.
[0079] After authenticating the M leader nodes, follower nodes can be authenticated within each agent group based on the RAFT consensus algorithm. In some embodiments of this disclosure, the RAFT consensus algorithm is improved. For example, information encryption and digital signature verification are performed within the RAFT algorithm. The improved RAFT consensus algorithm is described below.
[0080] In these embodiments, within each agent group, the leader node generates a first encrypted heartbeat and sends it to each follower node within the group. Each follower node verifies the first encrypted heartbeat upon receiving it. If any follower node successfully verifies the first encrypted heartbeat, it digitally signs it using its private key to generate a second encrypted heartbeat and sends it to the leader node as a response to the first encrypted heartbeat. Upon receiving the second encrypted heartbeat, the leader node sends its log information to the follower node that sent it. After copying the leader node's log information, the follower node replies with a response message to the client. If any follower node fails to send a second encrypted heartbeat to the leader node, the leader node determines that the follower node has not been authenticated.
[0081] In some embodiments of this disclosure, the leader node may generate a first encrypted heartbeat packet by the following steps: the leader node generates an original heartbeat packet; the leader node encrypts the original heartbeat packet using a specified one-way hash function (which is synchronized with the follower nodes in advance) to form a first digital digest; the leader node uses the leader node's private key to perform asymmetric encryption on the first digital digest to form a first digital signature; and the leader node encapsulates the first digital signature and the original heartbeat packet together to form a first encrypted heartbeat packet.
[0082] In some embodiments of this disclosure, each follower node, upon receiving a first encrypted heartbeat packet, may verify the first encrypted heartbeat packet through the following steps: the follower node uses the pre-obtained public key of the leader node to decrypt the first digital signature of the first encrypted heartbeat packet to derive a first digital digest; the follower node uses a specified one-way hash function to encrypt the original heartbeat packet in the first encrypted heartbeat packet to form a second digital digest; the follower node compares the hash value of the first digital digest with the hash value of the second digital digest; if the hash value of the first digital digest is the same as the hash value of the second digital digest, the follower node's verification of the first encrypted heartbeat packet passes; if the hash value of the first digital digest is different from the hash value of the second digital digest, the follower node's verification of the first encrypted heartbeat packet fails.
[0083] In the operation at frame S108, the grouping method keeps the number of nodes jointly applying the consensus mechanism within a limited range, preventing excessive communication overhead due to a large number of nodes. Furthermore, only one round of verification through the consensus mechanism is needed to determine the identity of Byzantine nodes in the multi-agent system, eliminating the need for extensive data analysis and processing, effectively reducing communication overhead. Only communication between leader nodes and between leader nodes and follower nodes within their groups is required; the network topology does not need to satisfy the f+1 robustness condition, reducing network complexity and minimizing communication redundancy while achieving consistency control, thus conserving communication resources.
[0084] At box S110, nodes that have not passed authentication are identified as Byzantine agents. Nodes that have passed authentication are identified as normal agents. In some embodiments of this disclosure, normal agents will reply with a response message to the client after passing authentication, while Byzantine agents will not reply with a response message to the client. Therefore, the client can also synchronously know which nodes are Byzantine agents.
[0085] At box S112, remove the Byzantine agent from the multi-agent system. Figure 2 In the example, assuming nodes 0, 7, 9, and 11 are Byzantine nodes, the network topology after removing these four Byzantine nodes is as follows: Figure 4 As shown.
[0086] In some embodiments of this disclosure, when the first leader node is determined to be a Byzantine agent, the follower nodes in the first agent group to which the first leader node belongs will search for a new leader node and join the agent group to which that leader node belongs. Here, the first leader node refers to any one of the M leader nodes. Each follower node in the first agent group to which the first leader node belongs is referred to as a target follower node, and the operations performed by the target follower node are described below.
[0087] If a target follower node can only communicate with one second leader node, then the target follower node is assigned to the second agent group containing that second leader node. Here, the second leader node refers to any of the M leader nodes other than the first leader node. The target follower node copies the log information of this second leader node, adds a digital signature to the copied log information, and broadcasts the digitally signed log information within the second agent group. Figure 4 In the example, after removing leader node 0, node 5 can only communicate with leader node 1. Therefore, node 5 is reassigned to the agent group where leader node 1 is located.
[0088] If a target follower node can communicate with multiple second leader nodes, the number of follower nodes in each second agent group that can communicate with the target follower node is determined, and the target follower node is assigned to the second agent group with the largest number of such nodes. The target follower node copies the log information of the second leader node in that second agent group, adds a digital signature to the copied log information, and broadcasts the digitally signed log information within that second agent group. In other words, in this case, the grouping of follower nodes communicating with the target follower node is considered. These follower nodes serve as reference nodes; the target follower node is assigned to the agent group with the most reference nodes.
[0089] If a target follower node cannot communicate with the second leader node, it verifies the digital signature of the log information sent by other follower nodes in the first agent group and copies the log information after successful verification. After copying the log information, the target follower node sends a response message to the client, indicating to the client that the target follower node has synchronized the log information. In this case, the target follower node will not be reassigned to another agent group. Figure 4 In the example, after removing leader node 0, node 4 no longer communicates with any leader node. Therefore, node 4 synchronizes information in the multi-agent system through node 5. Node 4 verifies the digital signature of the log information sent by node 5 and copies the log information after successful verification.
[0090] At block S114, an average consensus protocol is used to perform consensus control on normal agents in the multi-agent system. In some embodiments of this disclosure, the multi-agent system achieves secure consensus control when the state value of each agent in the multi-agent system meets the following conditions:
[0091]
[0092]
[0093] Where s(0) represents the minimum value of the initial state of a normal agent, S(0) represents the maximum value of the initial state of a normal agent, and x i (t) represents the state value of the i-th agent at time t, and Γ represents the set of all normal agents in the multi-agent system. j (t) represents the state value of agent j at time t, where agent j is a neighbor node of agent i.
[0094] exist Figure 2The network topology diagram shown contains four Byzantine agents, i.e., f = 4. After removing these four Byzantine agents (nodes 0, 7, 9, and 10), refer to... Figure 4 The maximum connectivity of the network topology graph is 4, which cannot satisfy the 5-robustness condition. Therefore, it is considered... Figure 2 The network topology diagram shown does not satisfy f+1 robustness when the Byzantine agents are nodes 0, 7, 9 and 10.
[0095] The embodiments of this disclosure Figure 2 The state response of the agent system shown was simulated and tested. The state trajectory diagrams of each agent in the multi-agent system are shown below. Figure 5 As shown in the diagram. Solid lines represent the state responses of normal agents, while dashed lines represent the state responses of Byzantine agents. Figure 5 It can be seen that, under the influence of Byzantine agents, normal agents can achieve consistent control objectives, and the state changes of each agent are within a safe range. (Comparison) Figure 6 The exemplary state response diagram of a multi-agent system controlled by the average subsequence reduction algorithm is shown. When the network topology diagram does not satisfy the f+1 robustness, the normal agents shown by the solid lines do not satisfy equation (5), making it impossible to achieve secure consistency control of the multi-agent system. It is evident that the secure consistency control method according to the embodiments of this disclosure effectively eliminates the influence of Byzantine agents on normal agents in a multi-agent system, improves the security of the multi-agent system, and has good engineering application value.
[0096] Figure 7 A schematic block diagram of a security consistency control device 700 for a multi-agent system according to an embodiment of the present disclosure is shown. The multi-agent system includes multiple agents. Figure 7 As shown, the security compliance control device 700 may include a processor 710 and a memory 720 storing a computer program. When the computer program is executed by the processor 710, the security compliance control device 700 is able to perform actions such as... Figure 1The steps of the security consistency control method 100 are shown below. In one example, the security consistency control device 700 may be a computer device or a cloud computing node. The security consistency control device 700 can establish a network topology diagram of the multi-agent system based on the communication relationships of the multiple agents. The security consistency control device 700 can select M leader nodes from the multiple agents according to the network topology diagram. The agents other than the M leader nodes are designated as follower nodes. The security consistency control device 700 can divide the multiple agents into M agent groups based on the selected leader nodes, such that each agent group includes one leader node. In the case where the multi-agent system includes Byzantine agents, the security consistency control device 700 can authenticate the M leader nodes using a Practical Byzantine Fault Tolerance consensus mechanism among the M agent groups, and authenticate follower nodes within each agent group based on the RAFT consensus algorithm. The security consistency control device 700 can identify nodes that fail authentication as Byzantine agents. The security consistency control device 700 can remove Byzantine agents from the multi-agent system. The secure consistency control device 700 can use an average consistency protocol to perform consistency control on normal agents in a multi-agent system. Normal agents are nodes that have been authenticated. M is an integer greater than or equal to 4.
[0097] In embodiments of this disclosure, processor 710 may be, for example, a central processing unit (CPU), a microprocessor, a digital signal processor (DSP), a processor based on a multi-core processor architecture, etc. Memory 720 may be any type of memory implemented using data storage technologies, including but not limited to random access memory, read-only memory, semiconductor-based memory, flash memory, disk storage, etc.
[0098] Furthermore, in embodiments of this disclosure, the device 700 may also include an input device 730, such as a keyboard or mouse, for inputting the initial state of each agent. Additionally, the device 700 may also include an output device 740, such as a display, for outputting the results of consistency control.
[0099] In other embodiments of this disclosure, a computer-readable storage medium storing a computer program is also provided, wherein the computer program, when executed by a processor, is capable of performing the following functions: Figure 1 The steps of the security and consistency control method are shown.
[0100] In summary, this disclosure addresses the security issue of Byzantine malicious nodes affecting the achievement of system consensus in multi-agent systems. Leveraging the advantages of blockchain technology in distributed information storage, data security, confidentiality, and traceability, it proposes utilizing the consensus mechanism of blockchain technology to detect and identify Byzantine agents in multi-agent systems, thereby promoting communication protection and collaboration among agents. The embodiments of this disclosure can achieve the following technical effects.
[0101] (1) Improve detection accuracy
[0102] The embodiments disclosed herein propose using a blockchain consensus algorithm to detect and verify Byzantine agents in a multi-agent system, applying the advantages of blockchain technology, such as information encryption, data protection, security, confidentiality, and traceability, to the secure consistency control of the multi-agent system. Using the PBFT consensus mechanism in blockchain technology and an improved RAFT consensus algorithm (which performs information encryption and digital signature verification within the RAFT algorithm), Byzantine malicious nodes in the multi-agent system are authenticated, resulting in high accuracy in the identification and detection process of Byzantine agents.
[0103] (2) Reduce communication overhead
[0104] The embodiments disclosed herein combine a multi-agent system network topology to elect a leader node and group agents into groups. Within each group, a consensus mechanism is used to authenticate follower nodes. This grouping approach keeps the number of nodes jointly applying the consensus algorithm relatively small, preventing excessive communication overhead due to a large number of nodes. Furthermore, only one round of verification via the consensus algorithm is needed to identify malicious nodes in the system, eliminating the need for extensive data analysis and processing, thus effectively reducing communication overhead.
[0105] (3) Reduce network complexity
[0106] The embodiments of this disclosure use a blockchain consensus mechanism to authenticate nodes in the system. It only requires that the leader nodes can communicate with each other and that a single leader node can communicate with the follower nodes in the group. It does not require the network topology to meet the condition of f+1 robustness, which reduces network complexity, reduces communication redundancy while achieving consistency control, and saves communication resources.
[0107] (4) Achieve secure consistency control
[0108] The embodiments of this disclosure remove detected Byzantine agents from the system before performing consensus control, thereby eliminating the influence of Byzantine agents on other normal agents and the final consensus value reached by the system.
[0109] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatuses and methods according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0110] Unless otherwise expressly indicated by the context, the singular form of words used herein and in the appended claims includes the plural form, and vice versa. Thus, when referring to the singular, the plural form of the corresponding term is generally included. Similarly, the terms “comprising” and “including” shall be interpreted as including rather than exclusively. Likewise, the terms “including” and “or” shall be interpreted as including unless such interpretation is expressly prohibited herein. Where the term “example” is used herein, particularly when it follows a set of terms, the “example” is merely exemplary and illustrative and should not be considered exclusive or extensive.
[0111] Further aspects and scope of adaptation become apparent from the description provided herein. It should be understood that various aspects of this application may be implemented individually or in combination with one or more other aspects. It should also be understood that the descriptions and specific embodiments herein are for illustrative purposes only and are not intended to limit the scope of this application.
[0112] Several embodiments of this disclosure have been described in detail above. However, it is obvious that those skilled in the art can make various modifications and variations to the embodiments of this disclosure without departing from the spirit and scope of this disclosure. The scope of protection of this disclosure is defined by the appended claims.
Claims
1. A method for secure consistency control in a multi-agent system, the multi-agent system comprising multiple agents, the method comprising: The network topology diagram of the multi-agent system is established based on the communication relationships of the multiple agents. According to the network topology diagram, M leader nodes are selected from the plurality of agents, wherein the agents other than the M leader nodes are designated as follower nodes. The plurality of agents are divided into M agent groups according to the selected leader node, such that each agent group includes a leader node. In the case where the multi-agent system includes Byzantine agents, a practical Byzantine fault-tolerant consensus mechanism is used to authenticate the M leader nodes among the M agent groups, and the follower nodes are authenticated based on the RAFT consensus algorithm within each agent group. Nodes that fail authentication are identified as Byzantine agents; Remove the Byzantine agent from the multi-agent system; and An average consensus protocol is used to control the consistency of normal agents in the multi-agent system, wherein the normal agents are nodes that have been authenticated. Where M is an integer greater than or equal to 4; Specifically, within each agent group, the authentication of the follower nodes based on the RAFT consensus algorithm includes: Within each agent group, the leader node generates a first encrypted heartbeat packet and sends the first encrypted heartbeat packet to each follower node within the agent group; Each follower node verifies the first encrypted heartbeat packet after receiving it; In response to any follower node's successful verification of the first encrypted heartbeat, the follower node uses its own private key to digitally sign the first encrypted heartbeat to generate a second encrypted heartbeat, and sends the second encrypted heartbeat to the leader node as a reply to the first encrypted heartbeat; Upon receiving the second encrypted heartbeat packet, the leader node sends its log information to the follower node that sent the second encrypted heartbeat packet; and If any follower node fails to send the second encrypted heartbeat to the leader node, the follower node is not authenticated.
2. The security consistency control method according to claim 1, wherein, The leader node generates the first encrypted heartbeat packet including: The leader node generates the original heartbeat packet; The leader node encrypts the original heartbeat packet using a specified one-way hash function to form a first digital digest; The leader node uses its private key to perform asymmetric encryption on the first digital digest to form a first digital signature; and The leader node encapsulates the first digital signature and the original heartbeat packet together to form the first encrypted heartbeat packet.
3. The security consistency control method according to claim 2, wherein, Each follower node verifies the first encrypted heartbeat packet after receiving it, including: The follower node uses the pre-obtained public key of the leader node to decrypt the first digital signature of the first encrypted heartbeat packet to derive the first digital digest; The follower node encrypts the original heartbeat packet in the first encrypted heartbeat packet using the specified one-way hash function to form a second digital digest; The follower node compares the hash value of the first digital digest with the hash value of the second digital digest; In response to the hash value of the first digital digest being the same as the hash value of the second digital digest, the follower node's verification of the first encrypted heartbeat packet is successful; and In response to the fact that the hash value of the first digital digest is different from the hash value of the second digital digest, the follower node fails to verify the first encrypted heartbeat packet.
4. The security consistency control method according to any one of claims 1 to 3, wherein, Selecting M leader nodes from the plurality of agents based on the network topology diagram includes: Determine the connectivity of each node in the network topology graph; The top N nodes with the highest connectivity ranking are identified as candidate nodes, where N is greater than or equal to 4; The node among the candidate nodes that can communicate with each of the other candidate nodes is determined as the leader node; and In response to the fact that the number of nodes identified as the leader node is less than 4, additional candidate nodes are selected in descending order of connectivity, and the node among the additional candidate nodes that can communicate with each of the leader nodes is identified as the leader node.
5. The security consistency control method according to any one of claims 1 to 3, wherein, The multiple agents are divided into M agent groups based on the selected leader node, including: The M leader nodes are assigned to the M agent groups respectively; The follower nodes are divided into first follower nodes that can only communicate with one leader node and second follower nodes that can communicate with multiple leader nodes; For each first follower node, assign it to the agent group containing the leader node with which it can communicate; and For each second follower node, identify the first follower node that can communicate with it, and assign the second follower node to the agent group to which the first follower node belongs.
6. The security consistency control method according to any one of claims 1 to 3, further comprising: If the first leader node is determined to be the Byzantine agent, each follower node in the first agent group to which the first leader node belongs is designated as the target follower node, and the following operations are performed: In response to the fact that the target follower node can only communicate with one second leader node, the target follower node is assigned to the second agent group where the second leader node is located. The target follower node copies the log information of the second leader node, adds a digital signature to the copied log information, and broadcasts the digitally signed log information within the second agent group. In response to the target follower node being able to communicate with multiple second leader nodes, the number of follower nodes in the second agent group to which each second leader node belongs that can communicate with the target follower node is determined, the target follower node is assigned to the second agent group with the largest number, the target follower node copies the log information of the second leader node in the second agent group, adds a digital signature to the copied log information, and broadcasts the digitally signed log information within the second agent group; as well as In response to the target follower node being unable to communicate with the second leader node, the target follower node verifies the digital signature of the log information sent by other follower nodes in the first agent group, and copies the log information after successful verification; The second leader node is the leader node other than the first leader node among the M leader nodes.
7. The security consistency control method according to any one of claims 1 to 3, wherein, The multi-agent system achieves secure consistency control when the state value of each agent in the multi-agent system satisfies the following conditions: in, This represents the minimum value of the initial state of the normal intelligent agent. This represents the maximum value of the initial state of the normal intelligent agent. This represents the state value of the i-th agent at time t. This represents the set of all normal agents in the multi-agent system. Let represent the state value of agent j at time t, where agent j is a neighbor node of agent i.
8. The security consistency control method according to any one of claims 1 to 3, wherein, The multi-agent system is established according to the following formula: in, This represents the state value of the i-th agent at time t. express The first derivative, This represents the control input of the i-th agent at time t; Wherein, when the i-th agent is the normal agent, the control input of the i-th agent is represented as: in, This represents the set of neighboring nodes of the i-th agent. This represents the state value of the i-th agent at time t. This represents the set of all normal agents in the multi-agent system. This represents the state value of the j-th agent at time t. This represents the elements in the adjacency matrix corresponding to the network topology graph, where, If the i-th agent can communicate with the j-th agent, then ,otherwise .
9. A security consistency control device for a multi-agent system, the multi-agent system comprising multiple agents, the security consistency control device comprising: At least one processor; as well as At least one memory storing a computer program; When the computer program is executed by the at least one processor, the security consistency control device performs the steps of the security consistency control method according to any one of claims 1 to 8.