# Application of Key Technologies of Distributed Storage Based on the Internet of Things in Urban Fire Protection

Authors: Weibin Yin; Zhongjie Han; Yueliang Feng; Gang Zhou; Yunchao Shen
Journal: Scientific Programming
 (2022)

---

## Abstract

Due to the rapid development of science and technology in the current era, fires occur more frequently, and the relationship between various economic activities and things is becoming more and more frequent. The need for real-time monitoring and remote monitoring of various firefighting facilities in buildings has become very urgent; this is a task that must be put on the agenda. The existing urban fire remote monitoring system has fewer intelligent networks, so it has high requirements for the firefighters on duty in the fire control room, which is no longer sufficient for the firefighting needs of the modern society. This paper proposes a wireless city fire remote monitoring system based on Internet of Things technology, NB-IoT technology, and cloud computing technology and studies core technologies such as designing wireless monitoring nodes at the perception layer. In the urban fire protection environment of distributed storage, several important theories, key technologies, and related algorithms are being studied in detail. After a variety of experimental verification results, the spatial data engine and adaptive spatial data model of the metadata database are developed. This provides a distributed storage virtual city geographic environment, multilevel, multiregional design and development of a simulated prototype platform and storage, management, sharing, and visualization of urban geospatial data. After technical analysis, a visualization framework was installed, which has the characteristics of global vector grid integration and distributed spatial data. Through the research on the key technology of distributed storage of the Internet of Things, this paper applies it to urban fire protection and promotes the intelligent development of urban fire protection. The application of IoT storage technology in urban fire protection can solve the shortcomings of the current urban fire remote monitoring system and automatic fire alarm system. Wireless city fire remote monitoring system, real-time collection, and transmission and storage of working status information of various fire facilities in the building are provided. The functions of real-time monitoring, real-time alarm, real-time search query, record query, maintenance management, route guidance, and user management are also realized.


---

## Body

## 1. Introduction

This article introduces the research background and importance of the smart city fire protection system and analyzes the market demand for the function integration of the smart city fire protection system through detailed interviews with domestic research methods. By reviewing the fire protection work and the theoretical support of smart fire protection cases at home and abroad, we will discuss the key points and difficulties of China’s smart fire protection development in the context of urbanization. According to the application upgrade requirements of the smart city fire protection system, this paper has carried out a series of design and research on the software of the smart fire protection system monitoring platform.This paper proposes a wireless urban fire remote monitoring system based on Internet of Things technology, NB-IoT technology, and cloud computing technology and studies core technologies such as the design of wireless monitoring nodes at the perception layer. In the distributed storage urban fire protection environment, several important theories, key technologies, and related algorithms are being studied in detail. After a variety of experiments to verify the results, the spatial data engine and adaptive spatial data model of the metadata database are developed.After the Internet of Things technology and understanding the concepts of data fire control and intelligent fire control, based on the data fire control intelligent system platform, a mobile intelligent fire control APP on the market was established and demand analysis interviews were conducted. The practicality of the APP design interface was through detailed interviews. The method of investigation was conducted and the security of the intelligent fire protection system was discussed to eliminate users’ worries. The intelligent fire protection system in the mobile terminal APP for residents’ demand analysis has functions such as fire alarm function, report analysis function, hidden danger processing function, and fire prevention work monitoring equipment monitoring and fire prevention knowledge function. More importantly, residents pay close attention to hidden dangers and have high requirements for the realization of the treatment process. However, to achieve a thorough treatment of hidden dangers, knowledge, tracking, digitization, classification, statistics, and implementation of all levels of the whole process are required. Through the largest user target group of mobile applications, residents can supplement the real-time information source of the fire protection data platform, thereby achieving the data fire protection and disaster prevention goals of the entire population. This smart city firefighting application is designed not only to meet the needs of customer groups but also to allow customers to make suggestions for improvement. Next, the current distributed storage VGE system structure, data resources, characteristics of supporting technologies and application platforms, and existing problems are researched and analyzed, and a four-tier system structure of distributed storage virtualized geographic environment architecture is established using technical analysis. In addition, it provides the organization and support technology of the basic layer, resource layer, service layer, and application layer content and makes it based on the technology and application level to provide research and design for distributed storage VGE and application services. At the same time, based on the three aspects of grid, cloud mode, and Internet of Things mode, a series of research and design on the architecture of virtual geographic environment have been carried out, and a wider range of ideas have been provided for the development of distributed storage VGE. The two aspects of scalability and compatibility were verified.


## 2. Related Work

Literature [1] describes the VGE metadata model. According to the needs of distributed storage VGE applications, a three-dimensional simulation model and a metadata model for vector and grid integration have been established, and eight technologies have also been completed, including dynamic management of VGE metadata, rapid analysis, and cache management. These provided technologies provide a certain value reference for the distributed storage VGE metadata model. The literature introduces the characteristics of the adaptive model of spatial data and gives and analyzes five factors that will affect the establishment of the characteristic spatial data model: data, software, users, computers, and networks [2]. The literature introduces the addition of a distributed spatial data engine on the basis of metadata. After constructing the spatial data storage system and analyzing the storage system, it is found that, in the construction of Linux multicache server, a data service model method can be used to construct this multicache server. The service model used not only eliminates the incompatibility of the Lustre file system with the Microsoft client but also improves the speed of data access [3]. The literature introduces multimodal applications researched and developed on the basis of adaptive spatial data visualization. The application establishes a visualization framework. The data of this framework includes global vector grid integrated data and distributed spatial data. It analyzes and studies the application of distributed spatial data visualization based on the adaptive spatial data model [4]. The literature introduces HRMD which is a strategy that combines data deduplication technology and finally forms a technology that can carry out mixed redundancy of hot and cold data. When it runs, it adopts a hybrid redundancy method, combining HRMD replication strategy and erasure coding technology [5]. This method is used to judge the cold and hot data, which is convenient to use the corresponding different redundancy strategies. In other words, hot data uses a replication strategy, while cold data uses erasure coding technology.


