A multi-factor capability proof blockchain consensus method for agricultural Internet of Things

By adopting the multi-factor capability proof blockchain consensus method in the agricultural Internet of Things, the problems of large node computing burden and high latency are solved, and a low-latency and highly scalable blockchain system is achieved, which is suitable for energy-limited agricultural products. Internet scenarios.

CN115174626BActive Publication Date: 2024-10-18GUANGDONG LIANHE INFORMATION TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210788803.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-06
Publication Date
2024-10-18
Estimated Expiration
2042-07-06

AI Technical Summary

Technical Problem

In the agricultural Internet of Things, the problems of high node computing burden, high transaction confirmation delay, and low scalability, especially in energy-limited outdoor scenarios, make it difficult for the traditional blockchain consensus mechanism to meet the needs of low latency and efficient data processing.

Method used

The multi-factor capability proof blockchain consensus method (PoMC) for the agricultural Internet of Things is adopted, accounting nodes are re-selected through the lottery and credibility evaluation of senator nodes, transactions are generated based on work scenarios, and the zone is optimized through the multi-factor capability proof algorithm The block packaging and verification process reduces node computing burden and latency.

Benefits of technology

It effectively reduces the transaction confirmation delay, reduces the node computing burden, extends the node life, and improves the scalability and security of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115174626B_ABST
    Figure CN115174626B_ABST
Patent Text Reader

Abstract

The present invention discloses a multi-factor capability proof blockchain consensus implementation method for agricultural Internet of Things. Based on the reputation mechanism, a senator lottery algorithm is designed. The senator nodes are based on the multi-factor capability proof consensus mechanism, and the reputation element reflecting the degree of contribution of the node to the system and the signal-to-noise ratio element of the node communication capability are used as consensus evidence to determine the ownership of the bookkeeping right. The node with the bookkeeping right is responsible for collecting the Internet of Things transactions generated by other nodes in the network. After receiving the block, other nodes are verified and added to the end of the local blockchain to complete the data chain storage. This method can effectively reduce the transaction confirmation delay in the agricultural Internet of Things based on blockchain technology, reduce the computing burden of the node, and improve the scalability and data security of the above network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of blockchain, and specifically is a multi-factor capability proof blockchain consensus method for agricultural Internet of Things. Background Art

[0002] The Internet of Things technology can scientifically manage the agricultural production process to improve agricultural production efficiency and ensure agricultural production safety while saving resources and costs, and has made many contributions to environmental protection. However, the agricultural Internet of Things is now facing some development bottlenecks. The first is the data security issue. In some outdoor application scenarios, agricultural Internet of Things devices are easily stolen and damaged, resulting in the risk of data being tampered with. Secondly, with the continuous development of low-power wide area networks, the number of agricultural Internet of Things devices will grow at a geometric scale in the future, making the cost of centralized management unbearable. In addition, due to the heterogeneity of the Internet of Things system, the data exchange efficiency between different departments, different data centers, and different Internet of Things systems is low, and the sharing ability is poor.

[0003] With the development of blockchain technology, more and more research has focused on how to solve the above-mentioned problems in the agricultural Internet of Things through blockchain technology in recent years. Blockchain is a decentralized distributed ledger technology. All nodes in the network maintain the same blockchain, and each node saves a complete copy of the blockchain locally. Blockchain is based on cryptography technology. As a ledger that only supports additions, it has the characteristics of tamper-proof and traceability. When blockchain technology is deployed in the Internet of Things, the Internet of Things data will be jointly maintained by all nodes in the P2P network, which can effectively realize the tracking and tracing of Internet of Things data, and can prevent data from being tampered with, and promote the flow of value in an untrusted environment.

[0004] The consensus mechanism is one of the core technologies of blockchain, which enables all nodes in a decentralized peer-to-peer network to reach a consensus on a certain transaction. The hardware devices in the agricultural Internet of Things are usually some sensors, control devices, agricultural machinery and equipment. The computing resources and energy resources of such devices are highly limited, making it difficult to run complex blockchain consensus mechanisms. For example, the PoW (proof of work) consensus mechanism requires nodes to perform a large amount of calculations. In some outdoor agricultural production scenarios, the energy of the IoT nodes cannot be replenished in time, and a large amount of calculations will cause the energy of the nodes to be exhausted prematurely. At the same time, the consensus process of some blockchain consensus mechanisms takes too long and cannot meet the low latency requirements of the agricultural Internet of Things for data. In addition, consensus mechanisms such as PBFT and PoS require some nodes to be privileged nodes to manage the consensus process within the management system, but the equity held by these privileged nodes will accumulate over time, which is not conducive to the competition for accounting rights by newly added nodes. Summary of the invention

