Blockchain-based fire safety inspection analysis and system design

Research Article
Open access

Blockchain-based fire safety inspection analysis and system design

ChenLiBing Liu 1 , Xiang Sun 2* , ZhongHao Lv 3 , Meng Sun 4 , Li Jia 5 , Zhengyong Qiu 6 , Bowen Cai 7
  • 1 Chengdu University of Information Technology    
  • 2 Chengdu University of Information Technology    
  • 3 Chengdu University of Information Technology    
  • 4 Chengdu University of Information Technology    
  • 5 Chengdu University of Information Technology    
  • 6 Chengdu University of Information Technology    
  • 7 Chengdu University of Information Technology    
  • *corresponding author lclb1225@foxmail.com
Published on 23 October 2023 | https://doi.org/10.54254/2755-2721/13/20230716
ACE Vol.13
ISSN (Print): 2755-273X
ISSN (Online): 2755-2721
ISBN (Print): 978-1-83558-017-2
ISBN (Online): 978-1-83558-018-9

Abstract

Today's buildings usually rely on various firefighting equipment for warning, often neglecting the importance of safety inspections. Most fires occur due to the usual weak awareness of fire prevention. If regular and strict safety inspections are carried out according to the regulations of fire departments will greatly reduce the occurrence of fires. Safety inspections in each unit include fire supervisors from the government and inspectors from relevant maintenance agencies, and these inspectors usually use paper reports to record the safety inspection work. This traditional practice leaves hidden problems for unresolved and important issues, including data integrity and tamperability, which will directly lead to difficulties in tracing responsibilities based on these data after an accident. Therefore, this paper proposes a de-neutralized, blockchain-based traceability system for a fire safety inspection. Blockchain technology has the characteristics of traceability, decentralization, consensus trust, and hard to tamper, which can be combined with this system. The system's core mainly adopts the Hyperledger Fabric consortium blockchain framework, configured to build a blockchain network. The network is organized with three organizations: government, unit, and maintenance agency, and smart contracts are written to process safety inspection data, thus guaranteeing the sharing of fire inspection information as well as traceability.

Keywords:

blockchain, firefighting, safety inspection, hyperledger fabric

Liu,C.;Sun,X.;Lv,Z.;Sun,M.;Jia,L.;Qiu,Z.;Cai,B. (2023). Blockchain-based fire safety inspection analysis and system design. Applied and Computational Engineering,13,112-121.
Export citation

1. Introduction

With the comprehensive development of urbanization in China, the building has potential fire accident risk characteristics, such as substantial combustible and flammable decorative materials and the complicated deployment of electric wires [1]. These can lead to unexpected fires, which cause numerous casualties and property damage yearly. For decades, academic researchers and industry specialists have been working to improve fire safety [2]. Initially, fire science and technology were extensively researched in fire safety monitoring and early detection. Much of the research focused on using various tools and techniques to detect smoke particles, carbon dioxide concentrations, and temperatures. In addition to fire safety monitoring and detection, some studies have focused on fire safety evacuation planning for buildings and tunnels [3]. And an extremely effective way to eliminate the occurrence of fires is through rigorous and truthful safety inspections.

To maintain trust and reliability throughout the inspection process, the focus is on ensuring that the stored inspection data is untameable and traceable. And all traders involved in the inspection chain can publish transactions without relying on third-party intermediaries. Furthermore, blockchain is a peer-to-peer topological distributed system, where a network formed by many peer-to-peer nodes is used to verify the information on the blockchain [4]. These decentralized, transparent, immutable, and ineradicable features provide a good solution for the application area of security checking. Whereas consortium blockchain, represented by Hyperledger Fabric, uses Certificate Authorities (CAs) to manage members and participants to know each other [5]. And all actions, whether committing application transactions, modifying network configurations, or deploying smart contracts, are recorded on the blockchain according to the recognition policy established for the network and the type of transaction in question [6]. Furthermore, dependent on the identity of the participants, the permitted blockchain can use the Practical Byzantine Fault Tolerance (PBFT) consensus algorithm, which is not only resistant to attacks by a certain number of malicious nodes but also does not require expensive mining as in the case of the public blockchain.

