A chain-based BFT consensus method for unmanned aerial vehicle ad hoc network
By optimizing the chain node order through the chain-based BFT consensus method and PSO algorithm, the problems of information timing and low data transmission efficiency in UAV self-organizing networks are solved, achieving fast and accurate chain order determination and improving the efficiency and resource utilization of the consensus network.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIHANG UNIV
- Filing Date
- 2025-01-26
- Publication Date
- 2026-07-07
AI Technical Summary
Existing technologies cannot guarantee the timing of information transmission in UAV self-organizing networks, nor can they quickly determine the optimal chain order, resulting in low data transmission efficiency and high communication complexity, which affects the efficiency of consensus networks.
The chain-based BFT consensus method is adopted, which optimizes the chain order of chain nodes in the consensus network through the PSO algorithm, uses chain propagation instead of broadcasting, and combines topology updates under sudden situations to quickly determine the optimal chain order and reduce communication complexity.
It effectively reduces the communication complexity of UAV self-organizing networks, ensures the timing of information transmission, reduces signal collision delay, and improves the consensus efficiency and resource utilization of UAV swarms.
Smart Images

Figure CN120050648B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of drone swarm technology and blockchain technology, and in particular to a chain-based BFT consensus method for drone self-organizing networks. Background Technology
[0002] With the rapid development of the Internet of Things (IoT) and communication technologies, drones are being applied in various scenarios such as traffic management, military operations, and auxiliary wireless communication. A drone network is a mobile, self-organizing network that does not require a reliable central authority. Mission completion depends on the interoperability of drone nodes, making traditional centralized systems unsuitable for this architecture. Blockchain technology, a distributed ledger technology, ensures data security and trustworthiness through encryption algorithms and consensus mechanisms. The consensus mechanism, in particular, determines both the performance and security of the blockchain system. Therefore, applying blockchain consensus technology to drone self-organizing networks is of significant research value for improving data sharing among drones, enhancing data exchange and access control, supporting secure collaborative drone networks, improving performance, and assisting drones in completing various mission scenarios.
[0003] Chinese Patent Publication No. CN115903911A discloses a blockchain-based hierarchical consensus method for drone swarms. The built-in blockchain-based hierarchical structure of drones enables the drone swarm network to have high scalability and robustness, realize information sharing among all drone nodes in the network, and greatly improve the working efficiency of drones. The PBFT algorithm can help drones reach consensus faster while avoiding a lot of computing power competition, ensuring data consistency and improving the security performance of the network.
[0004] Therefore, the above scheme improves the efficiency of drones by using the PBFT algorithm to achieve consensus through multiple rounds of broadcasting. However, the above scheme cannot guarantee the timing of information transmission, nor can it quickly determine the optimal chain order to ensure data transmission efficiency, thus failing to guarantee the consensus efficiency of the drone swarm in the consensus network. Summary of the Invention
[0005] To address this, the present invention provides a chain-based BFT consensus method for UAV self-organizing networks, which overcomes the problems in existing technologies that cannot guarantee the timing of information transmission, cannot quickly determine the optimal chain order to ensure data transmission efficiency, and cannot effectively reduce communication complexity, thus leading to low consensus efficiency of UAV swarms in consensus networks.
[0006] To achieve the above objectives, this invention provides a chain-based BFT consensus method for unmanned aerial vehicle (UAV) self-organizing networks, comprising:
[0007] Select several drones for network authentication;
[0008] A drone ad hoc network is constructed based on the collection of drones that have been authenticated through the network, and an ad hoc network topology is constructed based on the drone ad hoc network.
[0009] Based on flight requirements, several UAVs are selected from the UAV self-organizing network as consensus nodes, and the number of consensus nodes is denoted as N. A consensus network topology is constructed according to the self-organizing network topology and consensus nodes, and a consensus network based on the chain-based BFT protocol is built based on the consensus network topology.
[0010] Each consensus node in the consensus network is divided into several chain nodes for transmitting information through chain consensus and several candidate chain nodes for maintaining the information transmitted by the chain nodes.
[0011] The consensus network is optimized using the PSO algorithm to determine the chain order of each chain node in the consensus network, and after the chain order is determined, communication is established between each candidate chain node and the corresponding chain node.
[0012] Information is sent to the consensus network. The chain node, as the head of the chain, transmits the information according to the chain order. When each chain node receives the information output by the previous chain node, it transmits the information to the next chain node until each chain node completes the reception of the information.
[0013] After each chain node receives the information, the chain node at the head of the chain and the chain node at the tail of the chain simultaneously send corresponding information to each of the candidate chain nodes so that each candidate chain node outputs the corresponding action instruction according to the received information to synchronize consensus.
[0014] The consensus network topology is updated based on unforeseen circumstances to redetermine the chain order of each chain node; wherein, the unforeseen circumstances include the presence of potentially malicious nodes, malicious head nodes, and changes to the chain nodes in the consensus network.
[0015] Furthermore, the process of constructing the consensus network topology based on the self-organizing network topology and the consensus nodes includes:
[0016] Use G=( E) represents the self-organizing network topology, where Let E be the set of all the drones in the drone ad hoc network, and let E be the edge set in the drone ad hoc network. The edge set is the total number of drone pairs in the drone ad hoc network. For a single drone, a drone pair is defined as the drone that can directly transmit information within its line of sight to the drone and the drone itself.
[0017] The self-organizing network topology is abstracted based on LoS, and several drones are obtained from the drone self-organizing network as consensus nodes;
[0018] The self-organizing network topology and the locations of the consensus nodes are integrated to construct the consensus network topology. A consensus node distance matrix ε is constructed based on the weights between the consensus nodes, and a [specific value is missing here].
[0019]
[0020] Among them, y α,β Indicates the Pth α The consensus node and the Pth node β The weights among consensus nodes;
[0021] The weight is the minimum number of transmission paths required for communication between the two consensus nodes, and the transmission path is the path by which a single consensus node directly transmits information to another consensus node.
[0022] Furthermore, the process of optimizing the consensus network using the PSO algorithm includes:
[0023] Each chain sequence of the chain nodes in the consensus network is denoted as a single particle;
[0024] Several particles are generated sequentially, and each particle forms a particle swarm.
[0025] The particle swarm is initialized to generate a random chain order for each particle;
[0026] The appropriate value F for each particle consensus process in the consensus network is calculated sequentially using the following formula:
[0027]
[0028] Where F is the weight of the consensus process, and 2f+1 is the total number of chain nodes in the consensus node. This represents the total number of consensus nodes. The weights are from P1 to P2f+1. The weights from P2f+1 to P2f+2 to P3f+1 are... For the first The first chain node and the first The weights between each chain node For the first The first chain node and the first The weights among the candidate chain nodes;
[0029] Update the velocity and position of each particle, increase the number of iterations, and recalculate the fitness value F' based on the updated particles;
[0030] The F and F' values of a single particle are compared, and the smaller value of the appropriate value is retained. The chain order corresponding to the retained appropriate value is stored in the particle's local optimal position variable p. best middle;
[0031] When the number of iterations reaches the maximum number of iterations, based on all stored p... best The value determines the optimal chain order for each consensus node, and stores the optimal chain order in the globally optimal position variable g. best The optimization of the chain order is then completed.
[0032] Furthermore, the chain-based consensus information transmission process includes:
[0033] The drone used to receive interactive information is denoted as the client, the chain node that is the head of the chain is denoted as the head node, and the chain node that is the tail of the chain is denoted as the tail node.
[0034] The client packages the interaction information into a transaction and forwards it to the head node so that the head node can verify the correctness of the transaction;
[0035] When the head node determines that the correctness of the transaction meets the standard, it assigns a sequence number and forms a transaction message with a corresponding format, and forwards the transaction message to the subsequent chain nodes along the chain sequence.
[0036] After the chain node sends the valid transaction message to the subsequent chain node, the chain node sets and starts a timer;
[0037] When the tail node receives the transaction message, it calculates the signature, sends a response message and a transaction message to the client, and sends a transaction message to each of the candidate chain nodes;
[0038] The tail node forwards the feedback message to the preceding chain node along the chain sequence;
[0039] When a chain node receives the feedback message sent by its successor chain node, it cancels the timing for the successor chain node and forwards the feedback message to the chain node preceding it.
[0040] When the head node receives the feedback message, it sends the transaction message to each of the candidate chain nodes;
[0041] Each of the candidate chain nodes receives the transaction message sent by the head node and the tail node, outputs the corresponding synchronization instruction according to the transaction message to synchronize consensus, and completes the processing of the transaction;
[0042] If the client does not receive the response message and the transaction message from the tail node, it may resend the transaction; or, if it receives the response message and the transaction message from the tail node, it may complete the transaction.
[0043] Furthermore, the process by which the consensus network re-determines the chain order of each chain node when the sudden situation involves the presence of the potential malicious node includes:
[0044] For a single chain node, when its timeout for the corresponding successor chain node exceeds a preset value and it does not receive the feedback message from the successor chain node, the chain node sends timeout information to the head node and the preceding chain node.
[0045] Upon receiving the timeout information, the preceding chain node cancels the timeout and transmits the timeout information sequentially forward. Each chain node repeats the above operation until the timeout information is transmitted to the head node.
[0046] When the head node receives a single timeout message, it marks the chain node that sent the timeout message as the accusing node and the subsequent chain node of the accusing node as the accused node. After marking, the head node marks the accusing node and the accused node as potential malicious nodes.
[0047] When the head node receives the timeout information from its successor chain node, it changes the accusing node and the accused node into the candidate chain nodes, and re-optimizes the consensus network based on the PSO algorithm to complete the redetering of the chain order of each chain node.
[0048] Furthermore, when the head node receives timeout information directly sent by several chain nodes, the chain node that sent the timeout information closest to the end of the chain order is recorded as the accusing node, the chain node following the accusing node is recorded as the accused node, and the accusing node and the accused node are changed to the candidate chain nodes. The consensus network is then re-optimized and updated based on the PSO algorithm to determine the chain order of each chain node in the consensus network.
[0049] When the head node is the accusing node, the chain node to be accused is recorded as the accused node, the accused node is changed to the candidate chain node, and the consensus network is re-optimized and updated based on the PSO algorithm to determine the chain order of each chain node in the consensus network.
[0050] Furthermore, the process by which the consensus network re-determines the chain order of each chain node when the sudden situation involves the presence of the malicious head node includes:
[0051] If the head node fails to forward the transaction message to the subsequent chain node along the chain sequence, or forwards an incorrect transaction message to the subsequent chain node along the chain sequence, the head node shall be recorded as a malicious head node.
[0052] Each chain node sets a corresponding timer according to the chain order to wait for receiving the transaction message. When a single chain node records the head node as the malicious head node, the chain node issues a vote and sends a view change message to other chain nodes. After receiving the view change message, the other chain nodes vote in turn.
[0053] When each of the chain nodes determines to make a view change based on the voting results, the head node is reselected according to the ascending order of the drone numbers in the consensus network. The consensus network is re-optimized and updated based on the PSO algorithm to determine the chain order of each of the chain nodes in the consensus network. Each chain node cancels the corresponding timer and sets the timer to wait for receiving the new view message of the view change.
[0054] After the newly selected head node receives the view change message, it broadcasts the new view message to each chain node and regenerates the transaction message.
[0055] If the chain node does not receive the new view message before the timer exceeds the preset value, it resends the view change message and updates the timer. If the chain node receives the new view message before the timer exceeds the preset value, it resets the timer and the timer.
[0056] Furthermore, the process by which the consensus network re-determines the chain order of each chain node when the sudden situation involves a change in the chain node includes:
[0057] When a single drone joins the consensus network, network authentication is performed to enable the drone to join the drone self-organizing network. After the drone joins the drone self-organizing network, the base station or the drone sends a request message to the head node to join the consensus network.
[0058] After the head node receives the request message, it pauses the consensus process in the consensus network, verifies the signature of the request message, and sends the request message along the chain sequence.
[0059] After receiving the request message, each of the chain nodes sends the feedback message to the head node;
[0060] After the head node receives all the feedback messages, it records the drones that have joined the consensus network as a single chain node that has joined, broadcasts the joining message of the single chain node joining the consensus network to each chain node, places the single chain node that has joined in the corresponding position of the chain order, re-determines the chain order, and packages the request message into a single transaction.
[0061] When a single consensus node leaves the consensus network, the base station or the chain node that leaves the consensus network sends a leave message to the head node;
[0062] The head node verifies the signature of the exit message and sends the exit message along the chain sequence;
[0063] After each of the chain nodes receives the exit message, the head node broadcasts a notification to each of the chain nodes that the individual chain node has exited the consensus network.
[0064] The head node re-determines the chain order after a single chain node leaves the consensus network and packages the exit message into a single transaction.
[0065] Furthermore, the process of updating the topology of the consensus network based on the joining or leaving of the chain nodes to redetermine the chain order of each chain node includes:
[0066] When the network topology changes, the head node updates the consensus node distance matrix according to the changed network topology, and determines the change in the consensus node distance matrix according to the calculation formula:
[0067] .
[0068] in, For the change in the consensus node distance matrix, This is the updated consensus node distance matrix. Consensus node distance matrix
[0069] In obtaining Then, calculate according to the formula. The formula is:
[0070]
[0071] in, The value represents the change in the consensus node distance matrix. The dimension is A column vector of all 1s;
[0072] when At that time, the chain order is redefined.
[0073] Compared with existing technologies, the beneficial effects of this invention are as follows: the chain-based BFT consensus method of this invention uses chain propagation instead of broadcasting, which effectively reduces communication complexity and alleviates the consumption of communication resources in UAV ad hoc networks. Chain propagation effectively ensures the timeliness of information transmission and effectively reduces the latency caused by signal conflicts between UAVs. The PSO algorithm is used to optimize the consensus network and determine the chain order of each chain node in the consensus network, which effectively achieves fast and accurate determination of the optimal chain order, further reducing communication complexity. Based on sudden situations, the topology of the consensus network is updated to redetermine the chain order of each chain node, which effectively ensures data transmission efficiency and effectively improves the consensus efficiency of the UAV ensemble in the consensus network.
[0074] Furthermore, this invention obtains several drones from the drone self-organizing network as consensus nodes. By selecting drones as consensus nodes, the resource utilization rate of drones is effectively improved, and the consensus efficiency of drone swarms in the consensus network is further enhanced.
[0075] Furthermore, in the process of optimizing the consensus network using the PSO algorithm, this invention compares F and F' and retains the smaller value, which can effectively reduce the weight in the chain order. This further enables the rapid and accurate determination of the optimal chain order, effectively improving the quality of the chain order. While further reducing communication complexity, it also further improves the consensus efficiency of the drone swarm in the consensus network.
[0076] Furthermore, this invention updates the velocity and position of each particle based on a formula, enabling rapid and accurate calculation of the appropriate value, and storing the chain order corresponding to the retained appropriate value in the particle's local optimal position variable p. best In the process of optimizing the chain order, it is beneficial to quickly and accurately determine the optimal chain order, which further reduces communication complexity and improves the consensus efficiency of drone swarms in the consensus network.
[0077] Furthermore, after a chain node sends a valid transaction message to a subsequent chain node, the chain node sets and starts a timer, effectively realizing fault management of the chain node and further improving the consensus efficiency of the drone swarm in the consensus network.
[0078] Furthermore, this invention rapidly identifies potential malicious nodes in the consensus network. When a chain node receives a feedback message from its successor chain node, it cancels the timer for the successor chain node and forwards the feedback message to the chain node preceding it. Forwarding the feedback message along the chain can cancel the timer in a timely manner, effectively reducing the number of feedback messages. After changing the accusing and accused nodes to candidate chain nodes, the consensus network is re-optimized based on the PSO algorithm to redetermine the chain order of each chain node. This further enables the rapid and accurate determination of the optimal chain order, further reducing communication complexity and improving the consensus efficiency of the drone swarm in the consensus network.
[0079] Furthermore, when the head node of this invention receives several timeout messages, it designates the chain node that sent the timeout message closest to the end of the chain sequence as the accusing node, and the chain node following the accusing node as the accused node. The accusing node and the accused node are then changed to candidate chain nodes. This effectively avoids misjudgments of the accusing node and the accused node. When the head node is the accusing node, the accused node is changed to a candidate chain node, effectively maintaining the logical integrity of the data structure. After completing the above changes to the nodes, the consensus network is re-optimized and updated based on the PSO algorithm to determine the chain sequence of each chain node in the consensus network. This further enables fast and accurate determination of the optimal chain sequence, further reducing communication complexity while improving the consensus efficiency of the UAV swarm in the consensus network.
[0080] Furthermore, when a malicious head node exists in the chain sequence, the present invention reselects the head node according to the ascending order of the drone numbers in the consensus network, and re-optimizes and updates the consensus network based on the PSO algorithm to determine the chain sequence of each chain node in the consensus network. This further enables the rapid and accurate determination of the optimal chain sequence, effectively avoiding the occurrence of delays caused by the presence of malicious head nodes. While further reducing communication complexity, it also further improves the consensus efficiency of the drone swarm in the consensus network.
[0081] Furthermore, this invention analyzes the joining and leaving processes when a single drone joins or leaves the consensus network, enabling accurate analysis of the changes in the consensus network caused by the drone joining or leaving. The head node re-determines the chain order after a single drone joins or leaves, further improving the consensus efficiency of the drone swarm in the consensus network.
[0082] Furthermore, in this invention, the head node updates the consensus node distance matrix according to the changed network topology and determines the change in the consensus node distance matrix according to the calculation formula to determine whether the chain order needs to be re-determined. This enables the timely determination of the chain order when the chain order needs to be re-determined after the network topology changes, thereby further improving the consensus efficiency of the drone swarm in the consensus network. Attached Figure Description
[0083] Figure 1 This is a flowchart of the chain-based BFT consensus method for UAV ad hoc networks according to the present invention;
[0084] Figure 2 This is a flowchart illustrating the process of optimizing the consensus network using the PSO algorithm according to the present invention.
[0085] Figure 3 This is a schematic diagram illustrating the chain-based consensus information transmission process of the present invention;
[0086] Figure 4 This is a flowchart illustrating how the consensus network topology is updated based on unforeseen circumstances to redetermine the chain order of each chain node, as per the present invention. Detailed Implementation
[0087] To make the objectives and advantages of the present invention clearer, the present invention will be further described below with reference to embodiments; it should be understood that the specific embodiments described herein are merely for explaining the present invention and are not intended to limit the present invention.
[0088] Preferred embodiments of the present invention will now be described with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are merely illustrative of the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.
[0089] Please see Figure 1 The diagram shows a flowchart of the chain-based BFT consensus method for UAV self-organizing networks according to the present invention. The method described in this embodiment includes:
[0090] Select several drones for network authentication;
[0091] A drone ad hoc network is constructed based on the collection of drones that have been authenticated through the network, and an ad hoc network topology is constructed based on the drone ad hoc network.
[0092] Based on flight requirements, several UAVs are selected from the UAV self-organizing network as consensus nodes, and the number of consensus nodes is denoted as N. A consensus network topology is constructed according to the self-organizing network topology and consensus nodes, and a consensus network based on the chain-based BFT protocol is built based on the consensus network topology.
[0093] Each consensus node in the consensus network is divided into several chain nodes for transmitting information through chain consensus and several candidate chain nodes for maintaining the information transmitted by the chain nodes.
[0094] The consensus network is optimized using the PSO algorithm to determine the chain order of each chain node in the consensus network, and after the chain order is determined, communication is established between each candidate chain node and the corresponding chain node.
[0095] Information is sent to the consensus network. The chain node, as the head of the chain, transmits the information according to the chain order. When each chain node receives the information output by the previous chain node, it transmits the information to the next chain node until each chain node completes the reception of the information.
[0096] After each chain node receives the information, the chain node at the head of the chain and the chain node at the tail of the chain simultaneously send corresponding information to each of the candidate chain nodes so that each candidate chain node outputs the corresponding action instruction according to the received information to synchronize consensus.
[0097] The consensus network topology is updated based on unforeseen circumstances to redetermine the chain order of each chain node; wherein, the unforeseen circumstances include the presence of potentially malicious nodes, malicious head nodes, and changes to the chain nodes in the consensus network;
[0098] Specifically, the chain node set The candidate chain node set includes 2f+1 chain nodes for transmitting information via chain consensus. It includes f candidate chain nodes for maintaining the transmission information of chain nodes.
[0099] The process of constructing the consensus network topology based on the self-organizing network topology and the consensus nodes in this embodiment of the invention includes:
[0100] Use G=( E) represents the self-organizing network topology, where Let E be the set of all the drones in the drone ad hoc network, and let E be the edge set in the drone ad hoc network. The edge set is the total number of drone pairs in the drone ad hoc network. For a single drone, a drone pair is defined as the drone that can directly transmit information within its line of sight to the drone and the drone itself.
[0101] The self-organizing network topology is abstracted based on LoS, and several drones are obtained from the drone self-organizing network as consensus nodes;
[0102] The self-organizing network topology and the locations of the consensus nodes are integrated to construct the consensus network topology. A consensus node distance matrix ε is constructed based on the weights between the consensus nodes, and a [specific value is missing here].
[0103]
[0104] Among them, y α,β Indicates the Pth α The consensus node and the Pth node β The weights among consensus nodes;
[0105] The weight is the minimum number of transmission paths required for communication between the two consensus nodes, where each transmission path is the path through which a single consensus node directly transmits information to another consensus node.
[0106] Specifically, the collection of each of the aforementioned drones It consists of M UAVs in the aforementioned ad hoc network, where each UAV is represented as , ∈[1, 2, ..., M];
[0107] In the aforementioned UAV self-organizing network, a portion of the UAVs are selected to participate in the consensus process. The UAV self-organizing network is a paradigm where the consensus network and the authentication network are separated. The authentication network is composed of UAVs that belong to the UAV self-organizing network but not to the consensus network. In Each consensus node participates in the consensus process, forming a consensus node set. ={P1, P2, ..., P N}, its P α Let P represent the α-th consensus node. β Represents the β-th consensus node. yes A subset of.
[0108] Please see Figure 2 The diagram shows a flowchart illustrating the process of optimizing a consensus network using the PSO algorithm according to this invention. The process of optimizing the consensus network using the PSO algorithm in this embodiment of the invention includes:
[0109] Each chain sequence of the chain nodes in the consensus network is denoted as a single particle;
[0110] Several particles are generated sequentially, and each particle forms a particle swarm.
[0111] The particle swarm is initialized to generate a random chain order for each particle;
[0112] The appropriate value F for each particle consensus process in the consensus network is calculated sequentially using the following formula:
[0113]
[0114] Where F is the weight of the consensus process, and 2f+1 is the total number of chain nodes in the consensus node. This represents the total number of consensus nodes. The weights are from P1 to P2f+1. The weights from P2f+1 to P2f+2 to P3f+1 are... For the first The first chain node and the first The weights between each chain node For the first The first chain node and the first The weights among the candidate chain nodes;
[0115] Update the velocity and position of each particle, increase the number of iterations, and recalculate the fitness value F' based on the updated particles;
[0116] The F and F' values of a single particle are compared, and the smaller value of the appropriate value is retained. The chain order corresponding to the retained appropriate value is stored in the particle's local optimal position variable p. best middle;
[0117] When the number of iterations reaches the maximum number of iterations, based on all stored p... best The value determines the optimal chain order for each consensus node, and stores the optimal chain order in the globally optimal position variable g. best The optimization of the chain order is then completed.
[0118] Please see Figure 3 The diagram shown illustrates the chain-based consensus information transmission process of this invention. The chain-based consensus information transmission process described in this embodiment includes:
[0119] The drone used to receive interactive information is denoted as the client, the chain node that is the head of the chain is denoted as the head node, and the chain node that is the tail of the chain is denoted as the tail node.
[0120] The client packages the interaction information into a transaction® and forwards it to the head node so that the head node can verify the correctness of the transaction®;
[0121] When the head node determines that the correctness of the transaction® meets the standard, it assigns a sequence number and forms a transaction message with the corresponding format <CHAIN, VN, SN, RV, TX, C, HH, HR, CO>. The transaction message <CHAIN, VN, SN, RV, TX, C, HH, HR, CO> is sent along the chain sequence. Forward to the subsequent chain node;
[0122] The chain node sends a valid transaction message <CHAIN, VN, SN, RV, TX, C, HH, HR, CO> to subsequent chain nodes. Then, the chain node sets and starts a timer. ;
[0123] When the tail node receives the transaction message <CHAIN, VN, SN, RV, TX, C, HH, HR, CO> At that time, the signature is calculated, and a response message <Reply> is sent to the client. And transaction messages <CHAIN, VN, SN, RV, TX, C, HH, HR, CO> And, send transaction messages <CHAIN, VN, SN, RV, TX, C, HH, HR, CO> to each of the aforementioned candidate chain nodes. ;
[0124] The tail node forwards the feedback message <ACK, VN, SN, CO, HT, C> to its preceding chain node along the chain sequence. ;
[0125] When a chain node receives the feedback message <ACK, VN, SN, CO, HT, C> sent by its subsequent chain node. When this happens, cancel the timer for the subsequent chain node and send a feedback message <ACK, VN, SN, CO, HT, C>. Forward to the chain node preceding this chain node;
[0126] When the head node receives the feedback message <ACK, VN, SN, CO, HT, C> At that time, the transaction message <CHAIN, VN, SN, RV, TX, C, HH, HR, CO> is sent to each of the candidate chain nodes. ;
[0127] Each of the candidate chain nodes receives the transaction message <CHAIN, VN, SN, RV, TX, C, HH, HR, CO> sent by the head node and the tail node. It outputs corresponding synchronization instructions based on the transaction message to synchronize consensus and completes the processing of the transaction;
[0128] The client does not receive the response message <Reply> sent by the tail node. and the transaction message <CHAIN, VN, SN, RV, TX, C, HH, HR, CO> If the transaction is resent, or upon receiving the response message <Reply> from the tail node. and the transaction message <CHAIN, VN, SN, RV, TX, C, HH, HR, CO> The transaction will be completed in time.
[0129] Specifically, CHAIN represents the message type, VN represents the view number, SN represents the assigned sequence number, RV represents the number of re-chains during view VN, TX represents the transaction, HH represents the hash value of its execution history, HR represents the hash value of the client's response containing the execution result, C represents the client, and CO represents the current chain order, including the set of chain nodes after algorithmic sorting. and the set of candidate chain nodes , A message that is a signed message digest appended to the message;
[0130] timer The settings are configured according to the positions of each chain node in the chain sequence, for each chain node. , For chain nodes , ,,in, It serves as the baseline time, which can be adjusted based on the status of the drone network;
[0131] 〈ACK, VN, SN, CO, HT, C〉 HT represents the hash value of the transaction;
[0132] The synchronization consensus is based on the transaction message <CHAIN, VN, SN, RV, TX, C, HH, HR, CO>. Update the flight status of each candidate chain node.
[0133] Please see Figure 4 As shown, this is a flowchart illustrating how the consensus network topology is updated based on a sudden event to redetermine the chain order of each chain node according to the present invention. The process by which the consensus network redetermines the chain order of each chain node when the sudden event involves the presence of a potentially malicious node, as described in this embodiment of the invention, includes:
[0134] For a single chain node, if its timeout for the corresponding successor chain node exceeds a preset value and it does not receive the feedback message <ACK, VN, SN, CO, HT, C> from the successor chain node... At that time, the chain node sends timeout information <ACCUSE, AA, RV, VN> to the head node and the preceding chain node. ;
[0135] The preceding chain node, upon receiving the timeout information <ACCUSE, AA, RV, VN> The timer will be canceled and a timeout message will be displayed <ACCUSE, AA, RV, VN>. Transmit sequentially forward, with each chain node repeating the above operation until a timeout message <ACCUSE, AA, RV, VN> is received. Transported to the head node;
[0136] The head node receives a single timeout message <ACCUSE, AA, RV, VN> When the timeout occurs, a timeout message <ACCUSE, AA, RV, VN> will be sent. The chain node is denoted as the accusing node, and the chain node following the accusing node is denoted as the accused node. After marking, the head node denoted the accusing node and the accused node as potential malicious nodes.
[0137] When the head node receives the timeout information <ACCUSE, AA, RV, VN> from its subsequent chain node When the accusing node and the accused node are changed to the candidate chain nodes, the consensus network is re-optimized based on the PSO algorithm to complete the redetering of the chain order of each chain node.
[0138] Specifically, the distribution of the potentially malicious nodes in the chain sequence is not constrained;
[0139] <ACCUSE, AA, RV, VN> In the tuple AA, the accusing node and the accused node are combined. To prevent malicious nodes from making false accusations, it is assumed that the chain node can only accuse its direct successor chain node.
[0140] Both the accusing node and the accused node are recorded as potential malicious nodes. A potential malicious node is one in which the accused node has malicious timeout behavior, or the accusing node has made a false accusation against the accused node.
[0141] The consensus network is re-optimized and updated based on the PSO algorithm, and the transaction message <CHAIN, VN, SN, RV, TX, C, HH, HR, CO> is resent. Resume the consensus process.
[0142] Please continue reading. Figure 4As shown in the embodiment of the present invention, when the head node receives the timeout information <ACCUSE, AA, RV, VN> directly sent by several chain nodes, When the timeout information <ACCUSE, AA, RV, VN> closest to the end of the chain sequence is sent... The chain node is designated as the accusing node, the subsequent chain node of the accusing node is designated as the accused node, and the accusing node and the accused node are changed to the candidate chain nodes. The consensus network is re-optimized and updated based on the PSO algorithm to determine the chain order of each chain node in the consensus network.
[0143] When the head node is the accusing node, the chain node to be accused is recorded as the accused node, the accused node is changed to the candidate chain node, and the consensus network is re-optimized and updated based on the PSO algorithm to determine the chain order of each chain node in the consensus network.
[0144] Specifically, each of the potential malicious nodes is based on the candidate chain node set. The reconfiguration assumptions in the process are managed by combining reconfiguration with rechaining to effectively handle and fix each of the potential malicious nodes.
[0145] Please continue reading. Figure 4 As shown, the process by which the consensus network of this embodiment re-determines the chain order of each chain node when the sudden situation is the presence of the malicious head node includes:
[0146] If the head node fails to forward the transaction message to the subsequent chain node along the chain sequence, or forwards an incorrect transaction message to the subsequent chain node along the chain sequence, the head node shall be recorded as a malicious head node.
[0147] Each chain node sets a corresponding timer according to the chain order to wait for receiving the transaction message. When a single chain node records the head node as the malicious head node, the chain node issues a vote and sends a view change message to other chain nodes. After receiving the view change message, the other chain nodes vote in turn. The number of view change messages is f+1.
[0148] When each of the chain nodes determines to make a view change based on the voting results, the head node is reselected according to the ascending order of the drone numbers in the consensus network. The consensus network is re-optimized and updated based on the PSO algorithm to determine the chain order of each of the chain nodes in the consensus network. Each chain node cancels the corresponding timer and sets the timer to wait for receiving the new view message of the view change.
[0149] After the newly selected head node receives the view change message, it broadcasts the new view message to each chain node and regenerates the transaction message.
[0150] If the chain node does not receive the new view message before the timer exceeds the preset value, it resends the view change message and updates the timer. If the chain node receives the new view message before the timer exceeds the preset value, it resets the timer and the timer.
[0151] Specifically, each chain node sets a corresponding timer according to the chain order to wait for receiving the transaction message <CHAIN, VN, SN, RV, TX, C, HH, HR, CO>. The purpose is to detect the malicious head node and prevent high latency in the chain order, when each chain node is waiting for transaction messages <CHAIN, VN, SN, RV, TX, C, HH, HR, CO>. During this time, the timer will maintain the current view to ensure timely processing and detection of any abnormal delays;
[0152] After each of the chain nodes sends the view change message, it will no longer accept any messages other than the view change message and the new view message;
[0153] When each of the chain nodes votes in favor and performs the view change, the head node is reselected according to the ascending order of the drone numbers in the consensus network. Each chain node cancels its corresponding timer, and after collecting 2f new view messages, it sets the timer to wait for receiving the new view message of the view change.
[0154] Please continue reading. Figure 4 As shown, the process by which the consensus network of the present invention re-determines the chain order of each chain node when the sudden situation is a change in the chain node includes:
[0155] When a single drone joins the consensus network, network authentication is performed to enable the drone to join the drone self-organizing network. After the drone joins the drone self-organizing network, the base station or the drone sends a JOIN request message to the head node. D, PK> ;
[0156] When the head node receives the request message <JOIN>, D, PK> Then, the consensus process in the consensus network is paused, the signature of the request message is verified, and the request message <JOIN> is sent along the chain sequence. D, PK> ;
[0157] Each of the chain nodes receives the request message <JOIN>. D, PK> Then, send the feedback message <ACK, VN, SN, CO, HT, C>. To the head node;
[0158] When the head node receives all of the feedback messages <ACK, VN, SN, CO, HT, C> Then, the drones joining the consensus network are recorded as individual chain nodes, and a join message for each chain node joining the consensus network is broadcast to all chain nodes. The joined individual chain node is placed in the corresponding position of the chain order, the chain order is re-determined, and the request message <JOIN> is sent. D, PK> Packaged into a single transaction;
[0159] When a single consensus node leaves the consensus network, the base station or the chain node that leaves the consensus network sends a leave message <EXIT, i, j, D, PK> to the head node. ;
[0160] The head node verifies the signature of the exit message and sends the exit message along the chain sequence;
[0161] After each of the chain nodes receives the exit message, the head node broadcasts a notification to each of the chain nodes that the individual chain node has exited the consensus network.
[0162] After a single chain node leaves the consensus network, the head node re-determines the chain order and packages the exit message into a single transaction.
[0163] Specifically, a join and leave protocol for the consensus network was designed to handle change requests from chain nodes in the unmanned self-organizing network;
[0164] The identity information and assigned number of the individual drone authenticated through the network. (UAV is recorded as) This will be shared with all drones in the aforementioned ad hoc network;
[0165] <JOIN, D, PK> D in the middle represents the single drone that requested to join ( The identity of (or ground base station) is PK. public key;
[0166] When the number of consensus nodes does not satisfy N=3f + 1, .
[0167] Please continue reading. Figure 4 As shown, the process of updating the topology of the consensus network based on the joining or leaving of the chain nodes to redetermine the chain order of each chain node in this embodiment of the invention includes:
[0168] When the network topology changes, the head node updates the consensus node distance matrix according to the changed network topology, and determines the change in the consensus node distance matrix according to the calculation formula:
[0169]
[0170] in, For the change in the consensus node distance matrix, This is the updated consensus node distance matrix. Consensus node distance matrix
[0171] In obtaining Then, calculate according to the formula. The formula is:
[0172]
[0173] in, The value represents the change in the consensus node distance matrix. The dimension is A column vector of all 1s;
[0174] when When necessary, the chain order is redefined;
[0175] Specifically, the ensemble of drones may change the topology during flight, thereby altering the consensus node distance matrix. For example, when a drone suddenly loses contact due to being shot down or for other reasons, it has a significant impact on the entire drone ad hoc network.
[0176] When the consensus node set When the drone loses contact with the drone self-organizing network due to an in-flight accident, if the drone is in the chain node set In this process, the drone, acting as the accused node, moves to the set of candidate chain nodes. In the middle, if the drone is in the candidate chain node set In the middle, the drone will continue to remain in the backup chain node set. middle;
[0177] Candidate chain node set The candidate chain nodes periodically check each other's connection status. If a single chain node goes offline, the detection node sends an offline message to the head node. The structure and function of the offline message are the same as the exit message. Each chain node verifies the offline message by checking the updated topology. When all chain nodes have verified the offline message, the head node broadcasts a notification that a single chain node has gone offline and exited the consensus network, and packages the offline message into a single transaction to achieve consensus.
[0178] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will all fall within the scope of protection of the present invention.
[0179] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A chain-based BFT consensus method for unmanned aerial vehicle (UAV) self-organizing networks, characterized in that, include: Select several drones for network authentication; A drone ad hoc network is constructed based on the collection of drones that have been authenticated through the network, and an ad hoc network topology is constructed based on the drone ad hoc network. Based on flight requirements, several UAVs are selected from the UAV self-organizing network as consensus nodes, and the number of consensus nodes is denoted as N. A consensus network topology is constructed according to the self-organizing network topology and consensus nodes, and a consensus network based on the chain-based BFT protocol is built based on the consensus network topology. Each consensus node in the consensus network is divided into several chain nodes for transmitting information through chain consensus and several candidate chain nodes for maintaining the information transmitted by the chain nodes. The consensus network is optimized using the PSO algorithm to determine the chain order of each chain node in the consensus network, and after the chain order is determined, communication is established between each candidate chain node and the corresponding chain node. Information is sent to the consensus network. The chain node, as the head of the chain, transmits the information according to the chain order. When each chain node receives the information output by the previous chain node, it transmits the information to the next chain node until each chain node completes the reception of the information. After each chain node receives the information, the chain node at the head of the chain and the chain node at the tail of the chain simultaneously send corresponding information to each of the candidate chain nodes so that each candidate chain node outputs the corresponding action instruction according to the received information to synchronize consensus. The consensus network topology is updated based on unforeseen circumstances to redetermine the chain order of each chain node; wherein, the unforeseen circumstances include the presence of potentially malicious nodes, malicious head nodes, and changes to the chain nodes in the consensus network.
2. The chain-based BFT consensus method for UAV self-organizing networks according to claim 1, characterized in that, The process of constructing the consensus network topology based on the self-organizing network topology and the consensus nodes includes: Use G=( E) represents the self-organizing network topology, where Let E be the set of all the drones in the drone ad hoc network, and let E be the edge set in the drone ad hoc network. The edge set is the total number of drone pairs in the drone ad hoc network. For a single drone, a drone pair is defined as the drone that can directly transmit information within its line of sight to the drone and the drone itself. The self-organizing network topology is abstracted based on LoS, and several drones are obtained from the drone self-organizing network as consensus nodes; The self-organizing network topology and the locations of the consensus nodes are integrated to construct the consensus network topology. A consensus node distance matrix ε is constructed based on the weights between the consensus nodes, and a [specific value is missing here]. Among them, y α,β Indicates the Pth α The consensus node and the Pth node β The weights among consensus nodes; The weight is the minimum number of transmission paths required for communication between the two consensus nodes, and the transmission path is the path by which a single consensus node directly transmits information to another consensus node.
3. The chain-based BFT consensus method for UAV self-organizing networks according to claim 2, characterized in that, The process of optimizing the consensus network using the PSO algorithm includes: Each chain sequence of the chain nodes in the consensus network is denoted as a single particle; Several particles are generated sequentially, and each particle forms a particle swarm. The particle swarm is initialized to generate a random chain order for each particle; The appropriate value F for each particle consensus process in the consensus network is calculated sequentially using the following formula: Where F is the weight of the consensus process, and 2f+1 is the total number of chain nodes in the consensus node. This represents the total number of consensus nodes. The weights are from P1 to P2f+1. The weights from P2f+1 to P2f+2 to P3f+1 are... For the first The first chain node and the first The weights between each chain node For the first The first chain node and the first The weights among the candidate chain nodes; Update the velocity and position of each particle, increase the number of iterations, and recalculate the fitness value F' based on the updated particles; The F and F' values of a single particle are compared, and the smaller value of the appropriate value is retained. The chain order corresponding to the retained appropriate value is stored in the particle's local optimal position variable p. best middle; When the number of iterations reaches the maximum number of iterations, based on all stored p... best The value determines the optimal chain order for each consensus node, and stores the optimal chain order in the globally optimal position variable g. best The optimization of the chain order is then completed.
4. The chain-based BFT consensus method for UAV ad hoc networks according to claim 3, characterized in that, The chain consensus information transmission process includes: The drone used to receive interactive information is denoted as the client, the chain node that is the head of the chain is denoted as the head node, and the chain node that is the tail of the chain is denoted as the tail node. The client packages the interaction information into a transaction and forwards it to the head node so that the head node can verify the correctness of the transaction; When the head node determines that the correctness of the transaction meets the standard, it assigns a sequence number and forms a transaction message with a corresponding format, and forwards the transaction message to the subsequent chain nodes along the chain sequence. After the chain node sends the valid transaction message to the subsequent chain node, the chain node sets and starts a timer; When the tail node receives the transaction message, it calculates the signature, sends a response message and a transaction message to the client, and sends a transaction message to each of the candidate chain nodes; The tail node forwards the feedback message to the preceding chain node along the chain sequence; When a chain node receives the feedback message sent by its successor chain node, it cancels the timing for the successor chain node and forwards the feedback message to the chain node preceding it. When the head node receives the feedback message, it sends the transaction message to each of the candidate chain nodes; Each of the candidate chain nodes receives the transaction message sent by the head node and the tail node, outputs the corresponding synchronization instruction according to the transaction message to synchronize consensus, and completes the processing of the transaction; If the client does not receive the response message and the transaction message from the tail node, it may resend the transaction; or, if it receives the response message and the transaction message from the tail node, it may complete the transaction.
5. The chain-based BFT consensus method for UAV self-organizing networks according to claim 4, characterized in that, The process by which the consensus network re-determines the chain order of each chain node when the sudden situation involves the presence of the potential malicious node includes: For a single chain node, when its timeout for the corresponding successor chain node exceeds a preset value and it does not receive the feedback message from the successor chain node, the chain node sends timeout information to the head node and the preceding chain node. Upon receiving the timeout information, the preceding chain node cancels the timeout and transmits the timeout information sequentially forward. Each chain node repeats the above operation until the timeout information is transmitted to the head node. When the head node receives a single timeout message, it marks the chain node that sent the timeout message as the accusing node and the subsequent chain node of the accusing node as the accused node. After marking, the head node marks the accusing node and the accused node as potential malicious nodes. When the head node receives the timeout information from its successor chain node, it changes the accusing node and the accused node into the candidate chain nodes, and re-optimizes the consensus network based on the PSO algorithm to complete the redetering of the chain order of each chain node.
6. The chain-based BFT consensus method for UAV self-organizing networks according to claim 5, characterized in that, When the head node receives timeout information directly sent by several chain nodes, the chain node that sent the timeout information closest to the end of the chain order is recorded as the accusing node, the chain node that succeeds the accusing node is recorded as the accused node, and the accusing node and the accused node are changed to the candidate chain nodes. The consensus network is re-optimized and updated based on the PSO algorithm to determine the chain order of each chain node in the consensus network. When the head node is the accusing node, the chain node to be accused is recorded as the accused node, the accused node is changed to the candidate chain node, and the consensus network is re-optimized and updated based on the PSO algorithm to determine the chain order of each chain node in the consensus network.
7. The chain-based BFT consensus method for UAV self-organizing networks according to claim 6, characterized in that, The process by which the consensus network re-determines the chain order of each chain node when the sudden situation involves the presence of the malicious head node includes: If the head node fails to forward the transaction message to the subsequent chain node along the chain sequence, or forwards an incorrect transaction message to the subsequent chain node along the chain sequence, the head node shall be recorded as a malicious head node. Each chain node sets a corresponding timer according to the chain order to wait for receiving the transaction message. When a single chain node records the head node as the malicious head node, the chain node issues a vote and sends a view change message to other chain nodes. After receiving the view change message, the other chain nodes vote in turn. When each of the chain nodes determines to make a view change based on the voting results, the head node is reselected according to the ascending order of the drone numbers in the consensus network. The consensus network is re-optimized and updated based on the PSO algorithm to determine the chain order of each of the chain nodes in the consensus network. Each chain node cancels the corresponding timer and sets the timer to wait for receiving the new view message of the view change. After the newly selected head node receives the view change message, it broadcasts the new view message to each chain node and regenerates the transaction message. If the chain node does not receive the new view message before the timer exceeds the preset value, it resends the view change message and updates the timer. If the chain node receives the new view message before the timer exceeds the preset value, it resets the timer and the timer.
8. The chain-based BFT consensus method for UAV ad hoc networks according to claim 7, characterized in that, The process by which the consensus network re-determines the chain order of each chain node when the sudden situation involves a change in the chain node includes: When a single drone joins the consensus network, network authentication is performed to enable the drone to join the drone self-organizing network. After the drone joins the drone self-organizing network, the base station or the drone sends a request message to the head node to join the consensus network. After the head node receives the request message, it pauses the consensus process in the consensus network, verifies the signature of the request message, and sends the request message along the chain sequence. After receiving the request message, each of the chain nodes sends the feedback message to the head node; After the head node receives all the feedback messages, it records the drones that have joined the consensus network as a single chain node that has joined, broadcasts the joining message of the single chain node joining the consensus network to each chain node, places the single chain node that has joined in the corresponding position of the chain order, re-determines the chain order, and packages the request message into a single transaction. When a single consensus node leaves the consensus network, the base station or the chain node that leaves the consensus network sends a leave message to the head node; The head node verifies the signature of the exit message and sends the exit message along the chain sequence; After each of the chain nodes receives the exit message, the head node broadcasts a notification to each of the chain nodes that the individual chain node has exited the consensus network. The head node re-determines the chain order after a single chain node leaves the consensus network and packages the exit message into a single transaction.
9. The chain-based BFT consensus method for UAV self-organizing networks according to claim 8, characterized in that, The process of updating the topology of the consensus network based on the joining or leaving of the chain nodes to redetermine the chain order of each chain node includes: When the network topology changes, the head node updates the consensus node distance matrix according to the changed network topology, and determines the change in the consensus node distance matrix according to the calculation formula: ; in, For the change in the consensus node distance matrix, This is the updated consensus node distance matrix. Consensus node distance matrix In obtaining Then, calculate according to the formula. The formula is: ; in, The value represents the change in the consensus node distance matrix. The dimension is A column vector of all 1s; when At that time, the chain order is redefined.