[0005] In view of the problems of heavy node computing burden, high transaction confirmation delay, low scalability, etc. in the above-mentioned agricultural Internet of Things based on blockchain technology, the present invention provides a multi-factor capability proof blockchain consensus method PoMC (Proof of Multifactor Capacity) for the agricultural Internet of Things.

[0006] To achieve the above-mentioned invention object, the present invention adopts the following technical solution: a multi-factor capability proof blockchain consensus method for agricultural Internet of Things, comprising the following steps:

[0007] 1) Build and initialize the blockchain-based agricultural Internet of Things, which is an open, distributed, peer-to-peer network. The total number of nodes in the network is N, including N m Mining nodes, 1 accounting node and N S Senator nodes; all nodes store a local copy of the blockchain; during the initialization phase of the network, N S =0; the system generates a block that contains no information except the hash value as the genesis block, and randomly selects a node from the miner node as the accounting node;

[0008] 2) All nodes draw lots to select senator nodes;

[0009] 3) Senator nodes generate credit ratings based on the historical behavior of the nodes to update the credibility of all nodes in the system;

[0010] 4) Senator nodes reselect accounting nodes based on multi-factor capability proof;

[0011] 5) All nodes in the system generate different transactions according to the working scenarios and send them to the current accounting nodes in the system. The transactions include data collection messages, blockchain system transactions and instruction execution feedback;

[0012] 6) The accounting node stores the received transaction into the transaction pool and determines whether the transaction pool is full. If the transaction pool is full, go to step 7), otherwise go to step 6);

[0013] 7) The accounting node packages the transactions in the transaction pool into blocks and broadcasts the blocks to the network; the block header contains the following information: public_key, timestamp, hash value of the previous block, PoMC consensus information; public_key represents the address of the senator node S, and timestamp represents the timestamp;

[0014] 8) After receiving the block, other nodes verify whether the hash value of the block is equal to the hash value of the previous block. If they are equal, go to step 9); otherwise, discard the block and go to step 10);

[0015] 9) Add the block to the end of the local blockchain;

[0016] 10) The multi-factor proof-of-capacity blockchain consensus method for agricultural IoT is concluded.

[0017] Furthermore, in the above step 2), the node N i The selection of senator nodes by lottery includes the following steps:

[0018] 2.1) Node N i Determine whether there is a senator node in the system. If N S >0, go to step 2.2); otherwise, go to step 2.3);

[0019] 2.2) Node N i Determine whether the terms of all current senator nodes in the system are about to expire. If T cur >T S +t S -t red , go to step 2.3); otherwise go to step 2.2); where T cur is the current system time, T S is the time when the current senator node in the system takes office, t red is the redundancy time, t S is the term length of the senator node;

[0020] 2.3) Node N i Execute the operation H(param||nonce), if H(param||nonce)<R i target, go to step 2.4); otherwise nonce+1, go to step 2.3); where H(param||nonce) represents a double SHA256 hash operation on the parameters containing param and nonce, param is the node N i The self-information parameter, nonce is the node N i A randomly generated random number, target is the difficulty value released by the system, R i is the credibility value;

[0021] 2.4) Node N i Broadcast senator lottery information, the lottery information includes param, nonce value, and timestamp;

[0022] 2.5) The node receives the lottery information. If N S <Th S , N S +1, go to step 2.5); otherwise, go to step 2.6); where Th srepresents the threshold value of the number of senator nodes;

[0023] 2.6)N s The node represented by the source address of the lottery information becomes the senator node of the new round.

[0024] Furthermore, in the above step 3), the senator node S updates the node N i The credibility of the company includes the following steps:

[0025] 3.1) Senator Node S Computing Node N i Credit evaluation The calculation formula is as follows:

[0026]

[0027] Among them, C pos For node N i The credibility of the behavior affects the number of positive behaviors, C neg For node N i The credibility of the behavior affects the amount of negative behavior;

