Research

the


Introduction
In recent years, with the exploitation of coal resources and the sustainable development of coal industry, China's coal industry has developed rapidly with the help of technological progress and other fields. However, in the process of continuous development, coal accidents have not been effectively controlled. Of course, for a long time, the Chinese government has attached great importance to the management of coal production safety and issued a number of safety production regulations one after another. The purpose is to enable coal enterprises to strengthen the management of coal production safety by adopting advanced science and technology. Even so, on the whole, the incidence of coal safety accidents in China is still "among the best" in the world. This paper takes this as the background and puts forward a coal mine safety detection system based on GIS technology for the purpose of further improving the safety production management of coal enterprises.

Literature Review
With the rapid development of computer network technology and integrated electrical technology in foreign countries, coal mine safety production management system has made a major breakthrough in technology, and many types of advanced sensor equipment have been produced at the mine side. These sensor devices can collect mine environmental data, including air data such as gas, CO, and methane, as well as electrical equipment data produced for coal mines. At the same time, they also have the ability to remotely control the equipment, and the system can set predetermined rules for some automatic operations. In terms of network, the monitoring network of coal mine safety production monitoring system is mainly constructed by using LAN technology and Internet technology to realize the interaction between the monitoring center system and mine side data. At the software application level of coal mine safety production monitoring system, the functions of the application system mainly include power environment monitoring, video monitoring, etc. at the same time, it is effectively connected with coal mine production scheduling system through data interface to escort coal mine safety production. At present, the more advanced coal mine safety production management systems abroad mainly include Liang system, promos system, and Dan system. In general, these systems adopt the distributed system structure of open system interconnection model. The system is composed of the monitoring center on the upper side of the well and the monitoring substation on the underground side. The monitoring substation uses the Internet of things technology to connect all kinds of sensor equipment, which can adopt all kinds of data in real time and report to the monitoring center. The monitoring center can analyze the data, can automatically issue some control parameters, and has certain automation and intelligence ability. At present, the safety production accident rate of foreign coal mining enterprises is generally lower than that in China, which is mainly due to the role of coal mine safety production monitoring system [1].
Safety management of foreign mines has worked well in China and has spread to some major states of coal mines. At the same time, some coal mining companies and research and technology companies have begun to simulate and self-study the safety supervision of foreign mines. First, they introduced the K-type coal mine safety monitoring system that can monitor the operation of the coal mine under cover and store, manage, and analyze management information to of LAN technology. However, the monitoring at that time mainly focused on air monitoring. The monitoring parameters were mainly gas, and the monitoring results were more accurate, which played a certain role in coal mine safety production at that time. Because there are many coal mining enterprises in China, there is a lot of demand for gas sensor equipment. In order to meet this demand, some hardware manufacturers in China have strengthened the research on gas sensor. On the whole, the data acquisition stability and other convenience of gas sensors provided by early hardware manufacturers were not good, and the wireless transmission technology was not mature at that time, and wired transmission technology was adopted. To deploy gas sensors in the middle of the mine, wired lines need to be deployed, which not only increased the construction cost but also increased the workload of line repair and maintenance [2]. At the same time, the equipment in this period still has problems such as short service life and troublesome adjustment, which has a certain impact on the accuracy of data detection and restricts the function of coal mine safety production monitoring system.

