Abstract

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 differentiation (PID) algorithm. The noise data removal method is established based on the furthest priority strategy -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 effectively monitor the data on greenhouse temperature, carbon dioxide, light, and other environmental factors, and the greenhouse data management system can effectively ensure the normal operation of equipment and data storage. After being processed by the FPKM algorithm, outliers are identified and effectively removed. Under random seeds, the iteration times of the FPKM algorithm and the -means algorithm are significantly different. The iteration number of the FPKM algorithm is basically stable at approximately 2 times, while the iteration number of the -means algorithm obviously fluctuates. 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.

1. 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 [68]. 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 -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.

2. 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 energy-saving 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.

2.2. Factor Control of the Greenhouse Environment

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), represents the energy obtained from solar radiation in the greenhouse, represents the heat generated by a heating device in the greenhouse, represents the heat loss from ventilation inside and outside the greenhouse, represents the heat loss from the greenhouse covering and the external exchange, represents the heat absorbed by transpiration, represents the heat exchanged between surface water vapor and indoor air, and represents the heat exchanged between crops and indoor air.

According to the change in atmospheric pressure and density in the greenhouse, can be expressed:

In Equation (2), expresses the density of air at standard atmospheric pressure, expresses the air specific heat capacity at standard atmospheric pressure, expresses the height of the greenhouse, expresses the time, and 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 represents the external solar radiation intensity.

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, expresses the heat power supplied by the greenhouse heating device, and 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), represents the ventilation rate of the greenhouse ventilation device and 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), expresses the heat exchange coefficient of the energy exchange of the covering layer and expresses the area of the greenhouse covering layer.

Equation (7) is the calculation of :

In Equation (7), represents the heat coefficient of the heat exchange loss between the greenhouse and its covering layer, 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, represents the coefficient of the heat transfer between the air in the greenhouse and the crops, represents the standard atmospheric pressure, and represents the absolute indoor humidity.

Equation (8) shows the calculation of :

In Equation (8), denotes the dynamic impedance of air around crops and 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), denotes the transpiration rate of crops in a greenhouse, denotes the transpiration rate of surface water vapor in a greenhouse, denotes the variation quantity of water vapor caused by ventilation exchange in a greenhouse, and denotes the variable quantity of water vapor caused by the greenhouse humidifier.

2.3. 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.

2.4. Design of a Greenhouse System Controller Based on the Fuzzy Adaptive PID Algorithm

In practical engineering adoptions, the most commonly used controller design is the PID controller [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), represents the proportional gain, represents the integral gain, represents the differential gain, represents the setting value of the system, and 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), , , and express the initial value of the PID controller parameters. , , and express the variable quantity of PID controller parameters.

2.5. Noise Data Removal Based on the Furthest Priority Strategy for the -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 -means algorithm is a classical clustering algorithm based on distance [29]. For the input parameters, m objects can be randomly classified into clusters. If a cluster is a set of , the mean value of a cluster can be expressed as shown in

Equation (16) shows the criterion function of the -means algorithm:

In Equation (16), 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 denotes the given data object. is the mean value center of cluster .

The -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 -means algorithm is limited. The farthest priority strategy -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 -means algorithm [31].

2.6. 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.

2.7. 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, 1,000 of which are used as the training samples and 200 as the test samples.

3. 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 -means are compared (Figure 5). Under the random seed, the iteration times of the FPKM algorithm and the -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 -means algorithm fluctuates obviously. The number of iterations of the -means algorithm is more than that of the FPKM algorithm under partial random seeds. Hence, the number of iterations of the -means algorithm is greatly affected by the initial clustering center. The efficiency of the FPKM algorithm is obviously improved.

3.2. 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 heat-resistant 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 efficiency of different vegetables. As seen from the figure, the water consumption and transpiration efficiency of different kinds of vegetables vary greatly. The traditional planting mode cannot control the amount of water needed for vegetables, and the transpiration rate cannot be accurately measured and regulated. Therefore, it is necessary to make use of IoT technology for detection and regulation. In the second part, the background management of farmers is analysed. Farmers need to conduct real-time supervision of the temperature, humidity, carbon dioxide, and other factors 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.

3.3. 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 CO2 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.

3.4. 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.

3.5. 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.

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-time data changes. The display page for remote equipment operation of the intelligent agricultural system is shown in Figure 14.

4. 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.

Acknowledgments

This work was supported by the Heilongjiang Provincial Postdoctoral Science Foundation: Research on the transition of the recycling agriculture industry chain in Heilongjiang Province: dynamic mechanism, upgrading path and development countermeasures (No. LBH-Z14019) and Postdoctoral Science Foundation of Heilongjiang Province: Research on the mechanism and realization path of digital technology enabling agricultural green development in Heilongjiang Province (No. LBH-Q21053).