[0028] 3.2) Senator node S generates a credit evaluation transaction, denoted as

[0029] 3.3) Senator node S sends the transaction Trans to the current accounting node in the system;

[0030] 3.4) The accounting node stores the transaction Trans into the local transaction pool. If the transaction pool is full, go to step 3.5); otherwise, go to step 3.4)

[0031] 3.5) The accounting node packages the transactions in the transaction pool into blocks and broadcasts them in the network;

[0032] 3.6) The node that receives the block verifies whether the hash value of the block is equal to the hash value of the previous block. If they are equal, the block is added to the end of the local blockchain; otherwise, the block is discarded.

[0033] Furthermore, the above step 4) includes the following steps:

[0034] 4.1) Non-Senator Node N i Calculate the interference coefficient η, the calculation formula is as follows:

[0035]

[0036] Where P noise represents the noise intensity in the system, n itf represents the number of interfering nodes, represents the distance between node k and senator node S1, a represents the channel fading index, and β1 represents the node N i The signal-to-noise ratio threshold at which it can successfully communicate with its nearest senator node;

[0037] 4.2) Non-Senator Node N i Calculate the probability Pr(SINR) of being able to successfully transmit to the nearest senator node i ≥β1), the calculation formula is as follows:

[0038]

[0039] SINR i Represents node N i The signal-to-noise ratio when communicating with the nearest senator node, η is the interference coefficient;

[0040] 4.3) Non-Senator Node N i Calculate the reputation value R i The probability Pr(R i ≥β2), the calculation formula is as follows:

[0041]

[0042] Where E(R i ) and D(R i ) represent the nodes N i The expectation and variance of the historical credibility of

[0043] 4.4) Node N i Calculate your multi-factor capability value MC i , M.C. i The calculation formula is as follows:

[0044] MC i =Pr(SINR i ≥β1)·Pr(R i ≥β2)

[0045] 4.5) Node N i Construct a competition message and send it to the nearest senator node; the competition message is recorded as ConsMsg{public_key,timestamp,MC i};

[0046] 4.6) The senator node selects a node with the largest MC value from the received competition messages as a candidate node, and broadcasts the information of the candidate node within the senator node;

[0047] 4.7) The senator node receives the candidate node broadcast information from other senator nodes and adds the candidate node to the candidate node list;

[0048] 4.8) Senator nodes calculate the location of nodes N based on the arrival time positioning algorithm i The distance estimation between

[0049] 4.9) Senator Node Verification Node N i The signal-to-noise ratio capability value Pr(SINR i ≥β1), if Senator Node to Node N i Vote affirmatively and go to step 4.10); otherwise, the senator node votes for node N i Vote negative, go to step 4.12); where d ij Represents node N i and node N j The actual distance between ij and n ij are the introduced multiplicative coefficients and additive coefficients;

[0050] 4.10) The senator node searches the local blockchain for node N in the current cycle i The reputation of the node N affects the behavior. i Estimated credibility

[0051] 4.11) Senator Node Verification Node N i The credibility value Pr(R i ≥β2), if Senator Node to Node N i Vote affirmatively, otherwise the senator node will vote on node N i vote no;

[0052] 4.12) Node N i Get a voting set V i ={S1Y,S2N,…S k Y},k∈[1,N S ], where S1Y represents the relationship between senator node S1 and candidate node N i The vote is positive, S2N votes for candidate node N i The vote is negative, if node N i The number of affirmative votes obtained is greater than the threshold T V , go to step 4.13), otherwise node N i If you lose the competition for bookkeeping rights, go to step 4.14);

[0053] 4.13) If node N i The MC value of node N is the highest among the remaining candidate nodes. i Winning the competition for bookkeeping rights in this round, the senator node broadcasts node N i information, announcing node N i Become a bookkeeping node; otherwise, node N i Lost in the competition for bookkeeping rights;

[0054] 4.14) The senator node will node N i It is removed from the candidate node list, and the PoMC-based accounting node selection process ends.

[0055] The present invention has the following beneficial effects:

[0056] This method effectively reduces the transaction confirmation delay in the agricultural Internet of Things based on blockchain technology and reduces the computational burden of nodes in the consensus mechanism. At the same time, the adopted reputation-based senator lottery algorithm averages the energy load of the network and prolongs the life of the nodes. In addition, this method has good security while improving the scalability of the agricultural Internet of Things. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 Flowchart of the multi-factor capability proof blockchain consensus method for agricultural IoT.

