Shamir key lightweight consensus method based on reputation value

Through the reputation-based Shamir key lightweight consensus method, the key share and reconstruction difficulty threshold are dynamically adjusted, and combined with Newton's interpolation polynomial approximation technology, the high latency and resource waste of the blockchain consensus mechanism in drone communication are solved, and efficient and secure spectrum allocation and key management are achieved.

CN120281470APending Publication Date: 2025-07-08NANJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510353585.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-25
Publication Date
2025-07-08

AI Technical Summary

Technical Problem

The existing blockchain consensus mechanism leads to high latency in UAV communications, increases waste of computing resources, and reduces spectrum allocation efficiency, especially on resource-constrained UAV platforms.

Method used

The Shamir key lightweight consensus method based on reputation value is adopted, and the primary and secondary nodes are selected in turn, the Shamir key sharing algorithm is used to generate and distribute keys, and the key share and reconstruction difficulty threshold are dynamically adjusted according to the node reputation value, and the key reconstruction is reconstructed in combination with Newton's interpolation polynomial approximation technology, and a reputation clearing mechanism is set to prevent reputation monopoly.

Benefits of technology

It reduces consensus delay, improves spectrum allocation efficiency, optimizes resource utilization, enhances the security and stability of the system, prevents resource waste and information leakage, and encourages active participation of nodes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120281470A_ABST
    Figure CN120281470A_ABST
Patent Text Reader

Abstract

The invention discloses a shamir key lightweight consensus method based on a reputation value, which belongs to the technical field of communication, and comprises the following steps: generating a key by using a master node and distributing a key share to secondary nodes to reconstruct the key: if the key is successfully reconstructed, distributing the reconstructed key to the remaining secondary nodes to decrypt encrypted information of the master node, and if the key is not successfully reconstructed, sending the reconstructed key to the remaining secondary nodes to decrypt the encrypted information of the master node; if decryption succeeds, the block is uploaded to the block chain; if the number of times that the secondary node continuously uploads the block to the block chain exceeds three, accumulating the reputation value of the secondary node; if the cumulative number of times of uploading the block to the block chain by the secondary node exceeds a preset reconstruction difficulty threshold value, resetting the reputation value of the secondary node and the cumulative number of times of uploading the block to the block chain; if the number of times of continuous failure of key reconstruction exceeds three times, subtracting the reputation value of the secondary node; and if the reputation value of the secondary node is 0, the key is not distributed to the secondary node. According to the invention, the problems of resource waste, long time delay of a consensus mechanism and low spectrum allocation efficiency in the prior art are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a Shamir key lightweight consensus method based on reputation value, belonging to the technical field of communications. Background Art

[0002] In recent years, drone technology has rapidly become a popular application tool in many fields due to its low cost, high mobility and deployment flexibility. Drones have shown great application potential in many scenarios such as agricultural monitoring, environmental data collection, emergency rescue, cargo transportation, and film and television shooting. However, in terms of drone communications, most drones are not equipped with dedicated communication frequency bands, which leads to tension and conflict in spectrum resources. At the same time, due to the lack of an effective security supervision mechanism, there are security risks such as data leakage and malicious attacks in the process of drone communications. In order to solve these problems, the industry has begun to explore the introduction of blockchain technology into the field of drone communications. Blockchain technology, with its decentralized, open, transparent and tamper-proof characteristics, is expected to provide a safe and reliable communication environment for drone communications while optimizing the utilization of spectrum resources.

[0003] Although the introduction of blockchain technology into the field of drone communications has brought many potential advantages, such as improved communication performance, increased spectrum utilization, and enhanced security of spectrum transactions, the existing blockchain technology implementation solutions still have some significant defects. Among them, the most prominent problem is the high latency caused by the blockchain consensus mechanism. In drone communication scenarios, high latency not only reduces the efficiency of spectrum allocation, making it difficult for drones to obtain the required communication resources in a timely manner, but also may cause waste of computing resources. Since the blockchain consensus process requires multiple nodes to perform complex calculations and verifications, this increases the computing burden of drones, especially on resource-constrained drone platforms, where this waste of computing resources is particularly obvious. Therefore, how to reduce the latency of the consensus mechanism and improve the efficiency of spectrum allocation while maintaining the security of blockchain technology has become a key issue that needs to be urgently solved in the current drone communication field. Summary of the invention

[0004] The purpose of the present invention is to provide a Shamir key lightweight consensus method based on reputation value, which controls the reconstruction difficulty threshold by accumulating reputation value and block number, sets a reputation clearing mechanism to prevent reputation monopoly, and allows error correction of reconstructed keys, thereby reducing the reconstruction difficulty of high computing power nodes, so as to solve the problems of resource waste, extended consensus mechanism time and low spectrum allocation efficiency existing in the prior art.

[0005] In order to solve the above technical problems, the present invention is implemented by adopting the following technical solutions.

[0006] The present invention provides a Shamir key lightweight consensus method based on reputation value, comprising:

[0007] Construct a wireless communication system using drones and mobile network operators;

[0008] Take turns to select a mobile network operator as the primary node, and use the remaining unselected mobile network operators as secondary nodes;

[0009] Use the primary node to obtain the spectrum allocation strategy, and use the Shamir secret sharing algorithm to generate keys and key shares;

[0010] Distribute the key to the secondary nodes, and reconstruct the key according to the preset reconstruction difficulty by collecting key shares:

[0011] If a secondary node successfully reconstructs the key:

[0012] Then distribute the reconstructed key to the remaining secondary nodes. The remaining secondary nodes decrypt the encrypted information of the primary node according to the reconstructed key. If the decryption is successful, upload the block to the blockchain;

[0013] If the number of times the secondary node uploads the block to the blockchain continuously exceeds three times, accumulate the reputation value of the secondary node, and update the key share according to the reputation value of the secondary node;

[0014] If the cumulative number of times the secondary node uploads the block to the blockchain exceeds the preset reconstruction difficulty threshold, reset the reputation value of the secondary node and the cumulative number of times the block is uploaded to the blockchain:

[0015] If the number of consecutive failures of a secondary node to reconstruct the key exceeds three times, subtract the reputation value of the secondary node, and update the key share according to the reputation value of the secondary node;

[0016] If the reputation value of the secondary node is 0, do not distribute the key to the secondary node.

[0017] Furthermore, in the wireless communication system, the drone acts as a lightweight node for viewing block information; the mobile network operator acts as a full node for taking turns to select the primary node; the primary node is used to generate keys and encrypt transaction information and spectrum strategies, and distribute key shares to secondary nodes according to the keys; the secondary nodes are used to reconstruct keys as secondary nodes and consensus nodes to verify the legality of blocks.

[0018] Furthermore, after obtaining the spectrum allocation strategy using the primary node, it also includes setting the initial values of the key shares, reputation values, and the cumulative number of times of uploading blocks to the blockchain of all secondary nodes to be greater than 0.

[0019] Further, after generating the key using the Shamir secret sharing algorithm, it further includes decomposing the key into multiple key shares using the polynomial for generating the key shares, and the polynomial is expressed as:

[0020] ;

[0021] In the formula, represents the polynomial for generating the key shares, represents the random number for generating the key, represents the key, represents the coefficient of the first-degree term of the polynomial for generating the key shares, represents the coefficient of the second-degree term of the polynomial for generating the key shares, represents the -degree term coefficient of the polynomial for generating the key shares, represents the preset reconstruction difficulty.

[0022] Further, before the remaining secondary nodes decrypt the encrypted information of the primary node based on the reconstructed key, it further includes controlling the difficulty threshold for the secondary nodes to mine blocks using the reputation value, and the difficulty threshold for the secondary nodes to mine blocks is expressed as:

[0023] ;

[0024] In the formula, represents the difficulty threshold for the th secondary node to mine the th block, , represents the total number of blocks, represents the threshold, represents the preset reconstruction difficulty threshold, represents the cosine function, represents the reputation value of the th secondary node when mining the th block, represents the reputation value, represents the exponential function, represents the influence factor of the cumulative number of blocks on the difficulty threshold for the secondary nodes to mine blocks, represents the th secondary node when mining the th block, and represents the cumulative number of blocks threshold.

[0025] Further, after successful decryption, it further includes setting a reputation clearing mechanism using the cumulative number of blocks to prevent reputation monopoly, where the reputation value of the secondary node when mining a block is expressed as:

[0026] ;

[0027] Wherein, represents the reputation value of the th sub-node when mining the th block, represents the reputation value, represents the th sub-node when mining the th block, represents the minimum update unit for accumulating the reputation values of sub-nodes each time, represents the th sub-node mining the th block, the cumulative quantity of the block, represents the th sub-node mining the th block, the cumulative quantity of the block, represents the modulo operation.

[0028] Furthermore, the reconstructed key is distributed to the remaining sub-nodes, and the remaining sub-nodes decrypt the encrypted information of the master node according to the reconstructed key, including:

[0029] Construct a Newton interpolation polynomial according to the preset reconstruction difficulty and key shares;

[0030] Use the constructed Newton interpolation polynomial to approximate and reconstruct the key of the polynomial generating the key shares.

[0031] Furthermore, the constructed Newton interpolation polynomial is expressed as:

[0032] ;

[0033] ;

[0034] Wherein, represents the Newton interpolation polynomial constructed by the th sub-node when mining the th block, represents the difficulty threshold of the th sub-node mining the th block, represents the divided difference, which is used to approximate and reconstruct the key of the polynomial generating the key shares, represents the first random number obtained by the sub-node when mining the th block, represents the second random number obtained by the sub-node when mining the th block, represents the The th random number obtained when mining the th block represents the random number used to generate the key. th node obtains the th random number when mining the th block. Based on the th random number obtained by the th node when mining the

[0035] th block, the key share value is obtained.

[0036] ;

