A Reliable Data-Driven Control Method for Planting Temperature in Smart Agricultural Systems

With the rapid development of intelligent computing technologies, the smart agricultural systems has gradually received more research attention. Precisely controlling planting conditions via intelligent means, it is expected to technically improve reliability of smart agricultural systems. For this purpose, this paper introduces the idea of big data fusion, and proposes a reliable data-driven control method for planting temperature in smart agricultural systems. Firstly, a variety of sensors are used to collect the values of environmental factors such as air temperature and light intensity during the experiment, and the “Digi” wireless communication technology is used to transmit the data. Then, the collected data is sent to the server through the 5G module, and the important data of the growth process is stored in the MySQL database. Taking the cultivation of yams as the investigation object, experiments on the real-world data are utilized to evaluate the proposal. And it is shown that the propose framework can work well to control temperature for yam planting from the perspective of data fusion.


I. INTRODUCTION
Traditional agriculture has strict requirements on climate, which greatly limits the output and growth cycle of crops [1]. At the same time, the growing population also brings unprecedented pressure to the land resources on which crops grow [2]. To solve the impact of environmental factors and the scarcity of land resources, the production technology of facility agriculture has been increasingly widely used [3]. In this new historical stage of social development, the main contradiction of our society has changed, and the need for a better life is growing day by day, not only to fill the stomach but also to pursue a higher material life and spiritual life [4]. People put forward higher requirements for off-season vegetables, fruits, flowers, and other agricultural products, and the demand for facility agriculture is increasing The associate editor coordinating the review of this manuscript and approving it for publication was Zhaojun Steven Li . year by year [5]. Therefore, whether it is the limitation of external factors or the needs of one's own life, the development of facility agriculture is imperative [6]. In the process of greenhouse production, the temperature is one of the most important parameters affecting the growth of indoor crops [7]. The control of temperature changes in the greenhouse mainly adjusts the various actuators in the greenhouse through the data measured by the sensors, and changes the environment in the greenhouse to meet the growing needs of crops [8]. However, due to the complex internal environment of the greenhouse, how to obtain accurate and effective sensor data is a key problem to be solved urgently for the effective operation of the greenhouse management system [9].
The Agricultural Internet of Things is the key technical support for smart agriculture and provides important technical support for the development of traditional agriculture to modern and intelligent methods [10]. The Agricultural Internet of Things forms a monitoring network with many sensor nodes to complete the collection of data and information [11]. Modern information transmission channels such as wireless sensor networks are used to achieve reliable transmission of agricultural information [12]. Massive agricultural information is integrated and processed to achieve monitoring and scientific monitoring of the entire process of agricultural production management services [13]. The medicinal material-producing area of yam is mainly in the northeast region. It has high medicinal value, edible value, and the characteristics of perennial herbs [14]. For the long-term development of the yam industry and the inheritance of the excellent characteristics of the yam itself, many experts and scholars use the solar greenhouse as the yam. The base for breeding experiments is to observe the growth, morphology, and appearance changes of different varieties of yam in the same experimental environment. The material and labor costs of the greenhouse are low [15].
Compared with the traditional ginseng, the greenhouse not only has a better thermal insulation effect but also the climate conditions of the greenhouse environment are more convenient for manual control. The wave of smart agriculture development promotes the gradual application of technologies such as the Internet of Things and wireless sensors to modern intelligent agricultural construction [16]. Realtime monitoring of parameter information of environmental factors, and adjusting the growth environment according to plant characteristics and growth laws have become one of the key tasks of smart agriculture at present. In the yam breeding experiment and cultivation base, the Internet of Things technology is used to sense and adjust the greenhouse environment to ensure that the greenhouse climate can keep the yam in the environmental state required by the experiment, and provide scientific convenience for the yam experiment.
In this paper, ZigBee wireless communication technology will be used as the communication module, and the air temperature and humidity, soil humidity, light intensity, and carbon dioxide concentration in the greenhouse will be used as environmental factors to be controlled. Control, so that the plants in the greenhouse have always been in the best growth environment, to improve the yield and quality of crops, and make crops produce higher economic value. At the same time, the system also has the characteristics of low operating cost, high reliability, and easy maintenance, and has good market prospects and research value. As an advanced production model in the new era of agricultural development, plant factories represent the future direction of agricultural development and are an important foundation for the development of precision agriculture.
Vigorously developing this new agricultural production model will bring huge economic and social benefits. Applying the Internet of Things, big data, artificial intelligence, and other technologies to the development of smart agriculture, and using modern technology to eliminate the defects of traditional agriculture, can bring about changes in the agricultural industry and achieve the goals of rural revitalization and agricultural and rural modernization. In the future, it is not only necessary to cultivate scientific and technological talents and promote technological innovation, but also to encourage agricultural practitioners to actively learn information technology, build smart agricultural demonstration parks, and increase agricultural economic output. The main contributions of our work are as follows: • Realizing the intelligent control of the greenhouse is based on the physiological characteristics of the crops, partially or completely overcoming the shackles of the external climate environment and other non-self-factors, so as to create the best conditions for crop growth and achieve the purpose of increasing production and saving energy.
• To realize the intelligent control of the greenhouse, it is necessary to determine the various factors that restrict the environment. Then, the system finally determines the temperature, and the three quantities of humidity are the three main factors affecting the growth of crops.
• Using modern information processing technology, the greenhouse control that relied more on agricultural experience, knowledge and technology to judge the physiological status of various crops has been improved. The remainder of this paper is organized as follows. In the next section, the related works will be shown in detail. In Section III, the greenhouse sensor data fusion technology is proposed. In Section IV, the smart agriculture greenhouse yam planting temperature detection and control system is designed. In Section V, the detection and control method based on standard database is proposed. In Section VI, the simulation and experiments are carried out. Finally, some conclusions are drawn in Section VII.

