{'fraction_non_alphanumeric': 0.030785714285714284, 'fraction_numerical': 0.01042857142857143, 'mean_word_length': 5.066291161178509, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A Design of Work Monitoring System Using Smartphone

Working in a hazardous environment can decrease work efficiency and cause a variety of occupational diseases. To prevent occupational accidents and build a refreshing and pleasant work environment, therefore, it is necessary to develop an application system through which a worker’s safety can be monitored on a realtime basis and provide related services. Recently, smartphones have become very popular across the nation, with over 10 million users. As a result, a variety of application services have been developed and provided in diverse sectors. This study proposes a system structure to develop application services which monitor work environment using smartphones and examines its applicability through the implementation of server and client interfaces.


INTRODUCTION
Confined worksites include wastewater treatment plants, manholes, storage containers, the insides of pipes and vessels. A confined space is defined as 'a space at risk for fire or explosion due to oxygen deficiency and toxic gases'. Toxic gases refer gases in the air containing hazardous materials such as carbon dioxide and hydrogen sulfide. Normal gases refer to air with 18-23.5% oxygen concentration, 1.5% or less CO2 concentration and 10ppm or less H2S [1].
Working in a hazardous environment can decrease work efficiency and cause a variety of occupational diseases. To prevent occupational accidents and build a refreshing and pleasant work environment, therefore, it is necessary to develop an application system through which worker safety can be monitored on a realtime basis and provide related services. In addition, it is necessary to minimize worker exposure to hazards in hazardous places such as manholes, wastewater treatment plants, vessels and tugboats through an environment monitoring system. This kind of system should provide a mobile service environment to users under a USN environment and guarantee intellectual service functions. Recently, smartphones have become very popular across the nation, with over 10 million users. As a result, a variety of application services have been developed and provided in diverse sectors.
The smartphone has been used in various sectors in Korea to date. However, the new technology is currently rarely used in hazardous places such as manholes, septic tanks and confined spaces. Considering the convenience and popularity of the smartphone, it is time to perform various studies on smartphone-based application services which could make worksites safe and secure.
In this study, system architecture for the development of work environment monitoring application services has been designed. In addition, a service-based mobile application structure has been chosen to facilitate the advantages of mobile devices. To see the application cases of the proposed system, JAVA and Android monitoring server and client interfaces have been implemented. often occur in various confined spaces (ex: manhole, wastewater treatment plant, pipe, tank, etc.) in summer because high temperature and high humidity cause microbes to expand. In addition, workers can lose their life because of the high production of toxic gasses (ex: H2S, carbon dioxide, carbon monoxide, methane, etc.) and high oxygen deficiency through the oxidation of metals [1].

RELATED WORKS
This study has attempted to investigate the development of application systems and their use using smartphones to monitor a hazardous work environment. In Section [2], a smartphonebased realtime building information monitoring system was implemented. In this system, the user personally monitors operations through the menu panel. An automatic alarm function has been omitted.
In Section [3], a theater guidance system using smartphones with built-in GPS was introduced. The sensors used in a mobile device include microphone sensor, ambient light sensor, contact sensor, pressure sensor, temperature sensor, IR sensor, acceleration sensor, gyroscope sensor, motion sensor, touch sensor and bio sensor [4]. In Section [5], a customized menu management system was proposed for diabetic patients using smartphones. In Section 6, an Android smartphone-based information sharing system was introduced. In addition, a work environment monitoring system using environmental sensors was examined.
In Section [7], a work environment safety monitoring system was implemented using the data (ex: ambient temperature, humidity, illumination, etc.) collected from a u-helmet. In Section [8], a monitoring system that collects data from the server after installing temperature and humidity sensors in worksites of garbage treatment plants was mentioned. In Section [9], a system structure makes it possible to check work environment monitoring information via smartphone using the inference engine JESS. Few studies, however, have been performed on smartphone-based application services to date.
Hazardous worksites such as manholes, septic tanks, storage tanks and confined spaces can harm workers with toxic gasses or due to oxygen deficiency. In addition, there is a risk of fire or explosion due to inflammable materials. Therefore, it is necessary to keep monitoring hazardous information on a realtime basis through the sensors installed in a worksite and conduct continued studies on the development of a system that can keep workers safe from dangerous situations [10,11,12].

HAZARDOUS WORK ENVIRONMENT AND MONITORING DATA
The number of confined space accident cases listed on the official occupational accident statistics is stated in Table 1 below. According to the table, there were a total of 353 victims of confined space accidents from 1999 to 2007. Among them, 212 (60.1%) died while 141 were injured. On average, 24.4 confined space accidents were reported every year. Specifically, the annual mean of confined space accident victims is 24.4 while the annual mean of people dying from confined space accidents is 23.6 [1]. The confined space accident cases by place are described in Table 2. According to the table, 'wastewater treatment plant (44 cases, 20.0%)' is the highest, followed by 'manhole (40, 18.2%),' 'storage container (40, 18.2%),' 'worksite (16,7.3%),' 'underground worksite (16,7.3%),' 'inside of a pipe (15, 6.8%)' and 'vessels (15, 6.8%).' The ratio of death to injury is 1.5% on average. High mortality rates are observed in manholes (3.2%), confined spaces (3.3%), inside of pipes (3.4%) and vessels (2.4%). Storage containers (1.5%) and wastewater treatment plants (1.0%), on the contrary, have a fairly similar mortality to injury rate [1].
The effect of oxygen and toxic gases such as H2S and CO2 on the human body under this kind of hazardous work environment has been examined. The effect of oxygen deficiency on humans is shown in Table 3 below: Confined work spaces carry a risk of health impairment due to oxygen deficiency and toxic gases under poor ventilation. In addition, there is a risk of fire or explosion because of inflammable materials. Furthermore, the entrance is usually very limited [13]. The effect of H2S on humans is described in Table 4 below: H2S may occur in places where organic sludge is found. It is important to ventilate these spaces and for workers to wear safety gear such as oxygen masks before entering into these areas [14]. Table 5 below summarizes the effect of CO2 on the human body. It is very dangerous to breathe highly concentrated carbon dioxide in a confined space. Even though it is low in toxicity, the victim may suffer from headache if it becomes more concentrated. With long-term exposure to the gas, the victim could die from breathing difficulties [15].

Design of system structure
The system structure proposed in this study uses a servicebased mobile application architecture. This service-based mobile application is a brand-new application proposed to strengthen the advantages and make up for the weakness of mobile devices [16]. Under this structure, a part of the user function is distributed to the server, and all functions are executed through interactions with the client applications in mobile devices through the network. The structure of the proposed system is shown in Fig. 1.  Fig. 1, an environment sensor collects and transmits data through sensor modules. The environment sensor can measure work environment on a realtime basis. It has location, hazardous factor alarm and automatic sensor value calibration functions. The application server manages the whole application program and monitors the client by receiving data. The smartphone user unit makes it possible to check the current status of the worksite through the application service interface. Field workers can check the hazardous information transferred from the server through their smartphone.

Functions and operating process
A server decides if the work environment is dangerous based on the hazardous environment information transferred from the sensors on a realtime basis. Fig. 2 shows the process of a server monitoring a hazardous worksite environment.

Fig. 2. Server Process
The application server always waits for client access. Once client access is requested, the server creates a session for a new client and begins monitoring services. It then receives environment information from the client worksite and saves it in the database. In addition, it deduces the safety status of the worksite based on the received environment information. If the worksite is not safe, danger alarm signal is sent. After receiving the signal, client finishes the operation and evacuates. As shown in Figure 3, client should get access to the server application program first to get monitoring services. The client demon sends a danger message to workers if the worksite is dangerous. If the danger alarm signal is not properly sent, workers receive an alarm message from the server continuously. If the operation is finished by the client, server service is ended as well.

IMPLEMENTATION OF SERVER AND CLIENT INTERFACES
In Chapter 3, the effect of oxygen and toxic gases such as H2S and CO2, commonly found in hazardous work environments, on the human body was examined. In the server interface, a test was performed using the values of these gases. The application server for monitoring services has been implemented using JAVA. The smartphone client has been implemented with Android.

Server interface
The eco-sensor detects the concentration level of gases (ex: oxygen, CO2, H2S, carbon monoxide, organic compound, ammonia, etc.) found in a hazardous worksite such as manholes, septic tanks, storage tanks and confined spaces. The monitoring server infers dangerous situations in accordance with the respiratory analysis-related rules using the information on gases (ex: oxygen, H2S, CO2, etc.) from the sensors and sends the result to the client.  Fig. 4 shows a user interface for server management. A server administrator sets the information on a current monitoring worksite. In the data packet page, the pure packet information received from sensors can be viewed. The received packet data are classified and processed in the work memory via the server and are then saved in the database. The realtime data packet process is shown in Fig. 5   necessary during the inference of a knowledge base. The monitoring interface shows the current worksite environment using realtime information received from the sensors. If a danger factor is found, the danger alarm will sound, and a danger message will appear on the monitoring page.

Smartphone interface
In an Android application, it is necessary to get access to the network to use external services. In this study, a JAVA socketbased method is used. The following algorithm is an example of calling services using a socket.
Algorithm ConnectServer(port) Input: port(a port number of server) Output: socket(a received socket from server) Begin InetAddress serverAddr; Socket socket = null; serverAddr = InetAddress.getByName(ServerIP); socket = new Socket(serverAddr, port); Return socket; End To get mobile services using the socket communication as shown in Fig. 7, the user should either select a monitoring server or check the network status in advance. If a user confirms that a network is normally operated as shown in Fig. 8, mobile monitoring services could be available. If the network is unavailable, services may not be properly provided. Therefore, technical aspects that will facilitate the use of the network must be considered during the implementation stage. Fig. 9. Smartphone Monitoring Server Page Fig. 9 shows a user's access to the monitoring server. To facilitate operation of monitoring services, two servers were operated. During server implementation, a backup server operation policy and related technical aspects must be considered.  Fig. 10 shows a client user configuration page. Emergency action can be taken for a dangerous situation by setting related information such as user name and worksite. Using the worker's health information saved in the server, more active monitoring service can be provided. message appears. The danger alarm transmission process can slightly differ depending on the technical characteristics of the mobile devices.

CONCLUSION
In this study, a service system structure for continuous monitoring of a worker's conditions working in a hazardous worksite has been designed. The system uses service-based mobile application architecture. To see the application cases of the proposed system, JAVA and Android monitoring server and client interfaces have been implemented. The system is applicable to underground facilities and related industries. It is necessary to complete a prototype applicable to various industries in which underground facility management is essential. If and when the smartphone environment sensor becomes more common, server functions can be implemented in the smartphone client system. Because server connection is unnecessary, monitoring services could be faster.