Research on environmental monitoring and control technology based on intelligent Internet of Things perception

: This study studies the technology of environmental monitoring and control in an intelligent Internet of Things (IoT) perception. To improve the issue of small coverage and low stability in the traditional environmental parameter testing, a new environment monitoring technique based on intelligent perception is proposed. The technical framework consists of three layers, intelligent perception layer, network communication layer, and application layer. The intelligent perception collects and transmits data to the application-level server via the network communication layer for data analysis and diversified display. Based on this technique, we constructed a smart home environment monitoring and control system. The experimental test result shows that the system can accurately collect and process the data through the server and diversified displayed, which verifies the accuracy and reliability of this technique which is potential for further application.


Introduction
Environmental monitoring has been developed with the development of environmental pollution. It has been more than half a century. The Internet of Things (IoT) technology is currently a hot technology in the field of environmental monitoring [1]. The development of embedded technology and the IoT has brought opportunities for intelligent sensing environmental monitoring technology.
In the foreign countries, the environmental monitoring work has been highly intelligent. Various wireless LAN protocols have been commonly used in environmental monitoring systems, such as the Home-RF protocol in home sensor networks, and the ZigBee protocol of the physical layer and the media access control layer following the IEEE 802.15.4 standard [2][3][4]. Australia's ecological monitoring system for monitoring the distribution and habitat of toads [5] below. The ecological monitoring system of 'big duck' island was used to monitor the habitat of seabirds [6]. The application of IoT technology in the field of environmental monitoring has a long history. It replaces sensing devices with monitoring devices, connects terminal testing devices, or connects with end customers, environmental protection departments, and personal digital display monitoring systems, allowing people to more intuitively and quickly understand the environment status. The 'perception of water resources in Tai Lake' project in Jiangsu Province, which uses the IoT technology, is one of the 12 key demonstration projects in Wuxi for the application of the IoT [7]. At the same time, there are also deficiencies such as the standardisation of the IoT, the platform being too small, and narrow coverage, which needs to be further improved [8].

Overall structure of technique
The structure of environmental monitoring technique based on the intelligent IoT perception is composed of three levels: the intelligent sensing layer, the network communication layer, and the application layer, as shown in Fig. 1.
The perceptive layer is composed of measuring sensor circuit that is installed in the monitored environment. The sensor adopts a common standard interface and the system is equipped with many target sensors for testing various parameters in the environment.
The network layer mainly uses the 4G, GPRS, ZigBee to transmit data to server [9]. The user can query the measurement data through the terminal computer or mobile phone.
The application layer's main function is to analyse and process the information and data, make correct control and decisions, and implement intelligent management, applications, and services.
Combined with the basic architecture of the IoT, the technical design is divided into three parts. The first part is the design of the field detection technique of the perceptual layer; the second part is the design of the data transmission technique of the network transport layer; the third part is the database analysis and design of the application layer.

Design of on-site inspection technique
On-site inspection technique is the source of data for the IoT. The system is mainly used to collect temperature, humidity, air particulate concentration, pressure, strain and other data. The perceptive node is the lowest level of the IoT environment monitoring and control system. It is composed of an environmental parameter sensor module, processor module, memory module, wireless communication module, and a power supply module. We use to realize the monitoring and collection of environmental parameters. For complexity of the application environment, in order to more accurately collect data from the sensor nodes, a wireless acquisition and convergence deployment method is adopted, and a high-performance and low-power embedded processor is used to design sink node. The structures are shown in Figs. 2 and 3.

Design of data transmission technique
The perceptive sensor node transmits data to the sink node. The perceptive nodes and the sink nodes use wireless communication such as the ZigBee module which has better stability. For the complexity of the application scenario, the data transmission module uses narrow band Internet of things (NB-IoT)/4G to update real-time monitoring data quickly and easily, which effectively solves the limitations of wired transmission for monitoring system monitoring distance and terrain conditions [10]. The Socket communication method is used between the 4G communication module and the PC server [11]. The NB-IOT module has low power consumption, large communication capacity. It is suitable for scenarios with low speed, small data volume, and long distance, facilitating integration and modularization. Its structure is shown in Fig. 4.