## 3. Key Technology Design of Distributed Storage

### 3.1. Distributed Storage VGE Architecture

For a distributed storage VGE system, the stability and scalability of the system are entirely determined by the structure. Based on the concept and application requirements of the distributed storage VGE platform, combined with the grid geographic information service system structure, the principles of platform independence, site independence, and system security and stability can provide distributed storage VGE systems architecture. The whole system is composed of 4 layers, and there is a clear hierarchical relationship between each layer, and, in some cases, each layer unit also has a specific ordering relationship. The basic layer, resource layer, service layer, and application layer are all included in the architecture. Each adjacent layer can exchange data through standard interfaces, and each layer has completely independent application logic. The next section will introduce the specific content system of each layer.


#### 3.1.1. Basic Layer

The basic layer (Elements) is the basis of the distributed storage VGE system structure in the network environment, including the basic network structure, the lowest layer of the network protocol, and the specific protocol suitable for the geospatial visualization system. The Internet is the basis and platform for operating the entire system [6]. Among them, such functions as negotiating the configuration and current load of network resources and using strategies are mainly provided by the underlying network protocol, and the underlying network protocol will also negotiate access to network resources and perform some specified operations on the requirements of network settings (including reservations and service quality) [7], and the protocol also supports some required operations, such as creation process and data access, as well as monitoring of job status and control of jobs, such as suspending operations. The spatial information protocol is the method and rules for using geospatial information. The distributed storage system mainly stipulates the methods and principles of storing and using distributed data.


#### 3.1.2. Resource Layer

Distributed storage VGE system in various aspects of corresponding resources (such as various data resources, computing and corresponding storage resources, equipment, etc.) together constitutes the resource layer, and on the basis of Internet or wireless communication equipment, physical connections between each other were made [8]. Data resources mainly refer to large-scale distributed multisource time-varying heterogeneous spatial data, which are very rich in data resources. The focus is on how to visually present rich data resources to users. The main tasks of computing resources are used to monitor and control the process of the program and start the program; the resource process and resource reservation function are controlled by the assigned management mechanism; the corresponding query mechanism is provided, and other parties are supported to supervise the higher performance ratio. The transmission mechanism (such as the striped transmission mechanism) [9] and some read and write mechanism operations are based on the file set.


#### 3.1.3. Service Layer

The service layer (Service) realizes integrated management and processing of spatial information about geography and can complete the realization of corresponding functions about the visualization of geospatial information. For the collection and processing functions of spatial data, it is mainly responsible for completing the collection, creation, management, and maintenance of a large amount of spatial data [10]. This part of the content will be described in detail in this chapter for multisource scheduling problems and multiscale data space. In terms of data extraction, these problems are solved one by one by the corresponding spatial data engine; the process of building an adaptive spatial data model is introduced in detail, and the geospatial service specification contract determines the basic principles of sharing and accessing geospatial service data.


#### 3.1.4. Application Layer

Application layer (Applications) is a specific application program interface for geospatial visualization users and provides a geospatial integration application environment for the application domain. This layer is mainly divided into three levels of work implementation: First, it is based on the distributed storage virtualized geographic environment, which is developed by components and middleware, the function call and integration of the distributed geospatial visualization engine, and the integration of the GIS platform and support for application system development [11]. Second, in order to enable users to develop platform components or plug-ins based on distributed geospatial visualization, it provides a certain standard conceptual definition for component interfaces and corresponding protocols and also provides a standard definition for the corresponding development platform or the tools have corresponding compatibility. Third, we have built a terabyte-level interactive visualization software system for geographic information for heterogeneous data resources [12]. After conducting a series of research on distributed geographic information visualization engine and middleware, the research results are analyzed, and finally the distributed geographic information visualization client and server platform are developed and upgraded based on many operating systems including Windows. Some geographic information processing and management tools are developed to establish the interactive visualization of a TB-level virtual geographic environment, which is a software system based on the wide area network with domestic independent property rights for heterogeneous data resources [13]. The establishment of a distributed geospatial information infrastructure is promoted and the use of geospatial services is improved. We will conduct detailed research on the visualization of geospatial information, multimode applications, and the deployment of a distributed storage VGE platform.


### 3.2. Selection of the Data Distribution Model

The core of DDSF is a core selection model composed of mixed-integer backpack selection models. The role of the selection model is to select the best data distribution method according to the user's needs (e.g., the combination of the modules used and the cloud provider) [14]. Since the data distribution process includes three modules of distribution, encryption, and compression and cloud storage service providers and the numbers of modules and cloud storage service providers are limited, based on the above reasons, the method of mixed-integer optimization is chosen. The DDSF selection model is constructed on the basis of the multicriteria global optimization linear programming method. In the multicriteria global optimization linear programming, some parameters can be maximized, while other parameters can be minimized [15, 16]. This feature is very suitable for the DDSF selection model. In solving optimization problems, integer linear programming can be used to solve them. Integer linear programming requires an integer decision variable to indicate whether a particular module in a particular category is selected.The formation process of the DDSF selection model can be expressed by the following formula:(1)∑j=03Qjmin−Qk,jQjmin−Qjmin∗wj+∑j=47Qk,j−QjminQjmax−Qjmin∗wj,∑i=0jwi=1,wi∈0,1,∑i=1NidaDi=1,Di∈0,1,∑i=1NemcEi≤1,Ei∈0,1,∑i=1NcompCi≤1,Ci∈0,1,Qk,j≥Qjuser,∑i=1NprovPi=Preq,Pi∈0,1.


### 3.3. Hiddenness of Distributed Storage

