Research on Water Quality Monitoring Technology of Industrial Park Based on Internet of Things and Cloud Computing

Aiming at the problems of high cost, slow response and unstable data in industrial wastewater quality monitoring in industrial parks, this paper proposes a water quality monitoring system for industrial parks based on Internet of Things and cloud computing technology by studying data acquisition technology of water quality sensors, wireless networking technology of water quality acquisition equipment, connection technology between equipment and cloud computing platform, and end of data model interface. The monitoring technology is also applied in the water quality monitoring system of an industrial park in Hebei Province, China. The data response is timely and the pollution alarm is accurate, which improves the level of water pollution control.


Introduction
Advancement of new information technologies including the Internet of things and cloud computing have provided technical support for overall sensing and intelligent monitoring of water pollution in industrial parks. Water is an indispensable resource that human relies on to live, but with rapid progress in industrialization [1][2], water pollution becomes an growing concern, posing threats to people's health and life, so it is great significance to improve intelligent sensing and the Internet of things of the water quality monitoring system, and to establish an early-warning and efficient solution mechanism for water pollution in industrial gardens through cloud computing technology and big data analysis.
• With the traditional water quality monitoring methods, we need to collect samples at the sites, to bring the samples to the lab to analyze the parameters via chemical agents through experiments. These methods are inefficient, costly and unable to identify water pollution in time. • Though the portable water quality sensors designed based on electro-chemical technology can be used to collect samples for water quality tests, there are problems in detection of signals from these sensors: detection of signals is realized through discrete components [3][4][5][6], and the transmission path of signals are long and is susceptible to interference from noise and electromagnetism. Moreover, the integration level is low and the cost is high.  [3][4][5][6][7] or the GPRS remote wireless communication technology, both of which have limits in networking and the speed of data transmission. • The standard and format of data on the cloud data system are inconsistent, so it is hard to realize compatibility with related data or time-series data. Therefore, how to realize integrated, fast and wide-covering multi-parameter water quality monitoring is the key to research in this field. To solve the abovementioned problems, we designed a new water quality monitoring IoT cloud computing platform. This platform realizes connection with the Internet of things of water quality sensors, and through 4G networking, improves transmission efficiency and stability of the monitored water quality data. Besides, through cloud computing technology, the platform increases the data processing efficiency and hence can realize timely detection of water pollution. Figure 1 shows the framework of the water quality monitoring internet of things. On this water quality monitoring Internet of things platform, the administration organization of the industrial park and the environmental protection authorities can monitor the conditions of pollution discharge in the park and the water quality of rivers in the park. It can also realize monitoring of operating conditions of projects and major water quality parameters based on the map of water quality monitoring sites, process the monitored data in a timely manner, compare pollution data collected from different sampling sites, to make timely early-warning of pollution risks and keep optimizing the data analysis model.   Figure 2 shows the framework of the water quality monitoring IoT cloud computing model.

Perception and Iot Layer of Water Quality Monitoring Internet of Things
Like the perception system of human which consists of organs like the eyes, ears, the nose and the tongue, the perception layer consists of different sensors. Many water quality parameters can to some extent indicate whether the water is polluted, but one single parameter has only limited influence on water quality and testing of multiple parameters can reflect the pollution conditions in a more comprehensive way. Given the water pollution sensitivity parameters and corresponding sensors in the industrial park, the following water quality parameters are selected: water temperature, volume of dissolved oxygen (DO), potential of hydrogen (PH), oxidation-reduction potential (ORP) and electrical conductivity (EC). The working mechanism of the data collection terminal is shown in Figure 3. The embedded processor connects with the sensors of water quality parameters selectively by controlling the simulation switch and, after the signals from the sensors are adjusted by the conditioning circuit, read and pre-process the data from sensors before sending them to the 4G wireless network gateway. The gateway is then connected to the cloud computing platform through 4G wireless network.

Cloud Computing Model of Water Quality Monitoring Internet of Things
Operation of the water quality monitoring Internet of things will generate large amounts of data, the processing and storage of which are beyond the capacity of traditional servers, so it is necessary to build a large-scale computing platform. Cloud computing is, in essence, a computing platform used to process massive amounts of data, so such a platform will be competent to meet this need. Cloud computing provides elastic resources on demand, one representative form of which is the series of service modes, including Infrastructure-as-a-Service (IAAS), Platform-as-a-Service(PAAS), Data-asa-Service(DAAS) and Software-as-a-Service(SAAS), as shown in Figure 2. Among these service modes, IAAS provides physical or virtual computing, storage and network resources which can be used when the user provides the configuration information and codes of the infrastructure as well as user information. PAAS is the operating environment of cloud computing apps and provides services including application deployment and management; with the software tools and developing languages on the PAAS layer, the app developer only needs to focus on codes and data, without need to consider how to manage the underlying server, operating system, the network and memory. DAAS provides storage and analysis of big data, including storage and analysis of relational data and time-series data. SAAS is an app developed based on the cloud computing platform and is oriented to enterprise users; enterprises can solve problems in fast and lightweight design by renting SAAS service.