[0058] Figure 2 Flowchart of the algorithm for drawing lots for senator nodes.

[0059] Figure 3 Schematic diagram of the credibility mechanism.

[0060] Figure 4 This is the flow chart of the PoMC consensus mechanism. DETAILED DESCRIPTION

[0061] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments. It should be pointed out that the technical solution and design principle of the present invention are described in detail below only with an optimized technical solution, but the protection scope of the present invention is not limited to this.

[0062] like Figure 1 As shown in the figure, the multi-factor capability proof blockchain consensus method for agricultural IoT includes the following steps:

[0063] 1) Build and initialize the blockchain-based agricultural Internet of Things, which is an open, distributed, peer-to-peer network. The total number of nodes in the network is N, including N m Mining nodes, 1 accounting node and N SSenator nodes; all nodes store a local copy of the blockchain; during the initialization phase of the network, N S =0; the system generates a block that contains no information except the hash value as the genesis block, and randomly selects a node from the miner node as the accounting node;

[0064] 2) All nodes draw lots to select senator nodes;

[0065] 3) Senator nodes generate credit ratings based on their historical behaviors to update the reputation of all nodes in the system. The historical behaviors of nodes include maintenance behaviors that have positive significance to the system and destructive behaviors that have negative significance. These behaviors are collectively referred to as reputation-affecting behaviors, as shown in Table 1.

[0066] Table 1 Behaviors that affect node reputation

[0067]

[0068] 4) Reselect the accounting nodes, and the senator nodes will decide the ownership of the accounting rights based on the Proof of MultifactorCapacity (hereinafter referred to as PoMC);

[0069] 5) All nodes in the system generate different transactions according to the working scenarios. The transaction types include data collection messages, blockchain system transactions and instruction execution feedback. The generated transactions are sent to the current accounting nodes in the system;

[0070] 6) The accounting node stores the received transaction into the transaction pool and determines whether the transaction pool is full. If so, go to step 7), otherwise go to step 6);

[0071] 7) The accounting node packages the transactions in the transaction pool into blocks and broadcasts the blocks to the network. The information in the block header includes the following information: public_key, timestamp, hash value of the previous block, and PoMC consensus information. The public_key represents the address of the senator node S, and the timestamp represents the timestamp.

[0072] 8) After receiving the block, other nodes verify whether the hash value of the block is equal to the hash value of the previous block. If they are equal, go to step 9); otherwise, discard the block and go to step 10);

[0073] 9) Add the block to the end of the local blockchain;

[0074] 10) The multi-factor proof-of-capacity blockchain consensus method for agricultural IoT is concluded.

[0075] As a preferred embodiment of the present invention, Figure 2As shown, node N i Participating in the lottery to select a senator node includes the following steps:

[0076] 2.1) Node N i Determine whether there is a senator node in the system. If N S >0, go to step 2.2); otherwise, go to step 2.3);

[0077] 2.2) Node N i Determine whether the terms of all current senator nodes in the system are about to expire. If T cur >T S +t S -t red , go to step 2.3); otherwise go to step 2.2); where T cur is the current system time, T S is the time when the current senator node in the system takes office, t red is the redundancy time, t S is the term length of the senator node; in the specific embodiment of the present invention, t red = 20 seconds, t S = 100 seconds;

[0078] 2.3) Node N i Execute operation H(param||nonce), if H(param||nonce) is satisfied <R i target, go to step 2.4); otherwise nonce+1, go to step 2.3); where H(param||nonce) represents a double SHA256 hash operation on the parameters containing param and nonce, param is the node N i The self-information parameter, nonce is the node N i A randomly generated random number, target is the difficulty value released by the system;

[0079] 2.4) Node N i Broadcast senator lottery information, including its own information param, nonce value, and timestamp;

[0080] 2.5) The node receives the lottery information. If N S <Th S , N S +1, go to step 2.5); otherwise, go to step 2.6); where Th S represents the threshold value of the number of senator nodes. In a specific embodiment of the present invention, Th S =10;

[0081] 2.6)NS The node represented by the source address of the lottery information becomes the senator node of the new round.

