Applied Research of IOT and RFID Technology in Agricultural Product Traceability System

. In recent years, more and more attention has been given to the safety of agricultural products, whose demands for the traceability system are increasingly urgent. This paper, in response to the demands, by using the C# programming language, database technology, IOT technology and RFID technology, realized the traceability system of agricultural products, and explained the implementation of network technology and RFID technology in detail. The traceability system can complete the functions of data collection, early warning, control and data automatic input & management during the production process. This system can well solve the problem of data entry in the farming operation, timely and effectively record the information involved in the production of agricultural products, which can ensure the authenticity of the data in the traceability system.


Introduction
With the improvement of people's quality of life, the agricultural products circulation are facing new situations esp.after China entered the WTO, and the security of agricultural products has caused more and more people's attention [1]. Because China is a large agricultural country, agricultural products' export plays an important role in the foreign trade of China. In recent years, vegetables, tea, mushrooms, meat, canned food and other agricultural products and processed food, which Chinese exported to America, Japan, the European Union and other countries, have had quality problems, which not only makes China suffer huge economic losses but also makes the exported agricultural products of China lose good reputation [2]. Traceability system is the important measures and guarantee to promote the production information transparency, improve the health and safety of agricultural products and increase the market competitiveness of agricultural products [3][4]. In recent years, some domestic experts, from the perspective of information technology, taking the primary products of some vegetables as the research objects, has constructed the traceability system for safety production & management and quality of vegetables, has discussed the key technologies. Some of them has founded the traceability procedure taking the agricultural retrospective codes based on geographical coordinates and multiple encryption as the encoding, and some of them has founded the quality and safty traceability system of agricultural products, which depending on mobile phone 2D barcode recognition. At abroad, there also has some research on the product traceability system, such as the Australian animal identification and traceability system, food traceability system in Japan, the EU beef traceability system, American full traceability system for agricultural products and the Swedish agricultural products traceability management system [5][6][7][8][9][10][11][12][13][14][15]. Based on the above literature, it can be seen that the domestic and foreign experts and scholars have made some achievements in the aspects of vegetable traceability system,but since the complexity of the manufacturing process of agricultural products, the validity and objectivity of data acquisition would not be safeguarded. The IOT technology and RFID technology can solve this problem to a certain extent, which is the research direction of this paper.

The structure of vegetable traceability system
The traceability system for the overall structure is shown in Fig.1. The system obtains the data from the process of vegetable production by the IOT and RFID system and record them truly and effectively to avoid manual intervention.

Data Acquisition of Vegetables Environment
One of the main process of data acquisition and storage: hardware gathered the data through the wireless network to the specifized gateway,finaly data which is collected will be transmitted the specified IP address (i.e., IP address of the server).The server opens a monitor to create a TCP connection with hardware gateway first and then listens to data sent from the hardware gateway (the process as shown in Fig.  2).Through data packets which is obtained from remote gateway, corresponding recognition and resolution are made to get a variety of distance parameter which we want.Because the node identifier of the corresponding hardware is exclusive, so the data acquisition of hardware packet is done by extracting the hardware identifier, then we can know an exact hardware belongs to which user when the data is compared one to one in the database. After various related parameters are gained, the collected data is stored in the database according to the original construction of the data table in order to inquire and analyze the data later. Meanwhile, the split of the data in chart form is reflected in the user interface to more directly show the changing various parameters in greenhouse condition.

Message Warning Model
When the server and remote hardware sensor connection is successful, through the analysis of relevant data transmission by remote hardware package, a rough picture of the remote environment can obtain in real-time. Each of the parameters of environment inside will be compared with the critical parameter values in the database.When either higher or lower than the critical value, we will send the corresponding message alerts to the users which the hardware of monitoring node belonged to. Surely, we have to be ready for this critical value given by experts, according to the data, we finally will be got the up-and-low range monitoring parameters by the variety of vegetables planted in a greenhouse with the parameter and the day (day and night), cloud or snow, crop planting stage. According to above, this domain system automatically decide whether to send the messages to the user to achieve intelligent early warning.

Equipment Control
When the early warning information is generated, the remote client through the establishment of communication can submit the instruction of opening or closing to the server and the server will transform the command into control information and then transmitted to the wireless sensor network. After the device receives the control information, the command will be taken into effect. But once a remote hardware changes, the server will send the implementation of results to the client. Meanwhile, for the sake of security, the server will also send the message to the exclusive user. .

The application of the IOT technology and RFID technology
This article, using the C# programming language and the database technology,data bank technology, has realized the data collection, early warning, control in the process of the growth and management of vegetable in the traceability system (e.g. Fig.3, shown in Fig.4), and, using the RFID technology, has realized the effective input of data from vegetables' packing, the processing and transportation to avoided the disturbance from artificial operation, to safeguard the data authenticity and to form the traceable vegetables file information as shown in Fig.5.

Conclusions
The system, Using network technology, has realized the automatic acquisition of soil temperature and humidity , air temperature and humidity, illumination and CO2 concentration and so on. The system,depending on whether the collected data can produce early warning, can decide whether need control the corresponding devices to operate, such as rolling machine, irrigation etc. In the process the resulting data is automatically stored in the database, we can understand the process of vegetable production environment and production data for data security, from vegetable traceability system. Through the electronic tags and smart card access to get information and storage, using RFID technology for The farming operation (when or where to use pesticide, packaging, processing and transportation process), packaging, processing and transportation process of vegetable production. RFID technology, reduces artificial complex operation, reduces the information is not timely and not accurate, has solved problem of information reliability in traceability system.