Key Technologies of Safety Production
Monitoring Based on GIS 3.1. Image Scaling. The commonly used interpolation algorithms include the nearest neighbor interpolation, bilinear interpolation, and cubic convolution interpolation. The nearest neighbor interpolation method is simple and fast, but when there is a slight change in gray level between the pixels of the image, the scaled image has traces of artificial processing [3]. Compared with the nearest neighbor interpolation method, a bilinear interpolation method has a large amount of calculation, the gray values of pixels are continuous, and the distortion of the scaled image is not obvious. The calculation amount of cubic convolution method is much larger than that of bilinear interpolation method, but the accuracy is high and the image edge details are main-tained well. However, due to the limited logic resources of video real-time transmission application and the more complex the algorithm is, the more resources will be occupied. Therefore, a bilinear interpolation method is selected to scale the image in this paper [4]. The core idea of bilinear interpolation method is to obtain the pixels of the points to be interpolated by averaging the values of the four pixels close to the pixels to be interpolated. Its principle is shown in Figure 1. Figure 1, Q 11 , Q 12 , Q 21 , Q 22 are known pixels. According to the bilinear interpolation algorithm, the linear interpolation in the x direction is shown as follows: where f ðR 1 Þ, f ðR 2 Þ, respectively, represent the pixel values at two places, and x1 − x2 represents the distance between x1 and x2. The linear interpolation in y direction is shown as follows: where f ðaÞ represents the pixel value of point P, that is, the pixel value of the point to be interpolated.
3.2. RGB and YUV Conversion. RGB and YUV are important parts of video processing, and the conversion is the basis of coding. RGB and YUV are both a color space, that is, a method of coding a color. RGB is the most common color space in the computer. Each color can be represented by three variables: red, green, and blue. YUV is also a color space, which is commonly used in the field of analog video and television. In the process of video transmission, the RGB format video data captured by the camera is usually converted to YUV format, so as to reduce the burden of 2 Wireless Communications and Mobile Computing storage and transmission, and then converted to RGB format before displaying the image [5]. The conversion formula between YUV and RGB is shown as follows: 3.3. Video Transmission Protocol. TCP/IP protocol is a transmission control protocol, which is represented by the fourlayer structure of application layer, transmission layer, network layer, and network interface layer. As shown in Figure 2, data packets are transmitted layer by layer in the TCP/IP protocol stack from top to bottom or from bottom to top. Entities in one system communicate between the upper and lower layers through the interface, and the communication between entities and entities in the same layer of another system is carried out according to the protocol [6].
3.3.1. RTP and RTCP Protocols. The RTP protocol typically uses the UDP protocol to transmit multimedia files in a unicast or multicast network environment [7]: first the packet, then the time output of the news stream. Each RTP datagram has a header and a load. The first 12 bytes have the same header value, and the load is audio or video files. The details of the RTP datagram header are shown in. RTP file header contains the basic data of streaming media real-time transmission, such as the type of transmission media, serial number, format, and whether there is additional data and timestamp. RTP protocol, which provides end-to-end transmission service of real-time multimedia data, is a transport layer protocol and cannot be connected. It moves the functions of some transport layer protocols (such as flow control) upward to the application layer to complete the functions of transport layer together with UDP; it also does not rely on the special network address format and does not provide any reliability mechanism. Therefore, the underlying transmission protocol is required to support segmentation and framing or managed by the application [8].

Multiple Linear Regression Analysis Method.
Let y be a random variable that can be observed for many times, which is affected by p factors x 1 , ⋯, x p and 1 random factor ε. The relationship between them is expressed by the following formulas: The following formula is called the theoretical regression equation: Conduct n independent observations to obtain n groups of sample data, as follows: The following formula is satisfied: ⋯, Among them, ε 1 , ε 2 , ⋯, ε n are independent of each other and obey Nð0, σ 2 Þ. The above formula is expressed in a I n is the n-order identity matrix, as shown in     Wireless Communications and Mobile Computing digital mine production, safety, and management. It can make managers at all levels understand their responsibilities, so as to quickly, timely, and accurately obtain the relevant information of coal mine safety production, so as to avoid the occurrence of coal mine safety accidents. The general system model is shown in Figure 3. The acquisition module is mainly responsible for the acquisition of various monitoring data in the mining area, including sensor information and video information.
The transmission module is mainly responsible for the real-time transmission of various collected data, including underground to underground data transmission and data transmission from within the mining area to outside the mining area.
The processing module is mainly responsible for the processing of various monitoring data.
The storage module mainly includes data centers based on a local database, such as mining area dispatching center, data center, and group information center, which is responsible for the real-time storage of monitoring data [9,10].
The application module is mainly the realization of the overall function of the system and its application in practice, including the application of PC based terminal and mobile terminal.

4.2.
Overall System Structure Analysis. The software model for the coal mine climate management product based on the smart terminal, as shown in Figure 4, has three main components, each of which has the following function: contains information, a server, and a smart terminal.
The server side stores the data managed by the DataServer at the data generator in real time, stored in the internal data, and then sent to the smart terminal. The terminal successfully divides the coal mine safety monitoring system into four systems according to the requirements of the position: real time monitoring system, covert video monitoring system, commands, and GIS system. As seen in Figure 5, it is synchronized with the existing coal mine safety monitoring system and has reliable and real-time performance.

Design and Implementation of GIS System
4.3.1. Overall Structure Design of GIS System. Coal mine safety monitoring GIS system based on intelligent terminal is a visual monitoring platform based on geographic data and the comprehensive use of geographic information system, mobile communication, network, and other technologies. It provides fast, accurate, and visual information services for the macro management, command, coordination, and dispatching of leaders and principals at all levels and changes the traditional coal mine management mode. As shown in Figure 6, the coal mine safety monitoring GIS system based on Android platform mainly includes three parts: GIS Server, intelligent terminal, and real-time monitoring system [11].