[0082] As a preferred embodiment of the present invention, Figure 3 As shown, with node N i For example, Senator node S updates node N i The specific steps of credibility are as follows:

[0083] 3.1) Senator Node S Computing Node N i Credit evaluation The calculation formula is as follows:

[0084]

[0085] Among them, C pos For node N i The credibility of the behavior affects the number of positive behaviors, C neg For node N i The credibility of the behavior affects the amount of negative behavior;

[0086] 3.2) Senator node S generates a credit evaluation transaction in the form of Where public_key represents the address of the senator node S, and timestamp represents the timestamp;

[0087] 3.3) Senator node S sends the transaction Trans to the current accounting node in the system;

[0088] 3.4) The accounting node stores the transaction Trans into the local transaction pool. If the transaction pool is full, go to step 3.5); otherwise, go to step 3.4)

[0089] 3.5) The accounting node packages the transactions in the transaction pool into blocks and broadcasts them in the network;

[0090] 3.6) The node that receives the block verifies whether the hash value of the block is equal to the hash value of the previous block. If they are equal, the block is added to the end of the local blockchain; otherwise, the block is discarded.

[0091] As a preferred embodiment of the present invention, Figure 4 As shown, non-senator node N i Take this as an example, the specific steps are as follows:

[0092] 4.1) Node N i Calculate the interference coefficient η, where η represents the node N i The interference coefficient, η, when communicating with the senator node closest to its location is calculated as follows:

[0093]

[0094] Where P noise represents the noise intensity in the system, n itf represents the number of interfering nodes, represents the distance between node k and senator node S1, and a represents the channel fading index;

[0095] 4.2) Node N i Calculate Pr(SINR i ≥β1), where SINR i Represents node N i The signal-to-noise ratio when communicating with its nearest senator node, β1 represents the node N i The signal-to-noise ratio threshold at which the nearest senator node can successfully communicate with it, and Pr(SINR i ≥β1) indicates that node N i The probability of successfully transmitting to the nearest senator node, Pr(SINR i ≥β1) is calculated as follows:

[0096]

[0097] 4.3) Node N i Calculate Pr(R i ≥β2), Pr(R i ≥β2) indicates that node N i The credibility value R i The probability that the system reputation is greater than the minimum requirement β2, Pr(R i ≥β2) is calculated as follows:

[0098]

[0099] Where E(R i ) and D(R i ) represent the nodes N i The expectation and variance of the historical credibility of

[0100] 4.4) Node N i Calculate your multi-factor capability value MC i , the calculation formula is as follows:

[0101] MC i =Pr(SINR i ≥β1)·Pr(R i ≥β2)

[0102] 4.5) Node N iConstruct a competition message and send it to the nearest senator node; the competition message is in the form of ConsMsg{public_key,timestamp,MC i};

[0103] 4.6) The senator node selects a node with the largest MC value as a candidate node, and broadcasts the information of the candidate node within the senator node;

[0104] 4.7) The senator node receives the candidate node broadcast information from other senator nodes and adds the candidate node to the candidate node list;

[0105] 4.8) The senator node calculates the location of node N based on the arrival time positioning algorithm i The distance estimation between

[0106] 4.9) Senator Node Verification Node N i The signal-to-noise ratio capability value Pr(SINR i ≥β1), if Senator Node to Node N i Vote affirmatively and go to step 4.10); otherwise, the senator node votes for node N i Vote negative, go to step 4.12); where d ij Represents node N i and node N j The actual distance between ij and n ij are the introduced multiplicative coefficients and additive coefficients;

[0107] 4.10) The senator node searches the local blockchain for node N in the current cycle i The reputation of the node N affects the behavior. i Estimated credibility

[0108] 4.11) Senator Node Verification Node N i The credibility value Pr(R i ≥β2), if Senator Node to Node N i Vote affirmatively, otherwise the senator node will vote on node N i vote no;

[0109] 4.12) Node N i Get a voting set V i ={S1Y,S2N,…S k Y},k∈[1,N S]. S1Y represents the relationship between senator node S1 and candidate node N i The vote is positive, S2N votes for candidate node N i The vote is negative, and so on. If node N i The number of affirmative votes obtained is greater than the threshold T V , go to step 4.13), otherwise node N i If the candidate fails in the competition for bookkeeping rights, the process goes to step 4.14); in a specific embodiment of the present invention,