[0037] In the formula, represents the reconstructed key, represents the th key value reconstructed by the th secondary node when mining the

[0038] th block.

[0039] ;

[0040] In the formula, represents the th tolerance error of the th secondary node when mining the th block, which is used to represent the difference between the key reconstructed by the Newton interpolation polynomial constructed by the th secondary node when mining the th block and the key generated by the Shamir key sharing algorithm. represents the th difficulty threshold of the th secondary node when mining the th block, which is used to represent the speed of approximating the key reconstructed by the polynomial generating the key share. represents the th factorial of the difficulty threshold of the th secondary node when mining the represents the th block mined by the th secondary node.

[0041] Compared with the prior art, the beneficial effects achieved by the present invention are:

[0042] 1. The present invention constructs a wireless communication system by combining drones and mobile network operators, and uses a lightweight consensus method for Shamir keys based on reputation values to achieve efficient and flexible spectrum allocation and key management. By alternately selecting the primary node and the secondary node, and using the Shamir key sharing algorithm to generate and distribute keys, the present invention can ensure the security and reliability of the keys. At the same time, the key share and the reconstruction difficulty threshold are dynamically adjusted according to the reputation value of the node, so that nodes with high reputation and high computing power can more easily reconstruct the key and successfully upload the block to the blockchain, thereby reducing the consensus delay. In addition, through the reputation clearing mechanism, the reputation monopoly is effectively prevented, ensuring the fairness and stability of the system. This method not only improves the consensus efficiency, but also optimizes the resource utilization rate, avoiding problems such as resource waste and low spectrum allocation efficiency.

[0043] 2. The present invention realizes the flexible allocation of spectrum resources by using drones as lightweight nodes to view block information and mobile network operators as full nodes to alternately serve as the primary node. Among them, the primary node is responsible for key generation and transaction information encryption, while the secondary node acts as a miner to reconstruct the key and participate in block verification, ensuring the security and reliability of the consensus process. This mechanism not only improves the utilization efficiency of spectrum resources, but also enhances the security of key management through the Shamir key sharing algorithm, effectively preventing information leakage and malicious attacks.

[0044] 3. The present invention innovatively introduces a reputation value mechanism, which dynamically adjusts the mining block difficulty threshold and key share according to the reputation value of the node. High-reputation nodes can more easily reconstruct the key and successfully upload the block, thus accelerating the consensus speed. At the same time, the reputation monopoly is prevented through the reputation clearing mechanism, ensuring the fairness and stability of the system. This dynamic adjustment strategy based on reputation values makes the consensus process more efficient and flexible, and effectively motivates the active participation of nodes.

[0045] 4. The present invention adopts the Newton interpolation polynomial approximation technology in the key reconstruction process, and reconstructs the key by constructing a well-built Newton interpolation polynomial, which not only improves the accuracy of key reconstruction, but also further reduces the reconstruction error through the allowable error correction mechanism. In addition, the present invention also uses information such as the mining difficulty threshold and the cumulative number of blocks of the node to optimize the construction of the Newton interpolation polynomial, thereby realizing more efficient and accurate key reconstruction. This innovation in technology not only enhances the security and reliability of the consensus method, but also provides a new idea for the application of blockchain technology in wireless communication systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 is a schematic flowchart of a lightweight consensus method for Shamir keys based on reputation values provided by an embodiment of the present invention;

[0047] Figure 2 It is a schematic diagram of an analog of the wireless communication system provided by an embodiment of the present invention;

[0048] Figure 3 It is a schematic diagram of the block header structure model of the lightweight consensus method provided by an embodiment of the present invention;

[0049] Figure 4 It is a schematic diagram of an analog of a secondary node with different computing powers mining a block. Detailed implementation manners

[0050] The technical solution of the present invention will be described in detail below through the accompanying drawings and specific embodiments. It should be understood that the embodiments of the present invention and the specific features in the embodiments are detailed descriptions of the technical solution of the present invention, rather than limitations on the technical solution of the present invention. Without conflict, the embodiments of the present invention and the technical features in the embodiments can be combined with each other.

[0051] The term "and / or" is merely a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " generally represents an "or" relationship between the associated objects before and after.

[0052] Embodiment 1

[0053] As Figure 1 shown, this embodiment introduces a lightweight consensus method for Shamir keys based on reputation values, including:

[0054] Step 1: Construct a wireless communication system by using drones and mobile network operators.

[0055] The present invention aims to construct a wireless communication system. Among them, the drone serves as a lightweight node, mainly responsible for tasks such as viewing block information, while the mobile network operator serves as a full node, with more comprehensive functions and resources. Such a combination can make full use of the flexibility of the drone and the communication infrastructure of the mobile network operator, providing a solid physical foundation for the subsequent consensus mechanism and spectrum allocation strategy. By constructing a wireless communication system, more flexible and efficient utilization of spectrum resources can be achieved, while improving the overall communication ability and stability of the wireless communication system.