For the statistical characteristics of the data stream, the statistical characteristics of the data stream also include many relevant features, such as the distribution probability, the distribution range of experience, and the corresponding growth rate, mean, and variance. The data stream sequence is an important feature and is generally used in the inspection of various hidden channel data streams, and, at the same time, it performs feature statistics on some objects.Calculate the Euclidean distance of the change in the number of data packets in the corresponding interval, namely,P:(2)Pαx,βx=αxn−βxn2,x=1,2,…,Lmaxwind.Its self-information is(3)Ixi=−logpxi=1logpxi.Information entropy is defined as(4)HX=EIxi=−∑i=11pxilogpxi.The information entropy of thex-th window of the length sequence is(5)HxX=EIpXi=−∑i=11pxilogpxi.Similarly, the information entropy of thex-th window of the detected data stream is(6)HxY=EIpYi=−−∑1pxilogpxi.


### 3.4. MD5 Algorithm Principle

The full name of the MD5 algorithm is Message-Digest Algorithm 5 (Message Digest Algorithm). Both the MD5 algorithm and the SHA-1 algorithm are improved MD4 algorithms and are more complex than MD4. For information of any length, MD5 first groups the information, and the length of each group is 512 bits. Then, the subgroups after each group are divided and the corresponding generated groups will be cascaded, and finally a 128-bit fingerprint (also called a digest) is obtained.The specific steps of the MD5 algorithm are as follows.In the use of the MD5 algorithm, it is usually necessary to formulate four integer parameters. The digits of these four parameters are generally 32 bits. People usually call them link variables. The four link variables are as follows:(7)A=0123456716,B=89ABCDEF16,C=FEDCBA9816,D=7654321016.Again, four nonlinear functions are set. They are, respectively,(8)FX,Y,Z=X&Y|∼X&Z,GX,Y,Z=X&Z|Y&∼Z,HX,Y,Z=X∧Y∧Z,IX,Y,Z=Y∧X|∼Z,a=b+a+Fb,c,d+Mj+ti≪<s.


### 3.5. Random C-Cast Model Design

At first, among all the nodes in the running network, the model will select a red signal among them, and the selection process has a certain degree of randomness. Then, the randomly selected red signal will propagate a hop message to other operating nodes in the same network range. When the intermediate node detects that it cannot send the calculation message to another node, it will send an ACK message to the red signal in the reverse direction [17]. Through the ACK message, the red signal can calculate the maximum number of red hops K in the network. If it is not running on the basis of the global scheduling plan, it may happen that two or more nodes jointly start to compete for the red signal. When such an event occurs, nodes will compete with each other based on the timestamp or node ID.If the number of hops between the two signals ish, theoretically, if the area covered by the network is infinite, then those contour lines with a radius smaller than h will change, and they will form a ring with each other. In the area between the two signals, the contours of the two color signals will appear to be superimposed on each other, and the superposition will gradually form a spindle-like shape area. In this spindle-like region, you will find that any two BR contour pairs intersect at two points [18]. However, in the actual network area, it is not an ideally infinite area, and the shape of its deployment is not sure whether it is a spindle shape. In this area, it is uncertain whether there will be a phenomenon of superimposition. The following content details the influencing factors of the success rate of data query, the success rate is mainly affected by the degree of overlap between the two different areas of the spindle area and the network area, and this statement is given below. The concept of proof and standardization is defined.The following formula describes the degree of overlap between the network area and the spindle area:(9)r=ScSN⋅ScSo.According to (9), in the worst case, the degree of overlap between the network area and the spindle area can be given by the following formula:(10)rh=π/8h2r2/2⋅π/8π/3−3/4,0≤h≤L,π/4−arc cosL/h⋅h2+Lh2−L22L2⋅π/3−3/4h2,L<h≤2L.The expected value ofK is(11)EK=4L∫1/21∫1/21x2+y2dxdy≈1.07L.Then the following is satisfied:(12)x12+x22=K12,x12+x32=K22,x22+x42=K32,x32+x42=K42.


### 3.6. Performance Test of Distributed Storage

In the performance test of distributed storage, the influencing factors of the success rate of data query are studied and whether the success probability will be affected by the distance between the two signals is analyzed. In this study, there is random C-cast model simulation for experimental discussion and research. If the distance between the two signals is in the range of 20 to 30, the average success rate of data queries will exceed 75%. Positioning errors are considered in GHT. The simulation shows that the location error will have a significant impact on the success rate of GHT data query.The error range gradually increases from 1 m to 9 m. It can be observed that as errors continue to increase, the average data query rate of GHT gradually decreases. For C-cast and rumor routes, they are not affected by location errors. Since double rulings are the same as GHT in terms of mechanism, positioning errors are also included in the factors that affect the success rate of data query. Therefore, attention needs to be paid only to the storage overhead of double rulings.The function of the mesh network topology is mainly to test the load balancing of double rulings, C-cast and C-cast, using network coding. In double rulings, the storage capacity of each node is less than 10, and, in the center of the network, its load is much larger than the load of the edge nodes of the network. When distributing data copies, it is found that the average load on the C-cast node with network coding is half of the average C-cast.


## 3.1. Distributed Storage VGE Architecture

For a distributed storage VGE system, the stability and scalability of the system are entirely determined by the structure. Based on the concept and application requirements of the distributed storage VGE platform, combined with the grid geographic information service system structure, the principles of platform independence, site independence, and system security and stability can provide distributed storage VGE systems architecture. The whole system is composed of 4 layers, and there is a clear hierarchical relationship between each layer, and, in some cases, each layer unit also has a specific ordering relationship. The basic layer, resource layer, service layer, and application layer are all included in the architecture. Each adjacent layer can exchange data through standard interfaces, and each layer has completely independent application logic. The next section will introduce the specific content system of each layer.


### 3.1.1. Basic Layer

The basic layer (Elements) is the basis of the distributed storage VGE system structure in the network environment, including the basic network structure, the lowest layer of the network protocol, and the specific protocol suitable for the geospatial visualization system. The Internet is the basis and platform for operating the entire system [6]. Among them, such functions as negotiating the configuration and current load of network resources and using strategies are mainly provided by the underlying network protocol, and the underlying network protocol will also negotiate access to network resources and perform some specified operations on the requirements of network settings (including reservations and service quality) [7], and the protocol also supports some required operations, such as creation process and data access, as well as monitoring of job status and control of jobs, such as suspending operations. The spatial information protocol is the method and rules for using geospatial information. The distributed storage system mainly stipulates the methods and principles of storing and using distributed data.