[0110] 4.13) If node N i The MC value of node N is the highest among the remaining candidate nodes. i Winning the competition for bookkeeping rights in this round, the senator node broadcasts node N i information, announcing node N i Become a bookkeeping node; otherwise, node N i Lost in the competition for bookkeeping rights;

[0111] 4.14) The senator node will node N i It is removed from the candidate node list, and the PoMC-based accounting node selection process ends.

[0112] The embodiments are preferred implementations of the present invention, but the present invention is not limited to the above-mentioned implementations. Any obvious improvements, substitutions or modifications that can be made by those skilled in the art without departing from the essential content of the present invention belong to the protection scope of the present invention.

[0113] The present invention adopts OMNet++ as an experimental platform, mainly for the agricultural Internet of Things, and has designed a method for implementing a multi-factor capability proof blockchain for the agricultural Internet of Things, which has the advantages of low latency, low energy consumption, high transaction throughput and high scalability. The above content is only used to illustrate the design ideas and features of the present invention, and its purpose is to enable technicians in this field to understand the content of the present invention and implement it accordingly. The protection scope of the present invention is not limited to the above content. Therefore, all equivalent changes or modifications made according to the principles and design ideas disclosed by the present invention are within the protection scope of the present invention.

Claims

1. A multi-factor capability proof blockchain consensus method for agricultural Internet of Things, characterized by: The steps include: 1) Build and initialize the blockchain-based agricultural Internet of Things, which is an open, distributed, peer-to-peer network. The total number of nodes in the network is N, including N m Mining nodes, 1 accounting node and N S Senator nodes; all nodes store a local copy of the blockchain; during the initialization phase of the network, N S =0; the system generates a block that contains no information except the hash value as the genesis block, and randomly selects a node from the miner node as the accounting node; 2) All nodes draw lots to select senator nodes; 3) Senator nodes generate credit ratings based on the historical behavior of the nodes to update the credibility of all nodes in the system; 4) Senator nodes reselect accounting nodes based on multi-factor capability proof; 5) All nodes in the system generate different transactions according to the working scenarios and send them to the current accounting nodes in the system. The transactions include data collection messages, blockchain system transactions and instruction execution feedback; 6) The accounting node stores the received transaction into the transaction pool and determines whether the transaction pool is full. If the transaction pool is full, go to step 7), otherwise go to step 6); 7) The accounting node packages the transactions in the transaction pool into blocks and broadcasts the blocks to the network; the block header contains the following information: public_key, timestamp, hash value of the previous block, PoMC consensus information; public_key represents the address of the senator node S, and timestamp represents the timestamp; 8) After receiving the block, other nodes verify whether the hash value of the block is equal to the hash value of the previous block. If they are equal, go to step 9); otherwise, discard the block and go to step 10); 9) Add the block to the end of the local blockchain; 10) The multi-factor capability proof blockchain consensus method for the agricultural Internet of Things is concluded; The step 4) comprises the following steps: 4.1) Non-Senator Node N i Calculate the interference coefficient η, the calculation formula is as follows: Where P noise represents the noise intensity in the system, n itf represents the number of interfering nodes, represents the distance between node k and senator node S1, a represents the channel fading index, and β1 represents the node N i The signal-to-noise ratio threshold at which it can successfully communicate with its nearest senator node; 4.2) Non-Senator Node N i Calculate the probability Pr(SINR) of being able to successfully transmit to the nearest senator node i ≥v1), the calculation formula is as follows: SINR i Represents node N i The signal-to-noise ratio when communicating with the nearest senator node, η is the interference coefficient; 4.3) Non-Senator Node N i Calculate the reputation value R i The probability Pr(R i ≥β2), the calculation formula is as follows: Where E(R i ) and D(R i ) represent the nodes N i The expectation and variance of the historical credibility of 4.4) Node N i Calculate your multi-factor capability value MC i , M.C. i The calculation formula is as follows: MC i =Pr(SINR i ≥β1)·Pr(R i ≥β2) 4.5) Node N i Construct a competition message and send it to the nearest senator node; the competition message is recorded as ConsMsg{public_key,timestamp,MC i }; 4.6) The senator node selects a node with the largest MC value from the received competition messages as a candidate node, and broadcasts the information of the candidate node within the senator node; 4.7) The senator node receives the candidate node broadcast information from other senator nodes and adds the candidate node to the candidate node list; 4.8) Senator nodes calculate the location of nodes N based on the arrival time positioning algorithm i The distance estimation between 4.9) Senator Node Verification Node N i The signal-to-noise ratio capability value Pr(SINR i ≥β1), if Senator Node to Node N i Vote affirmatively and go to step 4.10); otherwise, the senator node votes for node N i Vote negative, go to step 4.12); where d ij Represents node N i and node N j The actual distance between ij and n ij are the introduced multiplicative coefficients and additive coefficients; 4.10) The senator node searches the local blockchain for node N in the current cycle i The reputation of the node N affects the behavior. i Estimated credibility 4.11) Senator Node Verification Node N i The credibility value Pr(R i ≥β2), if Senator Node to Node N i Vote affirmatively, otherwise the senator node will vote on node N i vote no; 4.12) Node N i Get a voting set V i ={S1Y,S2N,…S k Y},k∈[1,N S ], where S1Y represents the relationship between senator node S1 and candidate node N i The vote is positive, S2N votes for candidate node N i The vote is negative, if node N i The number of affirmative votes obtained is greater than the threshold T V , go to step 4.13), otherwise node N i If you lose the competition for bookkeeping rights, go to step 4.14); 4.13) If node N i The MC value of node N is the highest among the remaining candidate nodes. i Winning the competition for bookkeeping rights in this round, the senator node broadcasts node N i information, announcing node N i Become a bookkeeping node; otherwise, node N i Lost in the competition for bookkeeping rights; 4.14) The senator node will node N i It is removed from the candidate node list, and the PoMC-based accounting node selection process ends.

