| In recent years,with the gradual improvement of people’s living standards,people have a higher demand for the category and quality of agricultural products.Many seasonal and regional agricultural products have a high demand for planting land and growth environment,which requires the use of greenhouse planting.Chicken fir fungus is a typical representative.It is a kind of fungus for both medicine and food.It is rich in various nutrients and has crisp and tender meat.It is mainly distributed in warm and humid areas with rainy seasons in southern China.Therefore,in order to meet the growing food needs of people in other areas,the local chicken fir fungus greenhouse is indispensable.Under the above background,after on-the-spot investigation and investigation of the current situation at home and abroad,this thesis found that the overall trend of these planting environment parameters,such as air temperature and humidity,carbon dioxide concentration,etc.,directly affected the yield and quality of the planting of chicken fir fungus in the greenhouse.At the same time,chicken fir growers often have the demand of real-time viewing,abnormal reminding and timely feedback on various parameters of the greenhouse planting environment.Therefore,this thesis designs and implements a supervision system of chicken fir fungus greenhouse with both web and Android,and combines the Internet of things technology to collect,forward,store and display the environmental parameters of the chicken fir fungus greenhouse.The web end of the greenhouse supervision system applied to the planting of chicken fir fungus adopts the mode of separating the front and back ends in the development,in which the spring cloud framework is used at the back end and the VUE framework is used at the front end.The Android side uses Kotlin language for development.The system has designed and implemented five main functional modules:basic information management,data collection and forwarding,data display,anomaly detection and data prediction.The key and difficulty of this system is to timely and accurately collect,forward and store the environmental data of chicken fir fungus greenhouse.In view of this core requirement,the key module designed and implemented is the data collection and forwarding module.In order to ensure that the collected data can still be analyzed and forwarded efficiently and accurately when multiple collection devices are connected,Netty is selected as the processing framework of the collected data in the system.Its multiplexing thread model improves the efficiency of receiving and analyzing the collected data of the chicken fir fungus greenhouse when multiple devices are connected.At the same time,the open and concise Modbus protocol is selected as the encapsulation protocol of the original collected data.Under the framework of Netty,the system independently defines the processor,encoder and decoder with corresponding functions to realize the analysis,verification and splicing of the collected data according to the Modbus protocol.In addition,in the exception detection module,the method of regularly polling the Redis cache is used to realize the offline judgment,and the threshold comparison is made in the back-end process,so that the device exception and data exception can be found in a timely manner.Push the alarm immediately after detecting the abnormality,so that the grower can respond to the abnormal situation in time.Finally,the collected data is written into the database through the back-end,and the real-time data and statistical data are displayed on the web side and the Android side,so that the environmental parameters of the chicken fir fungus greenhouse are clear at a glance.At the same time,it is innovative to train the historical collected data through the long-term and short-term memory network and generate a prediction model to realize the trend prediction of environmental parameters in the next unit period.At present,the system has basically met the needs in the actual use process,and provided practical help for the planting supervision of chicken fir fungus greenhouse. |