### 3.1.2. Resource Layer

Distributed storage VGE system in various aspects of corresponding resources (such as various data resources, computing and corresponding storage resources, equipment, etc.) together constitutes the resource layer, and on the basis of Internet or wireless communication equipment, physical connections between each other were made [8]. Data resources mainly refer to large-scale distributed multisource time-varying heterogeneous spatial data, which are very rich in data resources. The focus is on how to visually present rich data resources to users. The main tasks of computing resources are used to monitor and control the process of the program and start the program; the resource process and resource reservation function are controlled by the assigned management mechanism; the corresponding query mechanism is provided, and other parties are supported to supervise the higher performance ratio. The transmission mechanism (such as the striped transmission mechanism) [9] and some read and write mechanism operations are based on the file set.


### 3.1.3. Service Layer

The service layer (Service) realizes integrated management and processing of spatial information about geography and can complete the realization of corresponding functions about the visualization of geospatial information. For the collection and processing functions of spatial data, it is mainly responsible for completing the collection, creation, management, and maintenance of a large amount of spatial data [10]. This part of the content will be described in detail in this chapter for multisource scheduling problems and multiscale data space. In terms of data extraction, these problems are solved one by one by the corresponding spatial data engine; the process of building an adaptive spatial data model is introduced in detail, and the geospatial service specification contract determines the basic principles of sharing and accessing geospatial service data.


### 3.1.4. Application Layer

Application layer (Applications) is a specific application program interface for geospatial visualization users and provides a geospatial integration application environment for the application domain. This layer is mainly divided into three levels of work implementation: First, it is based on the distributed storage virtualized geographic environment, which is developed by components and middleware, the function call and integration of the distributed geospatial visualization engine, and the integration of the GIS platform and support for application system development [11]. Second, in order to enable users to develop platform components or plug-ins based on distributed geospatial visualization, it provides a certain standard conceptual definition for component interfaces and corresponding protocols and also provides a standard definition for the corresponding development platform or the tools have corresponding compatibility. Third, we have built a terabyte-level interactive visualization software system for geographic information for heterogeneous data resources [12]. After conducting a series of research on distributed geographic information visualization engine and middleware, the research results are analyzed, and finally the distributed geographic information visualization client and server platform are developed and upgraded based on many operating systems including Windows. Some geographic information processing and management tools are developed to establish the interactive visualization of a TB-level virtual geographic environment, which is a software system based on the wide area network with domestic independent property rights for heterogeneous data resources [13]. The establishment of a distributed geospatial information infrastructure is promoted and the use of geospatial services is improved. We will conduct detailed research on the visualization of geospatial information, multimode applications, and the deployment of a distributed storage VGE platform.


## 3.1.1. Basic Layer

The basic layer (Elements) is the basis of the distributed storage VGE system structure in the network environment, including the basic network structure, the lowest layer of the network protocol, and the specific protocol suitable for the geospatial visualization system. The Internet is the basis and platform for operating the entire system [6]. Among them, such functions as negotiating the configuration and current load of network resources and using strategies are mainly provided by the underlying network protocol, and the underlying network protocol will also negotiate access to network resources and perform some specified operations on the requirements of network settings (including reservations and service quality) [7], and the protocol also supports some required operations, such as creation process and data access, as well as monitoring of job status and control of jobs, such as suspending operations. The spatial information protocol is the method and rules for using geospatial information. The distributed storage system mainly stipulates the methods and principles of storing and using distributed data.


## 3.1.2. Resource Layer

Distributed storage VGE system in various aspects of corresponding resources (such as various data resources, computing and corresponding storage resources, equipment, etc.) together constitutes the resource layer, and on the basis of Internet or wireless communication equipment, physical connections between each other were made [8]. Data resources mainly refer to large-scale distributed multisource time-varying heterogeneous spatial data, which are very rich in data resources. The focus is on how to visually present rich data resources to users. The main tasks of computing resources are used to monitor and control the process of the program and start the program; the resource process and resource reservation function are controlled by the assigned management mechanism; the corresponding query mechanism is provided, and other parties are supported to supervise the higher performance ratio. The transmission mechanism (such as the striped transmission mechanism) [9] and some read and write mechanism operations are based on the file set.


## 3.1.3. Service Layer

The service layer (Service) realizes integrated management and processing of spatial information about geography and can complete the realization of corresponding functions about the visualization of geospatial information. For the collection and processing functions of spatial data, it is mainly responsible for completing the collection, creation, management, and maintenance of a large amount of spatial data [10]. This part of the content will be described in detail in this chapter for multisource scheduling problems and multiscale data space. In terms of data extraction, these problems are solved one by one by the corresponding spatial data engine; the process of building an adaptive spatial data model is introduced in detail, and the geospatial service specification contract determines the basic principles of sharing and accessing geospatial service data.


## 3.1.4. Application Layer

Application layer (Applications) is a specific application program interface for geospatial visualization users and provides a geospatial integration application environment for the application domain. This layer is mainly divided into three levels of work implementation: First, it is based on the distributed storage virtualized geographic environment, which is developed by components and middleware, the function call and integration of the distributed geospatial visualization engine, and the integration of the GIS platform and support for application system development [11]. Second, in order to enable users to develop platform components or plug-ins based on distributed geospatial visualization, it provides a certain standard conceptual definition for component interfaces and corresponding protocols and also provides a standard definition for the corresponding development platform or the tools have corresponding compatibility. Third, we have built a terabyte-level interactive visualization software system for geographic information for heterogeneous data resources [12]. After conducting a series of research on distributed geographic information visualization engine and middleware, the research results are analyzed, and finally the distributed geographic information visualization client and server platform are developed and upgraded based on many operating systems including Windows. Some geographic information processing and management tools are developed to establish the interactive visualization of a TB-level virtual geographic environment, which is a software system based on the wide area network with domestic independent property rights for heterogeneous data resources [13]. The establishment of a distributed geospatial information infrastructure is promoted and the use of geospatial services is improved. We will conduct detailed research on the visualization of geospatial information, multimode applications, and the deployment of a distributed storage VGE platform.