In summary, the main contributions of this study are as follows. First, blockchain technology is a relatively new concept in firefighting. Combined with the actual reality, this paper combines blockchain technology with the field of fire safety inspection. Second, most studies nowadays tend to analyze the conceptual model of blockchain while ignoring the practical application and implementation. In this paper, the Hyperledger Fabric consortium blockchains framework will be used to design and build the blockchain network architecture. Then a smart contract is written, and a blockchain-based fire safety inspection system is implemented to ensure the sharing and traceability of data. In this system, mutual trust is established between all organizations involved in fire safety inspection, thus reducing coordination costs and improving the efficiency of fire safety protection.

2. Literature review

In 2008, Nakamoto [7] proposed a peer-to-peer electronic cash transaction system using proof of work to record transactions, which resulted in Bitcoin becoming the first application scenario for blockchain and sweeping around the world, laying the cornerstone for the subsequent development of blockchain technology. In 2018, Caro, et al. [8] elaborated that IoT devices in agriculture and food supply chains are experiencing exponential growth. Still, most supply chain systems are currently relatively centralized. So, integrating and applying IoT and blockchain technologies in agriculture, a distributed traceability system for the agri-food supply chain is proposed. And two different blockchain platforms, Ethereum and Hyperledger Sawtooth, were used for comparison experiments to test the time required to set values in the blockchain, the processing power of each node, and the performance of bytes transmitted and received by the network. Finally, Hyperledger Sawtooth was concluded to be more effective. This system stores data collected by IoT devices directly in the blockchain, which can be invoked through smart contracts, thus making the system's records transparent, immutable, and auditable. 2021, Khan, et al. [9] designed and developed a mobile application for portable firefighting equipment (PEE) used at construction sites to perform safety checks on PEE and equipment location. Since current PEE safety inspection records rely on handwritten records by safety auditors and the data are susceptible to tampering, image labels or reports on PFEs are automatically converted to text using artificial intelligence optical character recognition (OCR), and this data is stored using blockchain technology, thereby improving data transparency, traceability, and reducing the burden on relevant stakeholders. In 2021, Lin, et al. [10] applied blockchain technology to construction management. They proposed an autonomous inspection system based on blockchain technology. Staff can manage independent inspections and process-related documents using electronic devices and update construction site execution status in real-time. The system combines Ethernet and IPFS to save the data of autonomous inspection in the blockchain, which is used to solve the trust problem of different stakeholders and thus improve the construction industry [11]. However, only a relevant conceptual design is made in the paper, and there is still much room for improvement.

3. System architecture

3.1. System framework

The system architecture model in this paper is divided into three main layers, the physical layer, the blockchain layer, and the application layer. The framework design is shown in Fig. 1.

The physical layer is mainly a bridge between the inspector and the blockchain layer. The inspector will use inspection equipment such as a smartphone or inspection instrument to perform a safety inspection according to the inspection items, including whether the firefighting equipment is complete and whether the status of firefighting equipment is normal, and then upload the safety inspection information to the blockchain layer.

The blockchain layer consists of three major parts: smart contract, block data, and block network. The smart contract is used to realize the functional requirements of storage and query, including arranging inspection tasks, uploading inspection records, and querying inspection records. The block data layer is mainly the blockchain structure, storage, and management. Finally, the block network is primarily the basis of the information transmission structure of the blockchain platform, including the consensus mechanism, P2P network, data verification mechanism, etc.

In the application layer, users can directly interact with the Fabric blockchain platform after successful authentication and provide a visual interface for users. This layer also allows for task scheduling, such as issuing security inspection tasks, inspector scheduling, viewing inspection items, viewing inspection records, etc.

/word/media/image1.png

Figure 1. System framework design.

3.2. System design process