[0056] Step 2: Take turns selecting a mobile network operator as the primary node, and use the remaining unselected mobile network operators as secondary nodes.

[0057] The present invention realizes the balanced allocation of system resources and the equal participation of nodes by means of rotating the selection of the primary node. The primary node is responsible for key tasks such as formulating the spectrum allocation strategy, generating and distributing keys, etc., while the secondary nodes act as consensus nodes and participate in processes such as key reconstruction and block verification. The mechanism of rotating the selection of the primary node can prevent a single node from dominating for a long time, improving the fairness and security of the system. At the same time, this mechanism also helps to prevent single-point failures and enhances the stability and reliability of the system.

[0058] Step 3: Use the primary node to obtain the spectrum allocation strategy, and use the Shamir secret sharing algorithm to generate the key and key shares.

[0059] The present invention uses the primary node to formulate the spectrum allocation strategy according to the current system state and spectrum requirements. Then, the Shamir secret sharing algorithm is used to generate a key and multiple key shares. The Shamir secret sharing algorithm is a classic secret sharing method that allows a key to be split into multiple parts, namely key shares, and only when a sufficient number of key shares are collected can the original key be reconstructed.

[0060] By using the Shamir secret sharing algorithm, the present invention can ensure the security and reliability of the key. Even if some nodes are attacked or fail, as long as the remaining number of key shares is sufficient, the original key can still be reconstructed, thus ensuring the security and stability of the system.

[0061] Step 4: Distribute the key to the secondary nodes, and reconstruct the key according to the preset reconstruction difficulty by collecting key shares:

[0062] In the present invention, the primary node distributes the generated key shares to the secondary nodes, and the secondary nodes try to reconstruct the key according to the preset reconstruction difficulty, that is, the number of key shares to be collected. If a secondary node successfully reconstructs the key, it can use this key to decrypt the encrypted information of the primary node and upload the block to the blockchain. By distributing key shares and setting the reconstruction difficulty, the present invention can ensure that only nodes with sufficient computing power and reputation can successfully reconstruct the key and participate in the consensus process. It helps to improve the efficiency and security of consensus, and at the same time prevent attacks and fraud behaviors of malicious nodes.

[0063] If a secondary node successfully reconstructs the key: then distribute the reconstructed key to the remaining secondary nodes, and the remaining secondary nodes decrypt the encrypted information of the primary node according to the reconstructed key. If the decryption is successful, upload the block to the blockchain.

[0064] If the number of times the secondary node uploads the block to the blockchain continuously exceeds three times, then accumulate the reputation value of the secondary node, and update the key shares according to the reputation value of the secondary node.

[0065] The present invention distributes the reconstructed key to the remaining secondary nodes so that the remaining secondary nodes can also decrypt the encrypted information of the primary node. If the decryption is successful, the block is uploaded to the blockchain. If the number of times this node continuously uploads blocks to the blockchain exceeds three times, the reputation value of this node is accumulated, and the key share is updated according to the reputation value. For example, more or fewer key shares are given. Through the reward mechanism of the present invention, that is, accumulating the reputation value, it can encourage secondary nodes to actively participate in the consensus process and improve the overall performance of the system. At the same time, updating the key share according to the reputation value also helps to achieve more flexible key management and resource allocation.

[0066] If the cumulative number of times the secondary node uploads blocks to the blockchain exceeds the preset reconstruction difficulty threshold, the reputation value of the secondary node and the cumulative number of times the block is uploaded to the blockchain are reset.

[0067] If the number of consecutive failures in reconstructing the key by a certain secondary node exceeds three times, the reputation value of the secondary node is subtracted, and the key share is updated according to the reputation value of the secondary node.

[0068] If the reputation value of the secondary node is 0, the key is not distributed to the secondary node.

[0069] In the present invention, if the number of consecutive failures in reconstructing the key by a certain secondary node exceeds three times, its reputation value is subtracted as a punishment. If the reputation value of a certain secondary node drops to 0, the key share is no longer distributed to it, that is, it is excluded from the consensus process. Through the punishment mechanism of the present invention, that is, subtracting the reputation value, the behavior of malicious nodes can be inhibited and the security and stability of the system can be maintained. At the same time, excluding nodes with a reputation value of 0 from the consensus process also helps to prevent them from continuing to have a negative impact on the system.

[0070] Embodiment 2

[0071] Based on the same inventive concept as Embodiment 1, this embodiment introduces the implementation process of a lightweight consensus method for Shamir keys based on reputation value, including:

[0072] Step 1: Construct a wireless communication system using drones and mobile network operators.

[0073] In the Figure 2 shown wireless communication system, the system includes drones, mobile network operators. The drones are used as lightweight nodes to view block information; the mobile network operators are used as full nodes to take turns selecting the primary node; the primary node is used to generate keys and encrypt transaction information and spectrum policies, and distribute key shares to secondary nodes according to the keys; the secondary nodes are used as secondary nodes to reconstruct keys and as consensus nodes to verify the legality of blocks, where . InFigure 2 In the medium key sharing, it means that after spectrum trading, information such as trading information needs to be packaged and uploaded to the blockchain. First, the full nodes on the blockchain take turns to act as the main node. The main node generates a key, encrypts the trading information to generate ciphertext after generating the key, and at the same time generates key shares, and then publishes the key shares and the ciphertext to the blockchain.