Wireless Communications and Mobile Computing
Intelligent terminal, namely, mobile terminal, adopts Android2.3.3 operating system and SQLite database. It mainly realizes the update of GIS map and the visualization function of coal mine safety monitoring GIS system based on Android platform, including the enlargement, reduction and translation of mining area map, the query of measuring point information, and the alarm and early warning in case of abnormal data of measuring point sensor. All data queried are provided by SQLite database. The real-time monitoring system is mainly responsible for the real-time transmission of monitoring data between the central server and the intelligent terminal and stores the transmitted data in the SQLite database of the intelligent terminal in real time, forming a data linkage mode with the GIS system [12]. (1) GIS Map Making and Loading. Realize the conversion from CAD engineering drawing of mining area to shape file format suitable for intelligent terminal, the generation and editing of GIS map, the creation of SD card of intelligent terminal, and the loading and display of GIS map of intelligent terminal.
(2) GIS Map Update. Realize the real-time update of GIS map in mining area, and update the map in real time according to the changes of sensors and roadways, including whether the map is updated or not and real-time map acquisition.
(3) GIS Map Visualization Operation. It realizes the visual operations such as zoom in, zoom out, translation, and survey point information query of the mining area map. According to the positioning search of sensors, roadways, and working faces, the found roadways, sensors, and other elements are displayed with corresponding flashes. Users can view their details (including attribute information and data information) by clicking the sensor elements.
(4) Design of Terminal Database. The main function of data management of intelligent terminal is to realize real-time data management. It is the core of the whole intelligent terminal software system. Its design is directly related to the efficiency of system execution and the stability of the system. At the same time, based on the security considerations in the coal mining industry, when the terminal system logs in to the central server to request services, it is necessary to set up a certain security authority inspection mechanism to pro-vide the authentication function of the user's job identity, effectively distinguish the manager's own functional domain, prevent the illegal terminal from tampering and stealing the production information of the central server, and ensure the absolute security of production information [13]. The processing flow of user authority management is shown in Figure 8.
We choose SQLite as the intelligent terminal database, which mainly stores and manages the coal mine safety production data, monitoring coal mine information, dispatching user information, and other data. According to the above system requirements, we will establish various tables in the database and the corresponding words, field types, and field values in the table. The database Table name and the corresponding fields in each Table are Pinyin characters of Chinese names [14]. The intelligent terminal involves the data Table in Table 1.
Sensor data information includes sensor number (cgqbh), data volume (sjl), year month day (nyr), and time (sj), as shown in Table 3.
In order to meet the application environment, construct the optimal database, make it more effective to store and query data, and meet various operation needs of users; the following principles should be followed in the design of database GIS: Its structure is shown in Figure 9.  Wireless Communications and Mobile Computing The application layer is a collection of a series of core applications of Android system, in which all applications are written in Java language. Its core programs include email client, SMS (short message) sequence, calendar, Google map, and web browser.
An application layer is designed to create applications for the Android platform application layer. Developers have access to the API system used by the main application. The software architecture is used to facilitate the reuse of software products. Each program can publish its own task blocks, and any other program can publish task reports.
The base library layer contains C/C++ libraries used in various components of the Android system, including the main library, which provides most of the functions of Java programming languages at home [16].
The Linux kernel layer is the system kernel layer. Android core system services depend on the Linux 2.6 kernel, mainly adding a virtual CPU named goldfish and specific driver code required by Android runtime [17].

Software Function Model
Design. The software model of coal mine safety monitoring GIS system based on Android platform mainly includes two parts: server and intelligent terminal, as shown in Figure 10.
The intelligent terminal mainly includes a map update module and a map visualization module [18]. The map update module mainly judges whether the map is updated or not. If there is a map update, it sends a download request to the server, receives the map file sent by the server, and saves it on the local disk. The map visualization module mainly completes the map enlargement, reduction, translation, survey point information query (query the data in the SQLite database table, including attribute information and data information), and monitoring point sensor alarm and early warning (query the SQLite database Table in real time to monitor the survey point, and if the data of the survey point sensor is abnormal, the survey point graphic element flashes) to realize the real-time monitoring of safety production in the mining area [19].