## 3.2. Selection of the Data Distribution Model

The core of DDSF is a core selection model composed of mixed-integer backpack selection models. The role of the selection model is to select the best data distribution method according to the user's needs (e.g., the combination of the modules used and the cloud provider) [14]. Since the data distribution process includes three modules of distribution, encryption, and compression and cloud storage service providers and the numbers of modules and cloud storage service providers are limited, based on the above reasons, the method of mixed-integer optimization is chosen. The DDSF selection model is constructed on the basis of the multicriteria global optimization linear programming method. In the multicriteria global optimization linear programming, some parameters can be maximized, while other parameters can be minimized [15, 16]. This feature is very suitable for the DDSF selection model. In solving optimization problems, integer linear programming can be used to solve them. Integer linear programming requires an integer decision variable to indicate whether a particular module in a particular category is selected.The formation process of the DDSF selection model can be expressed by the following formula:(1)∑j=03Qjmin−Qk,jQjmin−Qjmin∗wj+∑j=47Qk,j−QjminQjmax−Qjmin∗wj,∑i=0jwi=1,wi∈0,1,∑i=1NidaDi=1,Di∈0,1,∑i=1NemcEi≤1,Ei∈0,1,∑i=1NcompCi≤1,Ci∈0,1,Qk,j≥Qjuser,∑i=1NprovPi=Preq,Pi∈0,1.


## 3.3. Hiddenness of Distributed Storage

For the statistical characteristics of the data stream, the statistical characteristics of the data stream also include many relevant features, such as the distribution probability, the distribution range of experience, and the corresponding growth rate, mean, and variance. The data stream sequence is an important feature and is generally used in the inspection of various hidden channel data streams, and, at the same time, it performs feature statistics on some objects.Calculate the Euclidean distance of the change in the number of data packets in the corresponding interval, namely,P:(2)Pαx,βx=αxn−βxn2,x=1,2,…,Lmaxwind.Its self-information is(3)Ixi=−logpxi=1logpxi.Information entropy is defined as(4)HX=EIxi=−∑i=11pxilogpxi.The information entropy of thex-th window of the length sequence is(5)HxX=EIpXi=−∑i=11pxilogpxi.Similarly, the information entropy of thex-th window of the detected data stream is(6)HxY=EIpYi=−−∑1pxilogpxi.


## 3.4. MD5 Algorithm Principle

The full name of the MD5 algorithm is Message-Digest Algorithm 5 (Message Digest Algorithm). Both the MD5 algorithm and the SHA-1 algorithm are improved MD4 algorithms and are more complex than MD4. For information of any length, MD5 first groups the information, and the length of each group is 512 bits. Then, the subgroups after each group are divided and the corresponding generated groups will be cascaded, and finally a 128-bit fingerprint (also called a digest) is obtained.The specific steps of the MD5 algorithm are as follows.In the use of the MD5 algorithm, it is usually necessary to formulate four integer parameters. The digits of these four parameters are generally 32 bits. People usually call them link variables. The four link variables are as follows:(7)A=0123456716,B=89ABCDEF16,C=FEDCBA9816,D=7654321016.Again, four nonlinear functions are set. They are, respectively,(8)FX,Y,Z=X&Y|∼X&Z,GX,Y,Z=X&Z|Y&∼Z,HX,Y,Z=X∧Y∧Z,IX,Y,Z=Y∧X|∼Z,a=b+a+Fb,c,d+Mj+ti≪<s.


## 3.5. Random C-Cast Model Design

At first, among all the nodes in the running network, the model will select a red signal among them, and the selection process has a certain degree of randomness. Then, the randomly selected red signal will propagate a hop message to other operating nodes in the same network range. When the intermediate node detects that it cannot send the calculation message to another node, it will send an ACK message to the red signal in the reverse direction [17]. Through the ACK message, the red signal can calculate the maximum number of red hops K in the network. If it is not running on the basis of the global scheduling plan, it may happen that two or more nodes jointly start to compete for the red signal. When such an event occurs, nodes will compete with each other based on the timestamp or node ID.If the number of hops between the two signals ish, theoretically, if the area covered by the network is infinite, then those contour lines with a radius smaller than h will change, and they will form a ring with each other. In the area between the two signals, the contours of the two color signals will appear to be superimposed on each other, and the superposition will gradually form a spindle-like shape area. In this spindle-like region, you will find that any two BR contour pairs intersect at two points [18]. However, in the actual network area, it is not an ideally infinite area, and the shape of its deployment is not sure whether it is a spindle shape. In this area, it is uncertain whether there will be a phenomenon of superimposition. The following content details the influencing factors of the success rate of data query, the success rate is mainly affected by the degree of overlap between the two different areas of the spindle area and the network area, and this statement is given below. The concept of proof and standardization is defined.The following formula describes the degree of overlap between the network area and the spindle area:(9)r=ScSN⋅ScSo.According to (9), in the worst case, the degree of overlap between the network area and the spindle area can be given by the following formula:(10)rh=π/8h2r2/2⋅π/8π/3−3/4,0≤h≤L,π/4−arc cosL/h⋅h2+Lh2−L22L2⋅π/3−3/4h2,L<h≤2L.The expected value ofK is(11)EK=4L∫1/21∫1/21x2+y2dxdy≈1.07L.Then the following is satisfied:(12)x12+x22=K12,x12+x32=K22,x22+x42=K32,x32+x42=K42.


## 3.6. Performance Test of Distributed Storage