II. RELATED WORKS
As for the scientific researcher's use of manual data collection to monitor the environment in the greenhouse, traditional instruments for measuring temperature, humidity, and light intensity are used to record the environmental conditions in the greenhouse and the growth conditions of crops, summarize the obtained information [17]. It seems that this method not only requires a lot of workforce and material resources, but also the measured parameters are not necessarily accurate, and the controlled environmental factors are single [18]. The rapid development of the Internet at the beginning of this century also accelerated the application of the Internet to greenhouses. Users can access the greenhouse control system through the Internet, understand the growth of crops according to the information obtained from the access, and take relevant measures according to the situation [19]. Oliveira et al. manage the pepper planting environment in the greenhouse through the wireless sensor network WSN [20]. The system collects relevant environmental data through the wireless sensor network, monitors the crop growth in real-time through the monitor, and automatically controls the environment according to the current growth stage of the pepper.  The facility maintains the stability of the pepper growing environment [21]. Otaiku proposed a power mean square operator method to realize data fusion [22]. The advantage of this method is that the optimal weight of each sensor is obtained by calculating the support function of each sensor, which is suitable for the fusion of real-time data collected by sensors [23]. Miceli and Settanni adopted the mean-based batch estimation method [24]. The advantage of this method is that it does not need to know any prior knowledge, and achieves high-precision data fusion by comprehensively analyzing the data collected by the sensor.
The Netherlands has a high degree of agricultural modernization. After years of continuous development, the Netherlands' technology, and experience in the field of greenhouse cultivation have brought more support and assistance to other countries in the world and achieved great results. The intelligent agricultural glass greenhouse control system developed by the Dutch company has a high level of automation, which greatly reduces the labor force on the premise of ensuring the continuous improvement of production efficiency [25]. At the same time, the Netherlands has the largest glass greenhouse in the world. Greenhouse cultivation is in a leading position, driving the rapid development of agriculture in the Netherlands and Europe [26]. Reference [27] collected environmental information such as soil water content, light intensity, air temperature, and humidity in litchi orchards, and made expert decisions based on environmental data. Reference [28] measured the greenhouse carbon dioxide concentration in real-time, to carry out intelligent regulation of the greenhouse carbon dioxide concentration. Reference [29] monitors soil pH in mountain farmland areas in real-time and implements a farmland soil monitoring system in hilly areas. Reference [30] collects data such as ambient temperature and humidity, soil temperature and humidity, light intensity, and rainfall in real-time, and implements a corn disease environmental monitoring system based on the Internet of Things.
As the number of agricultural IoT devices continues to increase and the types of devices become increasingly abundant, IoT gateway devices with flexible wireless network connection capabilities are required to undertake the responsibility of connecting a variety of terminal devices and the cloud. However, low-cost, general-purpose agricultural IoT gateways have not been seen in existing research. Gateways need to have extensive access capabilities, good protocol conversion capabilities, powerful device management capabilities, and information processing capabilities. In the process of improving the level of agricultural informatization and intelligence, the vast underdeveloped areas have low utilization of the original agricultural facilities, resulting in excessive investment. How to carry out wireless transformation for the existing agricultural facilities, and realize effective data acquisition and wireless transmission with low cost and low delay, has important research significance.