Functional Layer of Water Quality Monitoring Internet of Things
The functional layer is where the water quality monitoring Internet of things connects with the users and is closely connected with user demand. It can realize intelligent monitoring of water quality and include the following four functions: • Management of sampling sites. It can manage the sensors of the selective five parameters, i.e.
water temperature, DO, PH, ORP and EC, and realize mapping of the sensors with information on the cloud. To ensure accurate mapping, it generates an ID for each water quality sensor on the cloud, creates a key automatically for each user to the sensor and relates the user ID with the sensor ID. • Monitoring of operating conditions of projects. This function mainly refers to map-based monitoring of water quality sampling and real-time data monitoring. • User management. Enterprise users have a master account and sub-accounts, the latter of which are created and managed according to the needs of the former. Different accounts have different roles, positions and hence different levels of access to functions. The master account is managed by the platform administer and the sub-accounts are managed by the master account of the enterprise user.
• Data analysis. This function mainly refers to warning of water pollution based on monitored water quality data. On the platform, the network captures real-time data of each parameter, evaluates whether the parameters are accurate, identifies water pollution and the source of pollution in time.

Cloud Computing Data Transmission and Processing Technology
It first uploads the data through API onto the data service platform and store the data on the data storage layer on the platform. According to the demand of real-time data analysis and historical data analysis, different data processing procedures are initiated.
Real-time data analysis: when the data enter the storage layer, they are stored in Kafka. Kafka is monitored by Storm in real time. Once the data enter Kafka, Storm starts computing and stores the computing result into MongoDB for further display and utilization of the result. When no computing is involved, the data are directly stored in MongoDB for further display and utilization.
Historical data analysis: when the data enter the storage layer, they are stored temporarily in Kafka and then stored in HDFS before categorized by Map-Reduce. Data of the same user will be put into a folder built on a daily basis and then analysed by Hive. The analysis result will be put into MongoDB for further display or utilization of data. The detailed result will be placed in HBase for query.  Sensor  table 1   Sensor  table 2  …  Sensor  table N   Sensor  table 1   Sensor  table 2  …  Sensor  table N   Sensor  table 1 Sensor  Figure 6. Data transmission and processing flow

Design of Data Transmission Interface Model
The system defines the standard type of data transmission interface model, the interrelations and model interfaces. A good model system will greatly facilitate re-use of the model and streamline the model development process. On the basis of device access and control model of the MQTT protocol, this study realizes data transmission and device control; and on the edge side, MQTT and Web Service technologies are used to upload real-time data and device status onto the cloud computing platform. On the cloud, through the MQTT bi-directional control protocol, the control command is made to realize management of devices on the cloud and smart edge analysis. To use the interface, the system will verify the user's identity for legitimate use. During data transmission, the data are encrypted to ensure secure transmission. The specifications of the data interface model are as follows: • URL address: the URL must include the protocol version and the title of the communication protocol (HTTP or HTTPS); • Input parameters: the input parameters are compatible with the JSON data format. JSON is a grammar for text information storage and exchange, and it is in the grammatical form of {"name1":"value1","name2":"value2"}; • Request methods: it supports four basic functions: create, retrieve, update and delete; • Return value: the return value is in the format of JSON.

Application Test and Analysis
This study applied the system to water quality monitoring of an industrial park in Henan. As the base for many chemical manufacturers, this industrial park suffers severe water pollution and lacks an efficient water quality monitoring system.
We installed sensors for DO, PH, ORP and EC onto the sewage outfalls of plants, collected data through Smart IoT and transmitted the water quality data onto the water quality monitoring IoT platform. To access the data on the platform, several steps are necessary: management of access to the  When the monitoring sites and methods were determined, we identified 0 to 3 risk control points for each enterprise and established three levels of risk points: the lowest level is based on enterprises, the medium level is based on districts and the highest level on the industrial park. On that basis, we determined the standard or threshold value of security grading for each level of risk points.
In the end, we proposed a risk early-warning model which was built based on data obtained from March to June to realize release of early-warning information for pollution risks.

Conclusion
To solve problems in water quality monitoring in industrial parks, we studied the water quality monitoring technologies based on Internet of things and cloud computing. In particular, we made indepth research on the technology of Internet of things of water quality sensors, data Internet of things, big data processing technology and data interface model technology. On that basis, we realized collection of water quality data from sensors, Internet of things of data, big data processing, cloud computing of data and early warning of pollution. The system we proposed met the need of the industrial park's administration organization to conduct real-time monitoring of water pollution of 150 companies in the park, realized timely warning of enterprises that exceeded the pollution standard, and improved control of water pollution in the industrial park.
This study can be further improved. For instance, it can build models to analyse data of water pollution by different enterprises and realize more elaborate analysis of the pollution discharge of different enterprises so as to prevent pollution at the root.