In the performance test of distributed storage, the influencing factors of the success rate of data query are studied and whether the success probability will be affected by the distance between the two signals is analyzed. In this study, there is random C-cast model simulation for experimental discussion and research. If the distance between the two signals is in the range of 20 to 30, the average success rate of data queries will exceed 75%. Positioning errors are considered in GHT. The simulation shows that the location error will have a significant impact on the success rate of GHT data query.The error range gradually increases from 1 m to 9 m. It can be observed that as errors continue to increase, the average data query rate of GHT gradually decreases. For C-cast and rumor routes, they are not affected by location errors. Since double rulings are the same as GHT in terms of mechanism, positioning errors are also included in the factors that affect the success rate of data query. Therefore, attention needs to be paid only to the storage overhead of double rulings.The function of the mesh network topology is mainly to test the load balancing of double rulings, C-cast and C-cast, using network coding. In double rulings, the storage capacity of each node is less than 10, and, in the center of the network, its load is much larger than the load of the edge nodes of the network. When distributing data copies, it is found that the average load on the C-cast node with network coding is half of the average C-cast.


## 4. Design and Application of the Urban Fire Protection System Based on the Internet of Things

### 4.1. The Overall Architecture of the System Platform

The overall architecture of the system platform is a wide area network with a distributed structure, and the overall system architecture of the city's fire management service platform is designed and implemented on the basis of the C/S + B/S structure. The whole system is mainly divided into three layers:(1)
The intelligent perception layer of the Internet of Things:this is the use of the Internet of Things technology platform to collect real-time status information of network equipment fire protection facilities to install automatic fire alarm systems and obtain various perception information, video monitoring systems, security systems, and power environment monitoring systems in time(2)
Network transmission layer: broadband or GPRS wireless transmission(3)
Application layer: system center network platform and urban fire management service platform


### 4.2. Hardware Module Design of the Urban Fire Protection System

The perception layer of the wireless city fire remote monitoring system is composed of various indoor and outdoor fire equipment monitoring nodes and application mobile clients. Various types of indoor and outdoor firefighting equipment monitoring nodes use pressure sensors, smoke sensors, water level sensors, and other firefighting equipment sensors [19]. The information collected includes the real-time work of automatic fire alarm systems, electrical monitoring systems, hazardous gas monitoring and early warning systems, emergency lighting and evacuation signs, smoke prevention systems and exhaust systems, fire door monitoring systems, fire shutters, gas fire extinguishing systems, and other equipment. There is also fault information, as well as the pressure and flow of artificial water sources, fire pools, and other fire water sources [20]. After collecting these data, they will be connected to the MCU with NB-IoT function, and the MCU will be transmitted to the cloud computing center. Through the GPRS network, the mobile client of the application program is mainly for facility management projects, and maintenance personnel can easily enter the monitoring node information and service information of fire protection facilities. The data collection methods and remote control methods of other firefighting facilities are also different, and the use of facilities can be roughly divided into three types.


### 4.3. Design of the Software Module of the Urban Fire Protection System

RDS (Relational Database Service) is a database deployed in a scalable, reliable, and flexible virtual computing environment. After renting the database, we can open it and deploy it quickly without investing in hardware and software. It has the advantages of safety, reliability, automatic backup, and strong capacity expansion. Table1 shows the advantages of RDS compared to self-built databases.Table 1
Comparison of advantages between RDS and self-built database.
Comparison itemApsaraDB for RDSSelf-purchased server to build database serviceService availability99.95%Need to protect itself, build its own master/standby clone, configure its own RAID, etc.Data reliability99.9999%Need to protect itself, build its own master/standby clone. configure its own RAID, etc.System securityPrevent DDoS attacks and clean up traffic; repair large security holes caused by various databases in a timely mannerSelf-deployment, high cost; self-repair of database security vulnerabilitiesDatabase backupAutomatically clone storageRealize by itself, and need to find storage space for backups and regularly verify whether the backups are recoverableHardware and software investmentThere is no investment in software and hardware, and you need to pay according to your needsThe database server cost is relatively high, and the license fee is also required for SQL serverSystem hostingNo hosting feesEach 2U server is more than 5000 yuan per year (high cost per year)Maintenance costNo need for operation and maintenanceNeed to find a full-time DBA for maintenance; the labor cost is highDeployment expansionInstant activation, rapid deployment, flexible expansionNeed to purchase hardware, host the computer room, deploy corresponding machines, etc., which requires a long periodResource utilizationSettlement according to actual efficiency, 100% utilizationThere are periods of high peaks and low peaks, and its resource utilization is very lowData scalabilityMassively scalablePoor scalabilityError correction performanceStrong self-recovery abilityProne to crashFuture developmentCompatible with a variety of systemsDifficult for secondary development


### 4.4. System Implementation Environment

The software and hardware operating environment of this system has the following requirements.


#### 4.4.1. Server Hardware Requirements

(1)
The requirement of CPU main frequency is >3.SGHZ(2)
The memory requirement is >40 G(3)
The hard disk requirement is >100 G


#### 4.4.2. Software Platform

The selected operating system is Windows Server 2017The selected database is SQL Server 2015The selected development kit is Java SE 11.0The selected development tool is Notepad++


### 4.5. System Test and Result Analysis