The fire safety inspection system aims to build a Hyperledger Fabric blockchain-based fire safety inspection platform that can be used for fire safety inspection in various fire prevention units, such as factories, enterprises, and other places. First, an analysis of the business process of safety inspection, and then building the network environment. Next, the Fabric network is configured through YAML files, generating certificate files and deploying three organizations for this blockchain network: government, unit, and maintenance agency. Next, a smart contract is written and deployed, and inspectors log in to certified user accounts through the client to encrypt and upload the security inspection information of the unit to the blockchain. Finally, members of each organization can add query conditions to query the safety inspection data. The design process diagram of the system is shown in Fig. 2. The specific processes are as follows:

1) Network environment construction: analyze the real business scenario and functional requirements of this system, configure three organizations for the blockchain network: government (firefighting unit), unit, and maintenance agency, create a channel, and add the nodes of these three organizations to this channel. Because only the organization in the same channel can share the same block data and execute relevant smart contract operations, finally, according to the different needs of the function, other smart contracts are installed for each node to realize various operations of security check data for various organizations.

2) Security inspection-related information upload: The government can upload inspection items and create inspection tasks according to the actual situation. The unit must upload and rectify unit information according to the inspection items. When an inspection task is generated, the maintenance agency will send inspectors to inspect according to the inspection task and upload safety inspection information in real-time. If there is a safety problem, the problem situation will also be uploaded, as well as if the problem was solved and how it was solved.

3) Safety inspection traceability query: All organization members can log in to the blockchain fire safety inspection traceability platform using a user account with organization authentication to view safety inspection information, including inspectors, inspection items, safety issues, etc. The government can conduct random safety inspections of the unit at any time, and the unit can monitor the inspections of the maintenance agency at any time.

/word/media/image2.png

Figure 2. System process design.

3.3. System function realization

To realize the function of fire safety inspection traceability system, it is necessary to build the network environment first, followed by the design of smart contracts. The following is a detailed description of these two steps.

3.3.1. Hyperledger fabric network construction

To build a Fabric network, the system participants need to be determined according to the actual scenario, and then the organizations are selected from these participants. So this system selects three major organizations: government, fire unit, and maintenance agency. The first step is to generate organization-related private keys and certificates by configuring the crypto-config.yaml file and the second step is to manage transactions by configuring the configtx.yaml file includes organization configuration, characteristics required to join the network, access control policy, the definition of ordering service-related parameters for creating Genesis blocks or transactions, and the channel parameters to be written to Genesis blocks or configuring transactions, etc. The third step is to write the docker-compose.yaml file to configure the suitable containers for the fabric network. The fourth step is to open the orderer node and the peer node and create the channel so that each organization joins this channel. Subsequently, every transaction on the network will be executed on this channel, where each party must be authenticated and authorized to perform transactions on the channel. At this point, the fabric blockchain network is built, and the configuration information table for the system organizations is shown in Table 1.

Table 1. System organization informations.

Organization names

Organization identifier

Organization ID

Organization ports

Government

Org1

Org1MSP

7051

Unit

Org2

Org2MSP

9051

Maintenance agency

Org3

Org3MSP

11051

3.3.2. Smart contracts design

Hyperledger Fabric smart contracts are invoked by external applications on the blockchain when a transaction is to occur with the ledger. As shown in Fig. 3, a smart contract contains the corresponding trigger conditions and the operations performed after the trigger. The blockchain-based fire safety inspection system mainly encapsulates the smart contract for storing and querying safety inspection information.

/word/media/image3.png

Figure 3. Structure of smart contracts.

Smart contracts function as follows:

The smart contract connects the Fabric blockchain network as well as the client. This system installs different smart contracts on different organizations. Smart contracts' main functions include creating safety inspection items, querying safety inspection items, and querying safety inspection information. In addition, the government organization can also invoke the smart contracts of fire units and maintenance agencies to trace the related safety inspection information at all times, which can also be used as a basis for pursuing responsibility if a fire occurs.