[0074] In Figure 2 the reconstruction of the key means that other full nodes act as secondary nodes, that is, secondary nodes. The secondary nodes collect the key shares and reconstruct the key according to the current own reputation value and the reconstruction threshold generated by the cumulative number of blocks generated.

[0075] In Figure 2 the packaging of the block means that after the secondary node successfully mines, it obtains the ability to package the block, packages the trading information and spectrum strategy and other information to generate a block, and the newly generated block needs to be verified by other secondary nodes before it can be uploaded to the blockchain. The main node only generates keys and encrypted information and does not participate in mining.

[0076] In Figure 2 the broadcasting of the new block means that after broadcasting the block, it is necessary to verify the legality of the block. Therefore, when broadcasting the new block, the private key of the main node is used to sign the newly generated block and the key, and then the signed information is broadcast to the blockchain network.

[0077] In Figure 2 the successful verification of the block means that other consensus nodes decrypt the signed information through the public key of the broadcasting node, check its integrity, obtain the key therein after decrypting the digital signature, obtain the error tolerance of the key from the block header, and use the key to decrypt the encrypted information broadcast by the main node before under the allowable error share. Successful decryption indicates that the newly generated block is legally verified.

[0078] In Figure 2 the uploading to the blockchain means that after the newly generated block is verified by other consensus nodes and its legality is passed, it can be uploaded to the blockchain.

[0079] After generating the key by using the Shamir key sharing algorithm in this embodiment, it further includes decomposing the key into multiple key shares by using the polynomial for generating the key shares, and the polynomial is expressed as:

[0080] ;

[0081] In the formula, represents the polynomial for generating the key shares, represents the random number for generating the key, represents the key, represents the first-order term coefficient of the polynomial for generating the key shares, Represents the quadratic coefficient of the polynomial used to generate key shares, Represents the -th coefficient of the polynomial used to generate key shares, Represents a preset reconstruction difficulty.

[0082] Step 2: Take turns selecting a mobile network operator as the primary node, and use the remaining unselected mobile network operators as secondary nodes.

[0083] Step 3: Use the primary node to obtain the spectrum allocation strategy, and use the Shamir key sharing algorithm to generate keys and key shares.

[0084] After obtaining the spectrum allocation strategy using the primary node in this embodiment, it further includes setting the initial values of the key shares, reputation values, and the cumulative number of times of uploading blocks to the blockchain of all secondary nodes to be greater than 0.

[0085] Step 4: Distribute the keys to the secondary nodes, and reconstruct the keys according to the preset reconstruction difficulty by collecting key shares:

[0086] Step 4.1: If a secondary node successfully reconstructs the key: then distribute the reconstructed key to the remaining secondary nodes, and the remaining secondary nodes decrypt the encrypted information of the primary node according to the reconstructed key. If the decryption is successful, upload the block to the blockchain.

[0087] Before the remaining secondary nodes decrypt the encrypted information of the primary node according to the reconstructed key in this embodiment, it further includes using the reputation value to control the difficulty threshold for the secondary nodes to mine blocks. The difficulty threshold for the secondary nodes to mine blocks is expressed as:

[0088] ;

[0089] In the formula, Represents the difficulty threshold for the -th secondary node to mine the -th block, , Represents the total number of blocks, Represents the threshold, Represents a preset reconstruction difficulty threshold, Represents the cosine function, Represents the -th secondary node's reputation value when mining the -th block, Represents the reputation value, Represents the exponential function, Represents the influence factor of the cumulative number of blocks on the difficulty threshold for the secondary nodes to mine blocks, Represents the The cumulative number of blocks when the th sub-node mines the th block,

[0090]

[0091] In some embodiments, the reconstructed key is distributed to the remaining sub-nodes, and the remaining sub-nodes decrypt the encrypted information of the master node according to the reconstructed key, including:

[0092] Construct a Newton interpolation polynomial according to the preset reconstruction difficulty and key shares;

[0093] Approximate and reconstruct the key using the constructed Newton interpolation polynomial to generate the polynomial of the key shares.

[0094] ;

[0095] ;

[0096] In the formula, represents the th Newton interpolation polynomial constructed by the th sub-node when mining the th block, represents the difficulty threshold of the th sub-node mining the th block, represents the divided difference, which is used to approximate and reconstruct the key using the polynomial generating the key shares, represents the first random number obtained by the sub-node when mining the th block, represents the second random number obtained by the sub-node when mining the th block, represents the th random number obtained by the sub-node when mining the th block, represents the random number used to generate the key, represents the th random number obtained by the sub-node when mining the th block, represents the th random number obtained by the sub-node when mining the

[0097] In this embodiment, the reconstructed key is expressed as:

