To solve the problem that the safety data in the process of coal mine production are easy to be maliciously tampered with and deleted, a mine consortium blockchain data security monitoring system is proposed. The coal mine consortium blockchain includes supervision department, builds favourable centralized and decentralized production mode, and improves PBFT (Practical Byzantine Fault Tolerance) consensus mechanism to implement practical coal mine safety production. The evaluation shows that the architecture we proposed is more appropriate and efficient for the mine Internet of Things than the traditional blockchain architecture. The Hyperledger Fabric platform is used to build the mine consortium blockchain system to achieve the sensor data reliability, node consensus, safe operation automation management, and major equipment traceability.
China’s demand for coal energy is increasing year by year, and the scale of coal mining is gradually expanding. However, in the actual mining process, there are many mining problems, which may cause serious safety accidents to occur [
Blockchain technology is a decentralized distributed ledger technology [
Therefore, a coal mine safety production system mode based on consortium chain technology is proposed in this paper. First, the node architecture of the consortium chain integrated with the safety production model is constructed and the business process is analyzed. Then, specific analysis from the aspects of data reliability, safety production automation, traceability of major equipment, and consensus mechanism to provide a reference for the current theoretical research and actual construction of coal mine safety blockchain are conducted.
In the model, the blockchain technology is used to integrate smart contract, consensus mechanism, and distributed database. Meanwhile, the supervision departments are incorporated into the consortium chain system to realize nontampering of data, intelligent production process, and traceability of equipment information. The application model architecture of the consortium chain is shown in Figure
Model architecture of coal mine production consortium chain.
The model specifically includes a data credibility module, a safe operation automation module, and a major equipment traceability module, as shown in Figure
Submodule system structure.
The model node architecture and workflow are shown in Figure
Node architecture and workflow.
In this model, the internal authority of the coal mine safety production company acts as a CA (digital certificate authority) node, which relies on the Membership Service Provider (MSP) in the consortium chain system, and it is responsible for receiving the registration application of the user node and returning the registration password for login, so that users can obtain identity certificate. After successful application, the CA will provide the private key to the user node in the form of a password. Finally, users store the certificate signing request and private key in a secure location on the server or local drive. The user’s identity will be verified in all operations in the blockchain network to confirm whether it belongs to a sensor node, a supervisory node, or other nodes.
The sorting service is responsible for sorting the data packets returned by each sensor. The sorting service arranges the transaction information into a certain order based on the rules according to the timestamp and packs it to facilitate data transmission [
The client initiates a sensor data package proposal. The consortium chain system does not automatically send data. Instead, the client specifies which nodes the block is sent to for endorsement verification; that is, the client specifies the endorsement policy [
The endorsement node mainly performs verification, simulation execution, and endorsement of the proposal. After each endorsement node receives the block, it will verify the data in it. If the proposal does not meet the endorsement policy, it will not take effect locally.
Node confirmation is mainly responsible for checking the legality of transactions and updating and maintaining the state of the blockchain and ledger. Before the data packet is recorded in the ledger, it must be confirmed by the node confirmation, and only the confirmed data can be recorded in the blockchain ledger.
Various information is recorded in the world state, such as sensor node data, smart contract bytecode, data customized by each smart contract, and chain configuration parameters [
Through the client and SDK interface, users can specify endorsement strategies to endorsement nodes, send data information and device information to the sorting service, and participate in transaction verification.
To realize the interconnection of mine sensor information and the decentralized storage of sensor data, all sensor information in the mine is encapsulated by the model into blocks. Consensus review is conducted on the information before the cochain, and the information cannot be tampered with after the cochain to ensure that the sensor data during the collection, transmission, and storage is true and reliable.
The completed module can not only provide closed-loop data services of safety management but also be embedded in the coal mine information safety monitoring system software system based on blockchain technology to provide data services. When the module is embedded in the system, the existing security monitoring system is improved, and a reliable system for sensor data is built. The system can set the user’s functional authority and data authority according to the module characteristics and preset solutions suitable for different users in various abnormal scenarios. When the module detects that the sensor data have been tampered with, the system dynamically pushes abnormal information and response emergency solutions to users at all levels combined with the data of the existing intelligent perception analysis system of artificial intelligence, Internet of Things, and big data and provides users at all levels with a feedback channel for abnormal information or solution error information. After verification, the effective feedback information will be added to the optimization algorithm of the system. The sensor data reliability includes the following specific functional modules. The structure is shown in Figure
Sensor data reliability.
Account management is to record and change the members in the consortium chain network. Part of the functions of this module depend on the MSP of the consortium chain, and they are responsible for maintaining the IDs of all nodes in the system and issuing node identity certificates. The basic function module realizes the main functions of the safe production consortium chain, namely, the upload, download, query, and update of sensor data. The smart contract module is responsible for maintaining all chain codes in the system and realizes operations such as storage, compilation, update, and installation of chain codes. For the safety production consortium chain proposed in this paper, this module provides support for basic functions and audit traceability functions. The traceability module is responsible for packaging operation logs and device information into blocks and connecting them into chains while performing operations on the sensor data chain. Similar to the operation of the data link, the query of the operation log is to retrieve all the information in the behavior chain and return the specified log information to realize the postaudit function of the sensitive operation of the sensor data.
Smart contract is a computer protocol that can automatically execute the contract, and its characteristic is to allow trusted transactions without a third party [
The multiple private chain architecture deployed with smart contracts is shown in Figure
Smart contract deployment architecture.
Smart contracts are deployed on three different private chains to ensure data privacy and isolation. Each private chain can deploy multiple smart contracts, and the contracts can call each other. Data can be queried across private chains, but data cannot be changed. Each smart contract specifies the production process of its own equipment or product. If the department refuses to implement the specified production process for saving costs, the testing equipment will record the operating data and automatically deduct funds from the relevant departments and conduct other types of processing based on the smart contract. Inside the smart contract, specific processes and logical relationships are stipulated, such as processes A and B or joint confirmation of organizations A and B.
For the traditional traceability system, the regulations of traceability system are formulated by relevant institutions such as government and enterprises. After the regulations are formulated, all production links are required to comply with the regulations. A new traceability scheme based on blockchain technology is adopted in this model. The scheme aims to establish a decentralized product traceability system maintained by nontrusted participants. The traceability scheme based on blockchain technology is adopted to store traceability information in the blockchain, and the decentralized characteristics of the blockchain are used to realize a decentralized traceability system [
Merkle tree.
In the coal mine production environment, coal mine data are detected by sensors in real time. To ensure data traceability of the blockchain system, once the data are entered, they cannot be tampered with and cannot be deleted. Therefore, the amount of data will continue to increase with time, which may cause problems such as excessive data volume. This problem can be effectively solved by the Merkle Tree structure in the safe production blockchain system.
Suppose that there is a transaction with a value of Hash4 in the block to be verified, it is only necessary to know Hash3, Hash12, and Hash5678. The hash of Hash34 and Hash1234 and the root node are calculated. If the finally calculated root node hash is consistent with that recorded in the block header, it means that the transaction exists in the block. The key to Merkel tree verifying transactions lies in two points: (1) Hash is calculated by the Merkel tree layer by layer from bottom to top, so as long as the hash value of another adjacent node is known, it can be calculated up to the root node; (2) the hash value of the root node can be accurately used as the unique digest of a group of transactions [
The greatest advantage of the Merkel tree is that each transaction can be deleted directly and individually, and the hash value of this transaction is just kept. In this way, for the entire block, the cryptographic security and integrity of the block are not changed, but the amount of data can be greatly reduced (the hash value has 32 bytes, and a transaction generally takes more than 400 bytes). If there is only one transaction in a block that has no subsequent transactions, deleting all other transactions will greatly reduce the amount of data in the entire block. Hence, in the safe production blockchain, there is usually no need to worry about the problem of excessive data caused by the increasing amount of data with the Merkel tree.
Consensus mechanism refers to the process of reaching a unified agreement on the state of the network in a decentralized manner, which helps to verify that information is added to the ledger, ensuring that only real transactions are recorded on the blockchain [
There are currently three mainstream algorithms: Proof of Work (PoW): the principle of the PoW mechanism is that the more work is done, the greater the benefit is. PoW can be divided into two phases, solution and verification. The solution phase requires a lot of complex calculations to compare computing power to obtain a mathematical solution; in the verification phase, the correctness of the mathematical solutions of other nodes can be verified through simple calculations. PoW requires a lot of complex calculations to ensure the correctness and consistency of the blockchain network [ Proof of Stake: PoS is also a kind of consensus proof, which is similar to equity certificates and voting systems, so it is also called “stake proof algorithm” [ Practical Byzantine Fault Tolerance: PBFT is also a common consensus proof. It is different from the previous two mechanisms. PBFT is based on calculations and there is no token reward. Everyone on the chain participates in voting. The right to publicize information can be got when the objection is less than (N−1)/3 nodes.
The PBFT is adopted in the security management model, which can regularly evaluate the availability of nodes and dynamically add or delete authentication nodes to ensure overall operating efficiency.
In the PBFT consensus process, nodes are divided into master nodes and slave nodes. The master nodes are mainly composed of coal mine safety management departments, and the slave nodes are composed of sensor nodes. The consensus process without node failure is shown in Figure
PBFT consensus process.
First, the client sends a request to any node (from node 1 in the figure), and the node broadcasts the data request sent by the client to the entire network. After collecting multiple requests, the master node sorts them into the list, produces preprepared certificates, and broadcasts the preprepared certificates to the entire network. After it is received by the slave node, it verifies the certificate and replies to the master node for information approval. After the master node receives the approval information of all the slave nodes, it packs the approval information and sends it to all the slave nodes, and the slave node verifies the correctness of the approval information of other slave nodes. When all nodes indicate that they receive block information from other slave nodes, other nodes will package the data information on the cochain.
This section tests the performance of the coal mine consortium blockchain and compares it with traditional PBFT, two classic public blockchain platforms, Bitcoin, and Ethereum to highlight the advantages of our model. Finally, the Hyperledger Fabric platform is used to construct the coal mine consortium blockchain system. We focus on the analysis of the indicators of throughput and latency. Throughput is used to describe the number of data requests that can be processed per second in the coal mine consortium blockchain and is an important indicator to measure the performance of the consensus algorithm. The number of transactions packaged per unit time is expressed as TPS (transactions per second) in blockchain: Transactions/Δ
Hyperledger Caliper is used to perform the pressure test, setting up 100 nodes to continuously send transaction requests to the coal mine consortium blockchain system and observe its throughput and latency by increasing send rates.
Figure
The performance of throughput and latency of coal mine consortium blockchain.
In order to evaluate the effectiveness of the proposed coal mine consortium blockchain model, we compared the throughput of the consortium blockchain with traditional PBFT and two classic blockchain model: Bitcoin and Ethereum. The result shows that the coal mine consortium blockchain model has obvious advantages in throughput. Bitcoin uses the POW consensus mechanism, which requires a lot of computing power and only produces one block every 10 minutes on average. Ethereum uses a POW and POS consensus mechanism; it takes about 10 seconds per block. The data required by the comparison experiment is from two different public data sets [
Throughput comparison.
Finally, we use Hyperledger Fabric platform to build the coal mine consortium blockchain system, so as to implement the coal mine output transaction, query, and other operations. Figure
The mineral trading of consortium blockchain.
Performance of the underlying of the coal mine consortium blockchain.
The decentralized, intelligent, and tamper-resistant characteristics of blockchain technology are in line with the requirements of coal mine safety production, and blockchain technology has broad development prospects in the field of coal mine safety production. Our method enhances the safety of coal mine safety production using blockchain. However, we deployed a small number of nodes to test the performance of our platform. And our model assumes that most nodes are normal. So, in a real large-scale deployment, message consistency and accuracy may not be guaranteed. For future work, we will improve our consensus algorithm flow, especially the detailed view-change. And we will deploy our platform in a public blockchain (e.g., Ethereum). Although blockchain technology has different degrees of application and research in various industries, it is still in its infancy, and there are deficiencies such as low efficiency and waste of resources. As a result, blockchain technology has not yet been widely applied.
In cooperation with Jingying Technology in Taiyuan, this paper proposes a coal mine safety production consortium chain model combined with blockchain technology and safety requirements in the field of coal mine production. It incorporates supervision departments into the system to form a good and supervisable business model where centralization and decentralization coexist. The module structure, node structure, and business process of the model are analyzed and corresponding countermeasures are proposed aiming at the problems of data reliability, safety automation management, and major equipment traceability to promote the research and development of blockchain technology in the field of coal mine safety production.
We use the Hyperledger Caliper in Section
The test result of the Hyperledger Caliper.
Test | Name | Send rate | Avg latency (s) | Throughput (tps) |
---|---|---|---|---|
1 | Transaction | 100 | 0.11 | 100 |
2 | Transaction | 110 | 0.14 | 110 |
3 | Transaction | 120 | 0.18 | 120 |
4 | Transaction | 130 | 0.21 | 130 |
5 | Transaction | 140 | 0.26 | 140 |
6 | Transaction | 150 | 290 | 150 |
7 | Transaction | 160 | 0.29 | 160 |
8 | Transaction | 170 | 0.36 | 170 |
9 | Transaction | 180 | 0.39 | 172 |
10 | Transaction | 190 | 0.43 | 180 |
11 | Transaction | 200 | 0.44 | 197 |
12 | Transaction | 210 | 0.44 | 205 |
13 | Transaction | 220 | 0.49 | 208 |
14 | Transaction | 230 | 0.54 | 228 |
15 | Transaction | 240 | 0.62 | 235 |
16 | Transaction | 250 | 0.68 | 246 |
17 | Transaction | 260 | 0.73 | 257 |
18 | Transaction | 270 | 0.78 | 266 |
19 | Transaction | 280 | 0.99 | 265 |
20 | Transaction | 290 | 1.6 | 267 |
21 | Transaction | 300 | 2.8 | 264 |
22 | Transaction | 320 | 4.1 | 263 |
23 | Transaction | 340 | 5.4 | 265 |
24 | Transaction | 360 | 6.2 | 266 |
25 | Transaction | 380 | 7.1 | 269 |
Previously reported data were used to support this study. The datasets are cited at relevant places within the text as references [
The authors declare that they have no conflicts of interest.