DWSN Node Decision-Making Method Based on Blockchain Rotation Consensus Group
By employing a blockchain-based rotating consensus group method in wireless sensor networks, public and private keys are generated, consensus nodes are verified, a consensus cluster is formed, and nodes with high reputation are selected to execute tasks. This solves the problem of poor information transmission security and achieves secure and reliable data transmission.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-13
- Publication Date
- 2026-03-10
AI Technical Summary
In existing wireless sensor networks, the security of information transmission is poor, especially during the data collection process, which is vulnerable to malicious attacks, resulting in unreliable data and affecting network security.
The method adopts a blockchain-based rotating consensus group approach. Complete public and private keys are generated through base stations, consensus nodes are verified, a consensus cluster is formed, the node with the highest reputation ranking is selected to execute the consensus task, and the node credit value is evaluated through an evaluation model to ensure the security and trustworthiness of the data.
It improves the security and reliability of data transmission in wireless sensor networks, prevents malicious attacks, and ensures the integrity and accuracy of data.
Smart Images

Figure CN115297477B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electronic digital data processing technology, and in particular to a DWSN node decision-making method based on a blockchain-based rotating consensus group. Background Technology
[0002] With the development of the times and the continuous advancement of computer technology, and with the increase in the number of interconnected things around the world, industrial sensors, as the front end of data collection, are receiving more and more attention.
[0003] Data reliability and security are two particularly important factors. Low-quality or unreliable data collection will impose a significant burden on the entire network. During the data collection process, cluster heads will transmit the collected data. However, excessive power during the collection process can lead to many unexpected situations, such as malicious attacks on cluster heads or unethical actions, resulting in data upload problems and rendering the cluster unreliable and invalid. When a base station with key escrow functionality is attacked, it will affect the security of the entire wireless sensor network, which undoubtedly poses a huge threat to the entire network. Summary of the Invention
[0004] The purpose of this invention is to provide a DWSN node decision-making method based on a blockchain-based rotating consensus group, aiming to solve the problem of poor security in existing information transmission.
[0005] To achieve the above objectives, this invention provides a DWSN node decision-making method based on a blockchain-based rotating consensus group, comprising the following steps:
[0006] In the DWSN network, the base station generates complete public and private keys for the consensus nodes of all service clusters;
[0007] The base station broadcasts a message, and the consensus node verifies the message with the service cluster using the complete public key based on the signal strength of the message. If the verification is successful, the consensus cluster, the authoritative node, and the cluster key corresponding to the consensus cluster are obtained.
[0008] Multiple consensus nodes send the collected data to the consensus cluster, and the authoritative node selects the consensus node with the highest reputation ranking to execute the consensus task;
[0009] The evaluation model is used to evaluate and calculate the credit score of consensus nodes that perform consensus tasks.
[0010] The specific method by which the base station in the DWSN network generates complete public and private keys for the consensus nodes of all service clusters is as follows:
[0011] The base station generates unique identifiers for the service node and all consensus nodes, thus obtaining the service identifier and the consensus identifier.
[0012] The consensus identifier selects a secret value, and the base station selects a private key. Calculations are then performed to obtain a partial public-private key.
[0013] The consensus node verifies the partial public and private keys. If the verification is successful, the business identifier generates a complete public key and a complete private key.
[0014] The base station broadcasts a message, and the consensus node verifies the message's signal strength using the complete public key with the service cluster. If the verification is successful, the specific method for obtaining the consensus cluster, the authoritative node, and the cluster key corresponding to the consensus cluster is as follows:
[0015] The base station broadcasts a message, and the consensus node verifies the message. If the verification is successful, the message is packaged and uploaded to the base station's ontology blockchain to obtain the initial block.
[0016] Once the business cluster is formed, each consensus node broadcasts a message;
[0017] After receiving the broadcast message, the consensus node performs verification based on the initial block, integrates the service clusters with signal strength greater than the threshold, and obtains a consensus cluster.
[0018] The consensus cluster negotiates to obtain an authoritative node;
[0019] Based on the authoritative node, calculations and negotiations are performed to obtain a pair of master keys and a pair of encryption keys;
[0020] The authoritative node sends the encrypted data to each service node for verification, and obtains the cluster key if the verification is successful.
[0021] The consensus nodes send the collected data to the consensus cluster, and the authoritative node selects the consensus node with the highest reputation ranking to execute the consensus task in the following specific manner:
[0022] The authoritative node generates an evaluation table;
[0023] The percentage data is obtained by calculating the percentage based on the evaluation table.
[0024] Based on the aforementioned percentage data, a reputation ranking is obtained;
[0025] The consensus node with the highest reputation ranking is selected to execute the consensus task.
[0026] The specific method for evaluating consensus nodes that perform consensus tasks using an evaluation model to calculate node credit scores is as follows:
[0027] An evaluation model is set up, which scores the consensus task executed by each consensus node, obtains the score result, and updates the equity credit pool.
[0028] Based on the scoring results, cosine similarity is calculated to obtain cosine data;
[0029] The node credit assessment is obtained by linearly summing the scoring results and the cosine data.
[0030] This invention discloses a blockchain-based rotating consensus group-based DWSN node decision-making method. In the DWSN network, the base station generates complete public and private keys for consensus nodes of all service clusters. The base station broadcasts messages, and the consensus nodes verify with the service clusters using the complete public keys based on the signal strength of the messages. If the verification is successful, the consensus cluster, the authoritative node, and the cluster key corresponding to the consensus cluster are obtained. Multiple consensus nodes send collected data to the consensus cluster, and the authoritative node selects the consensus node with the highest reputation ranking to execute the consensus task. An evaluation model is used to evaluate and calculate the node credit value for each consensus node executing the consensus task. The cluster forms a cluster head management system. Each data upload reaches consensus with various consensus groups in the network before operation, ensuring data security and trustworthiness, thereby solving the problem of poor security in existing message transmission methods. Attached Figure Description
[0031] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0032] Figure 1 This is a flowchart of the DWSN node decision-making method based on a blockchain-based rotating consensus group provided by the present invention.
[0033] Figure 2 This is a flowchart of how a base station in a DWSN network generates complete public and private keys for consensus nodes of all service clusters.
[0034] Figure 3 This is a base station broadcast message. The consensus node verifies with the service cluster using the complete public key based on the signal strength. If the verification is successful, a flowchart is obtained showing the consensus cluster, the authoritative node, and the cluster key corresponding to the consensus cluster.
[0035] Figure 4This is a flowchart in which multiple consensus nodes send the collected data to the consensus cluster, and the authoritative node selects the consensus node with the highest reputation ranking to execute the consensus task.
[0036] Figure 5 The process involves evaluating consensus nodes that perform consensus tasks using an evaluation model, updating the equity credit pool, and then using a notary group consensus node credit value ranking algorithm to calculate the node credit value assessment flowchart. Detailed Implementation
[0037] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.
[0038] Please see Figures 1 to 5 This invention provides a DWSN node decision-making method based on a blockchain-based rotating consensus group, comprising the following steps:
[0039] In the DWSN network described in S1, the base station generates complete public and private keys for the consensus nodes of all service clusters;
[0040] The S11 base station generates unique identifiers for the service node and all consensus nodes, thus obtaining the service identifier and the consensus identifier.
[0041] Specifically, the base station (BS) generates a unique identifier Li for all service nodes (nLi) and a unique identifier Hj for all consensus nodes (nHj).
[0042] S12 The consensus identifier selects a secret value, the base station selects a private key, and the calculation is performed to obtain a partial public-private key;
[0043] Specifically, each nHj selects a secret value xHj, where xHj∈R Z* q And calculate PHj=xHjP, BS chooses rHj∈R Z* q BS uses rHj as its private key skBS and calculates a partial public-private key pair (RHj, dHj): RHj = rHjP, dHj = rHj + x·h0(Hj,RHj,PHj)modq, where RHj is BS's public key pkBS, and P is a point in the additive group. Z* q It is a multiplicative group with no zero factors.
[0044] The consensus node described in S13 verifies the partial public and private keys. If the verification is successful, the business identifier generates a complete public key and a complete private key.
[0045] Specifically, when nHj receives (RHj, dHj), it verifies dHjP = RHj + h0(Hj, RHj, PHj)Ppub. If the verification passes, Hj sets its complete private key to skHj = (dHj, xHj) and its complete public key to pkHj = (PHj, RHj); otherwise, it discards the message and regenerates a partial public and private key. The same process applies to nHj node generating certificateless public and private keys.
[0046] The S2 base station broadcasts a message, and the consensus node verifies the signal strength of the message with the service cluster using the complete public key. If the verification is successful, the consensus cluster, the authoritative node, and the cluster key corresponding to the consensus cluster are obtained.
[0047] S21 base station broadcasts a message, and the consensus node verifies the message. If the verification is successful, the message is packaged and uploaded to the base station's ontology blockchain to obtain the initial block.
[0048] Specifically, once all nodes have generated their complete public-private key pairs, the BS broadcasts a message (msg).<SETUP,pkBS,SskBS(h0(L)),L> Where L is a list of all legitimate nodes. All consensus nodes use pkBS to sign and verify the message. When the verification is successful, the message is packaged into a block and uploaded to the nHj node and the local blockchains Bhj and BBS of BS as the initial block.
[0049] After the S22 service cluster is formed, each consensus node broadcasts a message;
[0050] Specifically, nHj broadcasts the message msgAHj<SskHj(h0(Hj)),pkHj,Hj> nLi verifies the signature using pkHj and performs verification based on the list of legitimate nodes L in the BS genesis block. When multiple msgHj are received, nLi selects to join the cluster of nodes with higher signal strength. Here, msgAHj is the broadcast message of node nHj, SskHj(h0(Hj)) is the digital signature of node nHj, pkHj is the public key of node nHj, Hj is the identity identifier of node nHj, and nLi is a general business node.
[0051] After receiving the broadcast message, the consensus node in S23 performs verification based on the initial block, integrates the service clusters with signal strength greater than the threshold, and obtains a consensus cluster.
[0052] Specifically, after the service cluster is formed, each nHj broadcasts the message msgHjB.<SskHj(h0(Hj)),pkHj,Hj> After receiving the message, other nHj will verify it and integrate the relevant business clusters with signal strength greater than the threshold M into a consensus cluster.
[0053] The consensus cluster described in S24 negotiates to obtain an authoritative node;
[0054] Specifically, the consensus nodes within the consensus cluster negotiate to produce an authoritative node, nKj.
[0055] S25 performs calculations and negotiations based on the authoritative node to obtain a pair of master keys and a pair of encryption keys; specifically, after the authoritative node is generated, the node selects... As a secret value, calculate GKj = HMAC(xj,Hj) and negotiate session keys with each member in the consensus group to generate a pair of master keys KLiKj and a pair of encryption keys kLiHj.
[0056] The authoritative node described in S26 sends the encrypted data to each service node for verification, and obtains the cluster key if the verification is successful.
[0057] Specifically, calculate C2 = EKLiKj(GKj,Kj,Li), nKj sends C2 to each nLi, nLi uses kLiHj to decrypt and verify Kj and Li. If the verification is successful, GKj is used as the cluster key; otherwise, the message is discarded and reported to Kj to regenerate the cluster key.
[0058] S3 The multiple consensus nodes send the collected data to the consensus cluster, and the authoritative node selects the consensus node with the highest reputation ranking to execute the consensus task;
[0059] The authoritative node described in S31 generates an evaluation table;
[0060] Specifically, authoritative nodes generate a transaction evaluation table, which includes elements such as transaction processing time (time), business node feedback information (grade), and transaction status (status). The more efficient a consensus node is in completing a transaction, the higher its credit score will be.
[0061] S32 calculates the percentage based on the evaluation table to obtain the percentage data;
[0062] Specifically, the weight of each element in the transaction evaluation table is determined based on the piecewise function.
[0063]
[0064]
[0065]
[0066]
[0067] The vector A = (Qsuccess, Qtime, Qassess) is obtained through calculation, where w1 in the piecewise function Weight is the weight of the corresponding transaction status, w2 is the weight of the corresponding business node feedback, and w3 is the weight of the corresponding transaction processing time.
[0068] S33 obtains the reputation ranking based on the aforementioned percentage data;
[0069] Specifically, the authoritative node selects the node with the highest ranking based on the current node credit value sequence to perform the consensus task.
[0070] S34 selects the highest-ranking consensus node based on the reputation ranking to execute the consensus task.
[0071] Specifically, the formula section with the highest reputation ranking is selected to execute the formula task.
[0072] S4 evaluates and calculates the node credit score by evaluating the consensus nodes that perform consensus tasks through an evaluation model.
[0073] S41 sets up an evaluation model, which scores the consensus task executed by each consensus node, obtains the score result, and updates the equity credit pool.
[0074] Specifically, a simple task evaluation model is set up. When a consensus node completes a consensus, it will receive a score between 0 and 1. If there is dishonest behavior, it will receive 0 points. The sum of the scores of the consensus nodes, taken as... Nu represents the total number of consensus nodes participating in the consensus task, and Score represents the total number of nodes participating in the consensus task. i The score generated for each consensus task.
[0075] S42 calculates the cosine similarity based on the scoring results to obtain cosine data;
[0076] Specifically, cosine similarity is used to address the impact of task performance weights among consensus nodes, ensuring a more reasonable score when multiple nodes perform similarly. The similarity calculation formula is as follows: Through formula Calculate the score of consensus node u, where w∈F(u)) refers to all nodes that intersect with node u, and Puv refers to the pairwise similarity between consensus nodes.
[0077] S43 performs a linear summation based on the scoring results and the cosine data to obtain the node credit assessment.
[0078] Specifically, by linearly summing the two according to the formula, we obtain PR(u).d(t) u )=d×T u d represents the weight of the original score of the consensus node and the score obtained upon achieving consensus, respectively; T represents the weight of the score obtained upon achieving consensus. u To represent the different number of times a consensus node completes a consensus task, the self-score of the consensus node and the value gained from completing consensus are assigned different weights in the node credit score evaluation. PR(u)=(1-d(t) u )×Fixvalue(u)+d(t u )×Gainvalue(u)
[0079]
[0080] The above-disclosed embodiments are merely preferred embodiments of the DWSN node decision-making method based on the blockchain-based rotating consensus group of the present invention. Of course, they should not be construed as limiting the scope of the present invention. Those skilled in the art can understand that implementing all or part of the above embodiments and making equivalent changes in accordance with the claims of the present invention still fall within the scope of the invention.
Claims
1.A method for DWSN node decision-making of a rotating consensus group based on a blockchain, characterized in that, The method comprises the following steps: The base station in the DWSN network generates complete public keys and complete private keys for all consensus nodes of the service cluster; The base station broadcasts a message, and the consensus nodes verify the service cluster through the complete public keys according to the signal strength of the message, and obtain a consensus cluster, an authoritative node and a cluster key corresponding to the consensus cluster if the verification is passed; The multiple consensus nodes send the collected data to the consensus cluster, and the authoritative node selects the consensus node with the highest reputation ranking to perform a consensus task; The evaluation model is used to evaluate the consensus node performing the consensus task, and the node credit value evaluation is calculated; The base station broadcasts a message, and the consensus nodes verify the service cluster through the complete public keys according to the signal strength of the message, and obtain a consensus cluster, an authoritative node and a cluster key corresponding to the consensus cluster if the verification is passed; The base station broadcasts a message, and the consensus nodes verify the service cluster through the complete public keys according to the signal strength of the message, and obtain a consensus cluster, an authoritative node and a cluster key corresponding to the consensus cluster if the verification is passed; The base station broadcasts a message, and the consensus nodes verify the service cluster through the complete public keys according to the signal strength of the message, and obtain a consensus cluster, an authoritative node and a cluster key corresponding to the consensus cluster if the verification is passed; The consensus cluster negotiates to obtain an authoritative node; Based on the authoritative node, the pairwise master key and the pairwise encryption key are calculated and negotiated; The authoritative node sends the ciphertext data to each service node for verification, and obtains the cluster key if the verification is passed; The base station in the DWSN network generates complete public keys and complete private keys for all consensus nodes of the service cluster; The base station generates unique identifiers for the service nodes and all consensus nodes to obtain service identifiers and consensus identifiers; The consensus identifier selects a secret value, and the base station selects a private key to calculate a partial public and private key; The consensus nodes verify the partial public and private key, and the service identifier generates the complete public key and the complete private key if the verification is passed; The multiple consensus nodes send the collected data to the consensus cluster, and the authoritative node selects the consensus node with the highest reputation ranking to perform a consensus task; The authoritative node generates an evaluation table; Based on the evaluation table, the proportion calculation is performed to obtain proportion data; Based on the proportion data, the reputation ranking is obtained; Based on the reputation ranking, the consensus node with the highest reputation ranking is selected to perform a consensus task; The evaluation model is used to evaluate the consensus node performing the consensus task, and the node credit value evaluation is calculated. The evaluation model is used to evaluate the consensus node performing the consensus task, and the node credit value evaluation is calculated.
Citation Information
Patent Citations
Multi-receiver hybrid signcryption algorithm without bilinear pairings
CN104734857A
Industrial Internet of Things node consensus method based on blockchain
CN111182510A