Analysis and design of database
This project uses B/S structure and a Web server-based design scheme to achieve query and display of multi-level terminals [12]. The server implementation features include data collection, mobile communication, and Web management. The data acquisition module uses the interface between the server and the device to collect data and store the data in database. The mobile-end communication module is used to transmit data stored in database to mobile terminal and through the server to display the collected data. The Web management focuses on presentation of data. It displays data in a graph. When abnormal data is collected, the data will be sent to the user through SMS or WeChat public platform. Its specific function is shown in Fig. 5.
By setting up a listener on the server side, the data of the port monitoring and measurement nodes can be returned, parsed, and stored. The foreground and the background development were adopted simultaneously. The front controller interceptor in SpringMVC was used to implement HTTP interception and the interception and forwarding of the controller module. Finally, Nginx was used to implement the reverse proxy to achieve frontend and back-end integration [13]. The entire project is implemented using J-Query in the foreground, using Webpack to package the project, using Charles to implement the test agent, background engineering using SpringMVC to integrate, using the FeHelper, and the Restlet Client to implement the development process of testing. The project code is deployed in Ali cloud. The server realises the integration of front and background, reverse proxy and load balancing through Nginx. We use the server to set up listeners and use Socket to collect, analyse and store data from the server side and the communication module. By accessing the domain name, the browser sends the request to the Nginx, and then forwarded to the DispatcherServlet in the SpringMVC [14].  Through its processor interceptor and the processor adapter, the URL is forwarded to the corresponding controller, and then the processing response is returned. The foreground uses Ajax to achieve data acquisition and display [15,16]. Its core architecture is shown in Fig. 6.

Design of smart home environment monitoring and control system
Through the research of environmental monitoring and control technology based on intelligent IoT perception, this paper applies it to the monitoring of smart home environment. It enables people to know the quality of their homes in time so that they can take various preventive and cleaning measures.
As shown in Fig. 7, the smart home environment monitoring system is mainly composed of three levels: the perception layer, the network communication layer, and the application layer. This system conforms to the basic architecture of the IoT. The sensing layer is equipped with a temperature and humidity sensor DHT11, air quality inspection sensor PMS5003 for achieving indoor temperature and humidity, PM1.0, PM2.5, PM10 concentration and number of particles which air diameter >0.3, 0.5, 1.0, 2.5, and 5.0. The network layer mainly uses the 4G, GPRS to transmit data to the server. The user can query the measurement data through the terminal computer or their phone. The main function of the application layer is to analyse the received data and displays the data more intuitively through the form of a graph. Combine the database and obtain the analysis result.

Hardware design
Perceptive nodes consist of sensors, data processing, and power supply. The design mainly considers data collection such as temperature, humidity, and airborne particle concentration. With the addition of a ventilation system, improving air quality when the concentration of detected particles exceeds the set threshold. The structure of the perceptive nodes is shown in Fig. 8.

Software design
Main function: judge whether the sensor collects data. If data has been collected, print the data to the serial port; determine whether the concentration of particulate matter reaches threshold; if it has been reached, open the ventilation system and the motor drives fan to rotate. When the data is still collected continuously until the particulate concentration is below the threshold, ventilation system is turned off and fans stop rotating; on the contrary, the dust collection system continues to work, continuously collecting new data and comparing it with the threshold until it reaches the threshold again, the ventilation system is started again and the fan rotates again. The flow chart is shown in Fig. 9.

Implementation and test results
In order to verify the feasibility of the system, experiments are carried out. After burning the code, the data is displayed through the serial port, and the data is displayed in the form of the chart at the terminal. The first three rows of data indicate the concentration of each particle when CF = 1, the middle three rows indicate the air quality index, and the last three rows indicate the number of particles per 0.1 l of air. The serial monitor results as shown in Fig. 10.
After passing the data to the server via the transmission module, we set up a listener on the server side and use the listener to listen to the data port in real time. Once the data is passed in, the Socket object is instantiated through the accept method in the ServerSocket object, and the lightweight process (LWP) is opened for each Socket object, through the Runnable interface, regain the Run to implement the LWP class. In the function body of Run, a byte input stream and a byte output stream are created, which are used to determine whether the data is retrieved and whether the return reception is successful. Since the unit is byte, it needs to be converted into a string first, and then the obtained string is cut and stitched according to the required format, and finally the target data is obtained, and set to the plain ordinary Java object (POJO) corresponding to the database model, respectively. Then, the current model object is written to the database corresponding table through the persistence layer framework, and the data storage is completed. The final display interface we designed is shown in Fig. 11.

Conclusion
The intelligent home environment monitoring and control system is debugged. The system meets the design requirements and has high reliability in actual operation. It proves the feasibility and reliability of the technique of environmental monitoring and control based on intelligent IoT perception. If the technique is further application properly, the more powerful environmental detection and control system can be formed which supports the remote monitoring network of multi point and wireless transmission and will have far-reaching influence on human life and the construction of ecological civilization.

Acknowledgments
This work was supported by the National Natural Science Foundation of China, Grant No. 61471282 and 61727804.