Design of GIS Map Visualization Function.
The visualization function of coal mine safety monitoring GIS system based on Android platform mainly includes GIS map enlargement, reduction, translation, measuring point sensor information query, and alarm and early warning. Its visual function software model is shown in Figure 11.
The user enters the GIS monitoring system, starts the timer, opens the database, queries the data volume, alarm lower limit and alarm upper limit of all monitoring point sensors in the database table, and judges the abnormal data volume of the monitoring point. If the data quantity of the measuring point is less than the lower limit of the alarm or the data quantity is greater than the upper limit of the alarm, the element of the measuring point flashes an alarm warning; otherwise, continue to judge the abnormal data quantity of the measuring point.

System Test Environment.
System testing is to check whether the developed application system meets the requirements in the system requirement specification. It is an important means to ensure the system quality and a necessary work before delivery to the target user [20]. Before the system test, the system test environment must be determined according to the selected development technology and system application scale to ensure the accuracy of the test results [21]. As the coal mine safety production monitoring system is composed of application layer system, network layer, and hardware layer, the actual test environment will be established during the specific test, and the function and performance of the application layer system will be tested with test tools. The test environment selected for this system test is as follows:  (1) Server hardware environment: Lenovo system x3650 M4 (Intel Xeon E5-2600 * 2, ECC DDR332gb, eight 2.5-inch 300GB SAS hard disks) (2) Client hardware environment: Lenovo Yangtian t4900v (Intel Core i5 4570; 4GB DDR3; 1TB hard disk)

Test Simulation Environment.
In order to verify the actual test effect, a coal mine 2 mining area in Gansu Province was selected for the simulation test. The mining area 2 is located about 120 m underground, with a mine channel of 2 m wide and 2.5 m high, with a right angle bend in the middle. All kinds of sensor equipment required for transmission are deployed in the middle of the mining area; networking is carried out according to the network layer networking scheme and connected with the application system server of the monitoring center through the industrial Ethernet ring network [22].

System Function Test.
After continuous development and improvement of software testing technology, some function testing methods have been produced in system function testing, and the most commonly used system function testing method is black box testing. A black box test means that the tester regards the tested system as a black closed box in the test process; that is, the tester only tests the external functional characteristics of the tested system on the premise of completely knowing the content, logical structure, and logical path of the tested system. It can be seen that the black box test is a test method focusing on the external functions of the tested system [23]. In the specific function test, the tester first designs the test case according to the system requirement specification and then simulates the operation from the perspective of the operator to verify that the system can correctly receive the data entered by the operator or initiate the business operation and that the system can output the correct operation results; that is, compare whether the expected output is consistent with the actual output. If it is consistent, the test item is considered to pass; otherwise, it is not passed [24]. The system will use the black box test to test the function, but because the system function is too complex, there are many test cases designed. The following only introduces the test process of some test cases [25].

Alarm Threshold Setting Function Test Process.
The alarm threshold setting function test case is used to verify whether the functions of adding, editing, and deleting alarm threshold information meet the expected requirements. In the specific test process, based on the operator's point of view, simulate the input of corresponding data or initiate corresponding operations to verify whether the output results are consistent with the expected output results. The specific test process is shown in Table 4.

Substation Management Function Test
Process. The substation management function test case is used to verify whether the information addition, editing, deletion, and query functions of substation information meet the expected requirements. The specific test process is shown in Table 5.
The above test process of the system function test is introduced through the test process of the two function test cases. Due to the limitation of the length of the paper, the above test process only discusses the test process under the condition of inputting effective data. Through the above test results, it is found that all the function tests of the two function tests pass under the condition of inputting effective data. In the actual test process, the tester carried out the test in strict accordance with the system requirement specification and considered the input of valid data, invalid data, and other situations, comprehensively, scientifically, and reasonably tested the function of the system. During the first After finding the test problems, the errors and function omissions were repaired, and then, the regression test was carried out. Through the regression test, it was found that the problems found in the early stage had been modified and did not cause new problems, indicating that the system function test passed.
Although the system data collection does not have specific functions in the presentation layer, all monitoring data in the system come from the data collection in the background of the system. Since data acquisition is the basis of Alarm threshold information addition Select the alarm threshold setting function of the secondary menu under the environmental monitoring subsystem, select "add" on the main page, and enter the alarm threshold on the add page The system outputs a prompt message: "alarm threshold information added successfully!" Pass Alarm threshold information editing Information, click "save" The system outputs a prompt message: "alarm threshold information edited successfully!" Pass Alarm threshold information deletion Select the alarm threshold setting function of the secondary menu under the environmental monitoring subsystem, select a record on the main page, and click the "Edit" button to enter the alarm threshold information editing page. Edit the information on the page and "save" The system outputs a prompt message: "are you sure to delete this alarm threshold information?" Click "confirm" to complete the deletion and return to the main page of alarm threshold information setting; click "cancel" to return to the main page without deletion Pass Table 5: Substation management function test process.

