Unmanned aerial vehicle network chained BFT consensus method
By using chain BFT consensus method and PSO algorithm to optimize chain sequence in the drone network, the problems of information transmission timing and low data transmission efficiency are solved, and efficient drone network consensus is achieved.
Patent Information
- Application Number
- CN202510121360.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-26
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2045-01-26
AI Technical Summary
The prior art cannot guarantee the timing of information transmission in the drone network, and cannot quickly determine the optimal chain sequence to improve data transmission efficiency, resulting in low consensus efficiency of the drone cluster in the consensus network.
The chain BFT consensus method is adopted to optimize the chain node chain sequence in the consensus network through the PSO algorithm, build a chain consensus network, use chain propagation instead of broadcasting, reduce communication complexity, and update the topology structure in emergencies to redetermine the chain sequence.
It effectively ensures the timing of information transmission, improves the efficiency of data transmission between drones, reduces communication complexity, and improves the consensus efficiency of drones in consensus networks.
Smart Images

Figure CN120050648A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical fields of drone swarm technology and blockchain technology, and particularly relates to a method for drone network chain-based BFT consensus. Background Art
[0002] With the rapid development of the Internet of Things and communication technologies, drones are applied to various scenarios such as traffic management, military operations, and auxiliary wireless communication. A drone network is a mobile ad-hoc network that does not require the support of a reliable central institution, and the completion of tasks depends on the interoperability of drone nodes. Traditional centralized systems are not applicable to this architecture. Blockchain technology is a distributed ledger technology that ensures the security and credibility of data through means such as encryption algorithms and consensus mechanisms. Among them, the consensus mechanism determines the performance and security of the blockchain system at the same time. Therefore, applying blockchain consensus technology to drone ad-hoc networks has important research significance for data sharing between drones, enhancing data exchange and access control, supporting secure collaborative drone networks, improving performance, and assisting drones to complete various scenario tasks.
[0003] Chinese Patent Publication No.: CN115903911A discloses a method for hierarchical consensus of a drone swarm based on blockchain. The hierarchical structure of drones with built-in blockchain enables the drone swarm network to have high scalability and robustness, and can realize information sharing of all drone nodes in the network, greatly improving the working efficiency of drones; the PBFT algorithm can help drones reach a consensus faster while avoiding a large amount of computing power competition, ensuring data consistency and improving the security performance of networking.
[0004] It can be seen that the above solution uses the PBFT algorithm to complete consensus through multiple rounds of broadcasts, improving the working efficiency of drones. However, the above solution cannot guarantee the timeliness of information sending, cannot quickly determine the optimal chain order to ensure data transmission efficiency, and thus cannot guarantee the consensus efficiency of the drone swarm in the consensus network. Summary of the Invention
[0005] Therefore, the present invention provides a method for drone network chain-based BFT consensus to overcome the problems in the prior art that the timeliness of information sending cannot be guaranteed, the optimal chain order cannot be quickly determined to ensure data transmission efficiency, and the communication complexity cannot be effectively reduced, resulting in low consensus efficiency of the drone swarm in the consensus network.
[0006] To achieve the above object, the present invention provides a method for drone network chain-based BFT consensus, including:
[0007] Select several drones for network authentication;
[0008] Construct a drone ad-hoc network based on the set of each of the drones after network authentication, and construct a self-organizing network topology structure based on the drone ad-hoc network;
[0009] Select several of the drones from the drone ad-hoc network as consensus nodes based on flight requirements, and denote the number of consensus nodes as N. Construct a consensus network topology structure according to the self-organizing network topology structure and the consensus nodes, and form a consensus network based on the chained BFT protocol based on the consensus network topology structure;
[0010] Divide each of the consensus nodes in the consensus network into several chain nodes for transmitting information through chained consensus and several candidate chain nodes for maintaining the information transmission of the chain nodes;
[0011] Use the PSO algorithm to optimize the consensus network to determine the chain order of each of the chain nodes in the consensus network, and after determining the chain order, construct the communication between each of the candidate chain nodes and the corresponding chain nodes;
[0012] Send information to the consensus network. The chain node serving as the chain head conveys the information according to the chain order. Each chain node conveys the information to the next chain node when receiving the information output by the previous chain node until each chain node completes the reception of the information;
[0013] After each of the chain nodes has received the information, simultaneously, the chain node serving as the chain head and the chain node serving as the chain tail send the corresponding information to each of the candidate chain nodes so that each candidate chain node outputs corresponding action instructions according to the received information to synchronize the consensus;
[0014] Update the consensus network topology structure based on emergencies to re-determine the chain order of each of the chain nodes; wherein, the emergencies include the existence of potential malicious nodes, malicious head nodes and the change of the chain nodes in the consensus network.
[0015] Further, the process of constructing the consensus network topology structure according to the self-organizing network topology structure and the consensus nodes includes:
[0016] Use to represent the self-organizing network topology structure, where is the set of each of the drones in the drone ad-hoc network, E is the edge set in the drone ad-hoc network, and the edge set is the total number of drone pairs in the drone ad-hoc network. For a single drone, the drones that can directly transmit information within the line of sight of this drone and this drone are recorded as a drone pair;
[0017] Abstract the self-organizing network topology structure according to LoS, and obtain several of the drones from the drone ad-hoc network as the consensus nodes;
[0018] Integrate the self-organizing network topology and the positions of the consensus nodes to construct the consensus network topology, and construct a consensus node distance matrix ε based on the weights between the consensus nodes. Set
[0019]
[0020] where y α,β represents the weight between the P α th consensus node and the P β th consensus node;
[0021] The weight is the minimum number of transmission paths required for communication between two consensus nodes, and the transmission path is the path for a single consensus node to directly deliver information to another consensus node.
[0022] Furthermore, the process of optimizing the consensus network using the PSO algorithm includes:
[0023] Record the single chain order of each chain node in the consensus network as a single particle;
[0024] Generate a number of such particles in sequence, and each particle forms a particle swarm;
[0025] Initialize the particle swarm to generate a random chain order for each particle;
[0026] Use the following formula to calculate the fitness value F of the consensus process of each particle in the consensus network in sequence:
[0027]
[0028] where F is the weight of the consensus process, 2f + 1 is the total number of chain nodes in the consensus node, 3f + 1 is the total number of consensus nodes, is the weight from P1 to P2f + 1, is the weight from P2f + 1 to P2f + 2 to P3f + 1, y γ,ξ is the weight between the P γ th chain node and the P ξ th chain node, y 2f+1,η is the weight between the P 2f+1 th chain node and the P η th candidate chain node;
[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] Compare the F of a single said particle with F’, retain the moderate value with the smaller numerical value, and store the chain order corresponding to the retained moderate value in the local best position variable p of the particle best ;
[0031] When the number of iterations reaches the maximum number of iterations, determine the optimal chain order for each said consensus node based on all stored p best values, and store the optimal chain order in the global best position variable g best to complete the optimization of the chain order.
[0032] Furthermore, the process of updating the velocity and position of each said particle includes:
[0033] After completing the calculation of the moderate value, use the following formula to update the velocity of each said particle:
[0034]
[0035] where, is the velocity of the i-th particle at the z-th iteration, W PSO is the inertia weight, C 1 and C 2 are learning factors, R 1 and R 2 are both random numbers and R 1 ∈(0, 1), R 2 ∈(0, 1), is the position of the i-th particle at the z-th iteration, is the individual best position of the i-th particle at the z-th iteration, is the global best position of the particle swarm at the z-th iteration;
[0036] After completing the update of the velocity of each particle, use the following formula to update the position of each said particle:
[0037]
[0038] Furthermore, the process of transmitting information in the chain consensus includes:
[0039] Denote the drone used to receive interactive information as the client, denote the chain node as the head node as the head node and the chain node as the tail node as the tail node;
[0040] The client packs the interactive information into a transaction and forwards it to the head node so that the head node can verify the correctness of the transaction;
[0041] 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 node along the chain order;
[0042] After the chain node sends the valid transaction message to the subsequent chain node, the chain node sets and starts a timer;
[0043] When the tail node receives the transaction message, it calculates the signature and sends a response message and the transaction message to the client, and also sends the transaction message to each standby chain node;
[0044] The tail node forwards the feedback message to its previous chain node along the chain order;
[0045] When the chain node receives the feedback message sent by its subsequent chain node, it cancels the timing for the subsequent chain node and forwards the feedback message to the chain node in front of it;
[0046] When the head node receives the feedback message, it sends the transaction message to each standby chain node;
[0047] Each standby chain node receives the transaction message sent by the head node and the tail node, and outputs a corresponding synchronization instruction according to the transaction message to synchronize the consensus and complete the processing of the transaction;
[0048] When the client does not receive the response message and the transaction message sent by the tail node, it resends the transaction, or completes the transaction when it receives the response message and the transaction message sent by the tail node.
[0049] Further, the process by which the consensus network re-determines the chain order of each chain node when the emergency is the existence of a potential malicious node includes:
[0050] For a single chain node, when the timing for its corresponding subsequent chain node exceeds a preset value and it does not receive the feedback message conveyed by the subsequent chain node, the chain node sends timeout information to the head node and the previous chain node;
[0051] When the previous chain node receives the timeout information, it cancels the timing and sequentially forwards the timeout information forward, and each chain node repeats the above operation until the timeout information is conveyed to the head node;
[0052] When the head node receives a single timeout information, it records the chain node that sends the timeout information as the accusing node, and records the subsequent chain node of the accusing node as the accused node. After the marking is completed, the head node records the accusing node and the accused node as potential malicious nodes;
[0053] When the head node receives the timeout information transmitted by the subsequent chain node thereof, 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 re-determination of the chain order of each chain node.
[0054] Further, when the head node receives the timeout information directly sent by several chain nodes, it designates the chain node closest to the end of the chain order that sends the timeout information as the accusing node, designates the subsequent chain node of the accusing node as the accused node, changes the accusing node and the accused node into the candidate chain nodes, and re-optimizes the updated consensus network based on the PSO algorithm to determine the chain order of each chain node in the consensus network;
[0055] When the head node is the accusing node, it designates the accused chain node as the accused node, changes the accused node into the candidate chain node, and re-optimizes the updated consensus network based on the PSO algorithm to determine the chain order of each chain node in the consensus network.
[0056] Further, the process of the consensus network re-determining the chain order of each chain node when the emergency situation is the existence of a malicious head node includes:
[0057] When the head node does not forward the transaction message to the subsequent chain node along the chain order, or forwards an incorrect transaction message to the subsequent chain node along the chain order, it designates this head node as a malicious head node;
[0058] Each chain node sets a corresponding timer according to the chain order to wait for receiving the transaction message. When a single chain node designates the head node as the malicious head node, this chain node issues a vote and sends a view change message to other chain nodes, and other chain nodes vote in turn after receiving the view change message;
[0059] When each chain node determines to perform a view change according to the voting result, it re-selects the head node in ascending order of the numbers of the drones in the consensus network, re-optimizes the updated consensus network based on the PSO algorithm to determine the chain order of each chain node 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;
[0060] After the re-selected head node receives the view change message, it broadcasts the new view message to each chain node and regenerates the transaction message;
[0061] When the chain node does not receive the new view message before the timer exceeds the preset value, resend the view change message and update the timer. When the chain node receives the new view message before the timer exceeds the preset value, reset the timer and the timer.
[0062] Further, the process by which the consensus network re-determines the chain order of each chain node when the emergency situation is the change of a chain node includes:
[0063] When a single drone joins the consensus network, perform network authentication to enable the drone to join the drone ad-hoc network. After the drone joins the drone ad-hoc network, the base station or the drone sends a request message to join the consensus network to the head node;
[0064] After the head node receives the request message, pause the consensus process in the consensus network, verify the signature of the request message, and send the request message along the chain order;
[0065] After each chain node receives the request message, send the feedback message to the head node;
[0066] After the head node receives all the feedback messages, record the drone that joins the consensus network as a single chain node that joins, broadcast a join message of a single chain node joining the consensus network to each chain node, place the joined single chain node at the corresponding position in the chain order, re-determine the chain order, and package the request message into a single transaction;
[0067] When a single consensus node exits the consensus network, the base station or the chain node that exits the consensus network sends an exit message to the head node;
[0068] The head node verifies the signature of the exit message and sends the exit message along the chain order;
[0069] After each chain node receives the exit message, the head node broadcasts a notice that a single chain node exits the consensus network to each chain node;
[0070] After a single chain node exits the consensus network, the head node re-determines the chain order and packages the exit message into a single transaction.
[0071] Further, the process of updating the topology structure based on the addition or exit of a chain node from the consensus network to re-determine the chain order of each chain node includes:
[0072] When the network topology changes, the head node updates the consensus node distance matrix according to the changed network topology, and determines the change of the consensus node distance matrix according to the calculation formula. The calculation formula is:
[0073] ε′=ε new -ε old 。
[0074] Where ε′ is the change of the consensus node distance matrix, ε new is the updated consensus node distance matrix, and ε old is the consensus node distance matrix
[0075] After obtaining ε′, calculate Γ according to the formula. The formula is:
[0076]
[0077] Where Γ is the value of the change of the consensus node distance matrix, and l is a column vector of all 1s with dimension N;
[0078] When Γ≥N, re-determine the chain order.
[0079] Compared with the prior art, the beneficial effects of the present invention are as follows. The chained BFT consensus method of the present invention uses chained propagation instead of broadcasting, effectively reducing the communication complexity, effectively alleviating the consumption of communication resources in the UAV ad hoc network. The chained propagation effectively ensures the timing of information sending, effectively reducing the delay caused by signal conflicts between UAVs. The PSO algorithm is used to optimize the consensus network to determine the chain order of each chain node in the consensus network, effectively achieving fast and accurate determination of the optimal chain sequence, further reducing the communication complexity. Based on unexpected situations, the topology of the consensus network is updated to re-determine the chain order of each chain node, effectively ensuring the data transmission efficiency and effectively improving the consensus efficiency of the UAV set in the consensus network.
[0080] Furthermore, the present invention obtains several UAVs from the UAV ad hoc network as consensus nodes. By selecting UAVs as consensus nodes, the resource utilization rate of UAVs is effectively improved, and the consensus efficiency of the UAV group in the consensus network is further improved.
[0081] Furthermore, in the process of optimizing the consensus network by using the PSO algorithm in the present invention, F and F’ are compared, and the smaller moderate value is retained, which can effectively reduce the weight in the chain order, further achieving fast and accurate determination of the optimal chain sequence, effectively improving the quality of the chain order, while further reducing the communication complexity and further improving the consensus efficiency of the UAV group in the consensus network.
[0082] Furthermore, the present invention updates the velocities and positions of the particles based on a formula, can quickly and accurately calculate the fitness value, and stores the chain order corresponding to the retained fitness value in the local best position variable p of the particle best of the chain order, which is conducive to quickly and accurately determining the optimal chain sequence, further improving the consensus efficiency of the unmanned aerial vehicle swarm in the consensus network while further reducing the communication complexity.
[0083] Furthermore, after the chain node of the present invention sends an effective transaction message to the successor chain node, the chain node sets and starts a timer, effectively realizing the fault management of the chain node and further improving the consensus efficiency of the unmanned aerial vehicle swarm in the consensus network.
[0084] Furthermore, when there are potential malicious nodes in the consensus network, the present invention quickly identifies the potential malicious nodes. When the 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 the chain node. Forwarding the feedback message along the chain can cancel the timer in time, effectively reducing the number of feedback messages. After changing the accusing node and the accused node to candidate chain nodes, the consensus network is re-optimized based on the PSO algorithm to re-determine the chain order of each chain node, further realizing quickly and accurately determining the optimal chain sequence, further reducing the communication complexity while further improving the consensus efficiency of the unmanned aerial vehicle swarm in the consensus network.
[0085] Furthermore, when the head node receives a number of timeout messages, it designates the chain node that sends the timeout message closest to the end of the chain order as the accusing node, designates the successor chain node of the accusing node as the accused node, and changes the accusing node and the accused node to candidate chain nodes, which can effectively avoid misjudgment of the accusing node and the accused node. When the head node is the accusing node, changing the accused node to a candidate chain node can effectively maintain the logical integrity of the data structure. After completing the above node changes, the updated consensus network is re-optimized based on the PSO algorithm to determine the chain order of each chain node in the consensus network, further realizing quickly and accurately determining the optimal chain sequence, further reducing the communication complexity while further improving the consensus efficiency of the unmanned aerial vehicle swarm in the consensus network.
[0086] Furthermore, when there is a malicious head node in the chain order, the present invention re - selects the head node in ascending order of the numbers of the UAVs in the consensus network, and re - optimizes the updated consensus network based on the PSO algorithm to determine the chain order of each chain node in the consensus network, further achieving fast and accurate determination of the optimal chain sequence, effectively avoiding the occurrence of time delay caused by the existence of malicious head nodes, further reducing the communication complexity while further improving the consensus efficiency of the UAV swarm in the consensus network.
[0087] Furthermore, when a single UAV joins or exits the consensus network, the present invention analyzes the joining process and the exiting process, and can accurately analyze the changes in the consensus network caused by the joining or exiting of the UAV. The head node re - determines the chain order after a single UAV joins or exits, further improving the consensus efficiency of the UAV swarm in the consensus network.
[0088] Furthermore, in the present invention, the head node updates the consensus node distance matrix according to the changed network topology structure, and determines the change of the consensus node distance matrix according to the calculation formula to determine whether to re - determine the chain order, which can quickly and accurately determine the chain order in time when the chain order needs to be re - determined after the network topology structure changes, further improving the consensus efficiency of the UAV swarm in the consensus network. BRIEF DESCRIPTION OF THE DRAWINGS
[0089] Figure 1 is the flowchart of the UAV network chain - type BFT consensus method of the present invention;
[0090] Figure 2 is the flowchart of the process of optimizing the consensus network using the PSO algorithm of the present invention;
[0091] Figure 3 is the schematic diagram of the process of chain - type consensus transmission of information of the present invention;
[0092] Figure 4 is the flowchart of updating the network topology structure of the consensus network based on emergencies to re - determine the chain order of each chain node of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0093] In order to make the purpose and advantages of the present invention clearer, the present invention will be further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are only used to explain the present invention and do not limit the present invention.
[0094] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are only used to explain the technical principle of the present invention and do not limit the protection scope of the present invention.
[0095] Please refer to Figure 1As shown, it is a flowchart of the drone network chained BFT consensus method of the present invention. The method according to an embodiment of the present invention includes:
[0096] Select several drones for network authentication;
[0097] Construct a drone ad hoc network based on the set of each of the drones after passing the network authentication, and construct an ad hoc network topology structure based on the drone ad hoc network;
[0098] Select several of the drones from the drone ad hoc network as consensus nodes according to flight requirements, and denote the number of consensus nodes as N. Construct a consensus network topology structure according to the ad hoc network topology structure and the consensus nodes, and form a consensus network based on the chained BFT protocol based on the consensus network topology structure;
[0099] Divide each of the consensus nodes in the consensus network into several chain nodes for transmitting information through chained consensus and several candidate chain nodes for maintaining the information transmitted by the chain nodes;
[0100] Use the PSO algorithm to optimize the consensus network to determine the chain order of each of the chain nodes in the consensus network, and after completing the determination of the chain order, construct the communication between each of the candidate chain nodes and the corresponding chain nodes;
[0101] Send information to the consensus network. The chain node serving as the chain head conveys the information according to the chain order. Each chain node conveys the information to the next chain node when receiving the information output by the previous chain node until each chain node completes the reception of the information;
[0102] After each of the chain nodes has received the information, at the same time, the chain node serving as the chain head and the chain node serving as the chain tail send the corresponding information to each of the candidate chain nodes so that each candidate chain node outputs corresponding action instructions according to the received information to synchronize the consensus;
[0103] Update the consensus network topology structure based on emergencies to re-determine the chain order of each of the chain nodes; wherein, the emergencies include the existence of potential malicious nodes, malicious head nodes and the change of the chain nodes in the consensus network;
[0104] Specifically, the chain node set Ω contains 2f + 1 chain nodes for transmitting information through chained consensus, and the candidate chain node set contains f candidate chain nodes for maintaining the information transmitted by the chain nodes.
[0105] The process of constructing the consensus network topology structure according to the ad hoc network topology structure and the consensus nodes in the embodiment of the present invention includes:
[0106] Use Denote the self-organizing network topology, where is the set of each UAV in the UAV ad-hoc network, E is the edge set in the UAV ad-hoc network, and the edge set is the total number of UAV pairs in the UAV ad-hoc network. For a single UAV, the UAV that can directly transmit information within the line of sight of this UAV and this UAV are recorded as a UAV pair;
[0107] Abstract the self-organizing network topology according to LoS, and obtain several UAVs from the UAV ad-hoc network as the consensus nodes;
[0108] Integrate the positions of the self-organizing network topology and the consensus nodes to construct the consensus network topology, construct a consensus node distance matrix ε based on the weights between each consensus node, and set
[0109]
[0110] where y α,β represents the weight between the P α th consensus node and the P β th consensus node;
[0111] The weight is the minimum number of transmission paths required for communication between two consensus nodes, and the transmission path is the path for a single consensus node to directly deliver information to another consensus node;
[0112] Specifically, the set of each UAV consists of M UAVs in the UAV ad-hoc network, where each UAV is represented as U ∈ , ∈∈[1, 2,..., M];
[0113] Select some UAVs in the UAV ad-hoc network to participate in the consensus process. The UAV ad-hoc network is a paradigm mode in which the consensus network and the authentication network are separated. Among them, the authentication network is formed by each UAV that belongs to the UAV ad-hoc network and does not belong to the consensus network; N consensus nodes in participate in the consensus to form a consensus node set where P α represents the αth consensus node, and P β represents the βth consensus node, is a subset of.
[0114] Please refer to Figure 2 shown, which is a flowchart of the process of optimizing the consensus network by the PSO algorithm of the present invention. The process of optimizing the consensus network by the PSO algorithm in the embodiment of the present invention includes:
[0115] Record the individual chain order of each chain node in the consensus network as an individual particle;
[0116] Generate a number of the particles in sequence, and each particle forms a particle swarm;
[0117] Initialize the particle swarm to generate a random chain order for each particle;
[0118] Use the following formula to calculate the fitness value F of the consensus process of each particle in the consensus network in sequence:
[0119]
[0120] where F is the weight of the consensus process, 2f + 1 is the total number of chain nodes in the consensus nodes, 3f + 1 is the total number of consensus nodes, is the weight from P1 to P2f + 1, is the weight from P2f + 1 to P2f + 2 to P3f + 1, y γ,ξ is the P γ th chain node and the P ξ th chain node between the weights, y 2f+1,η is the P 2f+1 th chain node and the P η th candidate chain node between the weights;
[0121] Update the velocity and position of each particle, increase the number of iterations and recalculate the fitness value F' based on the updated particles;
[0122] Compare the F of a single particle with F', retain the smaller fitness value, and store the chain order corresponding to the retained fitness value in the local best position variable p best of the particle;
[0123] When the number of iterations reaches the maximum number of iterations, determine the optimal chain order for each consensus node based on all stored p best values and store the optimal chain order in the global best position variable g best to complete the optimization of the chain order.
[0124] The process of updating the velocity and position of each particle in the embodiment of the present invention includes:
[0125] After calculating the fitness value, use the following formula to update the velocity of each particle:
[0126]
[0127] where, is the velocity of the i-th particle at the z-th iteration, W PSO is the inertia weight, C1 and C 2 is the learning factor, R 1 and R 2 are both random numbers and R 1 ∈(0, 1), R 2 ∈(0, 1), is the position of the i-th particle at the z-th iteration, is the personal best position of the i-th particle at the z-th iteration, is the global best position of the particle swarm at the z-th iteration;
[0128] After updating the velocities of all the particles, update the positions of each of the said particles using the following formula:
[0129]
[0130] Specifically, the formula for updating the velocities of each of the said particles mainly controls the change of the order of each particle chain.
[0131] Please refer to Figure 3 shown, which is a schematic diagram of the process of the chain consensus transmission of information in the present invention. The process of the chain consensus transmission of information in the embodiments of the present invention includes:
[0132] Denote the unmanned aerial vehicle for receiving interactive information as the client, denote the said chain node as the head node as the head of the chain and denote the said chain node as the tail node as the tail of the chain;
[0133] The client packs the interactive information into and forwards it to the head node so that the head node verifies the correctness;
[0134] When the head node determines that the correctness meets the standard, it assigns a serial number and forms a transaction message <CHAIN, VN, SN, RV, TX, C, HH, HR, CO>σ i , and forwards the transaction message <CHAIN, VN, SN, RV, TX, C, HH, HR, CO>σ i to the succeeding said chain node along the chain order;
[0135] After the chain node sends the valid transaction message <CHAIN, VN, SN, RV, TX, C, HH, HR, CO>σ i to the succeeding chain node, the chain node sets and starts a timer Π t ;
[0136] When the tail node receives the transaction message <CHAIN, VN, SN, RV, TX, C, HH, HR, CO>σi When calculating the signature, a response message is sent to the client <reply>σ i and the transaction message <CHAIN, VN, SN, RV, TX, C, HH, HR, CO>σ i , and sending the transaction message <CHAIN, VN, SN, RV, TX, C, HH, HR, CO>σ to each of the candidate chain nodes i ;
[0137] The tail node forwards the feedback message <ACK, VN, SN, CO, HT, C)σ along the chain order to the previous chain node i ;
[0138] When the chain node receives the feedback message <ACK, VN, SN, CO, HT, C>σ sent by its successor chain node i , cancel the timing for the successor chain node and forward the feedback message <ACK, VN, SN, CO, HT, C>σ i to the chain node located before this chain node;
[0139] When the head node receives the feedback message <ACK, VN, SN, CO, HT, C>σ i , send the transaction message <CHAIN, VN, SN, RV, TX, C, HH, HR, CO>σ to each of the candidate chain nodes i ;
[0140] 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 i , and outputs a corresponding synchronization instruction according to the transaction message to synchronize the consensus and complete the processing of the transaction;
[0141] The client does not receive the response message sent by the tail node <reply>σ i and the transaction message <CHAIN, VN, SN, RV, TX, C, HH, HR, CO> σ i when, resend the Or, upon receiving the response message sent by the tail node <reply>σ i and the transaction message <CHAIN, VN, SN, RV, TX, C, HH, HR, CO> σ i when the
[0142] Specifically, CHAIN is the message type, VN is the view number, SN is the assigned sequence number, RV is the number of re - chains that occurred during view VN, TX is the transaction, HH is the hash value of its execution history, HR is the hash value of the client reply containing the execution result, C is the client, and CO is the order of the current chain, including the set of chain nodes Ω and the set of candidate chain nodes after algorithmic sorting σ i is the message appended to the message after signing the message digest;
[0143] Timer Π t is set according to the positions of the respective chain nodes in the chain order. For chain node P γ , Π t = Π γ = (N - f - γ)δ, for chain node P ξ , Π t = Π ξ = (N - f - ξ)δ,, where δ is the baseline time, which can be adjusted according to the state of the drone network;
[0144] <ACK, VN, SN, CO, HT, C> σ i where HT in it is the hash value of the transaction;
[0145] The synchronization consensus updates the flight states of the respective candidate chain nodes based on the transaction message <CHAIN, VN, SN, RV, TX, C, HH, HR, CO> σ i
[0146] Please refer to Figure 4 shown in the flowchart of the present invention for updating the consensus network topology based on an emergency situation to re - determine the chain order of each chain node. The process of the consensus network in the embodiment of the present invention for re - determining the chain order of each chain node when the emergency situation is the existence of the potential malicious node includes:
[0147] For a single chain node, when the timing for its corresponding successor chain node exceeds a preset value and it does not receive the feedback message <ACK, VN, SN, CO, HT, C> σ i transmitted by the successor chain node, this chain node sends a timeout message <ACCUSE, AA, RV, VN> σ i to the head node and the previous chain node;
[0148] The foregoing chain node cancels the timing when receiving the timeout information <ACCUSE, AA, RV, VN>σ i and sequentially forwards the timeout information <ACCUSE, AA, RV, VN>σ i forward. Each chain node repeats the above operation until the timeout information <ACCUSE, AA, RV, VN>σ i is delivered to the head node;
[0149] When the head node receives a single timeout information <ACCUSE, AA, RV, VN>σ i it designates the chain node that sent the timeout information <ACCUSE, AA, RV, VN>σ i as the accusing node, and designates the successor chain node of the accusing node as the accused node. After the marking is completed, the head node designates the accusing node and the accused node as potentially malicious nodes;
[0150] When the head node receives the timeout information <ACCUSE, AA, RV, VN>σ i transported by its successor chain node, it changes the accusing node and the accused node to the candidate chain nodes, and re-optimizes the consensus network based on the PSO algorithm to complete the re-determination of the chain order of each chain node;
[0151] Specifically, there is no constraint on the distribution of the potentially malicious nodes in the chain order;
[0152] <ACCUSE, AA, RV, VN>σ i where AA is a tuple composed of the accusing node and the accused node. To prevent malicious nodes from making false accusations, it is assumed that a chain node can only accuse its directly successor chain node;
[0153] Both the accusing node and the accused node are designated as potentially malicious nodes. A potentially malicious node means that the accused node has a malicious timeout behavior, or the accusing node makes a false accusation against the accused node;
[0154] Re-optimize the updated consensus network based on the PSO algorithm, and re-send the transaction message <CHAIN, VN, SN, RV, TX, C, HH, HR, CO>σ i to resume the consensus process.
[0155] Please continue to refer to Figure 4 As shown, in the embodiment of the present invention, when the head node receives a number of timeout information <ACCUSE, AA, RV, VN>σ i When, the sending timeout information <ACCUSE, AA, RV, VN> σ closest to the tail end of the chain order i The chain node is denoted as the accusing node, the successor chain node of the accusing node is denoted as the accused node, and the accusing node and the accused node are changed to the candidate chain nodes, and the updated consensus network is re-optimized based on the PSO algorithm to determine the chain order of each chain node in the consensus network;
[0156] When the head node is the accusing node, the accused chain node is denoted as the accused node, the accused node is changed to the candidate chain node, and the updated consensus network is re-optimized based on the PSO algorithm to determine the chain order of each chain node in the consensus network;
[0157] Specifically, each of the potential malicious nodes is managed according to the reconfiguration assumptions in the candidate chain node set And each of the potential malicious nodes is effectively processed and repaired by combining reconfiguration with the heavy chain.
[0158] Please continue to refer to Figure 4 As shown, the process of the consensus network in the embodiment of the present invention for re-determining the chain order of each chain node when the emergency situation is the existence of the malicious head node includes:
[0159] When the head node does not forward the transaction message to the successor chain node along the chain order, or forwards an incorrect transaction message to the successor chain node along the chain order, the head node is denoted as a malicious head node;
[0160] Each chain node sets a corresponding timer according to the chain order to wait for receiving the transaction message. When a single chain node denotes the head node as the malicious head node, the chain node issues a vote and sends a view change message to other chain nodes, and other chain nodes vote in turn after receiving the view change message, where the number of view change messages is f + 1;
[0161] When each chain node determines to perform a view change according to the voting result, the head node is re-selected in ascending order of the numbers of the drones in the consensus network, and the updated consensus network is re-optimized based on the PSO algorithm to determine the chain order of each chain node 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;
[0162] After the re-selected head node receives the view change message, it broadcasts the new view message to each chain node and regenerates the transaction message;
[0163] When the chain node does not receive the new view message before the timer exceeds the preset value, resend the view change message and update the timer. When the chain node receives the new view message before the timer exceeds the preset value, reset the timer and the timer.
[0164] Specifically, each of the chain nodes sets the corresponding timer according to the chain order to wait for receiving the transaction message <CHAIN, VN, SN, RV, TX, C, HH, HR, CO>σ i The purpose is to detect the malicious head node and prevent high latency in the chain order. When each chain node waits for the transaction message <CHAIN, VN, SN, RV, TX, C, HH, HR, CO>σ i the timer will maintain the current view to ensure timely processing and detection of any abnormal latency.
[0165] After each of the chain nodes sends the view change message, it no longer accepts any messages other than the view change message and the new view message.
[0166] When each of the chain nodes votes to pass and performs the view change, reselect the head node in ascending order of the numbers of the drones in the consensus network. Each of the chain nodes cancels the corresponding timer, and after collecting 2f new view messages, sets the timer to wait for receiving the new view message of the view change.
[0167] Please continue to refer to Figure 4 As shown, the process of the consensus network according to the embodiment of the present invention for re - determining the chain order of each chain node when the emergency situation is the change of the chain node includes:
[0168] When a single drone joins the consensus network, perform network authentication to enable the drone to join the drone ad - hoc network. After the drone joins the drone ad - hoc network, the base station or the drone sends a request message <JOIN, E, D, PK>σ to the head node. D ;
[0169] After the head node receives the request message <JOIN, E, D, PK>σ D it pauses the consensus process in the consensus network, verifies the signature of the request message, and sends the request message <JOIN, E, D, PK>σ along the chain order. D ;
[0170] After each of the chain nodes receives the request message <JOIN, E, D, PK>σ D it sends the feedback message <ACK, VN, SN, CO, HT, C>σ i to the head node;
[0171] After the head node receives all the feedback messages <ACK, VN, SN, CO, HT, C>σ i it designates the UAVs that have joined the consensus network as the individual chain nodes that have joined, broadcasts to each chain node the join message of the individual chain node joining the consensus network, places the joined individual chain node at the corresponding position in the chain order, re - determines the chain order, and packages the request message (JOIN, E, D, PK>σ D into a single transaction;
[0172] When an individual consensus node exits the consensus network, the base station or the chain node that exits the consensus network sends an exit message <EXIT, i, j, D, PK>σ to the head node D ;
[0173] The head node verifies the signature of the exit message and sends the exit message along the chain order;
[0174] After each chain node receives the exit message, the head node broadcasts to each chain node the notice that an individual chain node has exited the consensus network;
[0175] After an individual chain node exits the consensus network, the head node re - determines the chain order and packages the exit message into a single transaction;
[0176] Specifically, an addition and exit protocol for the consensus network is designed to handle change requests of the chain nodes in the ad - hoc network;
[0177] The identity information and the assigned number ∈ (UAV is denoted as U ∈ ) of a single UAV authenticated by the network will be shared with all UAVs in the ad - hoc network;
[0178] (JOIN, E, D, PK>σ D where D in it is the identity of a single UAV (U ∈ or the ground base station) requesting to join, and PK is the public key of U ∈ ;
[0179] When the number of consensus nodes does not satisfy N = 3f + 1,
[0180] Please continue to refer to Figure 4 As shown, the process of updating the topology based on the addition or exit of chain nodes from the consensus network to re - determine the chain order of each chain node in the embodiment of the present invention includes:
[0181] When the network topology changes, the head node updates the consensus node distance matrix according to the changed network topology and determines the change of the consensus node distance matrix according to the calculation formula. The calculation formula is:
[0182] ε′ = ε new - ε old 。
[0183] Where ε′ is the change of the consensus node distance matrix, ε new is the updated consensus node distance matrix, and ε old is the consensus node distance matrix
[0184] After obtaining ε′, calculate 「 according to the formula. The formula is:
[0185]
[0186] Where 「 is the value of the change of the consensus node distance matrix, and l is a column vector of all 1s with dimension N;
[0187] When 「 ≥ N, re - determine the chain order;
[0188] Specifically, the set of drones may change the topology during flight, thereby changing the consensus node distance matrix. For example, when a drone suddenly loses contact due to being shot down or other reasons, it has a significant impact on the entire drone ad - hoc network;
[0189] When the drone in the consensus node set loses contact with the drone ad - hoc network due to an accident during flight, if the drone is in the chain node set Ω, the drone moves to the candidate chain node set as an accused node. If the drone is in the candidate chain node set , the drone will continue to stay in the candidate chain node set ;
[0190] The candidate chain nodes in the candidate chain node set regularly check each other's connection status. If a single chain node is offline, the detection node sends an offline message to the head node. The structure and function of the offline message are the same as those of the exit message. Each chain node verifies the offline message by checking the updated topology. When all chain nodes have completed the verification of the offline message, the head node broadcasts a notice that a single chain node is offline and exits the consensus network, and packs the offline message into a single transaction to reach a consensus.
[0191] So far, the technical solution of the present invention has been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easily understood by those skilled in the art that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle 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 fall within the protection scope of the present invention.
[0192] The above are only the preferred embodiments of the present invention and are not used to limit the present invention. For those skilled in the art, the present invention can have various changes and modifications. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.< / reply> < / reply> < / reply>
Claims
1. A drone network chain BFT consensus method, characterized by: include: Select several drones for network authentication; Building a drone ad hoc network based on the set of drones that have passed the network authentication, and building an ad hoc network topology structure based on the drone ad hoc network; Based on flight requirements, a number of the drones are selected from the drone ad hoc network as consensus nodes, and the number of consensus nodes is recorded as N, a consensus network topology is constructed according to the ad hoc network topology and consensus nodes, and a consensus network based on the chained BFT protocol is established based on the consensus network topology; Divide each of the consensus nodes in the consensus network into a number of chain nodes for transmitting information through chain consensus and a number of standby chain nodes for maintaining the information transmitted by the chain nodes; The consensus network is optimized using a PSO algorithm to determine the chain sequence of each of the chain nodes in the consensus network, and after the chain sequence is determined, the communication between each of the candidate chain nodes and the corresponding chain node is established; Sending information to the consensus network, the chain node as the head of the chain transmits the information according to the chain order, and each chain node transmits the information output by the previous chain node to the next chain node when receiving the information until each chain node completes receiving the information; After all the chain nodes receive the information, at the same time, the chain node as the chain head and the chain node as the chain tail send corresponding information to each of the candidate chain nodes so that each candidate chain node outputs corresponding action instructions according to the received information to synchronize consensus; Based on emergencies, the topology of the consensus network is updated to redetermine the chain order of each of the chain nodes; wherein the emergencies include the presence of potential malicious nodes, malicious head nodes, and changes in the chain nodes in the consensus network.
2. The drone network chain BFT consensus method according to claim 1 is characterized in that: The process of constructing the consensus network topology structure according to the self-organizing network topology structure and the consensus nodes includes: use represents the ad hoc network topology, where is the set of all the drones in the drone ad hoc network, E is the edge set in the drone ad hoc network, and the edge set is the total number of drone pairs in the drone ad hoc network. For a single drone, the drones that can directly transmit information within the line of sight of the drone and the drone are recorded as a drone pair; Abstracting the topology of the self-organizing network according to LoS, and obtaining a number of the drones from the drone self-organizing network as the consensus nodes; The self-organizing network topology structure and the positions of the consensus nodes are integrated to construct the consensus network topology structure, and a consensus node distance matrix ε is constructed based on the weights between the consensus nodes. Among them, y α,β Indicates P α consensus nodes and the P β The weight between consensus nodes; The weight is the minimum number of transmission paths required for communication between two consensus nodes, and a transmission path is a path for a single consensus node to directly transmit information to another consensus node.
3. The drone network chain BFT consensus method according to claim 2 is characterized in that: The process of optimizing the consensus network using the PSO algorithm includes: Recording a single chain sequence of each of the chain nodes in the consensus network as a single particle; Generate a number of particles in sequence, each particle forming a particle group; Initializing the particle group to generate a random chain order for each particle; The fitness value F of each particle consensus process in the consensus network is calculated in turn using the following formula: Among them, F is the weight of the consensus process, 2f+1 is the total number of chain nodes in the consensus node, and 3f+1 is the total number of consensus nodes. is the weight from P1 to P2f+1, is the weight from P2f+1 to P2f+2 to P3f+1, y γ,ξ For P γ The chain nodes and the P ξ The weight between the chain nodes, y 2f+1,η For P 2f+1 The chain nodes and the P η The weights between candidate chain nodes; Update the speed and position of each particle, increase the number of iterations and recalculate the fitness value F' based on each updated particle; Compare the F and F' of a single particle, retain the smaller fitness value, and store the chain sequence corresponding to the retained fitness value 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 optimal chain order for each consensus node is determined by the value, and the optimal chain order is stored in the global optimal position variable g best In order to complete the optimization of the chain sequence.
4. The drone network chain BFT consensus method according to claim 3 is characterized in that: The process of updating the velocity and position of each particle includes: After completing the calculation of the fitness value, the velocity of each particle is updated using the following formula: in, is the velocity of the ith particle at the zth iteration, W PSO is the inertia weight, C1 and C2 are learning factors, R1 and R2 are random numbers and R1∈(0,1), R2∈(0,1), is the position of the ith particle at the zth iteration, is the individual best position of the ith particle at the zth iteration, is the global optimal position of the particle swarm at the zth iteration; After completing the update of the velocity of each particle, the position of each particle is updated using the following formula:
5. The drone network chain BFT consensus method according to claim 1 is characterized in that: The process of chain consensus information transmission includes: The drone for receiving the interactive information is recorded as a client, the chain node as the head of the chain is recorded as a head node, and the chain node as the tail of the chain is recorded as a tail node; The client packages the interaction information into a transaction and forwards it to the head node so that the head node verifies the correctness of the transaction; When determining that the correctness of the transaction meets the standard, the head node assigns a sequence number and forms a transaction message with a corresponding format, and forwards the transaction message to 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 the transaction message to the client, and sends the 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 the chain node receives the feedback message sent by its successor chain node, the timing for the successor chain node is canceled and the feedback message is forwarded to the chain node located in the preceding order of the chain node; 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, and outputs corresponding synchronization instructions according to the transaction message to synchronize consensus and complete the processing of the transaction; The client resends the transaction when not receiving the response message and the transaction message sent by the tail node, or completes the transaction when receiving the response message and the transaction message sent by the tail node.
6. The drone network chain BFT consensus method according to claim 5 is characterized in that: The process of the consensus network re-determining the chain order of each of the chain nodes when the emergency situation is the presence of the potential malicious node includes: For a single chain node, when its timing for the corresponding subsequent chain node exceeds a preset value and the feedback message transmitted by the subsequent chain node is not received, the chain node sends a timeout message to the head node and the previous chain node; The preceding chain node cancels the timing when receiving the timeout information and transmits the timeout information forward in sequence, and 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, the chain node that sends the timeout message is recorded as an accusing node, and the subsequent chain node of the accusing node is recorded as an accused node. After completing the marking, the head node records the accusing node and the accused node as potential malicious nodes; When the head node receives the timeout information transmitted by the subsequent chain node, the accusing node and the accused node are changed to the candidate chain nodes, and the consensus network is re-optimized based on the PSO algorithm to complete the redetermination of the chain order of each chain node.
7. The drone network chain BFT consensus method according to claim 6 is characterized in that: When the head node receives the timeout information directly sent by several chain nodes, the chain node that sends the timeout information closest to the end of the chain sequence is recorded as the accusing node, the chain node that is the successor of the accusing node is recorded as the accused node, and the accusing node and the accused node are changed to the candidate chain nodes, and the updated consensus network is re-optimized based on the PSO algorithm to determine the chain sequence of each chain node in the consensus network; When the head node is the accusing node, the chain node being accused is recorded as the accused node, the accused node is changed to the candidate chain node, and the updated consensus network is re-optimized based on the PSO algorithm to determine the chain order of each chain node in the consensus network.
8. The drone network chain BFT consensus method according to claim 1 is characterized in that: The process of the consensus network re-determining the chain order of each of the chain nodes when the emergency situation is the presence of the malicious head node includes: When the head node fails to forward the transaction message to the subsequent chain node along the chain sequence, or forwards an erroneous transaction message to the subsequent chain node along the chain sequence, the head node is recorded as a malicious head node; Each of the chain nodes sets a corresponding timer according to the chain sequence 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 change the view according to the voting result, the head node is re-selected according to the ascending order of the numbers of the drones in the consensus network, and the updated consensus network is re-optimized based on the PSO algorithm to determine the chain sequence 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 a new view message of the view change; After the re-selected head node receives the view change message, it broadcasts the new view message to each of the chain nodes and regenerates the transaction message; When 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. When the chain node receives the new view message before the timer exceeds the preset value, it resets the timer and the timer.
9. The drone network chained BFT consensus method according to claim 1 is characterized in that: The process of the consensus network re-determining the chain sequence of each chain node when the emergency situation is a change of the chain node includes: When a single drone joins the consensus network, the 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, the consensus process in the consensus network is suspended, the signature of the request message is verified, and the request message is sent 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 drone joining the consensus network as a single chain node that has joined, broadcasts a message of the single chain node joining the consensus network to each chain node, places the single chain node that has joined at the corresponding position of the chain sequence, re-determines the chain sequence, and packages the request message into a single transaction; When a single consensus node exits the consensus network, the base station or the chain node exiting the consensus network sends an exit 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 of a single chain node exiting the consensus network to each of the chain nodes; The head node redetermines the chain order after a single chain node exits the consensus network, and packages the exit message into a single transaction.
10. The drone network chained BFT consensus method according to claim 9 is characterized in that: The process of updating the topology structure based on the chain nodes joining or exiting the consensus network 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 of the consensus node distance matrix according to the calculation formula, which is: e′=e new -e lod 。 Among them, ε′ is the change of the consensus node distance matrix, ε new is the updated consensus node distance matrix, ε old is the consensus node distance matrix After obtaining ε′, Γ is calculated according to the formula: C=1 T e′1 Among them, Γ is the value of the change in the consensus node distance matrix, 1 is a full-1 column vector with dimension N; When Γ≥N, the chain order is redetermined.
Citation Information
Patent Citations
Multi-unmanned aerial vehicle cooperative city perception method based on block chain
CN115903911A
Unmanned aerial vehicle cluster node authentication method and device, storage medium and processor
CN113225736A
Task-oriented unmanned aerial vehicle network lightweight asynchronous provable consensus method and application
CN116017509A
Method for realizing semi-synchronous BFT consensus in wireless communication protocol and wireless network
CN118413882A