This is an effective verification software function test, which can test various functions realized by the project software according to the needs of users. Currently, the main testing method is to use test software related to manual testing for automatic testing [21]. To perform software testing, the test environment must be confirmed first, and then after the design test case is completed, the test is finally started, and the final test result is analyzed. Next, the web layer function test process of the target system is explained and the test results are displayed [22].According to the functional test process, the test environment must first be determined. For the urban fire management service platform based on the Internet of Things, Table2 shows the relevant parameters of the platform’s test environment [23].Table 2
System function test environment.
Configuration typeProgram server configurationDatabase server configurationClient configurationHardware configurationZhengrui I21S1–4584H; processor: Xeon E5620; memory: 4G DDR3 REGECC; hard disk: SAS 500GZhengrui I21S1–4584H; processor: Xeon E5620; memory: 4 G DDR3 REGECC; hard disk: SAS 500 GASUS brand CPU series: AMD; CPU frequency: 3.2 GHz; memory capacity: 3 GB; memory type: DDR3 8 GSoftware configurationOperating system: Windows Server 2003; IIS7.0: NET framework 4.0Operating system: Windows Server 2003; database management system: SQL server 2008Operating system: Windows XP/Windows 7; browser: IE 8.0, IE 9.0, 360Broadband configuration200 M bandwidth200 M bandwidth2 M bandwidthTable3 shows the results of abnormal firefighting equipment information and the statistical test process [24].Table 3
Test process and results of abnormal fire equipment information statistics.
Test processExpected resultsTest situationPreset conditions: the module has the function of automatically updating statistics, and the function module is runningChoose to delete an abnormal device in a certain organizationThe total amount of abnormal firefighting equipment will be updated immediately minus oneIn line with expectationsChoose to add an abnormal device in a certain unitThe total amount of firefighting equipment will be updated immediately plus oneIn line with expectationsTable4lists the testing process and results of the geographic location search and positioning function module of firefighting equipment [25].Table 4
Test process and results of the geographic location search and positioning of fire safety protection units.
Test processExpected resultsTest situationPreset conditions: this module has the ability to input and search company-level information and automatically find the company’s location. After finding the location, a related information window will be displayedEnter a nonexistent unit informationThe unit information prompted for input does not exist, please reenterIn line with expectationsEnter information about an existing unitPoint out the geographic location of the company on the map, and pop up a window with company-related informationIn line with expectationsTable4 shows that if the data already stored in a module is input, the data can be found according to the internal database. If nonexistent data is input, the corresponding data cannot be found. In short, this module realizes the function that it can store and search of location.Table5 shows the test process and results of the functional module of inputting enterprise information.Table 5
Test process and results of the functional module of inputting enterprise information.
Test processExpected resultsTest situationPreset conditions: the module provides an interface for entering enterprise information and realizes the function of entering enterprise informationDo not enter the unit codeClick submit; it prompts that the unit code has not been entered and must be enteredIn line with expectationsDo not enter the unit nameClick submit; it prompts that the unit name has not been entered and must be enteredIn line with expectationsDo not enter the unit addressClick submit; it prompts that the unit address is not entered and must be enteredIn line with expectationsEnter no number for the number of employees in the unitAfter submission, a prompt appears for the number of employees in the unit to enter illegal charactersIn line with expectationsThe postal code of the unit is not a numberAfter submission, there will be a prompt to enter illegal characters in the postal code of the unitIn line with expectationsEnter the postal code of the unit with 6 or lessAfter submission, there will be a prompt that the unit's postal code does not meet 6 digitsIn line with expectationsTable5 shows the results that can be obtained by entering different contents during the module test. The table shows the required contents and optional contents. In addition, if the unit zip code cannot match the corresponding correct value in the search database, the search will not be performed.


## 4.1. The Overall Architecture of the System Platform

The overall architecture of the system platform is a wide area network with a distributed structure, and the overall system architecture of the city's fire management service platform is designed and implemented on the basis of the C/S + B/S structure. The whole system is mainly divided into three layers:(1)
The intelligent perception layer of the Internet of Things:this is the use of the Internet of Things technology platform to collect real-time status information of network equipment fire protection facilities to install automatic fire alarm systems and obtain various perception information, video monitoring systems, security systems, and power environment monitoring systems in time(2)
Network transmission layer: broadband or GPRS wireless transmission(3)
Application layer: system center network platform and urban fire management service platform


## 4.2. Hardware Module Design of the Urban Fire Protection System

The perception layer of the wireless city fire remote monitoring system is composed of various indoor and outdoor fire equipment monitoring nodes and application mobile clients. Various types of indoor and outdoor firefighting equipment monitoring nodes use pressure sensors, smoke sensors, water level sensors, and other firefighting equipment sensors [19]. The information collected includes the real-time work of automatic fire alarm systems, electrical monitoring systems, hazardous gas monitoring and early warning systems, emergency lighting and evacuation signs, smoke prevention systems and exhaust systems, fire door monitoring systems, fire shutters, gas fire extinguishing systems, and other equipment. There is also fault information, as well as the pressure and flow of artificial water sources, fire pools, and other fire water sources [20]. After collecting these data, they will be connected to the MCU with NB-IoT function, and the MCU will be transmitted to the cloud computing center. Through the GPRS network, the mobile client of the application program is mainly for facility management projects, and maintenance personnel can easily enter the monitoring node information and service information of fire protection facilities. The data collection methods and remote control methods of other firefighting facilities are also different, and the use of facilities can be roughly divided into three types.


## 4.3. Design of the Software Module of the Urban Fire Protection System

RDS (Relational Database Service) is a database deployed in a scalable, reliable, and flexible virtual computing environment. After renting the database, we can open it and deploy it quickly without investing in hardware and software. It has the advantages of safety, reliability, automatic backup, and strong capacity expansion. Table1 shows the advantages of RDS compared to self-built databases.Table 1
Comparison of advantages between RDS and self-built database.
Comparison itemApsaraDB for RDSSelf-purchased server to build database serviceService availability99.95%Need to protect itself, build its own master/standby clone, configure its own RAID, etc.Data reliability99.9999%Need to protect itself, build its own master/standby clone. configure its own RAID, etc.System securityPrevent DDoS attacks and clean up traffic; repair large security holes caused by various databases in a timely mannerSelf-deployment, high cost; self-repair of database security vulnerabilitiesDatabase backupAutomatically clone storageRealize by itself, and need to find storage space for backups and regularly verify whether the backups are recoverableHardware and software investmentThere is no investment in software and hardware, and you need to pay according to your needsThe database server cost is relatively high, and the license fee is also required for SQL serverSystem hostingNo hosting feesEach 2U server is more than 5000 yuan per year (high cost per year)Maintenance costNo need for operation and maintenanceNeed to find a full-time DBA for maintenance; the labor cost is highDeployment expansionInstant activation, rapid deployment, flexible expansionNeed to purchase hardware, host the computer room, deploy corresponding machines, etc., which requires a long periodResource utilizationSettlement according to actual efficiency, 100% utilizationThere are periods of high peaks and low peaks, and its resource utilization is very lowData scalabilityMassively scalablePoor scalabilityError correction performanceStrong self-recovery abilityProne to crashFuture developmentCompatible with a variety of systemsDifficult for secondary development