III. GREENHOUSE SENSOR DATA FUSION TECHNOLOGY DESIGN
Combined with the actual greenhouse external conditions, greenhouse structure, building materials, planting crops, and other factors to set the calculated parameter conditions, the changes in the environmental field in the greenhouse can be more accurately represented, which not only reduces the test cost but also eliminates irrelevant factors [31]. The energy exchange in the greenhouse environment follows three conservation laws, namely mass conservation, momentum conservation, and energy conservation. Therefore, in the numerical calculation process of the temperature field in the greenhouse, the following three equations will be the main governing equations: In the formula, u, v, and w are the components of the velocity in the three directions of x, y, and z, respectively, and the unit is m/s. In the numerical calculation, the tomato plant in the greenhouse is simplified to a porous medium model for calculation, which conforms to the Darcy-Horkheimer law: where S ϕ is the source term; v is the air velocity, in m/s; u is the aerodynamic viscosity; p is the air density; K m is the permeability coefficient of the porous medium, and Cu is the nonlinear momentum loss factor. According to previous research, the power source terminal of tomato plants is related to plant characteristics and air velocity, which satisfies the equation: In the formula, C is the crop canopy resistance coefficient, and I L is the leaf area index. According to previous research, the value of C is 0.32. To sum up, by merging similar terms, the relationship between C u and K m is obtained: Crop growth requires a relatively stable surrounding environment. Compared with natural conditions, greenhouses can better meet the environmental needs of crop growth. For crops in a certain growth period, the environment provided by the greenhouse is often relatively stable, and the internal flow field of the greenhouse is also in a relatively stable state. The indoor field is analyzed to obtain the temperature value and velocity value of the sensor node position. According to the spatial similarity theory, only one sensor data can be obtained, and then the adjacent sensor node data can be predicted. By comparing the predicted sensor data with the actual readings of the sensor, if the actual data is within the error range, it can be assumed that the sensor node has no problem.
Considering the environmental conditions of the greenhouse, the energy consumption of the sensor, the accuracy of the algorithm detection, and the scope of application, the LEBDF algorithm is finally selected to judge the faulty node of the sensor. Because the change in the internal environment in the greenhouse is small, this method has a high detection accuracy. It is suitable for further screening of faulty sensors in the greenhouse environment. Selecting the temperature data obtained by the sensor as the judgment quantity, and use x to represent the greenhouse sensor network, i − th Each sensor node is denoted by X i 1 . First, the measurement values of the adjacent nodes of the node X i 1 are sorted according to the value size, X i k represents the set of k area sensor nodes, which includes X i 1 and other k−1 nodes, and the measurement values of the adjacent nodes of the node X i 1 are sorted and defined. To The intelligent greenhouse temperature field measurement and control system needs to realize the three main functions of indoor environment information collection, remote monitoring of crop growth, and automatic control of indoor equipment through its demand analysis. To monitor the changes in the temperature field in the greenhouse, according to the actual working conditions of the greenhouse, the environmental information of the greenhouse is obtained by arranging multiple sensor nodes, indoor cameras, and outdoor weather VOLUME 11, 2023 stations. If the data is inconsistent, it is necessary to preprocess the data, and then send the expert node information to the Alibaba Cloud server through ZigBee wireless communication technology [32]. View the environmental parameters, equipment status, and video surveillance images of each greenhouse in the background, and manually or automatically control various indoor equipment in time according to the early warning information or the set control threshold, as shown in Figure 1.
According to the analysis of historical data and the experience of relevant agronomic experts, a timing module is set up when specific crops are planted, which can control the opening and closing of fans and the opening and closing of supplementary lights at regular intervals every day. When performing timing control, you must pay attention to setting the priority value, because the initial conditions in the timing control setting are determined by the administrator based on the experience of the growing environment of the crops in this period, but the external environment may have obvious changes during this period. When the greenhouse environment control is still controlled according to the set timing mode, it may not be well suited to the current crop growth needs. To avoid data blocking caused by multiple nodes sending environmental information to the gateway at the same time, the information collection and control modules of the access gateway all set their address information, and the gateway obtains the environmental information of each module in turn by polling. The gateway that matches its own address requests data to return the current environment information to the gateway.
Among them, R s represents the symbol rate, BW 2 represents the bandwidth, and SF represents the spreading factor.
Due to the unstable network conditions in remote areas, network interruptions and network failures often occur. To avoid system disconnection and restarting the device, the disconnection and reconnection function is added to the gateway to determine whether the network is connected before the gateway sends data to the cloud platform. When it is detected that the WIFI is disconnected, the whole system waits for 1 minute and then automatically reconnects. The formula for calculating the data transfer rate is: Among them, DR represents the data transmission rate, and CR 2 represents the coding rate. Using LoRa wireless communication technology in different application scenarios can optimize the LoRa modulation parameters according to the actual situation to change the link budget and transmission time, thereby improving the transmission capability and stability of device transmission. Taking the tree-shaped network topology structure as the observation object, it belongs to the multi-hop network, which contains a single coordinator, numerous routers, and terminal nodes. When all nodes communicate with each other, they must complete the action of transmitting messages along the routing path, and the child nodes must use the parent node to communicate with all other nodes. If there is a problem with one of the router nodes and the function fails, the mission of the child node will end. Based on this, the security of the topology itself is relatively low.