[0098] ;

[0099] In the formula, Represents the reconstructed key Indicates the th sub-node's reconstructed key value when mining the th block.

[0100] In some embodiments, the reconstructed key is corrected using an allowable error, expressed as:

[0101] ;

[0102] In the formula, Indicates the th sub-node's allowable error when mining the th block, used to represent the gap between the reconstructed key of the Newton interpolation polynomial constructed by the th sub-node when mining the th block and the key generated using the Shamir key sharing algorithm, Indicates the th sub-node's difficulty threshold for mining the th block The divided difference, used to represent the speed of reconstructing the key by approximating the polynomial generating the key share, Indicates the th sub-node's difficulty threshold for mining the th block The factorial, Indicates the th sub-node's th block when mining the

[0103] Step 4.1.2: If the sub-node continuously uploads blocks to the blockchain more than three times, accumulate the reputation value of the sub-node and update the key share according to the reputation value of the sub-node.

[0104] Step 4.1.3: If the cumulative number of times the sub-node uploads blocks to the blockchain exceeds the preset reconstruction difficulty threshold, reset the reputation value of the sub-node and the cumulative number of times the blocks are uploaded to the blockchain.

[0105] After successful decryption in this embodiment, it further includes setting a reputation clearing mechanism using the cumulative number of blocks to prevent reputation monopoly. The reputation value of the sub-node when mining blocks is expressed as:

[0106] ;

[0107] In the formula, Indicates the th sub-node's reputation value when mining the th block, Indicates the reputation value, Indicates the th sub - node's reputation value when mining the th block, represents the minimum update unit for accumulating the reputation value of the sub - node each time, Indicates the th sub - node's cumulative number of blocks when mining the th block, Indicates the th sub - node's cumulative number of blocks when mining the th block, represents the modulo operation.

[0108] Step 4.2: If the consecutive failure times of a certain sub - node to reconstruct the key exceed three times, then subtract the reputation value of the sub - node, and update the key share according to the reputation value of the sub - node.

[0109] Step 4.2.1: If the reputation value of the sub - node is 0, then do not distribute the key to the sub - node.

[0110] In this embodiment, the changes in the header structure of the blocks mined by the sub - nodes are as Figure 3 shown. First, it is necessary to ensure the integrity of the information transmitted by the sub - node, without being tampered with, and a digital signature of the sub - node needs to be added. Secondly, when verifying the legality of the block, the key of the winning sub - node is required to decrypt the encrypted information broadcast by the master node using the key of the winning node. Finally, since the winning node generates the key under its error tolerance condition, when the consensus node uses this key for decryption, due to the relatively small reconstruction threshold of the winning node, the obtained key cannot fully approximate the linear function, so the error tolerance of the winning sub - node is required.

[0111] The performance analysis of the lightweight consensus method for Shamir keys based on reputation value provided by the present invention is as Figure 4 shown, Figure 4 There are five sub - nodes, and the computing power of each sub - node is randomly generated. The goal of the lightweight consensus method for Shamir keys based on reputation value is to reduce the consensus delay. The initial reputation value of all sub - nodes is 2, the cumulative block number threshold is 24, and 1000 blocks are mined. As can be seen from Figure 4 , for sub - nodes with a relatively large average computing power value, the number of blocks they generate is large, the average mining time is small, and the average reputation value is high.

[0112] Because when the computing power of the secondary node is high, at the same mining difficulty, the mining time of the secondary node is short and mining can be successful. Therefore, if the secondary node continuously mines successfully with high computing power for multiple times, it is considered an honest node rather than a malicious node. As a result, the reputation value of the secondary node increases. The increase in the reputation value of the secondary node and the increase in the number of generated blocks will reduce the mining difficulty. When the mining difficulty is reduced, if the computing power is the same, the one with a lower mining difficulty will mine successfully. It is not the case that the secondary node with a large average computing power monopolizes all the blocks, and other secondary nodes will also mine successfully. Because a reputation monopoly mechanism is set up. When a secondary node keeps mining successfully by continuously paying a high computing power, its reputation value becomes very high and the cumulative number of blocks is also large. Its mining difficulty will decrease, making it possible for the secondary node to mine successfully without necessarily paying a high computing power. Therefore, the reputation monopoly mechanism is set up. Therefore, when the average high-computing-power secondary node has a low computing power during mining, it will not mine successfully. So only the high-computing-power nodes can mine successfully, and the mining difficulty of the high-computing-power secondary nodes will decrease and the mining time will be reduced, thereby reducing the latency of the consensus algorithm and reducing resource waste.

[0113] Embodiment 3

[0114] Based on the same inventive concept as other embodiments, this embodiment introduces a computer-readable storage medium, on which computer instructions are stored. When the computer instructions are executed by a processor, the steps of the method in Embodiment 1 or 2 above are implemented.

[0115] Embodiment 4

[0116] Based on the same inventive concept as other embodiments, this embodiment introduces a computer program product, including computer instructions. When the computer instructions are executed by a processor, the steps of the method in Embodiment 1 or 2 above are implemented.

[0117] In summary of the above embodiments, the present invention constructs a wireless communication system by combining an unmanned aerial vehicle and a mobile network operator, and uses a lightweight Shamir key consensus method based on reputation value to achieve efficient and flexible spectrum allocation and key management. By alternately selecting the primary node and the secondary node, and using the Shamir key sharing algorithm to generate and distribute keys, the present invention can ensure the security and reliability of the keys. At the same time, according to the reputation value of the nodes, the key shares and the reconstruction difficulty threshold are dynamically adjusted, so that the nodes with high reputation and high computing power can more easily reconstruct the keys and successfully upload blocks to the blockchain, thereby reducing the consensus latency. In addition, through the reputation clearing mechanism, the reputation monopoly is effectively prevented, ensuring the fairness and stability of the system. This method not only improves the consensus efficiency, but also optimizes the resource utilization rate, avoiding problems such as resource waste and low spectrum allocation efficiency.

[0118] In the present invention, a drone is used as a light node to view block information, and a mobile network operator serves as a full node and takes turns as the master node, achieving flexible allocation of spectrum resources. Among them, the master node is responsible for key generation and transaction information encryption, while the secondary node acts as a miner to reconstruct the key and participate in block verification, ensuring the security and reliability of the consensus process. This mechanism not only improves the utilization efficiency of spectrum resources, but also enhances the security of key management through the Shamir key sharing algorithm, effectively preventing information leakage and malicious attacks.

[0119] The present invention innovatively introduces a reputation value mechanism, which dynamically adjusts the mining block difficulty threshold and key shares according to the reputation value of the nodes. Nodes with high reputation can more easily reconstruct the key and successfully upload the block, thus accelerating the consensus speed. At the same time, the reputation clearing mechanism prevents reputation monopoly, ensuring the fairness and stability of the system. This dynamic adjustment strategy based on reputation value makes the consensus process more efficient, flexible, and effectively motivates the active participation of nodes.

[0120] In the key reconstruction process of the present invention, the Newton interpolation polynomial approximation technology is adopted to reconstruct the key by constructing a well-built Newton interpolation polynomial, which not only improves the accuracy of key reconstruction, but also further reduces the reconstruction error through the allowable error correction mechanism. In addition, the present invention also utilizes information such as the mining difficulty threshold and the cumulative number of blocks of the nodes to optimize the construction of the Newton interpolation polynomial, thereby realizing more efficient and accurate key reconstruction. This technological innovation not only enhances the security and reliability of the consensus method, but also provides a new idea for the application of blockchain technology in wireless communication systems. Those skilled in the art should understand that the embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0121] The present invention is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of processes and / or blocks in the flowchart and / or block diagram, can be realized by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate for realizing in the process Figure 1 one process or multiple processes and / or blocks Figure 1means for the functions specified in one or more blocks.

[0122] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to operate in a particular manner, such that the instructions stored in the computer-readable memory produce a manufacture including an instruction means that implements the functions specified in one Figure 1 or more processes and / or blocks Figure 1 means for the functions specified in one or more blocks.

[0123] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus, such that a series of operational steps are performed on the computer or other programmable apparatus to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable apparatus provide steps for implementing the functions specified in one Figure 1 or more processes and / or blocks Figure 1 means for the functions specified in one or more blocks.

[0124] The embodiments of the present invention have been described above in conjunction with the accompanying drawings. However, the present invention is not limited to the above specific embodiments. The above specific embodiments are merely illustrative and not restrictive. Those of ordinary skill in the art, under the inspiration of the present invention and without departing from the spirit and scope protected by the present invention and the claims, can still make many forms, all of which fall within the protection scope of the present invention.

Claims

1. A lightweight consensus method for Shamir keys based on reputation values, characterized in that, Including: Construct a wireless communication system using drones and mobile network operators; Take turns selecting a mobile network operator as the primary node, and use the remaining unselected mobile network operators as secondary nodes; Use the primary node to obtain the spectrum allocation strategy, and use the Shamir secret sharing algorithm to generate keys and key shares; Distribute the keys to the secondary nodes, and collect key shares according to the preset reconstruction difficulty to reconstruct the keys: If a secondary node successfully reconstructs the key: Then distribute the reconstructed key to the remaining secondary nodes. The remaining secondary nodes decrypt the encrypted information of the primary node according to the reconstructed key. If the decryption is successful, upload the block to the blockchain; If the number of times the secondary node uploads the block to the blockchain continuously exceeds three times, accumulate the reputation value of the secondary node, and update the key share according to the reputation value of the secondary node; If the cumulative number of times the secondary node uploads the block to the blockchain exceeds the preset reconstruction difficulty threshold, reset the reputation value of the secondary node and the cumulative number of times the block is uploaded to the blockchain: If the number of consecutive failures of a secondary node to reconstruct the key exceeds three times, subtract the reputation value of the secondary node, and update the key share according to the reputation value of the secondary node; If the reputation value of the secondary node is 0, do not distribute the key to the secondary node.