After the smart contract is packaged and installed in the organization node, the endorsing node can approve the smart contract definition. Only after it is approved by all or most of the endorsing nodes can the subsequent smart contract be instantiated and invoked. When invoking a smart contract, the parameters passed to the methods developed by the smart contract are different for different methods. The following is a explanation of the smart contract functions designed for government organizations:

1) When the created inspection item is invoked, the system will first determine whether the inspection item already exists. If it does not exist, the new inspection item will be uploaded to the blockchain; when the query inspection item is invoked, the system will query the specified inspection item from the Fabric ledger, which can be used to verify whether the created inspection item function is created successfully.

2) When the create inspection task is invoked, the system generates a new security inspection task for the specified unit, and at the same time, it can specify which inspection item is used by the unit for security inspection; when the query inspection task is invoked, the system can view the created inspection task, which can be used to verify whether the create inspection task function is completed successfully.

3) When the create inspection records is invoked, since the government organization can conduct random safety inspections on the unit, this function will upload the safety inspection of the unit by the government organization; when the query inspection record is invoked, this function can view the execution of inspection tasks by unit and maintenance agency, which can be traced back to the inspector, inspection items, and other information, which ensures the traceability of safety inspection information.

In summary, each node has been issued a certificate and started normally, and joined the channel that was created. Fig. 4 shows the transaction flow diagram of the whole Fabric network. This flow describes the whole process from initiating an invoking transaction to final checkout on the instantiated smart contract channel.

/word/media/image4.png

Figure 4. Transaction process of blockchain-based fire safety inspection system.

The specific transaction flow is as follows:

1) Submit transaction proposal: After the client constructs the transaction proposal request, it selects the endorser peer to execute the transaction proposal and carry out the endorsement signature according to the endorsement policy, where the transaction proposal contains the smart contract methods to be invoked for this transaction, parameter information and client signature, etc.

2) Simulate execution of proposal and endorsement: After receiving the transaction proposal, the endorser peer will perform some verification, and after the verification is passed, the endorser peer will simulate the execution of the business logic in the smart contract and generate the read/write set based on the current book data. The ledger data will not be updated during the simulated execution. Then the endorser peer signs these read/write sets to generate the proposal response and returns them to the application.

3) Collect the endorsement of the transaction: the application receives the proposal response and verifies the signature of the endorser peer. If the smart contract only performs a ledger query operation, the application only needs to check the query response and does not submit the transaction to the order peer. However, if the smart contract performs an invoke operation on the ledger, it needs to submit the transaction to the order service for ledger update.

4) Construct the transaction request and send it to the order peer: After the application receives the signatures of all the endorser peers, it invokes the SDK to generate the transaction based on the endorser signature and broadcasts it to the order peer. The process of generating the transaction is straightforward, which only needs to confirm that the execution results of all endorser peers are precisely the same, and then package the transaction proposal, proposal response, and endorser signature to generate the transaction.

5) Order peer sequences the transactions and generates blocks: the order peer receives the transaction information from the channel in the network, reads the information to obtain the channel name, sequences the transaction information in the order of the receipt of transactions on the channel, and generates blocks.

6) Order peer broadcasts the block to the leader peer: after generating the block, the order peer broadcasts it to the leader peers of different organizations on the channel.

7) The committer peer verifies the block content and writes to the ledger: all the peer nodes are committer peers, which record the ledger data of the peers that have joined the channel. After the Committer peer receives the block generated by the order peer, it will verify the validity of the block transaction and then submit it to the local ledger and generate an event for generating the block. The application which listens to the block event will carry out the subsequent processing.

8) The anchor peers synchronous the latest blocks within the organization: if the transaction is invalid, it also will update the block, but not the state of the world. And anchor peers are mainly used to synchronize information between organizations in the same channel.

4. Results

To corroborate the feasibility of a blockchain-based fire safety inspection system, this experiment arranged the blockchain network on a VMware virtual machine with the operating system Ubuntu 20.04. The virtual machine was configured as follows: 4 GB of RAM, processor 2, and 30 GB of hard disk. Version 20.10.18 of Docker was used in the virtual machine to manage the smart contract environment, and the Hyperledger Fabric consortium blockchain framework with version 2.2.2 was used to develop the blockchain system. In addition, the front-end and back-end architecture is separated, with Vue.js used for the front end and SpringBoot for the back end.