IV. SMART AGRICULTURE GREENHOUSE YAM PLANTING TEMPERATURE DETECTION AND CONTROL SYSTEM
To avoid mutual interference between the modules and reduce the coupling degree between the modules, from the perspective of the system level, the system adopts a three-layer architecture, mainly including the perception layer, the middle layer, and the application layer, as shown in Figure 2. The perception layer realizes the collection, transmission, and preprocessing of greenhouse environmental information and equipment information [33]. The data collected by the sensor is networked using the 485-communication protocol and the data transmission is realized through ''Digi'' technology. The sensor node is used as the terminal node to collect environmental parameter data in real-time, and the ''Digi'' coordinator with data receiving, processing, and forwarding functions is used to receive a terminal. The sensor selects the SMMZ01 meteorological multi-element louver box, which can monitor environmental values such as temperature and humidity, light intensity, CO2 concentration, etc. The controller of the data acquisition module is an industrial integrated machine, and greenhouse managers can obtain real-time greenhouse environmental information and equipment work.
The middle layer receives the data from the perception layer in real-time. When the application layer user makes a service request, to respond to the corresponding request, the data needs to be analyzed and processed. It is developed using the Abatis framework to meet the needs of multi-level users. Because data collection is frequent, the amount of data generated accumulates a lot over time. To ensure the efficient and stable operation of the system, MySQL is selected as the database for data storage. It provides web application services to greenhouse managers and system operation and maintenance personnel, monitors, and controls the temperature field changes in the greenhouse through the PC, and displays the changes in the temperature field in the greenhouse in real-time in intuitive ways such as charts and data. It is necessary to control the working conditions of hardware equipment such as sunshades, fans, and wet curtains. At the same time, when managers query historical data, the data can be exported in various forms, which is convenient for managers to study and analyze changes in the indoor environment. Yam has strong adaptability to soil, and can grow in almost all soils. The adaptability range (PH value) of yam to alkalinity is between 6 and 7.5. Loam soil is most suitable.
The greenhouse environment monitoring module includes functions such as greenhouse environment information reading, video monitoring, and weather station information reading; the greenhouse environment control module includes functions such as sensor threshold setting, early warning information and equipment fault display, timing sets, and hardware equipment control logic setting [34]. The equipment management module includes functions such as greenhouse external equipment management, greenhouse control equipment management, and greenhouse area management; the greenhouse resource management module includes functions such as news, planting plans, yield estimates, and production logs.
When the system starts to work, use ''Digi'' to transmit environmental signals and equipment signals, set networking conditions to screen the signals, and establish a wireless sensor network for smart greenhouses. The main node of the wireless sensor network summarizes the transmitted signal data and transmits the signal under the condition of completing the preprocessing of the signal. In the whole process, the main sensor aggregation node needs to meet the following work requirements: undertake network work, complete data aggregation, perform preprocessing, and complete signal transmission, as shown in Figure 3. The data stream is the collection of data transmission along with the time series. Its movement direction is from bottom to top. After collecting the underlying information of sensor data and device information, the server preprocesses the data and transmits the data to the computer application interface. When the administrator makes a control plan, the coordinator controls each actuator. The control process is from top to bottom. The controller receives the multi-element sensor shutter box and transmits the environmental parameter data in the greenhouse through the ZigBee network, and associates the data with the data of the environment parameters in the greenhouse. The set parameter thresholds are compared and analyzed, and the corresponding equipment is controlled by the relay to adjust the environmental parameters.
Considering the accuracy of equipment operation, the control part is subdivided into three parts: manual control, timing control, and automatic control [35]. Manual control requires manual operation of the equipment, and remote control is controlled through the management platform; automatic control is through the set control logic, when the logic requirements are met, the operation and stop of the equipment are automatically controlled; timing control is to set the control logic based on historical data and call the clock. After the sensor or equipment signal is transmitted to the server through the gateway, the server does not set the trigger condition for the relevant information, and the relevant signal needs to be analyzed manually by the greenhouse management personnel. For example, when the temperature from the sensor has affected the normal growth of crops but has not reached the threshold of the fan or sunshade, manual operation can be performed to independently decide whether to turn on the relevant equipment.