Test function
Input action Expected output Test result

Substation information addition
Select the secondary menu substation management function under the system management subsystem, select "add" on the main page, enter substation information on the add page, and click The system outputs a prompt message: "substation information added successfully!"

Pass
Substation information editing Click save The system outputs a prompt message: "substation information edited successfully!" Pass Substation information deletion Select the secondary menu substation management function under the system management subsystem, select a record on the main page, and click the "Edit" button to enter the substation information editing page. Edit the information on the page and "save" The system outputs a prompt message: "are you sure to delete this substation information record?" Click "confirm" to complete the deletion and return to the main page of substation management; click "Cancel" to return to the main page without deletion Pass Substation information query Select the secondary menu substation management function under the system management subsystem, select a substation information record on the main page, and click "delete" If the query criteria has data, the system outputs the substation records that meet the query results in a list. If no data is queried, the output prompt: "no data is queried, please re-enter the query criteria!" Pass 10 Wireless Communications and Mobile Computing the operation of the system, it is necessary to test the success rate and accuracy of data acquisition. In the specific test process, 30 sensors in the simulated 1 mining area are configured to report data every 30 seconds for 60 minutes, and the total amount of data reported is 3600 data records. At the same time, the data stored in the local sensor network node is recorded to compare the accuracy of the uploaded data. The specific test results are shown in Table 6. Through the results in Table 6, it is found that the success rate and accuracy rate of data acquisition are 100%, meeting the acquisition requirements. According to the system performance requirements, the planned number of concurrent users of the system is 1000. This test environment is a single web application server and database server, and no load balancing scheme is built. During the specific test, 1000 virtual users are simulated through LoadRunner, and the test script and running scenario are configured according to the LoadRunner test process. In the configured running scenario, the concurrent load of 1000 virtual users is initiated on the system for 180 minutes. Various performance indicators are tracked in the whole process. The final performance test results are shown in Table 7.
According to the test results shown in Table 7, under the high load condition of 1000 virtual concurrent users, all performance indexes of the system meet the system performance requirements, indicating that the system performance is passed.

Conclusion
Firstly, by consulting a large number of documents, this paper compares and analyzes several popular operating systems based on mobile terminals. The results show that Android operating system is one of the most potential smartphone platforms at present and makes a simple study on the system architecture of Android platform. On this basis, this paper selects various key technologies, puts for-ward the overall research scheme and architecture of coal mine safety monitoring GIS system based on an Android platform, and describes in detail the overall design idea of the system and the code implementation of some functional modules, such as the visual operation of mining area map and real-time update of mining area map. The realization of the system provides a set of solutions suitable for the enterprise's own personnel movement, real time, and efficient office for the production of modern coal mining enterprises.
On the basis of mobile network, combined with the technical scheme and application mode of coal enterprise safety production monitoring system, a research scheme of coal mine safety production monitoring system based on intelligent terminal is proposed on the basis of the original fixed network coal mine safety production monitoring system. This paper makes a detailed demand analysis and design, architecture design, functional module design, and partial code implementation of the coal mine safety monitoring GIS system based on an Android platform. According to the mobile application solution, this paper studies the key technologies involved in the software development based on intelligent terminal, including the selection of intelligent terminal platform, the selection of GIS software suitable for intelligent terminal, and socket technology, and constructs a software development platform with strong universality.
According to the actual situation and the particularity and importance of mining area production information, the production, generation, real-time update, and real-time download of GIS map are realized on the GIS Server. This paper describes in detail the download process and code implementation of GIS Server-side software and terminal software, establishes the application mode of coal mine safety monitoring GIS system based on Android platform associated with mining area production real-time monitoring system and dispatching system, and realizes the seamless connection between coal mine safety production monitoring systems based on intelligent terminal in the real sense. The  system software uses Java language to code it. In the first round of test, one function omission, three serious system errors, 14 general errors, and 21 minor errors are found. The accident passing rate of the second test is greater than 99.88%, and all performance indexes of the system meet the performance requirements, which proves the feasibility of the system.

Data Availability
The datasets used and/or analyzed during the current study are available from the corresponding author on reasonable request.