2. The multi-factor capability proof blockchain consensus method for the agricultural Internet of Things as claimed in claim 1 is characterized in that: In step 2), node N i The selection of senator nodes by lottery includes the following steps: 2.1) Node N i Determine whether there is a senator node in the system. If N S >0, go to step 2.2); otherwise, go to step 2.3); 2.2) Node N i Determine whether the terms of all current senator nodes in the system are about to expire. If T cur >T S +t S -t red , go to step 2.3); otherwise go to step 2.2); where T cur is the current system time, T S is the time when the current senator node in the system takes office, t red is the redundancy time, t S is the term length of the senator node; 2.3) Node N i Execute operation H(param||nonce), if H(param||nonce) is satisfied <R i target, go to step 2.4); otherwise nonce+1, go to step 2.3); where H(param||nonce) represents a double SHA256 hash operation on the parameters containing param and nonce, param is the node N i The self-information parameter, nonce is the node N i A randomly generated random number, target is the difficulty value released by the system, R i is the credibility value; 2.4) Node N i Broadcast senator lottery information, the lottery information includes param, nonce value, and timestamp; 2.5) The node receives the lottery information. If N S <Th S , N S +1, go to step 2.5); otherwise, go to step 2.6); where Th S represents the threshold of the number of senator nodes; 2.6)N S The node represented by the source address of the lottery information becomes the senator node of the new round.

3. The multi-factor capability proof blockchain consensus method for the agricultural Internet of Things as claimed in claim 1 is characterized in that: In step 3), senator node S updates node N i The credibility of the company includes the following steps: 3.1) Senator Node S Computing Node N i Credit evaluation The calculation formula is as follows: Among them, C pos For node N i The credibility of the behavior affects the number of positive behaviors, C neg For node N i The credibility of the behavior affects the amount of negative behavior; 3.2) Senator node S generates a credit evaluation transaction, denoted as 3.3) Senator node S sends the transaction Trans to the current accounting node in the system; 3.4) The accounting node stores the transaction Trans into the local transaction pool. If the transaction pool is full, go to step 3.5); otherwise, go to step 3.4) 3.5) The accounting node packages the transactions in the transaction pool into blocks and broadcasts them in the network; 3.6) The node that receives the block verifies whether the hash value of the block is equal to the hash value of the previous block. If they are equal, the block is added to the end of the local blockchain; otherwise, the block is discarded.

Citation Information

Patent Citations

  • Marine Internet of Things data security sharing method under edge computing framework based on federated learning and block chain technology

    CN112348204A