V. VALIDATION METHOD DESIGN
The most basic function of a temperature sensor is to detect the ambient temperature and convert it into an output signal. As the core device for measuring temperature, many different temperature sensor types have been extended according to different needs. Among them, the thermocouple is the most widely used temperature sensor, but its accuracy is relatively weak compared with the thermistor sensor. Similarly, users can also choose contact sensors and non-contact sensors according to their measurement needs. According to the specific environmental conditions in the greenhouse and the measurement requirements of the system for the temperature sensor, DHT11 is finally selected as the temperature sensor of this design. VOLUME 11, 2023   The median filter algorithm was written, and the simulation experiment was performed on the temperature data. The simulation results are shown in Figure 4 below. It can be found that the temperature data has not changed. In the original data curve, it can be found that the ''maximum'' data is likely to be a gross error. It can be found in the curve after median filtering that the ''maximum'' data is a gross error. After being smoothed, it will not affect the second-level data fusion, and cause a large error in the adaptive weighted fusion. It is supposed to send data acquisition instructions to the sensor through the serial port. Due to the characteristics of DHT11, it will save the data acquired last time, so it needs to issue data acquisition instructions twice, and the second temperature data is the current real ambient temperature data. The data sent by the serial port is received through the microcontroller development assistant. Generally, the acquisition instructions and the data sent back are in hexadecimal, and we need to convert the hex to the real data of the temperature. By assigning different weights to different sensors, adaptive weighted average fusion expresses the degree of trust in the data of each sensor. The algorithm has less space and time complexity and effectively solves the problem of large data redundancy, and the accuracy of the fusion results is also improved. Relatively high, it is suitable for the current fusion of similar data in plant factories.
Through the fusion of multi-sensor data of the same kind, data redundancy is reduced, the impact of environmental noise on environmental data collection is reduced to a certain extent, and the accuracy of data is improved. Firstly, a median filter is used to non-linearly smooth the collected raw environmental data, and the data with large errors are smoothed. The purpose of this is to preserve the data details and ensure the integrity of the data collection format. Secondly, using the adaptive weighted average algorithm to fuse the preprocessed data, an accurate and consistent fusion value of a certain environmental parameter is obtained, which represents the optimal target value of the current environmental parameter of the plant factory. By establishing a two-level data fusion model, a solid foundation is laid for the subsequent actual data fusion experiments.
In the initial stage of software program design, it is necessary to count and confirm the type and specific name of user data storage. Standardized database design can pave the way for the next step of program development. After the system is put into use, a large amount of data will be generated in the stage of environmental data monitoring and ginseng experimental data collection. According to the different data types, they will be classified and stored in the corresponding data table to complete the basic data storage function. The data acquisition and update operations of the entire system 38188 VOLUME 11, 2023 Authorized licensed use limited to the terms of the applicable license agreement with IEEE. Restrictions apply.  are all inseparable from the frequent interaction between the system and the database, and the database occupies a key position in data storage. A good database design will affect system performance, function usage, and interface display effect. The integrity and authenticity of the data are very important for the practicability of the application system. The collection of environmental parameter data and the storage of ginseng experimental data are based on a large amount of data. To solve the problem of reasonable storage of the huge amount of data, the system needs a database with a clear structure and a compact structure as the support for data storage.

