Lightweight consensus method suitable for large-scale unmanned aerial vehicle cluster
By combining the Frost threshold signature algorithm and the HotStuff consensus algorithm in a large-scale drone cluster, the problems of traditional blockchain consensus algorithm’s large calculation load and multiple communication rounds are solved, reducing the calculation load and communication complexity, and improving the system throughput. Quantity effect.
Patent Information
- Application Number
- CN202411140181.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2025-01-21
AI Technical Summary
In large-scale drone clusters, traditional blockchain consensus algorithms such as HotStuff and Musig cannot meet scenarios with limited computing power, nodes may lose contact, and high latency requirements due to large computing volume and many communication rounds.
A lightweight consensus method is used to communicate between the master drone and the slave drone, using the combination of Frost threshold signature algorithm and HotStuff consensus algorithm to reduce communication rounds and calculations, and reduce communication complexity.
It reduces the amount of calculation, storage and communication complexity, reduces the transaction processing delay, improves the system throughput, and is suitable for large-scale drone cluster scenarios.
Smart Images

Figure CN119342464A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the fields of drone swarm technology and blockchain technology, and specifically relates to a lightweight consensus method suitable for large-scale drone clusters. Background Art
[0002] Clustered, autonomous, and intelligent drone swarms are an important development direction for drones in the future. Compared with single drone systems, drone swarms can take advantage of their scale to complete complex tasks, and have stronger survivability and cost advantages. When a single drone fails, other drones can replace it to complete the scheduled task, making the cluster system have high fault tolerance and self-healing capabilities. At the same time, drone swarms can cover a wider area and improve the efficiency and success rate of task execution. In order to reduce the complexity of communication, drone swarms are mostly managed by clustering. When clustered drone swarms perform tasks, they need to intelligently judge the situation based on the dynamic changes of the external environment and the administrator's instructions, make real-time flight decisions in an overall form, and reach consensus on strategies such as flight speed, position, angle, and flight action.
[0003] In large-scale drone clusters, blockchain technology is generally used to achieve task collaboration. It uses encryption algorithms, consensus mechanisms and other means to ensure the security and credibility of data, and has the advantages of decentralization, transparency, and immutability. However, blockchain transactions require verification and consensus from all nodes on the chain. In related technologies, the threshold signature of the traditional HotStuff consensus algorithm adopts a sequential verification method or an aggregate signature scheme such as Musig. Sequential verification requires a lot of calculations, and aggregate signature schemes such as Musig require multiple rounds of communication, which cannot meet the scenarios with limited computing power, possible node loss, and high latency requirements. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a lightweight consensus method suitable for large-scale drone clusters to meet the requirements of reducing computational complexity and reducing latency.
[0005] In order to achieve the above object, the present invention provides the following technical solutions:
[0006] According to the first aspect, an embodiment of the present invention provides a lightweight consensus method suitable for large-scale drone clusters, including: a master drone generates a proposal based on client instructions and qualification certificates and sends it to a slave drone; the slave drone verifies the legitimacy of the proposal and the qualification certificate, and when the verification is passed, signs the proposal based on the assigned private key fragments and commitment list to generate signature fragments and a new commitment, the commitment list is updated after the previous round of consensus, and the private key fragments are obtained by running a distributed key distribution protocol during the initialization process; the slave drone uses the signature fragments and the new commitment as votes for the proposal and sends them to the master drone; when the master drone receives the target number of votes verified by the corresponding drone public key, it aggregates multiple signature fragments to obtain an aggregate signature, and uses the aggregate signature and the new commitment list to generate a qualification certificate for the next round of proposals, thereby completing one round of voting, and achieving consensus on the client instructions after three rounds of voting, and the public key of the drone is obtained by running a distributed key distribution protocol during the initialization process.
[0007] Optionally, the proposal is signed according to the assigned private key fragments and the commitment list to generate signature fragments, including:
[0008] z i =d i +(e i ·ρ i )+λ i ·s i ·c
[0009] Among them, z i is the signature fragment from drone i, d i and e i is the random number used to generate the commitment from drone i, ρ i =H1(i,msg,B), msg is the message to be signed, B is the first target number of commitments in the commitment list, H1 is the hash function, λ i is the Lagrange coefficient, s i is the private key fragment from drone i, c = H2(R,Y,msg), Y is the public key, t is the consensus threshold and H2 is the hash function.
[0010] Optionally, after the master drone generates a proposal based on the client instructions and qualification certificate and sends it to the slave drone, the slave drone uses the signature fragments and the new commitment as votes for the proposal before sending it to the master drone, including: the slave drone determines the new master drone based on the total number of drones.
[0011] Optionally, a lightweight consensus method suitable for large-scale drone clusters also includes: when the slave drone times out on receiving a message, sending a view switch message to the master drone; after the master drone receives the view switch message, reordering the commitment list and arranging the commitments of the slave drones that send errors or do not send view switch messages at the end of the commitment list.
[0012] Optionally, before the master drone generates a proposal based on the client instruction and the qualification certificate and sends it to the slave drone, the drone cluster runs a distributed key distribution protocol, distributes private key fragments to each drone, and determines the public keys of other drones.
[0013] Optionally, the drone cluster runs a distributed key distribution protocol to distribute private key fragments to each drone and determine the public keys of other drones, including: each drone selects a random number corresponding to a consensus threshold value as a polynomial coefficient to generate a polynomial; the drone generates a knowledge proof based on the polynomial coefficients and calculates the public commitment of all coefficients; the drone broadcasts the knowledge proof and the public commitment to other drones so that the other drones can verify the authenticity of the received public commitment; when the drone receives the public commitments of all other drones and verifies the authenticity, it sends secret shares determined by the polynomial to the other drones respectively, and receives secret shares sent by all other drones; based on the secret shares received from all other drones, the drone obtains private key fragments and determines the public keys of other drones.
[0014] Optionally, the calculation formula for obtaining the private key fragments based on the secret shares received from all other drones is as follows:
[0015]
[0016] Among them, s i is the private key fragment of drone i, n is the total number of drones, f l (i) The secret share sent to drone l;
[0017] Other drones determine the public key Y of drone i i The formula is as follows:
[0018]
[0019] Among them, φ jk is the public commitment of the kth coefficient of drone j, q represents the order of the group predefined during the initialization process to run the distributed key distribution protocol, t is the consensus threshold, and n is the total number of drones.
[0020] According to the second aspect, an embodiment of the present invention provides a consensus method for a large-scale drone cluster, wherein the drone cluster includes multiple drone clusters, each drone cluster includes a cluster head node, and the method includes: when any drone cluster receives a client instruction, a lightweight consensus method suitable for a large-scale drone cluster as described in the first aspect or any embodiment of the first aspect is executed within the drone cluster to perform consensus; when the cluster head node detects that the consensus within the cluster has entered the consensus reaching stage, the cluster head node acts as a client and sends the client instruction to each cluster head node performing inter-cluster consensus; the cluster head nodes performing inter-cluster consensus execute a lightweight consensus method suitable for a large-scale drone cluster as described in the first aspect or any embodiment of the first aspect to perform inter-cluster consensus; when the inter-cluster consensus is completed, each cluster head node sends the client instruction to its respective cluster to complete the intra-cluster consensus, and each intra-cluster node executes the client instruction.
[0021] According to the third aspect, an embodiment of the present invention provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the steps of the lightweight consensus method applicable to large-scale drone clusters as described in the first aspect or any implementation scheme of the first aspect, or the consensus method for large-scale drone clusters as described in the second aspect.
[0022] According to the fourth aspect, an embodiment of the present invention provides a computer storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the lightweight consensus method applicable to large-scale drone clusters described in the first aspect or any embodiment of the first aspect, or the consensus method for large-scale drone clusters described in the second aspect.
[0023] The embodiment of the present invention provides a lightweight consensus method suitable for large-scale drone clusters. All communications occur between the master drone and the slave drones, and the time complexity of the communication is reduced by O(n 2) is reduced to O(n), and this embodiment uses the Frost threshold signature algorithm. Frost is the optimal round of Schnorr threshold signature, and the threshold signature value can be obtained through two rounds of communication. Frost is based on the Schnorr signature algorithm, and has the characteristics of high security, small calculation amount, and fast signing speed. Frost is used in HotStuff to design the steps of signing the proposal according to the assigned private key fragments and the commitment list, generating signature fragments, and generating new commitments, without the need to design additional communication rounds for the Frost signature, reducing the two rounds of communication to one round, and all messages between drones need to be signed and verified. This method can be applied to the scenario of large-scale drone clusters, which can greatly reduce the amount of calculation, storage and communication complexity, and realize the lightweight of the blockchain system in terms of calculation, storage and communication, thereby reducing transaction processing delays and improving system throughput.
[0024] Other advantages, objectives and features of the present invention will be described in the following description and will be apparent to those skilled in the art to some extent, or those skilled in the art may be taught from the practice of the present invention. The objectives and other advantages of the present invention may be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to make the purpose, technical solution and beneficial effects of the present invention clearer, the present invention provides the following drawings for illustration:
[0026] Figure 1 A specific example flow chart of a lightweight consensus method applicable to large-scale drone clusters provided by the present invention;
[0027] Figure 2 A schematic diagram of the proposed structure designed for the present invention to execute the consensus algorithm in a pipeline manner;
[0028] Figure 3 A schematic diagram of the specific voting format proposed for the present invention;
[0029] Figure 4 This is a schematic diagram of a lightweight blockchain system suitable for large-scale drone clusters according to the present invention;
[0030] Figure 5 It is a principle block diagram of a specific example of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION
[0031] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0032] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, it can also be the internal connection of two components, it can be a wireless connection, or it can be a wired connection. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0033] In addition, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0034] This embodiment provides a lightweight consensus method suitable for large-scale drone clusters. Figure 1 As shown, including:
[0035] S101, the master drone generates a proposal based on the client instruction and qualification certificate and sends it to the slave drone;
[0036] S103, verify the legitimacy of the proposal and the qualification certificate from the drone. When the verification is passed, sign the proposal according to the assigned private key fragments and commitment list, generate signature fragments, and generate new commitments. The commitment list is updated after the previous round of consensus, and the private key fragments are obtained by running the distributed key distribution protocol during the initialization process;
[0037] S105, the slave drone sends the signature fragment and the new commitment as a vote for the proposal to the master drone;
[0038] S107, when the master drone receives the target number of votes verified by the corresponding drone public key, it aggregates multiple signature fragments to obtain an aggregate signature, and uses the aggregate signature and the new commitment list to generate a qualification certificate for the next round of proposals, thereby completing a round of voting. After three rounds of voting, a consensus on the client instructions is achieved. The public key of the drone is obtained by running the distributed key distribution protocol during the initialization process.
[0039] Exemplarily, in an embodiment, in order to adapt to large-scale drone clusters, an improved HotStuff consensus algorithm is used. The HotStuff consensus algorithm is improved on the basis of the PBFT consensus algorithm. It can achieve that when the number of error nodes is f and the total number of nodes n is greater than 3f, all nodes can reach a strategic consensus, that is, 3f+1≤n. The HotStuff consensus algorithm includes client nodes, master nodes Leader and replica nodes Replica. Its communication network changes from the mesh topology of PBFT to a star topology. The entire algorithm process is mainly divided into four stages: Prepare stage, Pre-commit stage, Commit stage and Decide stage. In all stages, the Leader node sends messages to all Replica nodes, the Replica nodes vote on the messages, and the Leader collects the votes of the Replica nodes.
[0040] Specifically, after the drone takes off, all drones enter the consensus phase. First, all drones generate the Genesis block. Let the number of drones in the cluster be n, and the drone numbers be (0, 1, 2, 3, ..., n-1). Calculate m = H (Genesis) mod n. The first round of consensus will use drone m as the master drone, and the other drones as slave drones. Since the actions of the four stages of the HotStuff consensus algorithm are the same, this embodiment uses a pipelined approach to execute the consensus algorithm. The proposed structure is designed as follows: Figure 2 As shown, in each round, the master drone packages the client instruction Cmd and the qualification certificate QC generated in the previous round, the hash value of the parent block (parenthash), and the hash value of this round (hash) together to generate a proposal, and broadcasts the proposal as a proposal to all slave drones. After receiving the proposal, the slave drone verifies the legitimacy of the proposal and the qualification certificate QC. If the verification passes, the proposal is voted on. The voting method is to use its own private key fragments and the proposed commitment list (commitment list) to calculate the signature (sig) of the proposal and generate signature fragments. The private key fragments are obtained by running the distributed key distribution protocol by the drone cluster in the initialization phase. In addition, the slave drone will also generate two random numbers to calculate its new commitment. The slave drone generates two random numbers (d′ i ,e′ i ), calculate its new commitment (D′ i ,E′ i ) can be:
[0041] The initial commitment list is obtained by running the distributed key distribution protocol in the drone cluster during the initialization phase. New commitments will be generated in each subsequent round of consensus, and the commitment list used in each round of consensus is updated after the previous round of consensus.
[0042] As an optional implementation, after receiving the proposal, the slave drone determines the new master drone based on the total number of drones, specifically by calculating m'=H(proposal)mod n, and letting m' be the new master drone, and the slave drone verifies the legitimacy of the proposal and the qualification certificate. When the verification is passed, the proposal is signed according to the assigned private key fragments and the commitment list, a signature fragment is generated, and a new commitment is generated.
[0043] The signature fragments were sent from the drone i and the new commitment (D′ i ,E′ i ) into a target format, such as Figure 3 As shown in Figure 1, it is sent to the new master drone as a vote for this proposal. After receiving t (i.e., nf) votes, where n represents the total number of drones and f represents the number of drones that can tolerate errors, the master drone verifies multiple signature fragments z according to the public key. i Correctness can be determined by verifying whether the following formula is true:
[0044]
[0045] Where g represents the group (G, q, g) predefined in the distributed key distribution protocol during the initialization process, G is a cyclic group of order q, g is the generator of G, and z i For the signature fragment from the drone i, ρ i =H1(i,msg,B), msg is the message to be signed, B is the first t commitments in the commitment list, t is the threshold value, Y i is the public key fragment from drone i, λ i is the Lagrange coefficient, c=H2(R,Y,msg), Y is the public key, H1 and H2 are hash functions, where H1 is involved in the calculation of the commitment and H2 is used for the final signature.
[0046] When the verification is passed, the signature fragment z i Aggregate into signature Z, and split signature fragment z i The way to aggregate the signature Z can be to use the following formula:
[0047]
[0048] At the same time, all the commitments in the vote (D′ i ,E′ i) is saved and a new commitment list is formed. The aggregate signature Z and the new commitment list will be packaged into a new qualification certificate QC as the qualification certificate QC for the next proposal. When the proposal is sent to the slave drone, the slave drone will determine the correctness of the aggregate signature by verifying whether the following formula is true:
[0049]
[0050] in, ρ i =H1(i,msg,B), msg is the message to be signed, B is the first t commitments in the commitment list, H1 is the hash function, Z represents the aggregate signature, c=H2(R,Y,msg), Y is the public key, and H2 is the hash function.
[0051] If the verification is successful, it means that at least t (i.e., nf) drones have agreed to the last proposal.
[0052] It should be further explained that this embodiment introduces Frost threshold signature under the framework of HotStuff consensus algorithm and makes improvements to it, which are specifically described as follows:
[0053] According to the Frost threshold signature principle, two rounds of communication are required to complete the signature. In the first round, all participants send their commitments to the aggregator; in the second round, the aggregator sends the aggregated commitments to all participants, the participants calculate the signature fragments, and the aggregator collects all the signature fragments to obtain the aggregated signature. In this embodiment, by combining the Frost threshold signature with the HotStuff consensus, there is no need to design additional communication rounds for the Frost signature. The specific method is that after receiving the proposal from drone i, the first t (i.e., nf) commitments in the commitment list are used as signature elements to calculate the signature fragments, as follows:
[0054] z i =d i +(e i ·ρ i )+λ i ·s i ·c
[0055] z i is the signature fragment from drone i, d i and e i is the random number used to generate the commitment from drone i, ρ i =H1(i,msg,B), msg is the message to be signed, B is the first t commitments in the commitment list, H1 is the hash function, λi is the Lagrange coefficient, n is the total number of drones, s i is the private key fragment from drone i, c = H2(R,Y,msg), Y is the public key, t is the consensus threshold value, and H2 is the hash function. After that, the slave drone generates a new commitment and packages the signature fragment and the new commitment as a vote for this proposal and sends it to the master drone. The new commitment will be used to sign the next proposal, thus achieving the goal of combining Frost threshold signature and HotStuff consensus, and no longer needing to add additional communication rounds for Frost signature.
[0056] The embodiment of the present invention provides a lightweight consensus method suitable for large-scale drone clusters. All communications occur between the master drone and the slave drones, and the time complexity of the communication is reduced by O(n 2 ) is reduced to O(n), and this embodiment uses the Frost threshold signature algorithm. Frost is the optimal round of Schnorr threshold signature, and the threshold signature value can be obtained through two rounds of communication. Frost is based on the Schnorr signature algorithm, and has the characteristics of high security, small calculation amount, and fast signing speed. Frost is used in HotStuff to design the steps of signing the proposal according to the assigned private key fragments and the commitment list, generating signature fragments, and generating new commitments, without the need to design additional communication rounds for the Frost signature, reducing the two rounds of communication to one round, and all messages between drones need to be signed and verified. This method can be applied to the scenario of large-scale drone clusters, which can greatly reduce the amount of calculation, storage and communication complexity, and realize the lightweight of the blockchain system in terms of calculation, storage and communication, thereby reducing transaction processing delays and improving system throughput.
[0057] As an optional implementation, a lightweight consensus method suitable for large-scale drone clusters also includes: when the slave drone times out on receiving a message, sending a view switch message to the master drone; after the master drone receives the view switch message, reordering the commitment list, and arranging the commitments of the slave drones that send errors or do not send view switch messages at the end of the commitment list.
[0058] For example, in a large-scale drone cluster self-organizing network, there are frequent situations where drones lose connection, exit, or are controlled by an adversary. In the Frost threshold signature process, if there is a drone disconnection or other malicious behavior in the first t commitments in the commitment list, this signature verification will fail. At this time, all slave drone nodes will detect a timeout and need to send a view switch (New-View) message to the new master drone, but there is no need to regenerate a new commitment. After the new master drone receives the view switch (New-View) message, it will reorder the commitment list. For the slave drone node that sends a normal view switch (New-View) message, it means that the node is in a normal state, and its commitment is placed at the head of the commitment list. If the slave drone node sends an error or does not send a view switch (New-View) message, its last sent commitment will be placed at the end of the commitment list. In this way, it is ensured that the corresponding node in the commitment list used each time is online and normal, and the timeout view switch can be completed at a relatively low cost.
[0059] This embodiment provides a lightweight consensus method suitable for large-scale drone clusters. By actively changing attempts, the impact of malicious master nodes on system operation is reduced. This method is suitable for scenarios with a large number of network nodes and a complex network environment, especially scenarios where some nodes in a drone self-organizing network frequently lose connection. As long as the number of lost nodes is less than f, the consensus algorithm can still enable all nodes to reach a consensus.
[0060] As an optional implementation, before the master drone generates a proposal based on the client instruction and the qualification certificate and sends it to the slave drone, the following steps are performed: the drone cluster runs a distributed key distribution protocol, distributes private key fragments to each drone, and determines the public keys of other drones.
[0061] For example, before taking off, all drones need to run a distributed key distribution protocol to configure private key fragments for the drone. First, each drone selects a random number corresponding to the consensus threshold as a polynomial coefficient to generate a polynomial. Specifically, a group (G, q, g) is defined, where G is a q-order cyclic group and g is a generator of G. Each drone P i Select t random numbers t is the threshold value for reaching consensus, and they are used as the coefficients of the t-1 degree polynomial, that is:
[0062]
[0063] The drone generates a proof of knowledge based on the polynomial coefficients and calculates the public commitment of all coefficients. Specifically, each drone P i Pick a random number Calculate a i0 Proof of knowledge σ i =(R i ,μi ), where R i =g k , μ i =k+a i0 ·c i , c i Contains a i0 Information can be At the same time, P i Calculate all coefficients for public commitment in 0≤j≤t-1.
[0064] The drone broadcasts the knowledge proof and public commitment to other drones so that other drones can verify the authenticity of the received public commitment. Specifically, P i Will Broadcast to other drones in the cluster, and other drones receive Afterwards, by calculating Verify the authenticity of the received public commitment and delete the proof of knowledge σ once verification is successful i .
[0065] When a drone receives the public commitments of all other drones and verifies their authenticity, it sends secret shares determined by the polynomial to each of the other drones and receives secret shares sent by all other drones. Specifically, after obtaining the public commitments of all other drones, After that, each drone P i Give other drones P l Send(l,f i (l)), 1≤l≤n is taken as its secret share, and other drones l calculate the following formula to verify the correctness of the secret share.
[0066]
[0067] Among them, φ lk is the public commitment of the kth coefficient of drone l, q represents the order of the group predefined by the distributed key distribution protocol during the initialization process, t is the consensus threshold, and g is the generator during the initialization process.
[0068] Each drone P i After collecting the secret shares of all other participants, the private key fragment is obtained based on the secret shares sent by all other drones. The private key fragment s i The calculation method is:
[0069]
[0070] Private key fragments i The corresponding public key fragment is Other drones can also calculate P by the following formula: i The public key fragment of:
[0071]
[0072] Among them, φ jk is the public commitment of the kth coefficient of drone j, q represents the order of the group predefined during the initialization process to run the distributed key distribution protocol, t is the consensus threshold, and n is the total number of drones.
[0073] make:
[0074]
[0075] s=F(0) is the threshold signature private key, and its corresponding public key is By s i =F(i), after obtaining t private key fragments, the private key s can be obtained, that is:
[0076]
[0077] where λ i is the Lagrange coefficient, that is:
[0078]
[0079] After the distributed key distribution protocol in the preprocessing stage, each drone P i All have private key fragments i and the public key Y of other drones j Finally, all drones generate random numbers (d i ,e i ), calculate the corresponding commitment And (i,D i ,E i ) is sent to other drones in the cluster. In this way, all drones have the initial commitment list Commitment List B=((1,D1,E1),...,(n,D n ,E n )).
[0080] The specific algorithms for drone cluster initialization, consensus, and view switching are given below:
[0081]
[0082]
[0083] An embodiment of the present invention provides a consensus method for a large-scale drone cluster, wherein the drone cluster includes multiple drone clusters, each drone cluster includes a cluster head node, and the method includes:
[0084] When any drone cluster receives a client instruction, a lightweight consensus method suitable for large-scale drone clusters as described in the above embodiment is executed within the drone cluster for consensus; when the cluster head node detects that the consensus within the cluster has entered the consensus reaching stage, the cluster head node, as a client, sends the client instruction to each cluster head node that performs inter-cluster consensus; the cluster head nodes that perform inter-cluster consensus execute a lightweight consensus method suitable for large-scale drone clusters as described in the above embodiment for inter-cluster consensus; when the inter-cluster consensus is completed, each cluster head node sends the client instruction to its own cluster to complete the intra-cluster consensus, and each intra-cluster node executes the client instruction.
[0085] For example, as the scale of unmanned clusters expands, if only a single clustering structure is adopted, the complexity of intra-cluster communication will increase dramatically, which will significantly reduce the efficiency of transaction processing. In addition, considering the needs of self-organizing unmanned clusters in collaborative decision-making, they must be able to execute established instructions and make dynamic joint decisions according to real-time changes in the battlefield environment. If the devices in the cluster do not use a consensus algorithm and rely on a single leader device, once the leader device is hacked by an attacker, all the actions of the unmanned cluster will be controlled by the attacker, and overall consistency decisions cannot be achieved, with low security and poor fault tolerance. At the same time, if there is a lack of an effective consensus decision-making consensus algorithm between multiple clusters, the decision results of each cluster may be inconsistent, and it will be impossible to achieve multi-cluster collaborative, safe, efficient and dynamic combat decisions.
[0086] This embodiment designs a lightweight blockchain system suitable for large-scale drone clusters. Figure 4 As shown in the figure, all drones are divided into different clusters according to their geographical location and communication relationship. In each cluster, there is a cluster head node and ordinary intra-cluster nodes. The above-mentioned lightweight consensus method applicable to large-scale drone clusters is run in the cluster. In addition, in order to ensure that all clusters reach an agreement on the instructions of the client, the above-mentioned lightweight consensus method applicable to large-scale drone clusters is also run between clusters, and the cluster heads of each cluster serve as consensus nodes of the inter-cluster consensus algorithm. Considering that the cluster head node must run both the intra-cluster consensus process and the inter-cluster consensus process, drones with more power, stronger computing power, and larger communication bandwidth are selected as cluster head nodes. In each cluster, the intra-cluster drones serve as intra-cluster consensus nodes and run the above-mentioned lightweight consensus method applicable to large-scale drone clusters for consensus. Between clusters, the cluster head nodes of each cluster serve as inter-cluster consensus nodes, and also run the above-mentioned lightweight consensus method applicable to large-scale drone clusters for consensus.
[0087] When a cluster receives a client instruction, the main drone node of the cluster will first package the client instruction with the QC generated by the last proposal to generate a new proposal. After three votes, the intra-cluster consensus enters the Decide stage. The cluster head node detects that the instruction has entered the Decide stage and will send the instruction to each node of the inter-cluster consensus as a client. After each node of the inter-cluster consensus receives the instruction, the main drone node of the inter-cluster consensus will also package the instruction with the QC generated by the last proposal to generate a new proposal, and start a new consensus between the cluster heads of each cluster. After three votes, all cluster heads reach a consensus on the instruction. At this time, the cluster head of the cluster where the initiator of the instruction is located will send a broadcast packet to notify the nodes of its cluster to execute the instruction. At the same time, the cluster heads of other clusters will send the instruction to the nodes of their clusters as clients to start the intra-cluster consensus of their clusters. After the intra-cluster consensus of each cluster is completed, each node in the cluster directly executes the instruction, and the entire drone cluster will reach a consensus on the instruction.
[0088] See Algorithm 2 for the specific process.
[0089]
[0090] The present application also provides an electronic device, such as Figure 5 As shown, a processor 501 and a memory 502, wherein the processor 501 and the memory 502 may be connected via a bus or other means.
[0091] The processor 501 may be a central processing unit (CPU). The processor 501 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.
[0092] The memory 502 is a non-transient computer-readable storage medium that can be used to store non-transient software programs, non-transient computer executable programs and modules, such as the lightweight consensus method for large-scale drone clusters or the program instructions / modules corresponding to the consensus method for large-scale drone clusters in the embodiments of the present invention. The processor executes various functional applications and data processing of the processor by running the non-transient software programs, instructions and modules stored in the memory.
[0093] The memory 502 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory 502 may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0094] The one or more modules are stored in the memory 502, and when executed by the processor 501, the following is performed: Figure 1 The illustrated embodiment provides a lightweight consensus method suitable for large-scale drone clusters or a consensus method for large-scale drone clusters.
[0095] For details of the above electronic equipment, please refer to Figure 1 The corresponding related descriptions and effects in the illustrated embodiments can be understood and will not be repeated here.
[0096] This embodiment also provides a computer storage medium, which stores computer executable instructions, and the computer executable instructions can execute the lightweight consensus method for large-scale drone clusters or the consensus method for large-scale drone clusters in any of the above method embodiments. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk (HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above types of memory.
[0097] Finally, it should be noted that the above preferred embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail through the above preferred embodiments, those skilled in the art should understand that various changes can be made in form and details without departing from the scope defined by the claims of the present invention.
Claims
1. A lightweight consensus method suitable for large-scale drone clusters, characterized in that: include: The master drone generates a proposal based on the client instructions and qualification certificate and sends it to the slave drones; The drone verifies the legitimacy of the proposal and the qualification certificate. When the verification is passed, the proposal is signed according to the assigned private key fragments and commitment list, and a signature fragment is generated, and a new commitment is generated. The commitment list is updated after the previous round of consensus, and the private key fragments are obtained by running the distributed key distribution protocol during the initialization process; The slave drone sends the signature fragment and the new commitment as a vote for the proposal to the master drone; When the master drone receives the target number of votes verified by the corresponding drone public key, it aggregates multiple signature fragments to obtain an aggregate signature, and uses the aggregate signature and the new commitment list to generate a qualification certificate for the next round of proposals, thereby completing a round of voting. After three rounds of voting, consensus on the client instructions is achieved. The public key of the drone is obtained by running the distributed key distribution protocol during the initialization process.
2. A lightweight consensus method suitable for large-scale drone clusters according to claim 1, characterized in that: The proposal is signed according to the assigned private key fragments and commitment list to generate signature fragments, including: z i =d i +(e i ·r i )+λ i ·s i ·c Among them, z i is the signature fragment from drone i, d i and e i is the random number used to generate the commitment from drone i, ρi=H1(i,msg,B), msg is the message to be signed, B is the first target number of commitments in the commitment list, H1 is the hash function, λ i is the Lagrange coefficient, s i is the private key fragment from drone i, c = H2(R,Y,msg), Y is the public key, t is the consensus threshold and H2 is the hash function.
3. A lightweight consensus method suitable for large-scale drone clusters according to claim 1 or 2, characterized in that: After the master drone generates a proposal based on the client instructions and qualification certificate and sends it to the slave drone, the slave drone will use the signature fragments and new commitments as votes for the proposal before sending them to the master drone, including: The slave drone determines the new master drone based on the total number of drones.
4. A lightweight consensus method suitable for large-scale drone clusters according to claim 3, characterized in that: Also includes: When the slave drone times out receiving messages, it sends a view switching message to the master drone; After receiving the view switch message, the master drone reorders the commitment list and arranges the commitments of the slave drones that send errors or do not send view switch messages at the end of the commitment list.
5. According to claim 1, a lightweight consensus method suitable for large-scale drone clusters is characterized in that: The master drone generates a proposal based on the client instructions and qualification certificate before sending it to the slave drone, including: The drone swarm runs a distributed key distribution protocol to assign private key fragments to each drone and determine the public keys of other drones.
6. A lightweight consensus method suitable for large-scale drone clusters according to claim 5, characterized in that: The drone swarm runs a distributed key distribution protocol to assign private key fragments to each drone and determine the public keys of other drones, including: Each drone selects a random number corresponding to the consensus threshold as a polynomial coefficient and generates a polynomial; The drone generates a proof of knowledge based on the polynomial coefficients and computes a public commitment for all coefficients; The drone broadcasts the knowledge proof and the public commitment to other drones so that other drones can verify the authenticity of the received public commitment; When a drone receives the public commitments of all other drones and verifies the authenticity, it sends secret shares determined by the polynomial to other drones respectively, and receives secret shares sent by all other drones; Based on the secret shares received from all other drones, the private key fragments are obtained and the public keys of other drones are determined.
7. A lightweight consensus method suitable for large-scale drone clusters according to claim 6, characterized in that: According to the secret shares received from all other drones, the calculation formula for obtaining the private key fragments is as follows: Among them, s i is the private key fragment of drone i, n is the total number of drones, f l (i) The secret share sent to drone l; Other drones determine the public key Y of drone i i The formula is as follows: Among them, φ jk is the public commitment of the kth coefficient of drone j, q represents the order of the group predefined during the initialization process to run the distributed key distribution protocol, t is the consensus threshold, and n is the total number of drones.
8. A consensus method for large-scale drone swarms, characterized in that: The drone cluster includes a plurality of drone clusters, each drone cluster includes a cluster head node, and the method includes: When any drone cluster receives a command from the client, a lightweight consensus method applicable to a large-scale drone cluster as described in any one of claims 1 to 7 is executed in the drone cluster to reach a consensus; When the cluster head node detects that the intra-cluster consensus has entered the consensus reaching stage, the cluster head node acts as a client and sends the client instruction to each cluster head node for inter-cluster consensus; The cluster head node for performing inter-cluster consensus performs a lightweight consensus method applicable to a large-scale UAV cluster as described in any one of claims 1 to 7 for performing inter-cluster consensus; When the inter-cluster consensus is completed, each cluster head node sends the client command to its own cluster to complete the intra-cluster consensus, and each node in the cluster executes the client command.
9. An electronic device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the steps of the lightweight consensus method applicable to large-scale drone clusters as described in any of claims 1-7 or the steps of the consensus method for large-scale drone clusters as described in claim 8.
10. A computer storage medium having computer instructions stored thereon, characterized in that: When the instruction is executed by the processor, it implements the steps of the lightweight consensus method applicable to large-scale drone clusters as described in any one of claims 1-7 or the steps of the consensus method for large-scale drone clusters as described in claim 8.
Citation Information
Cited By
Unmanned aerial vehicle formation safe flight management method and system based on lightweight block chain
CN121418825A