# Design of Safety Evaluation and Risk Traceability System for Agricultural Product Quality
## 3 Construction of Risk Traceability System
### Traceability System Design  
#### 3.2.1 System Architecture Design  
The system architecture uses a B/S architecture modeled on a six-tier development framework. With the rise and development of network information technology, B/S architecture is also an improvement of C/S architecture. Compared with the traditional three-layer architecture divided into the presentation layer, business logic layer, and data access layer, the six-layer architecture for system design can better realize the design idea of \"high cohesion, low coupling\", so that the system has better compatibility and stability. At the same time, compared with the traditional three-tier system architecture, the six-tier system architecture has many advantages, mainly reflected in the maintainability, scalability, reusability, and architecture clarity of the agricultural product risk traceability system. The six-layer system architecture improves the applicability and maintainability of the design system. Each layer module can be deployed independently, which not only reduces the development cycle but also reduces the hardware requirements of the deployment server. Figure 2: Agricultural products quality and safety traceability business flow chart. The system architecture is divided into a device layer, data layer, service layer, application layer, display layer, and user layer. This makes the structure and function of the system clearer, and better adapted to the characteristics of many monitoring access devices, with a large data flow and wide range of service objects, and so on, and it better meets the actual use scenarios. The specific system architecture is shown in Figure 3.  
Compared to C/S architecture, B/S architecture is more lightweight and easier to deploy on the server. B/S architecture is technically pure HTML technology, which makes it better at integration, greatly reducing the development cycle. 1. The equipment layer is the foundation for system construction and operation. The collection of monitoring data for agricultural product risk tracing and system maintenance involves various service support devices. Dividing the equipment layer separately helps to clarify equipment interfaces and improve system development efficiency. The device layer is centered around the server, including network devices and other devices. The terminal for collecting agricultural-product-related data information is connected to the system based on actual sensors to achieve data collection. The main data collection sensors involved in the system are gas sensors, pH sensors, etc. 2. The data layer is the actual inspection data related to the quality and safety of agricultural products. A large number of circulation data will be generated during the  
Figure 3: System architecture diagram. circulation of agricultural products. Data processing is also the key to the design and development of an agricultural product risk traceability system. Dividing the data layer can refine the data processing function design, improve the efficiency of data storage and access, and then improve the speed and accuracy of traceability. The data layer roughly divides the processing data into four directions: heavy-metal-related detection data, pesticide-related monitoring data, mycotoxin-related detection data, and other data. The relevant regulatory authorities provide support for the monitoring data of agricultural product quality and safety required for the system's research and judgment; that is, they provide the detection data required by the data layer. 3. The service layer is the basic service support layer of the traceability system, which is used to connect the database and the application layer. The business functions and data transmission required by the risk traceability system involve intermediate links such as data synchronization and component implementation. Separate design and development can improve the understanding of functions during development and the reusability of functional components in the service layer.