VI. RESULTS ANALYSIS A. GREENHOUSE SENSOR DATA FUSION PERFORMANCE RESULTS
Collect the original traffic data, the original data has been abnormally marked by expert diagnosis, and deal with missing values; combine the sliding time window to divide the period; according to the abnormal cycle, carry out the cluster analysis of the traffic in the same time interval period to obtain the classification Features; supervised learning method is used to establish a leak detection model. In the actual detection process, the input traffic data at a certain time, query the traffic data of the previous 0.5 hours, 1 hour, and 1.5 hours, calculate the abnormal traffic probability in the corresponding period respectively, calculate the probability of abnormal traffic at the current moment by weighting and comprehensively calculate the probability of traffic abnormality at the current moment, and query the system The set leakage confidence level is used to judge whether there is leakage during this period. If there is leakage, a leakage alarm will be issued on the intelligent agricultural information monitoring service platform.
By comparing the relative errors of the adaptive weighted fusion algorithm and the arithmetic average method, it is concluded that the adaptive weighted average is better in the stability and accuracy of the data, as shown in Table 1. Using the adaptive weighted average algorithm compared with the arithmetic average method, the accuracy of the data is improved by about 8%. The accuracy of the data that changes rapidly such as the light intensity is more obvious, but the CO2 concentration does not change significantly. Data, its improvement is relatively limited relative to the temperature and humidity parameters. At the same time, the collected environmental data are all real numbers, so the mean square error can also be selected as a qualitative evaluation index reflecting the accuracy of the two algorithms. The mean square error is the average of the sum of squares of the deviations from the true value of each data, which can well reflect the degree of difference between the estimator and the estimator. The comparison of the mean square errors of the two algorithms for different parameters is shown in Figure 5 below. From the comparison of the mean square errors of the four environmental parameters, it can be found that the mean square error of the adaptive weighted average VOLUME 11, 2023 38189 Authorized licensed use limited to the terms of the applicable license agreement with IEEE. Restrictions apply. data fusion algorithm is reduced by about 81% compared with the mean square error of the direct mean value, which also confirms that the adaptive weighted data processing. The latter meaning is closest to the true value.
Before data fusion, a median filter is used to preprocess the original data, and the data stability and accuracy are compared through the average algorithm and the adaptive weighted average algorithm. Compared with the average algorithm, the fusion result of the adaptive weighted fusion algorithm is closer to the actual value, and its absolute error is significantly smaller than that of the average algorithm, mainly because the direct averaging cannot avoid the zero drift, and the error existing in the sensor itself. Using the adaptive weighting algorithm, under the condition of obtaining the minimum mean square error, the weighting factor of each sensor is adaptively obtained. By setting different weights for the trust degree of different sensor data, different sensors are realized by weighting. In the data fusion adjustment, a larger weight is assigned to the sensor with high accuracy, and a smaller weight is assigned to the sensor with low accuracy, which ultimately improves the accuracy of data fusion. In summary, the experimental results show that it is necessary to use the adaptive weighted average data fusion algorithm in the plant factory, which plays an important role in reducing data redundancy and improving data accuracy, and is conducive to achieving the stability of the plant factory environment. Ensure that crops are always grown in a suitable and stable environment.
Specifically, a plant factory environmental monitoring system based on STM32 is designed and implemented, mainly including the design of the lower computer for environmental parameter acquisition and transmission system and the design of the upper computer for human-computer interaction, which realizes the all-weather environmental data monitoring of the plant factory and Facility Control. Through the system function test of the upper computer and the lower computer, the lower function can collect and transmit data normally, the upper function can display real-time environmental data normally, and can perform remote control of related control facilities, indicating that the plant factory monitoring system designed in this paper functions normally. Analyzing the data fusion experiment results, it is expected to take the data collected by the temperature sensor as an example, and conduct data fusion experiments based on the average value algorithm and the adaptive weighting algorithm. Data with high precision is given a larger weight, and the adaptive weighted average has better performance in terms of data stability and accuracy. Comprehensive analysis of the above experimental results achieved the purpose of reducing data redundancy and improving data accuracy.