2. The lightweight consensus method for Shamir keys based on reputation value according to claim 1, wherein In the wireless communication system, the drone is used as a light node to view block information; The mobile network operator is used as a full node to take turns selecting the primary node; the primary node is used to generate keys, encrypt transaction information and spectrum strategies, and generate key shares according to the keys and distribute them to the secondary nodes; the secondary nodes are used as secondary nodes to reconstruct keys and as consensus nodes to verify the legality of blocks.

3. The lightweight consensus method for Shamir keys based on reputation value according to claim 1, wherein After using the primary node to obtain the spectrum allocation strategy, it further includes setting the initial values of the key shares, reputation values of all secondary nodes, and the cumulative number of times of uploading blocks to the blockchain to be greater than 0.

4. The lightweight consensus method for Shamir keys based on reputation value according to claim 1, wherein After using the Shamir secret sharing algorithm to generate keys, it further includes decomposing the key into multiple key shares using the polynomial for generating key shares, and the polynomial is expressed as: ; In the formula, represents the polynomial for generating key shares, represents the random number for generating the key, represents the key, represents the coefficient of the first-degree term of the polynomial for generating key shares, represents the coefficient of the second-degree term of the polynomial for generating key shares, represents the -degree term coefficient of the polynomial for generating key shares, represents the preset reconstruction difficulty.

5. The lightweight consensus method for Shamir keys based on reputation value according to claim 1, wherein Before the remaining secondary nodes decrypt the encrypted information of the primary node according to the reconstructed key, it further includes using the reputation value to control the difficulty threshold for the secondary node to mine blocks, and the difficulty threshold for the secondary node to mine blocks is expressed as: ; Wherein, represents the difficulty threshold of the th sub-node for mining the th block, , represents the total number of blocks, represents the threshold, represents the preset reconstruction difficulty threshold, represents the cosine function, represents the th sub-node's reputation value when mining the th block, represents the reputation value, represents the exponential function, represents the influence factor of the cumulative number of blocks on the difficulty threshold of sub-nodes for mining blocks, represents the th sub-node's cumulative number of blocks when mining the th block, represents the cumulative number threshold of blocks.

6. The lightweight consensus method for Shamir keys based on reputation value according to claim 1, wherein After successful decryption, it further includes setting a reputation clearing mechanism using the cumulative number of blocks to prevent reputation monopoly, where the reputation value of the secondary node when mining blocks is expressed as: ; In the formula, represents the th sub-node's reputation value when mining the th block, represents the reputation value, represents the th sub-node's reputation value when mining the th block, represents the minimum update unit for accumulating the reputation values of sub-nodes each time, represents the th sub-node's cumulative number of blocks when mining the th block, represents the th sub-node's cumulative number of blocks when mining the th block, represents the modulo operation.

7. The lightweight consensus method for Shamir keys based on reputation value according to claim 1, characterized in that, Distribute the reconstructed key to the remaining secondary nodes, and the remaining secondary nodes decrypt the encrypted information of the primary node according to the reconstructed key, including: Construct a Newton interpolation polynomial according to the preset reconstruction difficulty and key shares; Use the constructed Newton interpolation polynomial to approximate the polynomial for generating key shares to reconstruct the key.

8. The lightweight consensus method for Shamir keys based on reputation value according to claim 7, wherein The constructed Newton interpolation polynomial is expressed as: ; ; Wherein, represents the Newton interpolation polynomial constructed by the -th sub-node when mining the -th block, represents the difficulty threshold of the -th sub-node when mining the -th block, represents the divided difference, which is used to approximate the polynomial for reconstructing the key that generates the key share, represents the first random number obtained by the sub-node when mining the -th block, represents the second random number obtained by the sub-node when mining the -th block, represents the -th random number obtained by the sub-node when mining the -th block, represents the random number used to generate the key, represents the -th random number obtained by the sub-node when mining the -th block, represents obtaining the key share value based on the -th random number obtained by the sub-node when mining the -th block.

9. The lightweight consensus method for Shamir keys based on reputation value according to claim 7, wherein The reconstructed key is expressed as: ; In the formula, represents the reconstructed key, represents the th secondary node's reconstructed key value when mining the th block.

10. The lightweight consensus method for Shamir keys based on reputation value according to claim 9, characterized in that, Use the allowable error to correct the reconstructed key, expressed as: ; Wherein, represents the allowable error of the th secondary node when mining the th block, and is used to represent the gap between the reconstructed key of the Newton interpolation polynomial constructed by the th secondary node when mining the th block and the key generated by using the Shamir key sharing algorithm; represents the difficulty threshold of the th secondary node when mining the th block, is the divided difference, and is used to represent the speed of approximating the reconstructed key of the polynomial generating the key share; represents the difficulty threshold of the th secondary node when mining the th block, is the factorial; represents the th secondary node when mining the th block.