As shown in Fig. 5, the government creates a new fire safety inspection item and uploads them to the blockchain network, which can be queried by the unit and maintenance agency.

/word/media/image5.png

Figure 5. Create a fire safety inspection item.

As shown in Fig. 6, query the safety inspection items. The daily inspection items include whether the networking facilities are online, whether the safety warning signs are complete and visible, and whether the water for firefighting is sufficient.

/word/media/image6.png

Figure 6. Query safety inspection items.

Create daily inspection tasks as shown in Fig. 7. Government fire departments can create inspection tasks for units and urge them to perform them. The unit can also create inspection tasks for their companies and ask maintenance agencies to come and conduct inspections.

/word/media/image7.png

Figure 7. Create daily inspection task.

As shown in Fig. 8, it is a query inspection task that contains the block's hash value for easy traceability in the future. When the unit queries the task, it will rectify the company and meet the inspection; when the maintenance agency queries the task, it will arrange for relevant inspectors to perform the task.

/word/media/image8.png

Figure 8. Query inspection task.

As shown in Fig 9, query fire safety inspection records, all organizations can view the safety inspection records of the unit, including task generation time, inspection time, inspector, inspection result, block hash value, etc. However, no irregular modification can be made.

/word/media/image9.png

Figure 9. Query fire safety inspection records.

5. Discussion & conclusions

Currently, there are many problems with manual paper reports or centralized systems to record safety inspection information, such as inefficiency, easy falsification of safety inspection information, incomplete inspection information, and difficulty in traceability. This study designs and implements a solution for a fire safety inspection traceability system to address these problems, combining functional requirements and selecting a Hyperledger Fabric consortium blockchain that applies to actual fire safety inspection application scenarios. Taking fire safety inspection tasks as the traceability object, combined with the blockchain platform, the series of operations of fire safety inspection from proposing inspection items, generating inspection tasks, executing inspection tasks, and handling safety problems are recorded and tracked. The characteristics of blockchain technology of untameably, decentralized, consensus trust and traceability are applied to the fire safety inspection system, which realizes the transparency of the whole safety inspection process and ensures traceability and responsibility after the occurrence of fire accidents. And it greatly improves the integrity and reliability of data. The government fire bureau can query all the safety inspection information of the unit in real-time and propose rectification opinions to strangle the safety hazards in the cradle and reduce the occurrence of fire accidents.

In the future, this fire safety inspection system will do more extended functions, and it is not limited to applying blockchain technology to safety inspection. Still, it should incorporate all aspects of firefighting, including fire monitoring, micro fire station management, fire water control, fire equipment traceability, etc.


References

[1]. Zhong, Maohua, et al. "Study of the human evacuation simulation of metro fire safety analysis in China." Journal of Loss Prevention in the Process Industries, 287-298 (2008).

[2]. Yang, Ruochen, et al. "A time-dependent probabilistic model for fire accident analysis." Fire safety journal, 111 (2020).

[3]. Wu, Zuyu, et al. "A review for solar panel fire accident prevention in large-scale PV applications." IEEE Access, 8 (2020).

[4]. Zhao, Rui, et al. "Comparison of BIM Collaboration Paradigms for Digital Twin Readiness: Centralized Files, Decentralized Clouds, and Distributed Blockchains." Proc. of the Conference CIB W78, vol. 2021, pp. 11-15. (2021).

[5]. Wu, Liupengfei, et al. "A blockchain-based model with an incentive mechanism for cross-border logistics supervision and data sharing in modular construction." Journal of Cleaner Production, 375 (2022).

[6]. Wu, Liupengfei, et al. "Using blockchain to improve information sharing accuracy in the onsite assembly of modular construction." Journal of Management in Engineering, 38.3 (2022).

