Quick secret leader election method for lightweight block chain network
By leveraging the characteristics of signal path loss and power calculation in lightweight blockchain networks, secret leader elections are achieved, and the problem of difficulty in applying the existing technology in lightweight blockchain networks is solved, reducing equipment performance requirements and enhancing network security.
Patent Information
- Application Number
- CN202510075136.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2045-01-17
AI Technical Summary
The existing hidden leader election technology is difficult to apply in lightweight blockchain networks, mainly due to the reliance on a large number of encryption and decryption operations and communication processes, resulting in high demand for device performance.
By utilizing the characteristics of signal path loss and power calculation, secret leader elections between nodes are realized, and the encryption and decryption operations are avoided and the equipment performance needs are reduced. The specific steps include the server and node initializing network information, the server broadcasts the signal, the node calculates the road loss and participates in the election, the server monitors the channel to calculate the power sum, and the node determines whether it becomes a leader and sends a termination signal.
It significantly reduces the demand for device performance of lightweight blockchains, expands application scenarios on performance-constrained devices, and enhances network security through a secret election mechanism to avoid attack risks.
Smart Images

Figure CN119520215A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of computer networks and relates to a method for quickly electing a secret leader for a lightweight blockchain network. Background Art
[0002] In blockchain technology, the leader election algorithm is the core of the consensus mechanism. Figure 1 As shown in the figure, the formula node links various IoT systems and records the core data of the system. The leader election algorithm is responsible for selecting leaders from the formula nodes in each block proposal round to decide the next block to be added to the blockchain main chain. With the increasing attention paid to the energy consumption of blockchain, the optimization of the leader election algorithm has become particularly important to reduce energy consumption and improve efficiency.
[0003] The design of the leader election algorithm must take into account the efficient use of resources, avoid high energy consumption, and be able to adapt to the growing size of the network. Fairness and transparency are also important considerations in algorithm design to ensure the rights and interests of all participants in the election process.
[0004] The traditional Proof of Work (PoW) consensus mechanism has been criticized for its waste of resources and inefficiency. PoW obtains the right to record accounts through computing power competition, which leads to huge electricity consumption and potential impact on the environment. To solve this problem, many new consensus mechanisms have been proposed, such as Proof of Stake (PoS), Delegated Proof of Stake (DPoS), etc., which aim to reduce energy consumption while maintaining the security and decentralization of the network.
[0005] In order to deal with the high energy consumption problem in the blockchain leader election algorithm, researchers have proposed a variety of optimization strategies. First, the introduction of a verifiable random function (VRF) can safely and efficiently select block producers and validators in nodes, reducing energy consumption. The Raft algorithm improves consensus efficiency and system stability by optimizing the node information replication process, adjusting the leader election mechanism, and adopting a log replication strategy based on the dispatching idea.
[0006] The mainstream leader election algorithm focuses on quickly selecting a leader through fierce competition. This process inevitably leads to the disclosure of leader information, which makes the leader's information exposed to the entire network, thereby increasing the risk of network attacks. In view of this, scholars have proposed the secret leader election technology (SSLE), which ensures that network nodes can elect a leader while other nodes cannot obtain the leader's information, so we call it a secret leader.
[0007] However, the existing secret leader election technology relies on a large number of encryption and decryption operations and communication processes, which means that a powerful server must exist in the network. Therefore, this scheme is difficult to apply in lightweight distributed blockchain networks. Summary of the invention
[0008] In view of the above technical problems, the present invention provides a secret leader election method for a lightweight blockchain network, which is implemented by the following technical solutions: A fast secret leader election method for a lightweight blockchain network, the method comprising: S1: Server and node initialize basic network information; S2: The server broadcasts a signal to all nodes in the network at an agreed power; S3: The node calculates the path loss between it and the server based on the power of the received signal and the agreed power. The node participates in the election with a certain probability, randomly and evenly generates an ID according to the agreed range, and sends the signal with a certain power. S4: The server monitors the channel, calculates the power sum of the received signals, sends the received power sum to all nodes, and monitors the election termination signal. If there is a termination signal, the election is stopped. S5: The node monitors the channel and determines whether it becomes the leader based on the power and if so, it sends a termination signal, otherwise it continues with S3.
[0009] Further, in step S1: The basic network information includes the server's agreed signal transmission power 、Number of network nodes , minimum number of election nodes , ID scaling factor , Maximum election round , termination signal coefficient .
[0010] In step S3: The path loss from the node v to the server is , the probability of a node participating in the election is ,in , the agreed range of node ID generation is , the power of the signal sent by the node .
[0011] In step S4: The termination signal is the sum of the termination signals received by the server is greater than .
[0012] In step S5: The leader judgment rule is that if the square of its own 2 ID is greater than or equal to half of the total, then the node becomes the leader, and the sending power of the termination signal is ,in For interval Generates random numbers. Beneficial Effects
[0013] (1) The present invention utilizes the characteristics of signal path loss and power calculation to ensure that the ID of each node cannot be eavesdropped, avoiding the need for nodes and servers to perform encryption and decryption operations to ensure the security of messages, significantly reducing the requirements of lightweight blockchain on device performance, and thus expanding the application scenarios of lightweight blockchain on performance-constrained devices.
[0014] (2) The present invention aims to further enhance the security of the blockchain network. The algorithm can elect a secret leader node, avoiding attacks such as denial of service based on the leader, and proposes an election mechanism to ensure that the leader hides his or her own information, thereby effectively avoiding attacks from malicious nodes.
[0015] (3) Since we can ensure that the algorithm can generate a unique ID for each node with a high probability, the present invention can efficiently complete the leader election process within a constant number of rounds; compared with the traditional leader election algorithm, the present invention greatly improves the probability of electing a leader within a constant number of rounds. Given that current communication technology can complete a round of elections within milliseconds, the present invention can therefore achieve the election of a secret leader within milliseconds. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 This is the blockchain system architecture diagram; Figure 2 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0017] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the following Figure 2 It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0018] See also Figure 1-2 A fast secret leader election method for a lightweight blockchain network, the method comprising: S1: The server and network nodes initialize basic network information, including the server's agreed signal power 、Number of network nodes , minimum number of election nodes , ID scaling factor , Maximum election round , termination signal coefficient .
[0019] Specifically, in the initialization network information phase, the server and the node can complete the information exchange through network communication. Specifically, the server first sets the set parameters Broadcast to all nodes in the network. All nodes learn the server's IP address based on the received message and send their own device information. The server calculates the number of nodes in the network based on the device information. , and again the number of nodes Broadcast to all nodes in the network.
[0020] S2: The server is based on the agreed power Send a signal and start monitoring the channel.
[0021] Specifically, the server can use the communication chip to send a signal at a specified power. The communication chip controls the output power of the signal through the RF power amplifier (PA). In order to obtain the total signal power of the candidate nodes, the RF signal amplitude is sampled through the detection circuit or ADC, the signal amplitude is converted into a digital quantity, and the signal power is calculated for monitoring the power strength of the signal.
[0022] S3: Node Calculate the path loss between itself and the server based on the monitored signal , the probability of participating in the election , if the node chooses to participate in the leader election, it changes to a candidate node.
[0023] Specifically, assuming that the current node is node , the server uses the agreed power After broadcasting the signal, the node The monitored signal power is ,According to the signal-to-interference-to-noise ratio, the path loss represents the attenuation factor of the signal from the sending location to the receiving location, which is obtained according to the ratio of the agreed power to the power of the received signal, and is a conventional technology.
[0024] The probability of a node participating in an election use The purpose is to control the number of candidate nodes Specifically, we let the indicator variable Representation Node Whether to participate in the leader election, let the random variable is the sum of all node decisions, due to the node election probability ,and Pick and The maximum value of , so we can get the random variable The expected value of , combined with Chernoff's inequality, we can get and , because the number of nodes in this network is often large, it can be guaranteed that the number of candidate nodes has a high probability of being located .
[0025] S4: Candidate Node In the interval Generates itself randomly and uniformly within the range , and according to the power Send a signal.
[0026] The ID generation interval It can be guaranteed that there is at least one round of candidate node IDs that are different. Specifically, we set the random variable Representation Node and nodes The generated ID conflicts because the node ID generation interval is , so the probability of a conflict in one round is:
[0027] Then the probability of having ID conflict nodes among all nodes is:
[0028] go through The probability that there is still an ID conflict is , and because It is very large, so it can be guaranteed that there is a high probability that there will be at least one round in which the IDs generated by all candidate nodes do not conflict.
[0029] The transmission power It can be ensured that when the IDs of all nodes are not conflicting, when the signal sent by the largest node is listened to by the server, its signal value satisfies ,in The sum of the signal powers of all candidate nodes monitored by the server. Specifically, due to signal loss, the server receives The signal power is , then the sum of the signal powers received by the server is ,in is the set of all candidate nodes. Can get , so it is easy to get .
[0030] S5: The server receives the signals sent by all candidate nodes and calculates the sum of the powers , and the sum of the powers Broadcast to all nodes in the network.
[0031] Specifically, the signal strength detection in this process can be implemented by using the signal monitoring technology described in S3. Broadcasting can be done using the UDP protocol. Specifically, the node runs the program that receives the message by default. The server sets the broadcast datagram format. After the message is broadcast, the node can receive the datagram and parse the datagram content to get the message broadcast by the server.
[0032] S6: The candidate node monitors the channel and if it receives a message ,and , then the node becomes a secret leader, otherwise it is a candidate node.
[0033] It has been proved in step S4 that when the IDs of the candidate nodes do not conflict with each other, there is only one node that satisfies , then the node can become the leader, and both confidentiality (all nodes do not know the IDs of other nodes) and uniqueness (only one node satisfies this feature) are satisfied.
[0034] S7: Secret Leaders with Power Send a termination signal, where For interval A randomly generated integer within the range, candidate nodes are in power Send a termination signal.
[0035] The technique used to send signals at a specified power is consistent with the technique used in step S2. If no leader is elected in this round, all nodes send signals at a specified power. Sending signals. If a secret leader node is elected, the power of the signal sent will be slightly greater than that of other nodes. Therefore, we set the random amplification parameter To distinguish.
[0036] S8: The server calculates the sum of the received termination signals, and if it is greater than , then the election is terminated and a secret leader is generated, otherwise execution continues from S3.
[0037] Specifically, if no leader is elected in a round, the power signal sent by all nodes is , the signal power received by the server is On the contrary, since the signal power sent by the leader is greater, the signal power received by the server is greater than , the server can determine whether a secret leader exists based on this threshold. If it does exist, the leader election process can be stopped.
[0038] The leader election method proposed in this invention shows remarkable flexibility and efficiency, and can adapt to network environments with greatly different performance. The present invention greatly reduces the demand for device performance and can adjust parameters to determine a performance range suitable for a network with uneven performance, thereby ensuring the flexibility and efficiency of the method.
[0039] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions only describe the principles of the present invention. The present invention may be subject to various changes and improvements without departing from the spirit and scope of the present invention. These changes and improvements fall within the scope of the present invention. The scope of protection claimed by the present invention is defined by the attached claims and their equivalents.
Claims
1. A fast secret leader election method for lightweight blockchain networks, characterized by: S1: Server and node initialize basic network information; S2: The server broadcasts a signal to all nodes in the network at an agreed power; S3: The node calculates the path loss between it and the server based on the power of the received signal and the agreed power. The node participates in the election with a certain probability, randomly and evenly generates an ID according to the agreed range, and sends the signal with a certain power. S4: The server monitors the channel, calculates the power sum of the received signals, sends the received power sum to all nodes, and monitors the election termination signal. If there is a termination signal, the election is stopped. S5: The node monitors the channel and determines whether it becomes the leader based on the power and if so, it sends a termination signal, otherwise it continues with S3.
2. The method for fast election of secret leaders for lightweight blockchain networks according to claim 1 is characterized by the following steps: In S1: the basic network information includes the server's agreed signal transmission power 、Number of network nodes , minimum number of election nodes , ID scaling factor , Maximum election round , termination signal coefficient , N is the number of nodes in the current network.
3. The fast secret leader election method for lightweight blockchain networks according to claim 2 is characterized by: In step S3: The node The path loss to the server is ,node The probability of participating in the election is ,in ,node The ID convention generation range is , the power of the signal sent by the node .
4. The method for fast election of secret leaders for lightweight blockchain networks according to claim 2 is characterized in that, in step S4: the termination signal is the sum of the termination signals received by the server is greater than .
5. According to the method for fast election of secret leaders for lightweight blockchain networks in claim 3, it is characterized in that, in step S5: the leader judgment rule is that if the square of its own 2 ID is greater than or equal to half of the sum, then the node becomes the leader, and the transmission power of the termination signal is ,in For interval Generates random numbers.
6. A non-volatile storage medium, characterized in that: The non-volatile storage medium includes a stored program, wherein the program controls the device where the non-volatile storage medium is located to execute the method according to any one of claims 1 to 5 when the program is executed.
7. An electronic device, characterized in that: It comprises a processor and a memory; the memory stores computer-readable instructions, and the processor is used to execute the computer-readable instructions, wherein the computer-readable instructions execute the method described in any one of claims 1 to 5 when executed.
Citation Information
Patent Citations
Consensus method suitable for wireless block chain network
CN110913501A
Fault-tolerant consensus method suitable for wireless block chain network
CN112860807A
Multi-chain block chain leader hidden election method and device
CN115580442A
Block chain consensus method based on multi-agent reinforcement learning and application thereof
CN117318966A
Method and apparatus for electing representative node device, and computer device and storage medium
WO2020048427A1