# Design of Safety Evaluation and Risk Traceability System for Agricultural Product Quality
## 3 Construction of Risk Traceability System  
### Systematic Traceability Methods  
The basis of agricultural product quality and safety traceability is the establishment of a traceability system and a traceability business process designed in accordance with the form of distribution of agricultural products. A perfect traceability system and scientifically designed traceability methods can support the better establishment of an agricultural product quality and safety traceability system so as to realize the needs of meeting the safety supervision of agricultural products.  
Traceability system refers to relying on public service platforms, from the collection of commodities from production, trade, and circulation to the consumer of the whole process of the fragmented quality information. The use of big data analysis and cloud computing means, the formation of standards and quality as the core content of the whole chain, and a closed-loop large quality management mechanism will achieve the true transmission of commodity value [22]. There are two types of traceability processes, forward and reverse traceability; that is, the distinction is made according to the order in which the distribution of agricultural products from the upstream link to the downstream link is traced.  
Traceability of the quality and safety of agricultural products, on the other hand, is a process of reverse traceability, that is, from the consumer to the planting base [23]. Agricultural products from the planting base to the hands of consumers need to go through a number of flow links such as processing, transportation, etc. [24; 25], and at the same time will produce different data information.  
The business flowchart of agricultural product quality and safety traceability is shown in Figure 2. The current distribution model of agricultural products consists mainly of producers, processors, wholesalers, distributors, and consumers [26]. Through the traceability system, users can query the quality and safety monitoring data of agricultural products stored in the system database, as well as the quality and safety score values of agricultural products evaluated by the system. By using classical logic to quantitatively analyze the quality and safety status of agricultural products, further improvement measures can be proposed through the quantitative score analysis. The main requirements of the traceability system based on this are as follows: the entry and storage of the actual testing data of agricultural products, the querying of the data information of agricultural products by the users, the evaluation of the risk level of the input data by the system, and the labeling of the risky data for early warning, and so on. When the system is running, the user first logs in through the interface and then calls the AJAX engine to launch HTTP requests containing data parameters to the server, and the server receives the requests and then obtains the produce traceability data through SQL statements. Then, the data will be returned to the client after serialization and deserialization through JSON, and finally parsed into an interface and displayed to the user by string separation tools, so as to realize the forward tracking and reverse traceability of the agricultural product quality and safety traceability system.