[7]. Nakamoto, Satoshi. "Bitcoin: A peer-to-peer electronic cash system." Decentralized Business Review, (2008).

[8]. Caro, Miguel Pincheira, et al. "Blockchain-based traceability in Agri-Food supply chain management: A practical implementation." 2018 IoT Vertical and Topical Summit on Agriculture-Tuscany (IOT Tuscany). IEEE, (2018).

[9]. Khan, Numan, et al. "Utilizing safety rule correlation for mobile scaffolds monitoring leveraging deep convolution neural networks." Computers in Industry, 129 (2021).

[10]. Lin, Yi-Hsin, et al. "Application of Blockchain in Construction Inspection Activities." The 2nd international conference on computing and data science. (2021).

[11]. Li, Xiao, et al. "Two-layer Adaptive Blockchain-based Supervision model for off-site modular housing production." Computers in Industry, 128 (2021).


Cite this article

Liu,C.;Sun,X.;Lv,Z.;Sun,M.;Jia,L.;Qiu,Z.;Cai,B. (2023). Blockchain-based fire safety inspection analysis and system design. Applied and Computational Engineering,13,112-121.

Data availability

The datasets used and/or analyzed during the current study will be available from the authors upon reasonable request.

Disclaimer/Publisher's Note

The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of EWA Publishing and/or the editor(s). EWA Publishing and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

About volume

Volume title: Proceedings of the 5th International Conference on Computing and Data Science

ISBN:978-1-83558-017-2(Print) / 978-1-83558-018-9(Online)
Editor:Roman Bauer, Marwan Omar, Alan Wang
Conference website: https://2023.confcds.org/
Conference date: 14 July 2023
Series: Applied and Computational Engineering
Volume number: Vol.13
ISSN:2755-2721(Print) / 2755-273X(Online)

© 2024 by the author(s). Licensee EWA Publishing, Oxford, UK. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license. Authors who publish this series agree to the following terms:
1. Authors retain copyright and grant the series right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this series.
2. Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the series's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this series.
3. Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See Open access policy for details).

References

[1]. Zhong, Maohua, et al. "Study of the human evacuation simulation of metro fire safety analysis in China." Journal of Loss Prevention in the Process Industries, 287-298 (2008).

[2]. Yang, Ruochen, et al. "A time-dependent probabilistic model for fire accident analysis." Fire safety journal, 111 (2020).

[3]. Wu, Zuyu, et al. "A review for solar panel fire accident prevention in large-scale PV applications." IEEE Access, 8 (2020).

[4]. Zhao, Rui, et al. "Comparison of BIM Collaboration Paradigms for Digital Twin Readiness: Centralized Files, Decentralized Clouds, and Distributed Blockchains." Proc. of the Conference CIB W78, vol. 2021, pp. 11-15. (2021).

[5]. Wu, Liupengfei, et al. "A blockchain-based model with an incentive mechanism for cross-border logistics supervision and data sharing in modular construction." Journal of Cleaner Production, 375 (2022).

[6]. Wu, Liupengfei, et al. "Using blockchain to improve information sharing accuracy in the onsite assembly of modular construction." Journal of Management in Engineering, 38.3 (2022).

[7]. Nakamoto, Satoshi. "Bitcoin: A peer-to-peer electronic cash system." Decentralized Business Review, (2008).

[8]. Caro, Miguel Pincheira, et al. "Blockchain-based traceability in Agri-Food supply chain management: A practical implementation." 2018 IoT Vertical and Topical Summit on Agriculture-Tuscany (IOT Tuscany). IEEE, (2018).

[9]. Khan, Numan, et al. "Utilizing safety rule correlation for mobile scaffolds monitoring leveraging deep convolution neural networks." Computers in Industry, 129 (2021).

[10]. Lin, Yi-Hsin, et al. "Application of Blockchain in Construction Inspection Activities." The 2nd international conference on computing and data science. (2021).

[11]. Li, Xiao, et al. "Two-layer Adaptive Blockchain-based Supervision model for off-site modular housing production." Computers in Industry, 128 (2021).