B. ANALYSIS OF VERIFICATION RESULTS
A reasonable test design is a necessary guarantee for the accuracy of the system test. To verify the system more accurately, a reasonable test plan must be designed. The laboratory test platform is composed of sensor nodes, monitoring systems, and data storage units. The research object of the test is the collection, transmission, and storage of multiple environmental parameters of the meteorological multi-element shutter box in the greenhouse environment.
The main tasks are to build Zigbee wireless communication technology to complete the acquisition and transmission of sensor signals and use the built software system to test the communication function and software performance of the system. Then, the multi-element sensor shutter box of the same model is selected as the actual greenhouse and installed in the test location. The sensor node is used as the terminal node for monitoring ZigBee on site. After setting the relevant parameters through the serial port function, the main aggregation node is connected with the indoor temperature field measurement and control system application platform. After the system is connected successfully, the monitoring system application center can realize the reception, display, processing, and storage of data.
Data are exported from the system, and compare the position of the same measuring point at the same time through the hand-held thermometer. The data is updated once every 5 minutes. The results are shown in Figure 6. The system temperature readings are consistent with the handheld thermometer readings. The maximum error is 0.6 • C, and the average error is 0.3 • C. The network communication distance is tested. According to the laboratory conditions and the layout of the actual greenhouse, the influence of obstacles is considered in the communication distance test. The sensor SMMZ01 environmental monitoring sensor, which is the same as the actual greenhouse layout, is used to read and compare the signal.
After the system is implemented, it is necessary to continue to evaluate the performance of the system software, whether the functions of each module of the measurement and control system can operate normally, and whether it can meet the requirements of the greenhouse management personnel. The test results show that the system meets the expected goals and can meet the management needs of smart greenhouses. For the test of the communication signal, the test is mainly carried out through the signal acquisition, transmission, and storage of the sensor in the laboratory to ensure the safety and stability of the signal transmission. When testing the software performance of the whole system, it can complete the function test, stability test, and compatibility test of the system to meet the design requirements of the system.
To ensure the integrity and loss prevention of the experimental records, it is very important to effectively record the experimental records in the system, including the experimental time, operator, name, purpose, materials, and pictures of the process. As is shown in Table 2, The simulation results are compared with the existing experimental results. The user can upload the experiment record, or enter the experiment name to retrieve the corresponding content. This module records the experimental equipment, experimental reagents, and various office supplies purchased by the experimenter in the system according to the purchase time, purchase quantity, factory information and current equipment status, etc., to reduce the possibility of improper management of assets and equipment. During maintenance, the maintenance personnel can be notified as soon as possible to improve the effective utilization of the equipment, as shown in Figure 7.
Through the analysis of the environmental impact factors of the plant factory, this paper determines the relevant requirements of crop growth and completes the functional design and implementation of the plant factory monitoring system according to the needs of crop growth. Specifically, a plant factory environmental monitoring system based on STM32 is designed and implemented, mainly including the design of the lower computer for environmental parameter acquisition and transmission system and the design of the upper computer for human-computer interaction, which realizes the all-weather environmental data monitoring of the plant factory. Through the system function test of the upper computer and the lower computer, the lower function can collect and transmit data normally, the upper function can display real-time environmental data normally, and can perform remote control of related control facilities, indicating that the plant factory monitoring system designed in this paper functions normally.

VII. CONCLUSION
In this paper, ANSYS is used to establish a greenhouse model, and the validity of the model is verified by the comparative analysis of the simulated value and the actual value. It is proposed that through Fluent simulation when the environment inside the greenhouse reaches a stable state, the distribution changes of the interior field of the greenhouse can be obtained. The environmental value is predicted, and the abnormal position of the node is obtained based on the actual reading of the sensor, then the LEBDF algorithm is used to further screen the abnormal node, which can judge the location of the faulty node in the sensor network in time. Design the overall scheme of the intelligent greenhouse temperature field measurement and control system, choose the development mode based on MVC, divide the system into small modules according to functions, and choose My SQL for the database to realize data storage. According to the overall function design of the measurement and control system, the perceptual layer, network layer, and application layer of the system are designed and implemented in detail. The greenhouse distributed monitoring system designed in this paper has been installed in the planting base and the system function test has been completed. The currently installed system consists of a gateway connected to three information acquisition control modules, one of which is directly connected to the RS-485 bus. Access gateway, the other two modules are converted to access gateway through a repeater. After field testing, the currently installed part can continue to operate stably.
Compared with the traditional greenhouse remote control system, the system mainly has the following advantages: the mode of single-point access to the Internet by the gateway avoids the problem that the network in remote areas is not easily fully covered, and only one gateway can be connected within a radius of 2.5 km. We have not considered the results of seasons yet. In future work, we will take seasons into consideration. And monitor all information acquisition and control equipment; data transmission adopts wired and wireless hybrid mode, compared with separate wireless or wired transmission, it not only prolongs the distance of data transmission, expands the scope of control, but also avoids the problem of wiring crossing obstacles, can realize the access of more devices; the control part adopts the combination of automatic control and remote control, which can meet the needs of most users. The design of the system provides a solution for remote online management and control of planting bases in remote areas, saving labor and improving production efficiency.