## 4.4. System Implementation Environment

The software and hardware operating environment of this system has the following requirements.


### 4.4.1. Server Hardware Requirements

(1)
The requirement of CPU main frequency is >3.SGHZ(2)
The memory requirement is >40 G(3)
The hard disk requirement is >100 G


### 4.4.2. Software Platform

The selected operating system is Windows Server 2017The selected database is SQL Server 2015The selected development kit is Java SE 11.0The selected development tool is Notepad++


## 4.4.1. Server Hardware Requirements

(1)
The requirement of CPU main frequency is >3.SGHZ(2)
The memory requirement is >40 G(3)
The hard disk requirement is >100 G


## 4.4.2. Software Platform

The selected operating system is Windows Server 2017The selected database is SQL Server 2015The selected development kit is Java SE 11.0The selected development tool is Notepad++


## 4.5. System Test and Result Analysis

This is an effective verification software function test, which can test various functions realized by the project software according to the needs of users. Currently, the main testing method is to use test software related to manual testing for automatic testing [21]. To perform software testing, the test environment must be confirmed first, and then after the design test case is completed, the test is finally started, and the final test result is analyzed. Next, the web layer function test process of the target system is explained and the test results are displayed [22].According to the functional test process, the test environment must first be determined. For the urban fire management service platform based on the Internet of Things, Table2 shows the relevant parameters of the platform’s test environment [23].Table 2
System function test environment.
Configuration typeProgram server configurationDatabase server configurationClient configurationHardware configurationZhengrui I21S1–4584H; processor: Xeon E5620; memory: 4G DDR3 REGECC; hard disk: SAS 500GZhengrui I21S1–4584H; processor: Xeon E5620; memory: 4 G DDR3 REGECC; hard disk: SAS 500 GASUS brand CPU series: AMD; CPU frequency: 3.2 GHz; memory capacity: 3 GB; memory type: DDR3 8 GSoftware configurationOperating system: Windows Server 2003; IIS7.0: NET framework 4.0Operating system: Windows Server 2003; database management system: SQL server 2008Operating system: Windows XP/Windows 7; browser: IE 8.0, IE 9.0, 360Broadband configuration200 M bandwidth200 M bandwidth2 M bandwidthTable3 shows the results of abnormal firefighting equipment information and the statistical test process [24].Table 3
Test process and results of abnormal fire equipment information statistics.
Test processExpected resultsTest situationPreset conditions: the module has the function of automatically updating statistics, and the function module is runningChoose to delete an abnormal device in a certain organizationThe total amount of abnormal firefighting equipment will be updated immediately minus oneIn line with expectationsChoose to add an abnormal device in a certain unitThe total amount of firefighting equipment will be updated immediately plus oneIn line with expectationsTable4lists the testing process and results of the geographic location search and positioning function module of firefighting equipment [25].Table 4
Test process and results of the geographic location search and positioning of fire safety protection units.
Test processExpected resultsTest situationPreset conditions: this module has the ability to input and search company-level information and automatically find the company’s location. After finding the location, a related information window will be displayedEnter a nonexistent unit informationThe unit information prompted for input does not exist, please reenterIn line with expectationsEnter information about an existing unitPoint out the geographic location of the company on the map, and pop up a window with company-related informationIn line with expectationsTable4 shows that if the data already stored in a module is input, the data can be found according to the internal database. If nonexistent data is input, the corresponding data cannot be found. In short, this module realizes the function that it can store and search of location.Table5 shows the test process and results of the functional module of inputting enterprise information.Table 5
Test process and results of the functional module of inputting enterprise information.
Test processExpected resultsTest situationPreset conditions: the module provides an interface for entering enterprise information and realizes the function of entering enterprise informationDo not enter the unit codeClick submit; it prompts that the unit code has not been entered and must be enteredIn line with expectationsDo not enter the unit nameClick submit; it prompts that the unit name has not been entered and must be enteredIn line with expectationsDo not enter the unit addressClick submit; it prompts that the unit address is not entered and must be enteredIn line with expectationsEnter no number for the number of employees in the unitAfter submission, a prompt appears for the number of employees in the unit to enter illegal charactersIn line with expectationsThe postal code of the unit is not a numberAfter submission, there will be a prompt to enter illegal characters in the postal code of the unitIn line with expectationsEnter the postal code of the unit with 6 or lessAfter submission, there will be a prompt that the unit's postal code does not meet 6 digitsIn line with expectationsTable5 shows the results that can be obtained by entering different contents during the module test. The table shows the required contents and optional contents. In addition, if the unit zip code cannot match the corresponding correct value in the search database, the search will not be performed.


## 5. Conclusion

This article aims to solve the deficiencies of the current urban fire remote monitoring system and automatic fire alarm system by using advanced technologies such as the Internet of Things, cloud computing, and NB-IoT. It provides a wireless city fire remote monitoring system with real-time collection, transmission, and storage of various firefighting facilities working status information in the building. It also realizes real-time monitoring, real-time alarms, real-time search and query, record query, maintenance management, and route guidance, user management, and other functions. Among them, it is designed through MCU technology with NB-IoT function, sensor technology, relay, and other technologies and constitutes the identification layer of the wireless monitoring node system of various firefighting facilities in the building. Alibaba Cloud ECS, load balancing SLB, cloud database RDS, and developed communication applications constitute the network transmission layer of the system, while the system user application layer is composed of the developed and designed network user computer web page. The outstanding advantage of this technology is that it can realize the intelligent connection of objects while providing powerful storage capacity. In the direction of fire protection, it can not only realize low latency and fast alarm but also record and learn historical data, providing a more intelligent operation interface.



---

*Source: 9381139-2022-03-01.xml*