A collaborative filtering algorithm-based method for electing cross-chain notary nodes in a drone swarm blockchain.
By electing cross-chain notary nodes based on collaborative filtering algorithms, the security risks and high operating costs of centralized nodes in cross-chain interactions of drone swarms are resolved, enabling more efficient, secure, and transparent cross-chain interactions and improving the reliability and impartiality of drone swarms.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-19
- Publication Date
- 2026-04-03
AI Technical Summary
Existing cross-chain interactions in drone swarms suffer from security risks associated with centralized notary nodes, high operating costs, insufficient transparency, and decentralization issues, affecting the reliability and impartiality of the network.
A cross-chain notary node election method based on collaborative filtering algorithm is adopted. By collecting drone node information, a node scoring matrix is constructed, and the node similarity is calculated using cosine similarity. The most suitable node is selected as the cross-chain notary to ensure the reliability and fairness of cross-chain interaction.
It improves the accuracy and efficiency of cross-chain interactions, enhances network security, prevents malicious attacks, and improves the stability and transparency of drone swarms.
Smart Images

Figure CN116842274B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of blockchain technology for drone swarm applications. Background Technology
[0002] There are already some research and practical cases regarding the application of blockchain technology in drone swarms. Blockchain technology can provide drone swarms with distributed ledger and data management, as well as smart contract functions, thereby enabling autonomous decision-making, intelligent collaboration, and self-management. For example, through blockchain and cross-chain technologies, drone swarms can be widely applied in logistics, traffic management, environmental monitoring, and other fields, improving operational efficiency and security in these areas. Furthermore, the application of drone swarms can be extended to areas such as medical rescue and military operations to support the completion of specific missions.
[0003] Furthermore, due to the significant differences in application scenarios and needs of drone swarms, different drone swarms may choose different blockchain structures to meet their specific business needs and security requirements. For example, some drone swarms may choose public blockchains, while others may be more suitable for consortium blockchains or private blockchains.
[0004] In this context, research on blockchain cross-chain technology for drone swarms is of great significance. Cross-chain technology can realize data exchange and value transfer between different blockchains, further expanding the application scope and business scenarios of drone swarms, and will help promote the further development and application of drone swarm technology.
[0005] The background technology of this invention mainly relates to blockchain technology, collaborative filtering algorithms, and drone swarm control technology.
[0006] Blockchain technology is a distributed database technology that uses cryptographic and consensus algorithms to ensure data security and trustworthiness, enabling decentralized data sharing and exchange. Blockchain technology can be applied to fields such as digital currency, smart contracts, and the Internet of Things, and has broad application prospects.
[0007] Collaborative filtering algorithm: Collaborative filtering is a recommendation algorithm based on users' historical behavior data. It analyzes users' behavioral preferences, calculates the similarity between users, and thus recommends similar items. Collaborative filtering has wide applications in recommendation systems, social networks, and other fields.
[0008] Unmanned Aerial Vehicle (UAV) swarm control technology: This technology involves grouping multiple UAVs into a swarm and achieving swarm movement, perception, and cooperation through coordinated control. UAV swarm control technology has broad application prospects in military, civilian, and scientific research fields.
[0009] Traditional blockchain networks typically employ centralized notary nodes for cross-chain communication. A centralized notary mechanism, on the other hand, is a mechanism where a small number of notary nodes control transaction confirmation and data flow within the network.
[0010] Simple majority voting: In this scheme, notary nodes decide the validity of a transaction through a simple majority vote. For example, if there are 5 notary nodes in the network, at least 3 nodes need to agree on the transaction for it to be confirmed. This scheme is simple and easy to implement, but it may have potential security risks because controlling only a portion of the nodes can influence the entire system.
[0011] Committee Mechanism: In this scheme, a fixed set of notary nodes are selected as committee members, who have the right to confirm and verify transactions. This scheme is relatively secure because the identities of committee members are fixed, making it difficult for attackers to control the entire system by attacking a single node. However, this also means that committee members have a high degree of power and control, which may lead to some fairness and transparency issues.
[0012] Expert review: In this approach, a team of experts reviews and verifies transactions. This approach may be more secure and reliable because expert review teams typically have higher technical skills and experience, but it can also lead to centralization issues and may require higher costs to hire such teams.
[0013] Single point of failure: The centralized notary node is a single point of failure. Once the node crashes or is attacked, the reliability of the entire system will be affected.
[0014] Vulnerable to attacks: Attackers can target centralized notary nodes, altering or blocking transactions by attacking them. Furthermore, if attackers gain control of a majority of the notary nodes, they can control the entire network through a so-called "51% attack."
[0015] High operating costs: Operating a centralized notary node requires a large amount of computing and storage resources, which leads to high operating costs.
[0016] Lack of transparency and decentralization: The actions and decisions of centralized notary nodes are often controlled by a small number of individuals or organizations, resulting in a lack of transparency and decentralization. This means that users cannot fully trust the decisions of notary nodes and may need to pay higher costs to ensure their security and reliability. Summary of the Invention
[0017] The purpose of this invention is to provide a cross-chain notary node election method for blockchain-structured drone swarms, ensuring the reliability and fairness of cross-chain interactions. Currently, with the development of drone technology and the expansion of application scenarios, the demand for cross-chain interactions between drone swarms is increasing. The reliability and fairness of cross-chain interactions are crucial for ensuring the security and stability of drone swarms. Therefore, this invention aims to provide a feasible cross-chain notary node election method to meet the cross-chain interaction needs of drone swarms.
[0018] The present invention provides a cross-chain notary node election method for blockchain-structured drone swarms based on collaborative filtering algorithms. This method mainly includes the following steps:
[0019] (1) Collect node information: In a drone cluster with a blockchain structure, each drone has an ID. Therefore, information on the collaboration between drones and other drones can be collected. The number of times a drone collaborates with a specific drone can be counted. The drone's flight speed, flight altitude, flight time, payload weight, positioning accuracy, and attitude accuracy can also be collected. This information is used as a weighted element of the drone's performance indicators.
[0020] (2) Constructing a node rating matrix: Based on the collected node information, a node similarity matrix can be constructed, and a node rating matrix can be constructed. Each element in the matrix represents the rating between a node and other nodes.
[0021] (3) Using collaborative filtering algorithm: Using collaborative filtering algorithm, based on the node rating matrix, calculate the similarity score of each node with other nodes, and select the most suitable node as a cross-chain notary node based on the similarity score.
[0022] (4) Node election: Select the most suitable node to serve as a cross-chain notary node. This node will be responsible for notarizing the cross-chain interaction to ensure the reliability and fairness of the cross-chain interaction.
[0023] (5) Use the selected group of notaries for cross-chain collaboration
[0024] (1) Based on the collaborative filtering algorithm, the election results are more accurate and reliable.
[0025] (2) It can fully consider the similarity between nodes, making the election results more equitable.
[0026] (3) It is highly applicable to blockchain-structured drone clusters.
[0027] Effects of the present invention
[0028] Improving election accuracy: Collaborative filtering algorithms can use data such as the historical performance and reputation of nodes to accurately assess the strength and potential of each node, thereby selecting the most suitable node to serve as a cross-chain notary node.
[0029] Enhanced interaction efficiency: The election results of cross-chain notary nodes can make cross-chain interactions in the blockchain network more efficient and stable, thereby improving the overall network interaction efficiency.
[0030] Enhanced security: By electing the most suitable node as a cross-chain notary node, attacks and fraudulent activities by malicious nodes can be effectively prevented, thereby ensuring the security of the entire blockchain network. Attached Figure Description
[0031] Figure 1 Cross-chain collaboration graph
[0032] Figure 2 UAV node similarity matrix Detailed Implementation
[0033] (1) Collection of node information: Node information is collected by periodic updates; the update cycle is determined, an automated script is written, and the script is written in Python scripting language. The information collection and update are realized by calling the API. The script is set to a timed task to trigger the information collection and update operation at regular intervals; the written automated script is deployed to the server. Information on the collaboration between the UAV and other UAVs is collected, the number of times the UAV collaborates with a specific UAV is counted (n), and the flight speed (v), flight altitude (h), flight time (t), payload weight (m), positioning accuracy (k), and attitude accuracy (p) of the UAV are collected. The weighted sum of these information values is used as the performance index of the UAV. These information values are divided into ten intervals and scored as 1, 2, 3...10. The score is the score of the interval in which the UAV is located. The weight of each index is 1. Finally, the weighted sum of these scores is the performance index value.
[0034] (2) Construction of the similarity matrix:
[0035] Node-Rating Matrix Construction: The rating vector for node A is equal to an array of values obtained by multiplying the number of interactions between node A and nodes x1, x2, x3...xn by the corresponding performance metrics of the two nodes. This results in the node vector.
[0036] b. Similarity Matrix Construction: Specifically, assuming there are n nodes, an n x n similarity matrix can be constructed, where each element represents the similarity score between two nodes. The similarity score uses cosine similarity as shown in equation (1) as the similarity calculation method, and the matrix can be constructed as follows: Figure 2 The similarity matrix.
[0037] Where sim(i,j) represents the similarity between node i and node j, a i and a j Let |a| represent the score vectors of nodes i and j. j ||and||a j || represents the magnitude of the score vectors for nodes i and j.
[0038] The cosine similarity value ranges from -1 to 1. A value closer to 1 indicates greater similarity between the rating vectors of the two nodes, while a value closer to -1 indicates less similarity. A value of 0 indicates that the rating vectors of the two nodes are completely unrelated. Each element in the matrix represents the similarity score between two nodes; a higher score indicates greater similarity.
[0039] Implementation of the collaborative filtering algorithm: Based on the node similarity matrix, a neighborhood-based collaborative filtering algorithm is used to predict node scores, and the neighborhood size is determined by cross-validation. For each node, the weighted scores of the nodes in the neighborhood num are used to predict the node's score. The weights are the node performance indicators, and the scores are the similarity scores. In this way, the predicted score of each node can be obtained, and then the node with the higher predicted score is selected as the notary node.
[0040] (3) Implementation of the collaborative filtering algorithm: First, select the neighborhood size using cross-validation. Divide the dataset into k subsets, one of which is used as the validation set and the remaining k-1 subsets are used as the training set. For each neighborhood size, train the neighborhood-based collaborative filtering model using the training set and evaluate the model performance using the validation set. Repeat this process until all subsets are used as the validation set. Evaluate the model performance. Select the neighborhood size by comparing the performance (accuracy, precision, recall, F1) of different neighborhood sizes to select the optimal neighborhood size num. Based on the obtained neighborhood size num, each node selects the num nodes with the highest node similarity and uses the weighted scores of these nodes to predict the score of the node. The weight is the node performance score, and the score is the similarity score. Finally, sort the nodes according to the score results and select the top-ranked nodes as the notary nodes. The notary nodes of each blockchain and the notary nodes of other blockchains form the notary group of the cross-chain system.
[0041] (4) Design of cross-chain system:
[0042] a. Create a drone blockchain cluster: Select a Raspberry Pi hardware platform and control system, install a software stack that supports blockchain technology on the Raspberry Pi, including blockchain nodes and smart contracts, use Internet communication to establish links between different drones, use P2P protocol for data transmission, and write an application to connect to the blockchain cluster.
[0043] b. Design and deploy the cross-chain protocol: Define the data packet format (including sender address, receiver address, data content, and signature, etc.), design verification rules that require data packets to be verified (whether the data packet is complete and the data signature is verified) before they can be received and processed, and define the parameters and logic for cross-chain communication (if the next-hop address is unknown, send directly to the target address; otherwise, send to the next-hop address). Write the above functions using Solidity. Test and deploy using Remix, deploying the cross-chain protocol to each independent blockchain drone cluster to ensure that they can all access the protocol.
[0044] Deploying the collaborative filtering algorithm: Write the collaborative filtering algorithm code in Python, compile the code into an executable file, and deploy the executable file to the nodes in the drone cluster. Tools such as SSH can be used to upload the file to each node, and then use SSH or similar tools to start the algorithm process on each node.
[0045] d. Registered Notaries Group: Write smart contracts to implement the registration and management of notaries. The contracts include verification of notary qualifications and whether they have been registered. Deployment is carried out using the Remix tool.
[0046] Deploying Smart Contracts: Deploy one smart contract on each cluster to handle the forwarding and verification of cross-chain data packets. Define the structure of the cross-chain data packet to store the packet's metadata and content, define an event to notify the client when a cross-chain data packet is received, define a function to send the cross-chain data packet on the current chain, and define a function to receive and verify the cross-chain data packet on the target chain. Contracts can be written using languages such as Solidity and tested and deployed using tools such as Remix.
[0047] Cross-chain data packet transmission and reception: A smart contract is deployed on each blockchain to handle the forwarding and verification of cross-chain data packets. A cross-chain protocol is used to establish connections between different blockchains. Drone cluster A creates a cross-chain connection to drone cluster B and sends data packets to B. The data packets are sent to the smart contract on B via the IBC protocol, where they are verified and processed. The same applies from B to A.
[0048] (5) Implementation of cross-chain collaboration among multiple drone swarms: Multiple drone swarms need to send and receive data packets across chains. Each drone swarm is an independent blockchain structure, and each drone is a node. For example... Figure 1
[0049] (a) Determine the content and format of the data packets that need to be sent and received across chains so that they can be processed and converted accordingly during cross-chain interactions.
[0050] (b) Send the data packets that need to be sent and received across the chain to one of the nodes in the cross-chain notary node group.
[0051] (c) The node processes the received data packets and forwards them to the notary node group of all other drone clusters.
[0052] (d) Other notary nodes process the received data packets and forward them to the notary nodes in the target drone cluster.
[0053] (e) The target notary node group processes the received data packets and forwards them to the target nodes in the target drone cluster.
[0054] (f) After receiving the data packet, the target node processes it and sends an acknowledgment message to the sender, indicating that the data packet has been successfully delivered to the target drone cluster.
[0055] (g) If a reply message is required from the target drone cluster, the reply message is sent back to the sending drone cluster in a similar manner.
[0056] The notary node group plays a central role, responsible for ensuring the reliability and security of cross-chain data packet transmission, and performing necessary data processing and transformation.
Claims
1. A method for electing cross-chain notary nodes in a drone swarm blockchain based on a collaborative filtering algorithm, characterized in that, Includes the following steps: (1) Collect node information: In the drone cluster with blockchain structure, each drone has an ID. Collect information on the collaboration between drones and other drones, count the number of times drones collaborate with specific drones, and collect the drone's flight speed, flight altitude, flight time, payload weight, positioning accuracy, and attitude accuracy. Use this information as a weighted element of the drone's performance indicators. (2) Constructing a node rating matrix: Based on the collected node information, construct a node rating matrix, where each element represents the rating between a node and other nodes. (3) Using collaborative filtering algorithm: Using collaborative filtering algorithm, based on the node rating matrix, calculate the similarity score of each node with other nodes, and select the most suitable node as a cross-chain notary node based on the similarity score. (4) Node election: Select the most suitable node to serve as a cross-chain notary node, which will be responsible for notarizing cross-chain interactions; (5) Use the selected group of notaries for cross-chain collaboration.
2. The method according to claim 1, characterized in that... Includes the following steps: (2) Collection of node information: Node information is collected by periodic updates; the update cycle is determined, an automated script is written, and the script is written in Python scripting language. Information collection and updates are realized by calling API. The script is set to a scheduled task to trigger information collection and update operations at regular intervals. The written automated script is deployed to the server. Information on the collaboration between UAVs and other UAVs is collected, the number of times UAVs collaborate with specific UAVs is counted (n), and the flight speed (v), flight altitude (h), flight time (t), payload weight (m), positioning accuracy (k), and attitude accuracy (p) of the UAV are collected. The weighted sum of these information values is used as the performance index of the UAV. These information values are divided into ten intervals and scored as 1, 2, 3...
10. The score is the score of the interval in which the UAV is located. The weight of each index is 1. Finally, the weighted sum of these scores is the performance index value. (2) Construction of the similarity matrix: Node-Rating Matrix Construction: The rating vector of aircraft node A is equal to an array of values obtained by multiplying the number of interactions between node A and nodes x1, x2, x3...xn by the corresponding performance indicators of the two nodes; thus, the node vector is obtained. b. Similarity matrix construction: Given n nodes, construct an n x n similarity matrix. Each element in the matrix represents the similarity score between two nodes. The similarity score is calculated using cosine similarity as shown in equation (1). sim(i,j)= (1) Where sim(i,j) represents the similarity between node i and node j. and Let i represent the score vectors for nodes i and j. and | This represents the magnitude of the score vectors for nodes i and j; The cosine similarity value ranges from -1 to 1. The closer the value is to 1, the more similar the rating vectors of the two nodes are; the closer the value is to -1, the less similar the rating vectors of the two nodes are; and a value of 0 indicates that the rating vectors of the two nodes are completely unrelated. Implementation of the collaborative filtering algorithm: Based on the node similarity matrix, a neighborhood-based collaborative filtering algorithm is used to predict node scores, and the neighborhood size is determined by cross-validation. For each node, the weighted scores of the nodes in the neighborhood num are used to predict the node's score. The weights are the node performance indicators, and the scores are the similarity scores. In this way, the predicted score of each node can be obtained, and then the node with the higher predicted score is selected as the notary node. (3) Implementation of collaborative filtering algorithm: First, select the neighborhood size and use cross-validation to select the neighborhood size. Divide the dataset into k subsets, one of which is used as the validation set and the remaining k-1 subsets are used as the training set. For each neighborhood size, train the neighborhood-based collaborative filtering model using the training set and evaluate the model performance using the validation set. Repeat this process until all subsets are used as the validation set. Evaluate the model performance. Choose the neighborhood size by comparing the performance of different neighborhood sizes to select the optimal neighborhood size num; Based on the obtained neighborhood size num, each node selects num nodes with the highest node similarity, and uses the weighted scores of these nodes to predict the score of the node. The weight is the node performance score, and the score is the similarity score. Finally, according to the score results, the nodes are sorted, and the top-ranked nodes are selected as drone notary nodes. The notary nodes of each blockchain and the notary nodes of other blockchains form the notary group of the cross-chain system. (3) Design of cross-chain system: a. Create a drone blockchain cluster: Select a Raspberry Pi hardware platform and control system, install a software stack that supports blockchain technology on the Raspberry Pi, including blockchain nodes and smart contracts, use Internet communication to establish links between different drones, use the P2P protocol for data transmission, and write an application to connect to the blockchain cluster; b. Design and deploy the cross-chain protocol: Define the data packet format, which includes the sender's address, receiver's address, data content, and signature. Design verification rules that require data packets to be verified for completeness and data signature before they can be received and processed. Define the parameters and logic for cross-chain communication and write functions using Solidity. The logic is that if the next-hop address is unknown, send directly to the target address; otherwise, send to the next-hop address. Use Remix for testing and deployment, deploying the cross-chain protocol to each independent blockchain drone cluster to ensure they can all access the protocol. c. Deploying the collaborative filtering algorithm: Write the collaborative filtering algorithm code in Python, compile the code into an executable file, and deploy the executable file to the nodes in the drone cluster; d. Registered Notary Group: Write smart contracts to implement the registration and management of notaries. The contracts include verification of notary qualifications and whether they have been registered. Deployment is carried out using the Remix tool. e. Deploy smart contracts: Deploy a smart contract on each cluster to handle the forwarding and verification of cross-chain data packets; define the structure of the cross-chain data packet to store the data packet's metadata and content; define an event to notify the client when a cross-chain data packet is received; define a function to send the cross-chain data packet on the current chain; define a function to receive and verify the cross-chain data packet on the target chain; write the contract; and test and deploy it. f Cross-chain data packet sending and receiving: Deploy a smart contract on each blockchain to handle the forwarding and verification of cross-chain data packets. Use the cross-chain protocol to establish connections between different blockchains. Drone cluster A creates a cross-chain connection to connect to drone cluster B and sends data packets to B. The data packets are sent to the smart contract on B via the IBC protocol and are verified and processed by the smart contract; the same applies from B to A. (4) Implementation of cross-chain collaboration among multiple drone swarms: There are multiple drone swarms that need to send and receive data packets across chains. Each drone swarm is an independent blockchain structure, and each drone is a node. (a) Determine the content and format of the data packets that need to be sent and received across chains, so as to perform corresponding processing and conversion during cross-chain interaction; (b) Send the data packets that need to be sent and received across the chain to one of the nodes in the cross-chain notary node group; (c) The node processes the received data packet and forwards it to the notary node group of all other drone clusters; (d) Other notary node groups process the received data packets and forward them to the notary node groups in the target drone cluster; (e) The target notary node group processes the received data packets and forwards them to the target nodes in the target drone cluster; (f) After receiving the data packet, the target node processes it and sends an acknowledgment message to the sender, indicating that the data packet has been successfully delivered to the target drone cluster; if a reply message is needed from the target drone cluster, the reply message is sent back to the sender drone cluster.
Citation Information
Patent Citations
Unmanned aerial vehicle sharing system and method
CN108876514A
Unmanned aerial vehicle cluster information consistency sharing method based on block chain
CN115208578A