CN114339653B - Block chain system based on wireless sensor network and data recording method - Google Patents

Block chain system based on wireless sensor network and data recording method Download PDF

Info

Publication number
CN114339653B
CN114339653B CN202210206303.3A CN202210206303A CN114339653B CN 114339653 B CN114339653 B CN 114339653B CN 202210206303 A CN202210206303 A CN 202210206303A CN 114339653 B CN114339653 B CN 114339653B
Authority
CN
China
Prior art keywords
node
data
wireless sensor
block chain
monitoring data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210206303.3A
Other languages
Chinese (zh)
Other versions
CN114339653A (en
Inventor
万志涛
蔡民强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Gewu Zhian Technology Co ltd
Original Assignee
Hangzhou Gewu Zhian Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Gewu Zhian Technology Co ltd filed Critical Hangzhou Gewu Zhian Technology Co ltd
Priority to CN202210206303.3A priority Critical patent/CN114339653B/en
Publication of CN114339653A publication Critical patent/CN114339653A/en
Application granted granted Critical
Publication of CN114339653B publication Critical patent/CN114339653B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The application provides a wireless sensor network-based block chain system and a data recording method, wherein each wireless sensor node in the block chain system is provided with a unique node identifier, real-time monitoring is carried out to obtain monitoring data, the emission content of a related node during data emission is monitored, the node identifier and the content hash value of the related node are recorded, the data of the wireless sensor node is reported to any gateway node, and the reported data comprises the monitoring data monitored by the wireless sensor node, the corresponding node identifier, the monitored content hash value of the related node and the corresponding node identifier; the gateway node checks the data reported by any wireless sensor node and forwards the data to the block link node; and the block chain node checks consistency of the monitoring data corresponding to the same node identification and all content hash values in each statistical period to determine whether to record the monitoring data into the block chain.

Description

Block chain system based on wireless sensor network and data recording method
Technical Field
The application relates to the technical field of wireless sensing, in particular to a block chain system based on a wireless sensor network and a data recording method.
Background
During the process of uploading data uploaded by the wireless sensor device through the gateway (i.e. the repeater), the gateway may be subject to intrusion by an illegally accessed sensor device or to human tampering. Disputes may result in scenarios where multiple parties' data need to be reconciled. For example, in a supervision scene of a pollution discharge enterprise by an environmental protection department, the environmental protection department can deploy a wireless sensor network to be supervised on a supervised object autonomously or by entrusting a third party for supervision at present. However, in terms of production flow, the repeated deployment cost of a supervisor and a supervised object is high, or a small number of sensors are deployed to reduce the cost, but the problem of link loss caused by insufficient precision is faced; and only depending on the monitored object to report data, there is a problem of credibility.
Disclosure of Invention
An object of the embodiments of the present application is to provide a wireless sensor network-based blockchain system and a data recording method, so as to provide a field proof capable of cross validation through mutual validation of multiple wireless sensor nodes and multiple gateway nodes, and record historical data of a wireless sensor more reliably and robustly.
In order to achieve the above object, embodiments of the present application are implemented as follows:
in a first aspect, an embodiment of the present application provides a wireless sensor network-based block chain system, including a plurality of wireless sensor nodes, gateway nodes, and block chain link points, where each wireless sensor node has a unique node identifier, and is configured to perform real-time monitoring to obtain monitored data, and to monitor transmission content of a relevant node when transmitting data, and record a node identifier and a content hash value of the relevant node, and to report data of the wireless sensor node to any gateway node, where the relevant node is a wireless sensor node that can be monitored by the wireless sensor node, and the reported data includes monitored data monitored by the wireless sensor node, a corresponding node identifier, a monitored content hash value of the relevant node, and a corresponding node identifier; each gateway node is used for verifying and then forwarding the data to the block link node after receiving the data reported by any wireless sensor node; and any block chain node is used for performing consistency check on the monitoring data corresponding to the same node identifier and all content hash values in each statistical period so as to determine whether the monitoring data is recorded into the block chain.
With reference to the first aspect, in a first possible implementation manner of the first aspect, the block chain node is specifically configured to: if the monitoring data and all content hash values corresponding to the same node identification have consistency, recording the monitoring data into a block chain; and if the monitoring data does not have consistency with any content hash value corresponding to the same node identifier, determining whether to record the monitoring data into the block chain or not based on the number of the content hash values with consistency corresponding to the monitoring data and the same node identifier.
With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the block chain node is specifically configured to: counting the proportion of the number of the content hash values with consistency corresponding to the monitoring data and the same node identification in the total amount, wherein the total amount comprises the number of the content hash values with consistency corresponding to the monitoring data and the same node identification and the number of the content hash values without consistency; judging whether the ratio reaches a set ratio; if the ratio reaches the set ratio, recording the monitoring data into a block chain; if the ratio does not reach the set ratio, the monitoring data is discarded.
With reference to the second possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, the set ratio is 1/3.
With reference to the first possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, the gateway node is further configured to add a gateway identifier Gid to data reported by the wireless sensor node and forward the data to the block chain node, where the block chain node is specifically configured to: after receiving data forwarded by any gateway node, synchronizing all data which belong to a statistical period and have the same node identification and are forwarded by all gateway nodes among block link nodes, and grouping the data according to a timestamp T, a data source node identification Sid, a monitoring forwarding node identification Fid and a data source node content hash value Hi, wherein the monitoring forwarding node identification Fid is a wireless sensor node which monitors the monitoring data and transmits the monitoring data by a wireless sensor node which monitors the data source node identification Sid; taking a first candidate record:
Figure 51525DEST_PATH_IMAGE001
and after removing the record of the content hash value Hi of the data source node, if a second candidate record exists, taking the second candidate record:
Figure 499824DEST_PATH_IMAGE002
after the record of the content hash value Hi of the data source node is removed, if no second candidate record exists, only the first candidate record is taken; counting according to the first candidate record and the second candidate record, wherein the majority of consistent results are taken asAnd (3) consensus results:
Figure 279561DEST_PATH_IMAGE003
and recording the monitoring data corresponding to the consensus result into the block chain.
With reference to the first aspect, in a fourth possible implementation manner of the first aspect, a plurality of the gateway nodes are integrated or independent.
With reference to the first aspect, in a fifth possible implementation manner of the first aspect, a plurality of the blockchain nodes are integrated or independent.
In a second aspect, an embodiment of the present application provides a data recording method, which is applied to any blockchain node in the wireless sensor network-based blockchain system described in any one of the first aspect or possible implementation manners of the first aspect, where the method includes: receiving data forwarded by any gateway node, wherein the data comprises monitoring data monitored by a wireless sensor node, a corresponding node identifier, a content hash value of a monitored related node and a corresponding node identifier; acquiring monitoring data monitored by a wireless sensor node and a corresponding target node identifier; generating a verification instruction and transmitting the verification instruction to other block chain nodes, wherein the verification instruction comprises monitoring data monitored by the wireless sensor node and corresponding target node identification; and acquiring a verification result fed back by each other block chain node, and determining whether to record the monitoring data into the block chain based on all the verification results, wherein each other block chain node is used for performing consistency verification on the content hash value corresponding to the target node identifier in the statistical period and the monitoring data based on the received verification instruction to obtain a corresponding verification result.
In a third aspect, an embodiment of the present application provides a data recording method, which is applied to any blockchain node in the wireless sensor network-based blockchain system described in any one of the first aspect or possible implementation manners of the first aspect, where the method includes: receiving a verification instruction transmitted by other block link nodes, wherein the verification instruction comprises a target node identifier and corresponding monitoring data, and the verification instruction is generated after monitoring data monitored by the wireless sensor node and the corresponding target node identifier are acquired from data forwarded by any gateway node by other block link nodes; determining whether a content hash value corresponding to the target node identification exists or not in a statistical period based on the target node identification in the verification instruction; and if the content hash value corresponding to the target node identification exists, performing consistency check on the content hash value and the monitoring data in the check instruction, determining a check result and feeding back the check result to the block chain node for transmitting the check instruction, so that the block chain node for transmitting the check instruction determines whether to record the monitoring data into the block chain based on all the check results.
Has the advantages that: each wireless sensor node in the block chain system based on the wireless sensor network has a unique node identifier and is used for monitoring in real time to obtain monitoring data, meanwhile, the transmitting content of a related node during data transmitting can be monitored, the node identifier and the content hash value of the related node are recorded, and then the data (the monitoring data of the wireless sensor node, the corresponding node identifier, the content hash value of the related node and the corresponding node identifier) of the wireless sensor node is reported to any gateway node; each gateway node is used for verifying and transmitting the data to the block chain node after receiving the data reported by any wireless sensor node; and any block link point is used for performing consistency check on the monitoring data corresponding to the same node identification and all content hash values in each statistical period so as to determine whether to record the monitoring data into a block chain. Therefore, the block chain system based on the wireless sensor network records the historical data of the wireless sensor more reliably and robustly through mutual verification of multiple sensor nodes and multiple gateways (trust establishment among multiple equal nodes without a single center is facilitated through node cross verification, verification capability and endorsement capability of the sensor network data are provided, and uploaded sensor data have public trust). Cross-verifiable field attestation is provided as opposed to traditional sensor data collection and logging that relies entirely on gateways. And a block chain design of double-layer nodes is adopted (the adjacent wireless sensor nodes can report the monitored data to the gateway node when sending data by themselves, and the gateway node is positioned at a higher layer and is responsible for checking the data and reporting the data to the block chain node), and in the working process of the real-time sensor, the data can be sent to a plurality of gateways at the end of each data sending period of each node. Based on the characteristic that the wireless sensor network signals are sent in a wireless broadcast mode, the block chain system based on the wireless sensor network has low additional cost, wireless signal transmission can be completed in one hop between the nodes and the gateway, and time delay is low.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic diagram of a block chain system based on a wireless sensor network according to an embodiment of the present disclosure.
Fig. 2 is a flowchart of a first data recording method applied to a blockchain node.
Fig. 3 is a flowchart of a second data recording method applied to a blockchain node.
Icon: 100-a wireless sensor network based blockchain system; 110-a wireless sensor node; 120-a gateway node; 130-blockchain node.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
Referring to fig. 1, fig. 1 is a schematic diagram of a wireless sensor network-based block chain system 100 according to an embodiment of the present disclosure.
In this embodiment, the wireless sensor network-based blockchain system 100 may include: a plurality of wireless sensor nodes 110 (which may be considered sensor layers), gateway nodes 120 (which may be considered gateway layers), and blockchain nodes 130 (which may be considered blockchain layers).
Each wireless sensor node 110 has a unique node identifier, and each wireless sensor node 110 may be configured to perform real-time monitoring to obtain monitoring data. Meanwhile, each wireless sensor node 110 may be configured to monitor (and record) transmission content of a relevant node when transmitting data, and record a node identifier and a content hash value of the relevant node. Here, the relevant nodes, i.e. other wireless sensor nodes in the vicinity of the wireless sensor node 110, can be heard by the wireless sensor node 110 when the other wireless sensor nodes in the vicinity transmit data. The wireless sensor node 110 may also be configured to report data of the wireless sensor node 110 to any gateway node 120 (the gateway node 120 that reports data is selected according to an actual situation, where any gateway node 120 is only used to indicate that the gateway node 120 is not specific when the wireless sensor node 110 reports data, and should not be considered as a limitation of the present application), and the reported data may include monitoring data and a corresponding node identifier monitored by the wireless sensor node 110, and a hash value and a corresponding node identifier of content of a monitored related node.
Each gateway node 120 may be configured to, after receiving data reported by any wireless sensor node 110, perform verification and forward the verification to the blockchain node 130.
Any one of the blockchain nodes 130 may be configured to perform consistency check on the monitoring data corresponding to the same node identifier and all content hash values (which are the content hash values corresponding to the same node identifier and are derived from different wireless sensor nodes monitoring the wireless sensor node 110 reporting the monitoring data) in each statistical period (e.g., 1 second, 3 seconds, etc.) to determine whether to record the monitoring data into the blockchain.
For example, the blockchain link point 130 may determine whether to record the monitoring data into the blockchain by:
if the monitoring data and all content hash values corresponding to the same node identifier have consistency (that is, the monitoring data reported by the wireless sensor node 110 is consistent with the content hash values recorded by other nodes based on monitoring the transmission content of the wireless sensor node 110, indicating that the monitoring data reported by the wireless sensor node 110 is the same as the transmission content monitored by other nodes), the block chain node 130 may record the monitoring data into the block chain.
If there is no consistency between the monitoring data and any content hash value corresponding to the same node identifier (if there is inconsistency between the content hash value corresponding to the node identifier and the monitoring data), the blockchain node 130 may determine whether to record the monitoring data into the blockchain based on the number of the content hash values corresponding to the monitoring data and the same node identifier, which have consistency.
Specifically, the blockchain node 130 may count a ratio of the number of consistent content hash values corresponding to the monitoring data and the same node identifier to a total amount, where the total amount includes the number of consistent content hash values corresponding to the monitoring data and the same node identifier and the number of content hash values not having the consistency. The blockchain node 130 may then determine whether the ratio reaches a set ratio (e.g., 1/3, where set ratio 1/3 is a ratio determined based on actual test radio channel attenuation and interference-induced reception errors). If the percentage reaches the set ratio, the blockchain node 130 may record the monitoring data into the blockchain; if the percentage does not reach the set percentage, the blockchain node 130 may discard the monitored data.
In order to prevent the behavior of the gateway node that maliciously tampers with the data, the gateway domain consensus may be formed in the following manner:
first, data reported by any wireless sensor node 110 may include a timestamp T, a data source node identifier Sid, a related node identifier Rid, a data source node content hash value Hi, and the like, and after receiving data reported by any wireless sensor node 110, the gateway node 120 may add a gateway identifier Gid to the reported data and forward the data to the block chain node 130, so that the data forwarded by the gateway node 120 is in the following form:
Figure 674771DEST_PATH_IMAGE004
and (1) after receiving the data forwarded by any gateway node 120, the block link point 130 may synchronize all data forwarded by all gateway nodes (determined based on the gateway identifier Gid) within a statistical period (determined based on the timestamp T) and having the same node identifier (determined based on the data source node identifier Sid) among the block link points (i.e., among all block link points in the block chain), and group the data according to the timestamp T, the data source node identifier Sid, a listening forwarding node identifier Fid (different from the relevant node identifier Rid), and a data source node content hash value Hi, where the listening forwarding node identifier Fid is a wireless sensor node that listens to the wireless sensor node having the data source node identifier Sid and transmits the monitoring data.
Specifically, the block link point may be the first candidate record:
Figure 20301DEST_PATH_IMAGE005
and (2) after removing the record of the hash value Hi of the content of the data source node, if a second candidate record exists, taking the second candidate record:
Figure 842764DEST_PATH_IMAGE006
and (3) after removing the record of the hash value Hi of the content of the data source node, if no second candidate record exists, only taking the first candidate record.
Then, the block link points may be counted according to the first candidate record and the second candidate record, and a majority of the consistent results are the consensus result:
Figure 109797DEST_PATH_IMAGE007
and (4) recording the monitoring data corresponding to the consensus result into the block chain.
Since the wireless sensor node 110 reports data in a wireless broadcast manner, the data can be monitored by other wireless sensor nodes 110, and in addition, the data reported by the same wireless sensor node 110 can be monitored by different gateway nodes 120, and different gateway nodes 120 need to add their unique gateway identifiers when forwarding the data, so that the data from multiple channels (i.e., different wireless sensor nodes 110 and different gateway nodes 120) can be provided at the level of the block link point 130, thereby performing cross-validation of the data, preventing malicious tampering of the data, and avoiding the malicious behavior of the gateway.
The specific manner in which the consensus result is determined in relation to the formation of the consensus mechanism may also be determined according to different situations, for example:
if the same copies (with consistent content hash values) obtained by two different channels (determined to be from different gateway nodes 120) are received and the other copies are inconsistent, the content corresponding to the two same copies can be approved, and then the blockchain node 130 may record the monitoring data corresponding to the two same copies into the blockchain; if there are more than one set of identical copies, then the majority copy set (taking the most significant set of copies corresponding to the monitored data records into the block chain) is approved, and is not limited herein.
In this embodiment, the plurality of gateway nodes 120 (or the blockchain node 130) may be integrated or independent, and are not limited herein.
Here, for example, the operation of the wireless sensor network-based block chain system 100 will be briefly described:
firstly, the system can be initialized, the authentication center (which authenticates the gateway and the sensor, i.e. it is guaranteed that hardware entering the system is both in accordance with the standard and is an admission approval) issues the device list to the block link node 130 and forwards the gateway node 120, so as to ensure that the identities of the gateway node 120 and the wireless sensor node 110 which can enter the network can be verified and have unique identifiers (i.e. corresponding node identifiers), and the creation block of the block link node 130 can record basic information such as the digital certificate and the network identifier of the gateway node 120.
Then, the wireless sensor node 110 is powered on and initialized, and starts to monitor, so as to record the monitored transmission content (report data) of the relevant node, record a node identifier (a node identifier corresponding to the wireless sensor node 110 that reports data) and a content hash value (a content hash value corresponding to the transmission content), and attach the received record node identifier and the content hash value (which can be recorded and reported in a form of a list) when the node reports data.
After receiving the data reported by the wireless sensor node 110, the gateway node 120 may forward the data to the blockchain node 130 after verification.
As for the blockchain node 130, it may check, in each statistical period, that the hash value of the content of the node reported by each wireless sensor is identical to the hash value of the content of the node reported by other nodes, and if the hash values are identical, may record the data to the blockchain; if the inconsistency exists, the hash values of the contents of the nodes reported by other nodes can be counted, and 1/3 consistency, namely passing, is adopted to determine whether to count the data into the block chain or discard the data.
In order to facilitate understanding of the present embodiment, the following describes the verification and recording manner of the data in terms of the view of the block link point 130.
Referring to fig. 2, fig. 2 is a flowchart of a first data recording method applied to the blockchain node 130. The first data recording method may include step S11, step S12, step S13, and step S14.
Step S11: and receiving data forwarded by any gateway node, wherein the data comprises monitoring data monitored by a wireless sensor node, a corresponding node identifier, a monitored content hash value of a related node and a corresponding node identifier.
Step S12: and acquiring monitoring data monitored by the wireless sensor node and a corresponding target node identifier.
Step S13: and generating a verification instruction and transmitting the verification instruction to other block chain nodes, wherein the verification instruction comprises monitoring data monitored by the wireless sensor node and a corresponding target node identifier.
Step S14: and acquiring a verification result fed back by each other block chain node, and determining whether to record the monitoring data into the block chain based on all the verification results, wherein each other block chain node is used for performing consistency verification on the content hash value corresponding to the target node identifier in the statistical period and the monitoring data based on the received verification instruction to obtain a corresponding verification result.
The blockchain node 130 may receive data forwarded by any gateway node 120, where the data includes monitoring data monitored by a wireless sensor node 110 and a corresponding node identifier, and a content hash value of a monitored related node and a corresponding node identifier. After receiving the data, the blockchain node 130 may obtain the monitoring data monitored by the wireless sensor node 110 and the corresponding target node identifier, and then generate a verification instruction and transmit the verification instruction to other blockchain nodes 130, where the verification instruction includes the monitoring data monitored by the wireless sensor node 110 and the corresponding target node identifier. And performing consistency check on the content hash value corresponding to the target node identifier in the statistical period and the monitoring data through other block link points to obtain corresponding check results, feeding back the corresponding check results to the block link point 130, and enabling the block link point 130 to obtain the check results fed back by each other block link point and determining whether to record the monitoring data into the block chain based on all the check results.
In order to further reveal the process of performing consistency check on the content hash value corresponding to the target node identifier and the monitoring data after the block chain node 130 receives the check instruction, a second data recording method is provided here.
Referring to fig. 3, fig. 3 is a flowchart of a second data recording method applied to the blockchain node 130. In the present embodiment, the second data recording method may include step S21, step S22, and step S23.
Step S21: and receiving a verification instruction transmitted by other block link nodes, wherein the verification instruction comprises a target node identifier and corresponding monitoring data, and the verification instruction is generated after the monitoring data monitored by the wireless sensor node and the corresponding target node identifier are acquired from data forwarded by any gateway node by other block link nodes.
Step S22: and determining whether a content hash value corresponding to the target node identifier exists or not in the statistical period based on the target node identifier in the verification instruction.
Step S23: and if the content hash value corresponding to the target node identification exists, performing consistency check on the content hash value and the monitoring data in the check instruction, determining a check result and feeding back the check result to the block chain node for transmitting the check instruction, so that the block chain node for transmitting the check instruction determines whether to record the monitoring data into the block chain based on all the check results.
The blockchain node 130 may receive the verification command (including the target node identifier and the corresponding monitoring data) transmitted by the other blockchain nodes, and the verification command is generated for the other blockchain nodes. Then, the blockchain node 130 may determine whether a content hash value corresponding to the target node identifier exists in the statistical period based on the target node identifier in the verification instruction. And if the content hash value corresponding to the target node identification exists, performing consistency check on the content hash value and the monitoring data in the check instruction to determine a check result, and feeding back the check result to the block chain node for transmitting the check instruction so as to determine whether the monitoring data is recorded into the block chain or not by the block chain link point for transmitting the check instruction based on all the check results. The manner of determining whether to record the monitored data into the blockchain is described in detail above, and will not be described herein again.
For the application scenario of the wireless sensor network-based blockchain system 100, there may be many, for example, a multi-entity wireless sensor network blockchain platform based on a pollutant emission monitoring scenario: steel enterprises arrange wireless sensors based on Lora such as monitoring PM2.5, PM10, nitrogen oxide, sulphide through producing line, open air, factory boundary etc. and entrust third party through many owned, environmental protection and deploy gateway and block chain link point, realize that monitoring data is credible. Of course, the method can also be applied to other scenarios, for example, a multi-entity wireless sensor network block chain platform for monitoring scenarios based on personnel positioning and personnel attendance record: a UWB-based personnel positioning safety helmet is deployed in a construction site, the positioning adopts a self-networking mode, wherein part of personnel positioning safety helmets are simultaneously used as data relay nodes, gateways are commonly deployed through a residential building party, a public security party, a project party and a construction undertaking party, and block chain nodes are respectively deployed, so that services of actual post arrival, attendance checking, salary generation, identity verification, workload statistics and the like of workers are realized. The application scenarios listed here are not intended to limit the present application.
To sum up, in the block chain system 100 based on the wireless sensor network, each wireless sensor node 110 has a unique node identifier for performing real-time monitoring to obtain monitoring data, and at the same time, can monitor the transmission content of the relevant node when transmitting data, and record the node identifier and the content hash value of the relevant node, and then report the data of the wireless sensor node 110 (the monitoring data of the wireless sensor node 110 and the corresponding node identifier, the content hash value of the relevant node and the corresponding node identifier) to any gateway node 120; each gateway node 120 is configured to forward to the block link node 130 after checking after receiving data reported by any wireless sensor node 110; any blockchain node 130 is configured to perform consistency check on the monitored data and all content hash values corresponding to the same node identifier in each statistical period to determine whether to record the monitored data into a blockchain. Therefore, the wireless sensor network-based blockchain system 100 records the historical data of the wireless sensor more reliably and robustly through mutual authentication of multiple sensor nodes and multiple gateways (trust establishment among multiple equal nodes without a single center is facilitated through node cross authentication, authentication capability and endorsement capability of the sensor network data are provided, and uploaded sensor data have public trust). Cross-verifiable field attestation is provided as opposed to traditional sensor data collection and logging that relies entirely on gateways. And a block chain design of double-layer nodes is adopted (the adjacent wireless sensor nodes can report the monitored data to the gateway node when sending data by themselves, and the gateway node is positioned at a higher layer and is responsible for checking the data and reporting the data to the block chain node), and in the working process of the real-time sensor, the data can be sent to a plurality of gateway nodes at the end of each data sending period of each node. Based on the characteristic that the wireless sensor network signals are sent in a wireless broadcast mode, the block chain system 100 based on the wireless sensor network has less additional overhead, and the wireless signal transmission can be completed in one hop between the nodes and the gateway, so that the time delay is low.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (9)

1. A wireless sensor network-based block chain system is characterized by comprising a plurality of wireless sensor nodes, a gateway node and block chain link points,
each wireless sensor node is provided with a unique node identifier and is used for monitoring in real time to obtain monitoring data, monitoring the emission content of a related node when the related node emits data, recording the node identifier and the content hash value of the related node, and reporting the data of the wireless sensor node to any gateway node, wherein the related node is a wireless sensor node which can be monitored by the wireless sensor node, and the reported data comprises the monitoring data monitored by the wireless sensor node, the corresponding node identifier, the monitored content hash value of the related node and the corresponding node identifier;
each gateway node is used for verifying and forwarding the data to the block chain node after receiving the data reported by any wireless sensor node;
and any block chain node is used for performing consistency check on the monitoring data corresponding to the same node identifier and all content hash values in each statistical period so as to determine whether to record the monitoring data into the block chain.
2. A wireless sensor network-based blockchain system according to claim 1, wherein the blockchain node is specifically configured to:
if the monitoring data and all content hash values corresponding to the same node identification have consistency, recording the monitoring data into a block chain;
and if the monitoring data does not have consistency with any content hash value corresponding to the same node identifier, determining whether to record the monitoring data into the block chain or not based on the number of the content hash values with consistency corresponding to the monitoring data and the same node identifier.
3. A wireless sensor network-based blockchain system according to claim 2, wherein the blockchain node is specifically configured to:
counting the proportion of the number of the content hash values with consistency corresponding to the monitoring data and the same node identification in the total amount, wherein the total amount comprises the number of the content hash values with consistency corresponding to the monitoring data and the same node identification and the number of the content hash values without consistency;
judging whether the ratio reaches a set ratio;
if the ratio reaches the set ratio, recording the monitoring data into a block chain;
if the ratio does not reach the set ratio, the monitoring data is discarded.
4. The wireless sensor network-based blockchain system of claim 3, wherein the set ratio is 1/3.
5. A wireless sensor network-based block chain system according to claim 2, wherein the gateway node is further configured to add a gateway identifier Gid to data reported by the wireless sensor node and forward the data to the block chain node, and the block chain node is specifically configured to:
after receiving data forwarded by any gateway node, synchronizing all data which belong to a statistical period and have the same node identification and are forwarded by all gateway nodes among block link nodes, and grouping the data according to a timestamp T, a data source node identification Sid, a monitoring forwarding node identification Fid and a data source node content hash value Hi, wherein the monitoring forwarding node identification Fid is a wireless sensor node which monitors the monitoring data and transmits the monitoring data by a wireless sensor node which monitors the data source node identification Sid;
taking a first candidate record:
Figure DEST_PATH_IMAGE001
and after removing the record of the content hash value Hi of the data source node, if a second candidate record exists, taking the second candidate record:
Figure DEST_PATH_IMAGE002
after the record of the content hash value Hi of the data source node is removed, if no second candidate record exists, only the first candidate record is taken; counting according to the first candidate record and the second candidate record, wherein most consistent results are common results:
Figure DEST_PATH_IMAGE003
and recording the monitoring data corresponding to the consensus result into the block chain.
6. The wireless sensor network-based blockchain system of claim 1, wherein a plurality of the gateway nodes are integrated or standalone.
7. The wireless sensor network-based blockchain system of claim 1, wherein a plurality of the blockchain nodes are integrated or independent.
8. A data recording method applied to any blockchain node in the wireless sensor network based blockchain system of any one of claims 1 to 7, the method comprising:
receiving data forwarded by any gateway node, wherein the data comprises monitoring data monitored by a wireless sensor node, a corresponding node identifier, a content hash value of a monitored related node and a corresponding node identifier;
acquiring monitoring data monitored by a wireless sensor node and a corresponding target node identifier;
generating a verification instruction and transmitting the verification instruction to other block chain nodes, wherein the verification instruction comprises monitoring data monitored by the wireless sensor node and corresponding target node identification;
and acquiring a verification result fed back by each other block chain node, and determining whether to record the monitoring data into the block chain based on all the verification results, wherein each other block chain node is used for performing consistency verification on the content hash value corresponding to the target node identifier in the statistical period and the monitoring data based on the received verification instruction to obtain a corresponding verification result.
9. A data recording method applied to any blockchain node in the wireless sensor network based blockchain system of any one of claims 1 to 7, the method comprising:
receiving a verification instruction transmitted by other block link nodes, wherein the verification instruction comprises a target node identifier and corresponding monitoring data, and the verification instruction is generated after monitoring data monitored by the wireless sensor node and the corresponding target node identifier are acquired from data forwarded by any gateway node by other block link nodes;
determining whether a content hash value corresponding to the target node identification exists or not in a statistical period based on the target node identification in the verification instruction;
and if the content hash value corresponding to the target node identification exists, performing consistency check on the content hash value and the monitoring data in the check instruction, determining a check result and feeding back the check result to the block chain node for transmitting the check instruction, so that the block chain node for transmitting the check instruction determines whether to record the monitoring data into the block chain based on all the check results.
CN202210206303.3A 2022-03-04 2022-03-04 Block chain system based on wireless sensor network and data recording method Active CN114339653B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210206303.3A CN114339653B (en) 2022-03-04 2022-03-04 Block chain system based on wireless sensor network and data recording method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210206303.3A CN114339653B (en) 2022-03-04 2022-03-04 Block chain system based on wireless sensor network and data recording method

Publications (2)

Publication Number Publication Date
CN114339653A CN114339653A (en) 2022-04-12
CN114339653B true CN114339653B (en) 2022-05-24

Family

ID=81031505

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210206303.3A Active CN114339653B (en) 2022-03-04 2022-03-04 Block chain system based on wireless sensor network and data recording method

Country Status (1)

Country Link
CN (1) CN114339653B (en)

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018147673A1 (en) * 2017-02-09 2018-08-16 에스지에이솔루션즈 주식회사 Symmetric key-based user authentication method for ensuring anonymity in wireless sensor network environment
CN108600967A (en) * 2018-04-28 2018-09-28 深圳凯达通光电科技有限公司 Preassembled transformer station wireless sensor network measure and control device based on block chain
CN108737980A (en) * 2018-04-28 2018-11-02 深圳众厉电力科技有限公司 A kind of power transformer chamber environmental data collecting and processing system based on block chain technology
CN108737512A (en) * 2018-04-28 2018-11-02 深圳智达机械技术有限公司 A kind of pollution of waterhead monitoring system based on block chain technology
CN109889326A (en) * 2019-02-19 2019-06-14 北京工业大学 A kind of Internet of Things framework based on block chain and have verified that data prove common recognition method
CN110177003A (en) * 2019-06-10 2019-08-27 沈阳理工大学 Data verification method based on block chain technology in industrial sensor network
WO2020043793A2 (en) * 2018-08-29 2020-03-05 Wfs Technologies Ltd Communication network
CN111414418A (en) * 2020-03-05 2020-07-14 合肥达朴汇联科技有限公司 Data storage method and device based on block chain
CN111641593A (en) * 2020-05-09 2020-09-08 深圳供电局有限公司 Internet of things security architecture and information security interaction method thereof
CN111740838A (en) * 2020-05-22 2020-10-02 青岛万民科技有限公司 Trusted uplink method and system for block chain data
CN111770089A (en) * 2020-06-29 2020-10-13 福建福链科技有限公司 Authentication method for blockchain sensor and blockchain network
CN112308093A (en) * 2020-11-24 2021-02-02 腾讯科技(深圳)有限公司 Air quality perception method based on image recognition, model training method and system
CN112887076A (en) * 2021-01-15 2021-06-01 上海天俣可信物联网科技有限公司 Internet of things system based on NB-IoT and blockchain technology and implementation method
CN113079508A (en) * 2021-04-06 2021-07-06 中国工商银行股份有限公司 Data transmission method, device and equipment based on block chain network
CN113489697A (en) * 2021-06-24 2021-10-08 江苏大学 Centerless key distribution method in Internet of things
CN113949709A (en) * 2021-10-13 2022-01-18 甘肃同兴智能科技发展有限责任公司 Consensus method and system for improving safety of block chain network

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018147673A1 (en) * 2017-02-09 2018-08-16 에스지에이솔루션즈 주식회사 Symmetric key-based user authentication method for ensuring anonymity in wireless sensor network environment
CN108600967A (en) * 2018-04-28 2018-09-28 深圳凯达通光电科技有限公司 Preassembled transformer station wireless sensor network measure and control device based on block chain
CN108737980A (en) * 2018-04-28 2018-11-02 深圳众厉电力科技有限公司 A kind of power transformer chamber environmental data collecting and processing system based on block chain technology
CN108737512A (en) * 2018-04-28 2018-11-02 深圳智达机械技术有限公司 A kind of pollution of waterhead monitoring system based on block chain technology
WO2020043793A2 (en) * 2018-08-29 2020-03-05 Wfs Technologies Ltd Communication network
CN109889326A (en) * 2019-02-19 2019-06-14 北京工业大学 A kind of Internet of Things framework based on block chain and have verified that data prove common recognition method
CN110177003A (en) * 2019-06-10 2019-08-27 沈阳理工大学 Data verification method based on block chain technology in industrial sensor network
CN111414418A (en) * 2020-03-05 2020-07-14 合肥达朴汇联科技有限公司 Data storage method and device based on block chain
CN111641593A (en) * 2020-05-09 2020-09-08 深圳供电局有限公司 Internet of things security architecture and information security interaction method thereof
CN111740838A (en) * 2020-05-22 2020-10-02 青岛万民科技有限公司 Trusted uplink method and system for block chain data
CN111770089A (en) * 2020-06-29 2020-10-13 福建福链科技有限公司 Authentication method for blockchain sensor and blockchain network
CN112308093A (en) * 2020-11-24 2021-02-02 腾讯科技(深圳)有限公司 Air quality perception method based on image recognition, model training method and system
CN112887076A (en) * 2021-01-15 2021-06-01 上海天俣可信物联网科技有限公司 Internet of things system based on NB-IoT and blockchain technology and implementation method
CN113079508A (en) * 2021-04-06 2021-07-06 中国工商银行股份有限公司 Data transmission method, device and equipment based on block chain network
CN113489697A (en) * 2021-06-24 2021-10-08 江苏大学 Centerless key distribution method in Internet of things
CN113949709A (en) * 2021-10-13 2022-01-18 甘肃同兴智能科技发展有限责任公司 Consensus method and system for improving safety of block chain network

Also Published As

Publication number Publication date
CN114339653A (en) 2022-04-12

Similar Documents

Publication Publication Date Title
She et al. Blockchain trust model for malicious node detection in wireless sensor networks
CN108632381B (en) Block chain-based environment supervision method and system
Raya et al. Eviction of misbehaving and faulty nodes in vehicular networks
CN108306893A (en) A kind of Novel Distributed Intrusion Detection Method and system of ad-hoc network
CN109302405A (en) Industrial data detection block chain network framework and detection method based on edge calculations
WO2020000924A1 (en) Message reliability evaluation method for aggregating two trust evaluations in internet of vehicles
de Melo et al. Uavouch: A secure identity and location validation scheme for uav-networks
KR102102835B1 (en) Wips sensor
US20210409201A1 (en) Remotely managing devices using blockchain and dice-riot
Kamel et al. Misbehavior reporting protocol for c-its
Talreja et al. Trust and behavior based system to prevent collision in IoT enabled VANET
KR102414334B1 (en) Method and apparatus for detecting threats of cooperative-intelligent transport road infrastructure
Al Mutaz et al. Leveraging platoon dispersion for sybil detection in vehicular networks
Ayobi et al. A lightweight blockchain-based trust model for smart vehicles in vanets
CN114339653B (en) Block chain system based on wireless sensor network and data recording method
Sangwan et al. A classification of misbehavior detection schemes for VANETs: a survey
Abreu et al. An effective attack detection approach in wireless mesh networks
CN114862626B (en) Construction site environment monitoring method and system based on block chain technology
Hu et al. Intrusion detection methods in communication-based train control systems based on relative entropy and trust evaluation
Chen et al. Sybil attack detection based on signature vectors in VANETs
Haidar et al. Dare: a reports dataset for global misbehavior authority evaluation in c-its
Chen et al. A wireless intrusion Alerts Clustering Method for mobile internet
Basan et al. Host-based method and system for detecting anomalies in network traffic for a robotic system
Garay et al. Reliable routing protocol for delay tolerant networks
Nee et al. Peer-to-Peer Misbehavior Reporting Using Non-Interactive Zero-Knowledge Proofs for Intelligent Transport Systems

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant