Remote Monitoring and Management System of Intelligent Agriculture under the Internet of Things and Deep Learning

Based on the Internet of Things (IoT) technology and deep learning algorithm, a greenhouse intelligent agriculture management system was established to analyse the application value of the intelligent agriculture remote monitoring management system in the greenhouse planting industry. Based on the analysis of greenhouse planting demand and environmental factors, the intelligent agriculture monitoring system is established based on the IoT, and the greenhouse system controller is designed based on the adaptive proportion integration di ﬀ erentiation (PID) algorithm. The noise data removal method is established based on the furthest priority strategy k -means (FPKM) algorithm, and the greenhouse data management system is established mainly by the business platform and management platform. The data set of air temperature during the cultivation of Flammulina velutifolia in a factory from October 2020 to January 2021 was selected as the research data to analyse the ability of the IoT-based IARMM system to collect greenhouse temperature, carbon dioxide, and light data. In addition, the application of the greenhouse data management system in greenhouse data monitoring and control is analysed. The processing capability of agricultural environment monitoring data based on the FPKM algorithm is analysed. The results show that the intelligent agriculture monitoring system based on IoT and machine learning can e ﬀ ectively monitor the data on greenhouse temperature, carbon dioxide, light, and other environmental factors, and the greenhouse data management system can e ﬀ ectively ensure the normal operation of equipment and data storage. After being processed by the FPKM algorithm, outliers are identi ﬁ ed and e ﬀ ectively removed. Under random seeds, the iteration times of the FPKM algorithm and the k -means algorithm are signi ﬁ cantly di ﬀ erent. The iteration number of the FPKM algorithm is basically stable at approximately 2 times, while the iteration number of the k -means algorithm obviously ﬂ uctuates. Based on the IoT and FPKM algorithm, the intelligent agriculture monitoring system covering the user monitoring center, data center module, and mobile phone client module is established. This work establishes a practical remote monitoring and management system for intelligent agriculture based on the IoT and machine learning algorithm, which provides a new idea for intelligent agricultural management.


Introduction
Agriculture is the foundation of a country's development, especially for such a large population. Agriculture is the lifeblood of our survival and economic development. Since the founding of new China, we have been looking for ways to solve the problem of food and clothing [1]. In recent years, with the growth of population and social development, the scale of agricultural production has been continuously improved. The traditional agricultural production mode cannot meet people's demand for crops in different seasons and quality levels [2]. Besides, due to China's vast territory and complex conditions of climate and terrain, there are many regional restrictions on the growth of crops, so the quality and yield of crops cannot be guaranteed [3]. To solve these effects on crops and ensure yield and quality, greenhouses are introduced into agricultural production so that the yield and quality of crops are guaranteed. However, there are still some problems, such as farmers' difficulties in planting, poor control of temperature and water, and pollution caused by improper implants. Then, there are some poor agricultural products, resulting in an obvious decrease in sales [4,5].
The Internet of Things (IoT) is a comprehensive adoption of new information technology, including sensors, communication, and automatic control. Currently, it is widely used in agriculture, industry, transportation, and medical treatment [6][7][8]. The combination of IoT technology and modern agriculture has gradually brought smart agriculture into people's lives, thus improving crop yield and work efficiency, saving resources, and ensuring the quality of crops [9]. Intelligent agriculture systems based on IoT mainly include agricultural production information collection, data storage and management, information analysis, and corresponding decision execution [10]. Intelligent agriculture based on IoT combines advanced science and technology with agricultural production, which can scientifically monitor the growth of crops, changes in the soil and air environment, temperature, humidity, and the soil environment, thereby improving the comprehensive benefits of agricultural production [11]. Through the artificial construction of crop growth environments and intelligent control to optimize the living conditions of crops in greenhouses, greenhouses can make crops in different growth stages in the best environmental conditions [12]. The combination of greenhouses and IoT technology can achieve real-time monitoring of crops, improve the management level of agricultural production, and save labor resources and production costs [13]. The research and application of smart agriculture in planting mainly consists of real-time collection of environmental elements of planting crops through an automated network monitoring system and automatic opening or closing of designated equipment through system settings, which is still in the initial stage [14]. Al-Qurabat et al. [15], based on IoT technology, adopted compression and minimum description length technology in data transmission received by sensors to establish a remote monitoring system for smart agriculture, and the results showed that this method can significantly reduce the data transmission speed and provide a better method for real-time monitoring. Intelligent agriculture started late in China, and intelligent agriculture based on IoT is still in the primary stage. Hence, there are few relevant investigations, and all the requirements for the development of intelligent agriculture cannot be satisfied. The pervasiveness of agriculture towards intelligence and automation has been severely restricted. Besides, there is still a certain gap between China and Western countries in terms of levels of technology and intelligence [16], which needs to be further optimized. On the other hand, the current intelligent agriculture system has collected a large amount of data, which seems to be chaotic but contains great value. If data analysis is conducted without necessary preprocessing, the probability of failure will greatly increase [17]. To ensure accurate and effective information and improve the efficiency of data analysis, it is necessary to add a data preprocessing module before data analysis. The effective processing of these data can provide a scientific basis for the automatic control and intelligent management of the environment.
In summary, there are still some shortcomings in the research of intelligent agriculture systems, and a large number of studies are still needed based on the characteristics of crops and geographical conditions. First, the greenhouse planting requirements and environmental control factors are analysed in this work. Then, a modular greenhouse controller is designed based on the adaptive proportion integration differentiation (PID) algorithm, and the data noise is removed by using the furthest priority strategy for the k-means (FPKM) algorithm. Finally, the intelligent agriculture system and data management system are established based on IoT and are analysed using the test set data. In addition, the intelligent agriculture system is established based on machine learning and IoT. The alarm system and remote control system are added to the data management system and applied to the monitoring of greenhouse crops. The value of intelligent agriculture systems in the greenhouse planting industry under the background of the IoT is discussed to provide a guiding ideology and an experimental basis for the development of intelligent agriculture in the future.

Methodology
2.1. Analysis of Greenhouse Planting Requirements. Before establishing the IoT greenhouse system, the detection and related platforms for greenhouse planting need to be analysed. Based on the research results of Al-Qurabat and Kadhum [18], this work further analyses the greenhouse planting demand. First, the data that the greenhouse needs to detect, including temperature, humidity, light, carbon dioxide, and other external environments, need to be determined, and real-time monitoring of the external environment of crop growth needs to be conducted. Then, the obtained information is stored and transmitted so that the obtained data can be shared in a timely manner and sent to farmers in a timely manner so that the internal situation of the greenhouse at all times is understood, and corresponding countermeasures are made according to the situation. After that, the display screen should be installed in the greenhouse to obtain a comprehensive understanding of the greenhouse situation. The most important thing in a greenhouse is the regulation of temperature, which is an important factor for the growth of crops. A temperature evaluation system should be established to monitor whether the current temperature is suitable for the growth of crops to automatically adjust the temperature or manually control the temperature in the later period to ensure the optimal temperature of crops. The remote control system is established to enable farmers to understand the environment in the greenhouse even in the field and make corresponding adjustments to the greenhouse environment to meet the growth of crops. Finally, an early warning and energysaving device can be set up to issue a remote early warning when abnormalities occur in the greenhouse. At the same time, the installation of farmers can remotely control the relevant equipment in the greenhouse so that it can be shut down in time when it is not needed. The specific greenhouse planting requirements are shown in Figure 1. The greenhouse environment problem is the root of planting, and too high or too low of a temperature and humidity can stunt crops. Serious conditions may lead to the death of crops. However, the traditional method of carbon dioxide delivery is not only inconvenient but also harmful to the human body [19]. Using the IoT system to control greenhouse factors is now necessary to cultivate better products and reduce the burden on farmers. The greenhouse environmental factor control device is constructed according to the obtained greenhouse information to make the relevant flowchart to design the steps and design a scheme needed for greenhouse environmental factor control. Hot water pipes, hot air heating, and heaters are generally adopted for greenhouse temperature control, while ventilation is generally adopted for cooling. If natural ventilation is not ideal, relevant equipment should be introduced for ventilation and cooling treatment. Humidity is generally divided into dehumidification and humidification. Natural ventilation is used for dehumidification. The wet curtain or spray needs to be introduced for humidification. For light, internal and external sunshade nets can be used. For greenhouse carbon dioxide concentrations, chemical methods can be applied, such as burning coal, drying ice, and biogas fertilizer. The above devices are combined with the IoT system to make an automatic mode. The greenhouse is a semiclosed system that constantly exchanges energy and matter with the outside world. The heat obtained from the outside of the greenhouse is in a state of thermal balance with that emitted to the outside [20]. In the actual energy calculation of the greenhouse, photosynthesis and respiration can be ignored because the energy costs between them are minimal compared with the others. Then, Equation (1) expresses the environmental heat balance model of the greenhouse: In Equation (1), Q s represents the energy obtained from solar radiation in the greenhouse, Q r represents the heat generated by a heating device in the greenhouse, Q l represents the heat loss from ventilation inside and outside the greenhouse, Q c represents the heat loss from the greenhouse covering and the external exchange, Q t represents the heat absorbed by transpiration, Q w represents the heat exchanged between surface water vapor and indoor air, and Q e represents the heat exchanged between crops and indoor air.
According to the change in atmospheric pressure and density in the greenhouse, Q h can be expressed: In Equation (2), ρ expresses the density of air at standard atmospheric pressure, C expresses the air specific heat capacity at standard atmospheric pressure, H expresses the height of the greenhouse, t expresses the time, and T i expresses the air temperature in the greenhouse.
Equation (3) shows the heat produced by solar radiation in a greenhouse: In Equation (3), ϑ represents the average light transmittance of greenhouse mulch and R 0 represents the external solar radiation intensity.

Wireless Communications and Mobile Computing
Equation (4) shows the calculation of the heat generated by the heating device in the greenhouse: In Equation (4), α expresses the heat utilization rate of the greenhouse heating device, W expresses the heat power supplied by the greenhouse heating device, and E s expresses the floor area of the greenhouse.
The rate of exchange between the air inside and outside the greenhouse affects the amount of heat consumed during ventilation. Equation (5) shows the calculation method for the heat loss of ventilation inside and outside the greenhouse: In Equation (5), B represents the ventilation rate of the greenhouse ventilation device and T 0 represents the air temperature outside the greenhouse.
Equation (6) shows the calculation of heat exchange between greenhouse cover and the outside world: In Equation (6), g expresses the heat exchange coefficient of the energy exchange of the covering layer and E s1 expresses the area of the greenhouse covering layer. Equation (7) is the calculation of Q t : In Equation (7), F represents the heat coefficient of the heat exchange loss between the greenhouse and its covering layer, G x represents the solar radiation absorbed by crops, ε represents the pressure of saturated water vapor in the greenhouse air when the air temperature is 20°C, β represents the effect coefficient of temperature on saturated water vapor in the greenhouse, η represents the coefficient constant of the hygrometer, h t represents the coefficient of the heat transfer between the air in the greenhouse and the crops, P represents the standard atmospheric pressure, and β i represents the absolute indoor humidity.
Equation (8) shows the calculation of Q w : In Equation (8), R denotes the dynamic impedance of air around crops and T l denotes the temperature of the plant's own leaves.
The transpiration of crops in the greenhouse, the evaporation of surface water vapor, and the variation in air water vapor caused by the humidifier in the greenhouse can all cause changes in the overall air humidity in the greenhouse [21]. If the distribution of water evaporation in the greenhouse is uniform, the greenhouse air humidity can be expressed as shown in In Equation (9), J denotes the transpiration rate of crops in a greenhouse, JT denotes the transpiration rate of surface water vapor in a greenhouse, G s denotes the variation quantity of water vapor caused by ventilation exchange in a greenhouse, and R l denotes the variable quantity of water vapor caused by the greenhouse humidifier.

The Design of an Intelligent Agriculture System Based on
IoT. The IoT mainly includes the perception layer, network layer, and application layer [22]. Consequently, the intelligent agriculture system based on IoT mainly includes these three layers. The perception layer mainly consists of data acquisition control and a real-time video signal monitoring module composed of multisensors, cameras, and controllers deployed in the greenhouse. The involved sensors mainly include a temperature sensor, humidity sensor, light sensor, carbon dioxide sensor, soil temperature and humidity sensor, and soil pH sensor. The sensor collects data through the network layer to the cloud server. The controller relay mainly refers to the control of the greenhouse's environmental regulation electrical equipment. As the middle layer of the intelligent agricultural greenhouse monitoring system, the network layer mainly transmits the environmental data collected from the perception layer to the application layer. Simultaneously, the general command of the application layer is delivered to the controller in the awareness layer. The application layer is the highest layer of the system, and it is a cloud platform service system to realize application functions and data visualization, which is mainly composed of a web server, database, and third-party access cloud platform. Figure 2 shows the overall framework of the IoT-based intelligent agriculture system.    [23]. The PID controller generally takes the difference (deviation) between the system set value and the measured value as the input value of the system. Equation (10) shows the calculation of the deviation: Equation (11) shows the output expression of the PID controller: In Equations (10) and (11), C p represents the proportional gain, C l represents the integral gain, C d represents the differential gain, pðtÞ represents the setting value of the system, and qðtÞ represents the actual value measured by the system.
A fuzzy controller generally consists of two input variables and three output variables [24]. When the temperature factor of the greenhouse is controlled, it is necessary to adjust the parameters of the fuzzy adaptive PID controller online to ensure that the parameter values meet the requirements of temperature control.
Equations (12)- (14) represent the parameter setting calculation method of the fuzzy adaptive PID controller: In Equations (12)- (14), C * p , C * l , and C d express the initial value of the PID controller parameters. ΔC p , ΔC l , and ΔC d express the variable quantity of PID controller parameters.

Noise Data Removal Based on the Furthest Priority
Strategy for the k-Means (FPKM) Algorithm. The original data often have problems such as data inconsistency, duplication, and missing, abnormal, and redundant information [25]. If data mining is performed directly without processing the data, the probability of mining task failure increases significantly [26]. Hence, to ensure the accuracy of mining data and improve mining efficiency, data preprocessing is necessary before data mining. Presently, data preprocessing mainly includes data cleaning, data integration, data transformation, and data specification [27]. The data detected by intelligent agriculture systems need to be removed and processed. The clustering method can not only group the data with large similarity into the same cluster but also isolate outliers in the data and delete them [28]. The k-means algorithm is a classical clustering algorithm based on distance [29]. For the input parameters, m objects can be randomly classified into k clusters. If a cluster is a set of s ij , the mean value of a cluster can be expressed as shown in Equation (16) shows the criterion function of the k -means algorithm: In Equation (16), A denotes the sum of squares of the distances among all the objects in a data set and the mean center of the cluster to which they belong, and x denotes the given data object. σ~is the mean value center of cluster C i .
The k-means algorithm is simple and can effectively preprocess data. Nonetheless, the algorithm is easily affected by the initial cluster center and is sensitive to "noise" and outlier data while searching for nonconvex clusters [30]. As a result, the adoption scope of the k-means algorithm is limited. The farthest priority strategy k-means (FPKM) algorithm uses the farthest priority strategy to select the center of the cluster, and it introduces the farthest priority strategy and threshold value to judge whether the data contain noise, which can effectively avoid the shortcomings of the k-means algorithm [31].

Establishment of the Data Management System.
The key to crop planting still depends on artificial regulation. If the information is collected in the greenhouse, the corresponding background management system must be set up to observe the data and make corresponding adjustments. The application of the IoT is to facilitate people in managing the production of crops more conveniently and accurately. An artificial intelligence service system is added to the background. Two platforms are mainly designed: business platform and management platform. The overall diagram of the data management system is shown in Figure 3. The business platform mainly includes the timely release of information, remote control of the greenhouse by farmers, timely viewing of the greenhouse and understanding of the internal conditions, disposal of the alarm system by farmers, and setting of all condition thresholds. The management platform is mainly for the management of users and data, timely viewing and management of equipment, and information sharing and release. At the same time, a mobile phone client is set up so that farmers can timely query the situation in the greenhouse from the mobile phone and can conduct remote control.

The Data
Set of the Test. The data set of air temperature during the cultivation process of Flammulina velutipes in a factory from October 2020 to January 2021 is used as the research data. The data set includes air temperature data, air humidity data, soil temperature data, and soil humidity data. All four kinds of data are collected every minute. A total of 1,200 groups of complete cycle data are collected,

Results and Discussion
3.1. Analysis of the Results of Noise Data Removal Based on the FPKM Algorithm. The FPKM algorithm is used to denoise the data in the data set ( Figure 4). Before the denoising processing of the FPKM algorithm, there are 7 abnormal values in the data. The abnormal values are identified and effectively removed after the processing of the FPKM algorithm.
The denoising efficiency of the algorithm can be represented by the number of iterations. The lower the number of iterations is, the higher the efficiency of the algorithm is [32]. Under the effect of different and random seeds, the iteration times of the FPKM algorithm and the k-means are compared ( Figure 5). Under the random seed, the iteration times of the FPKM algorithm and the k-means algorithm are obviously different, and the iteration times of the FPKM algorithm are stable, basically at approximately 2 times. The number of iterations of the k-means algorithm fluctuates obviously. The number of iterations of the k -means algorithm is more than that of the FPKM algorithm under partial random seeds. Hence, the number of iterations of the k-means algorithm is greatly affected by the initial clustering center. The efficiency of the FPKM algorithm is obviously improved.

Greenhouse
Planting Demand Analysis. The greenhouse planting demand is divided into two parts. The first part is the demand for crops in the greenhouse, and the second part is the backstage management operation of farmers, which is used to comprehensively manage the growth of crops in the greenhouse. We visited and investigated the conditions required in the greenhouse to provide the corresponding data support for the subsequent model establishment and application. Table 1 shows the temperature requirements of various vegetables. According to the figure, the most suitable temperature for different vegetables is shown. Therefore, the temperature is adjusted in the greenhouse by combining the temperature demand of different vegetables with the external environmental temperature. According to the different temperatures that vegetables can tolerate, vegetables can be classified into cold-resistant vegetables, semi-cold-resistant vegetables, warm vegetables, and heatresistant vegetables. Among them, cold-resistant vegetables are very strong in frost resistance. Some vegetables can survive even at only 10°C. The universal cold-resistant vegetables are leek, spinach, radish, onion, and garlic. Semi-cold-resistant vegetables grow best at 17-20°C, which can withstand the short-term low temperature of -1~-3°C. Common semi-cold-resistant vegetables include Chinese cabbage, radish, carrot, cabbage, pea, and broad bean. Warm vegetables grow at temperatures of 20-30°C and are not resistant to frost. It is easy to cause falling flowers below 15°C. Above 35°C, there will be poor growth and fruit. Warm vegetables mainly include cucumber, tomato, pepper, bean, and eggplant. Heat-resistant vegetables grow better at approximately 30°C, which can still grow normally and bear fruit at 35-40°C, including winter melon, pumpkin, watermelon, cowpea, bean, amaranth, and water spinach. Figure 6 shows the amount of water required by farmers for growing vegetables, and Figure 7 shows the water use     in the greenhouse and adjust the environment in the greenhouse in a timely manner. Figure 8 is the frame of the greenhouse system. As seen from the figure, an overall plan is made for the demand of the greenhouse. The temperature and humidity sensors in the greenhouse can evaluate and adjust the environment in a timely manner. Meanwhile, all the obtained video, weather, and other conditions can be recorded and fed back to the terminal, which can also adjust and monitor the data. This system enables farmers to know all aspects of the greenhouse and automatic irrigation and lighting system, which can be monitored and adjusted by farmers at any time.

Greenhouse Environmental Factor Control Device.
There are many kinds of agricultural products in China. The difference in temperature between the north and south is large, so it is impossible to give a unified agricultural operation mode and path selection [33]. Hot water pipes, hot air, heaters, and other devices are used to increase the greenhouse temperature. An outer sunshade or spray is used to lower the temperature inside the greenhouse. The results showed that the spray was much more effective in lowering the greenhouse temperature. Skylights for the greenhouse are designed to achieve the effect of dehumidification; natural ventilation is used to achieve the purpose of dehumidification, and a wet curtain and spray are used to achieve the effect of increasing humidity. The results show that both of these methods can effectively increase the moisture in the greenhouse. In the greenhouse, an internal and external sunshade net is used to promote the growth of crops by increasing the ambient light intensity in the farmers' opinion. The result shows that this device can effectively increase the light intensity so that the crops can obtain sufficient light even in rainy weather and avoid direct sunlight at the same time. A carbon dioxide gas production device is used to control the concentration of CO 2 in the greenhouse. Ammonium bicarbonate is placed under the device, sulfuric acid is dripped into the linkage device, and the valve containing the liquid is controlled with the automatic control system to produce carbon dioxide. This method can effectively produce carbon dioxide to meet the needs of crop production. Figure 9 is a flowchart of a greenhouse control system. As seen from the figure, the combination of relevant material devices and the IoT are used to control greenhouse conditions. The design of the background operation management and data control center meets the farmers' overall management of the greenhouse and achieves the functions of mobile phones and PC. Combined with the existing network technology and data technology, the control of greenhouse temperature, humidity, and carbon dioxide is achieved. Then, wireless sensor technology and a monitoring network are adopted to collect environmental and meteorological data back to the data center. Finally, it is presented to farmers in the form of charts.

Background Design and Database Analysis.
A background management system is set up for farmers so that farmers can use mobile phones and other terminals to grasp the situation in the greenhouse in a timely manner. User permission management, database operation, and user management are set to protect the management privacy of farmers. At the same time, the establishment of the data module gives farmers a timely understanding of the relevant data. Figure 10 shows a sample diagram of the user monitoring center and data center module. The information monitored by users including the information of each area in the greenhouse, the early warning information of the specific situation of the greenhouse, the monitoring and viewing of the equipment at any time, and the relevant videos in the greenhouse over time are shown in the figure. Meanwhile, a system supervisor is set up to collect and analyse the data of the data center to comprehensively master the data information in the production of farmers. The mobile phone client model is established. Figure 11 is the greenhouse mobile phone login operation flowchart. It shows the control of the greenhouse system by the mobile phone client. Farmers can use the phone to check the history data and manually control the greenhouse environment at the same time. Through this convenient method, the manpower material resources in agricultural production are greatly reduced, and a precise control system can increase crop production, which provides a design plan used in other crop production for the IoT. Vegetable category Production water demand (g) Figure 6: Water requirements of different vegetables during the growing process.  Wireless Communications and Mobile Computing

Performance Analysis of the Greenhouse System
Controller. The performance of the greenhouse system controller based on the fuzzy adaptive PID algorithm is analysed ( Figure 12). Within 2 hours of monitoring, the temperature outside the greenhouse gradually increases, the temperature value in the greenhouse has always remained in the range of 18.0°C~21.0°C, and the error range between the change trend of indoor temperature and the set value is maintained within 3°C. The results show that the greenhouse system controller based on the fuzzy adaptive PID algorithm can effectively maintain the stable state of the temperature in the greenhouse.    Figure 11: Mobile client management process. 10 Wireless Communications and Mobile Computing 3.6. The Data Display and Remote Control Interface of the Intelligent Agriculture System. The data monitoring part of the intelligent agriculture system can display the specific values of temperature, humidity, carbon dioxide concentration, and light in the greenhouse in real time, which is a real and comprehensive record of the plant growth environment in the greenhouse. At the same time, the situation inside the greenhouse can be recorded in real time through video monitoring images. The data display page of the intelligent agriculture system is shown in Figure 13. The remote equipment operation module of the intelligent agricultural system can display the real-time operation and configuration of the equipment and remotely control the greenhouse environmental parameters through real-

Conclusion
In this work, an effective remote monitoring and management system for intelligent agriculture is established based on the IoT and machine learning algorithm. However, there are still some shortcomings. Only the temperature monitoring in the system is optimized, while the humidity and other environmental factors are not optimized and analysed. In future work, the system will be further improved to increase its application range. In conclusion, it establishes an intelligent agriculture system based on the IoT and machine learning algorithm, which provides guidance and an experimental basis for the development of intelligent agriculture.

Data Availability
The data used to support the findings of this study are available from the authors upon request.

Conflicts of Interest
The authors declare that they have no conflicts of interest. Save Implement Figure 14: The display page of remote equipment operation of the intelligent agricultural system.

12
Wireless Communications and Mobile Computing