Nutritional Quality and Safety Traceability System for China’s Leafy Vegetable Supply Chain Based on Fault Tree Analysis and QR Code

Leafy vegetables are consumed in most daily xdiets worldwide. As living standards improve, food quality, safety requirements, and nutrition are becoming increasingly important to consumers when purchasing leafy vegetables. This study proposes an evaluation and traceability method that can be used to track the nutritional quality of leafy vegetables. Employing the principles of the Hazard Analysis and Critical Control Point (HACCP) system combined with fault tree analysis (FTA), a traceability model for the entire production and sale process of leafy vegetables is constructed. Four common leafy vegetables, spinach, rape, lettuce, and celery are examined in this research to establish a nutritional quality index system using fuzzy mathematics subordinate function method to evaluate nutritional quality. A nutritional quality and safety traceability system based on browser/server architecture and quick response (QR) code is then designed and developed for full traceability of leafy vegetable quality. This method can ensure food safety and hygiene through the control of key factors affecting food safety throughout the entire supply chain process.


I. INTRODUCTION
Consumption of vegetables provides the majority of vitamin A and C required by the human body [1]. According to a China Industry Information report, 692.71 million tons of vegetables were consumed in China in 2018, with per capita consumption at approximately 475 kg annually. This amount exceeds the annual per capita vegetable consumption of other countries worldwide. As the country with the world's highest vegetable production [2], the status of vegetables in the daily diet of Chinese people is particularly important. From a perspective of health, leafy vegetables are an important component of the daily diet, providing the body with a variety of nutrients including minerals, vitamins, and dietary fiber [3]. The various minerals and vitamins contained in leafy vegetables can stimulate appetite and regulate the acid-base balance The associate editor coordinating the review of this manuscript and approving it for publication was Bing Li . in the body, while dietary fiber works to regulate the human digestive system [4]. High rates of agricultural product safety issues have occurred in China in recent years, including many cases of vegetable contamination affecting the health of consumers. As such, the quality and safety of leafy vegetables is receiving increasing attention from consumers. The rapid development of information technology has facilitated the use of traceability systems to effectively communicate food quality and safety [5]. Traceability technology can intuitively provide consumers with information on the quality of the agricultural products, increasing consumer trust in the product.
There are five main supply chain processes before vegetables are consumed: planting, harvesting, processing, storage and transportation, and sales ( Figure 1). Problems at any point along the production to sales process will have a dramatic influence on the quality of leafy vegetables, meaning that research into a system for full quality traceability is VOLUME 8, 2020 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ essential [6]. According to research on whole-process traceability, full traceability information can be recorded in the system to achieve quality and safety monitoring of leafy vegetables. The newly revised ''Food Safety Law of the People's Republic of China'' (2018 Edition) states that food producers and operators should collect and record production and operation information to establish a food traceability system. The establishment of a full traceability system of agricultural products from farmland to the dining table can promote the development of transparent management of the entire supply chain. This process also provides an easy method of detecting quality and safety issues in products and locating the process in which it occurs, meaning the product can be recalled with adequate time. As such, it is an effective means to ensure national food quality and safety. Vegetal or animal food traceability from the perspective of the relationship between soil-plant-animal is an increasingly important global concern.
Food quality and safety are important to human health. The focus of current research is on the use of traceability technology to obtain information on food quality and safety; however, few studies have examined the nutritional quality of leafy vegetables. Several studies have established traceability systems for the production of leafy vegetables, and these technologies primarily involve tracing information relating to quality and safety. However, few studies have examined the traceability of leafy vegetable nutritional quality information, which has often resulted in an inability to meet consumer demand for vegetable nutritional quality information. The nutritional quality of leafy vegetables primarily refers to the nutrient content of leafy vegetables. However, because leafy vegetables are diverse, the nutritional characteristics of leafy vegetables differ-often even between species. Simply comparing the contents of various nutrients does not accurately capture the nutritional quality. Therefore, there is a demand for the scientific method to be used to comprehensively evaluate the nutritional quality of leafy vegetables, which not only transmits information on the nutritional quality of leafy vegetables to consumers through the traceability system but also helps improve the commercial value of the products of vegetable production and operation enterprises.
The main contributions of this paper are as follows.
First, to develop an optimal means by which consumers could obtain information on leafy vegetable quality and safety online, we studied the entire process from the production to the sale of leafy vegetables. Specifically, we traced several different types of information across the entire supply chain and proposed a quality and safety traceability system for China's leafy vegetables. Second, as the existing traceability system lacks assessments of the nutritional quality of leafy vegetables, this study explores a method for the comprehensive evaluation of the nutritional quality of leafy vegetables, analyzes the indicators reflecting quality, proposes nutritional quality grading standards, and uses nutritional index content and the results of evaluations to characterize the nutritional quality of the products. This information is then added to the traceability system. Finally, the platform ASP.NET was used as the development language to establish a high-quality and safe traceability system based on a browser/server (B/S) architecture. Traceability information for consumers is then stored in the QR code on product packaging.
The remainder of the paper is organized as follows. Section II introduces the related works and discusses the most relevant previous findings. In Section III, the architecture of the proposed nutritional quality and safety traceability system is described in detail. Section IV presents the results of several analyses of the traceability system, including Hazard Analysis, Critical Control Point (HACCP) analysis, fault tree analysis (FTA), and the membership function method. In Section V, the implementation of the entire process of the traceability system of leafy vegetables is described, and the QR code error correction effect is verified. Finally, Section VI concludes the paper and provides possible optimization directions for further system development.

II. RELATED WORK
Vegetal or animal food traceability from the perspective of the relationship between soil-plant-animal has become an increasingly important global concern. With the advancement of science and technology and changes in market demand, understanding and improving research and developmental trends of the traceability system have played an important role in studies of the traceability system. Researchers both in China and abroad have discussed the possibility of combining traceability systems to improve the current management of food quality and safety.
Dulf et al. proposed a methodology for a vegetable food traceability system in which the area of vegetables harvested and global yield are taken into consideration [7]. Mainetti et al. proposed a web-based, low-cost traceability system for vegetable quality and safety supervision for readyto-eat fresh vegetables using a system database to manage the vegetable production process [8]. Significant progress has also been made in research on traceability systems in China. For example, Jiang et al. [9] designed a leafy vegetable tracing system based on quick-response (QR) code, Radio Frequency Identification (RFID), wireless network sensing, and other technology. This method facilitates the full tracking of the production line from seed to sales, ensuring leafy vegetable quality and safety supervision. Jin et al. [10] proposed a food safety traceability system based on the Internet of Things, in which three kinds of heterogeneous multi-source information are processed to track food safety. Lin et al. [11] proposed a food safety traceability system based on the blockchain and EPC Information Services. They also developed a prototype system that showed superior performance in tamper-proof ability, privacy protection, the degree of decentralization, and the amount of on-chain data. Numerous researchers have established traceability systems for the vegetable production process, and most have focused on the traceability of quality and safety issues. However, few studies have been conducted on the traceability of vegetable nutritional quality information; consequently, the consumer demand for such nutritional information remains unfulfilled. The nutritional contents of each vegetable are varied, and there are also often differences between vegetable species. Comparing the contents of various nutrients separately does not fully reflect nutritional quality; thus, a scientific and comprehensive method for evaluating the nutritional quality of vegetables is required. This information can then be provided to consumers through the traceability system. This process is also helpful for vegetable producers as it enhances the commercial value of their products.
To develop a feasible approach for the nutritional quality and safety traceability system for China's leafy vegetable supply chain, HACCP analysis, FTA, the membership function method, and QR code are needed to obtain foundational knowledge.

A. HACCP ANALYSIS
The HACCP system is a food safety assurance system that is recognized and accepted internationally. It is a scientific, reasonable, and systematic method for hazard identification, evaluation, and control. The HAACP system ensures quality in production, processing, manufacture, and preparation of food in consumption, as well as safety during consumption [12], [13]. Using the HACCP system can ensure the whole monitoring process is safe and scientific. The analysis of key control points provides the basis for establishing the entire process traceability system of leafy vegetables. The HACCP system is a quality and safety control methodology that comprehensively analyzes the biological, chemical, and physical hazards that may occur in all processes, and establishes control measures to minimize hazards. The system generally consists of seven steps: hazard analysis (HA), determine for critical control points (CCP), determine for critical limits (CL), establishment of monitoring procedures, establishment of corrective measures, establishment of verification, and establishment of an effective record-keeping program [14]. A comprehensive HACCP analysis can be completed using the above seven steps. The HA and CCP are used to analyze the whole process of production, storage, and transportation of leafy vegetables, which can identify potential hazards in the entire process and obtain the critical control points that require monitoring. This method provides a basis for constructing a traceability system of leaf quality and safety.

B. FAULT TREE ANALYSIS
Fault tree analysis is a graph-based logic deduction method which connects various events through logical symbols to form a tree diagram composed of logical relationships [15]. This method is used to evaluate the security of a system and is based on deductive reasoning, using the tree to represent possible breeches of the system and various causes of the incident. Qualitative and quantitative methods are employed in analysis of the accident tree to identify the main cause of the accident [15], [16]. The fault tree is made up of events which include the top event (the system's least desirable event), basic or bottom event (the smallest unit event that caused the top event to occur), non-basic events (negligible, low probability events), and intermediate event (event between top event and basic event).
In FTA, a circle is commonly used to represent a basic event, a rectangle represents a top event or an intermediate event, and a diamond represents a non-basic event. The logic symbols used to connect events mainly include AND gates and OR gates. An AND gate represents multiple events failing at the same time, causing the output event to fail. An OR gate means that a single event failed, causing the output event to fail.
The FTA process can typically be divided into the following steps: determining the analysis target, construction of the fault tree, simplifying and normalizing the complex fault tree, qualitative analysis, quantitative analysis, and summarizing FTA results.

C. MEMBERSHIP FUNCTION METHOD
The main methods of agricultural product quality evaluation include sensory quality evaluation [17], [18], mean nutritional value assessment [19], [20], principal component analysis [21], and the subordinates of fuzzy mathematics function method. Sensory quality evaluation is often influenced by subjective factors. For this method, the average nutritional assessment technique is applied to a small number of evaluation parameters, then the average amount of the detection values of nutrient composition indicators are calculated. The principal component analysis method is suitable for a large number of evaluation parameters, and in order to simplify the data structure, a new comprehensive index is sought. The linear relationship between the original indicator, principal component contribution rate, and the correlation of the index is first established to discern the index that has the greatest impact on the product. The average membership function value of fuzzy mathematics is then employed to indicate the relative quality of the comprehensive index in the evaluation. This method been used successfully in previous VOLUME 8, 2020 nutritional quality analysis of agricultural products [22], [23]. Zhang et al. used the membership function method of fuzzy mathematics to analyze and evaluate the nutritional quality of different varieties of radish, finding varieties with superior nutritional quality among 18 kinds of radishes [24]. Bai et al. also used the average membership function method to achieve an effective comprehensive evaluation of nutritional quality when investigating the correlation analysis of potato nutrients [25].
This study utilizes the fuzzy mathematics membership function method to incorporate nutritional quality into the system. According to the average membership function value of good and poor quality indicators, the higher the average membership function value of the good quality, the higher the good index content, and the better the nutritional quality. Conversely, the larger the average membership function value of poor quality, the worse the quality. The difference between the two can be used for comprehensive evaluation, which is proportional to the nutritional quality [26].
The basic steps of the membership function method of fuzzy mathematics are described as follows: 1) After determining the various nutritional quality indicators of the leafy vegetables, membership function values of the various nutritional quality indicators are calculated according to (1): where X is a detected value of an index, X max is the maximum values, and X min is the minimum values.
2) According to the membership function value of the reference value of the nutritional quality evaluation index and the membership function value of the measured value, the average membership function values of each type are individually calculated according to (2): where i is the average membership function value, j is the type of quality indicator, X ij is the j th quality indicator of the i th average membership function value, and n is the number of quality indicators when calculating the i th average membership function value.
3) The difference between the average membership function values of the two types of indicators of the reference value and the detected value is then respectively calculated as a reference difference value and a detection difference value.

D. QR CODE
The QR code is often used in the traceability evaluation process due to its text information storage capacity. By scanning the QR code with a smart phone, the consumer can easily obtain traceability information about the product. Two-dimensional code technology is also increasingly employed in the study of traceability systems. Peng et al. used two-dimensional code to carry information on planting, processing, and sales in the vegetable supply chain, making it convenient for consumers to obtain traceability information from intelligent terminals [27].
In this paper, the code rule for QR code is used with longitudinal combining of the nutritional quality information of leafy vegetables obtained during the process of quality evaluation. A different code model is utilized for different kinds of information during coding, and the resulting QR code for mobile phones can be used to communicate the nutritional quality of leafy vegetables [28]. A QR code has the following advantages: a larger amount of data can be stored in the QR code; mixed content such as numbers, characters, and Chinese text can be utilized; certain fault tolerance is provided (meaning that it can be read normally after partial damage); it contains high space utilization.
During the processing of leafy vegetables, the complexity of the environment may cause QR code malfunction, so the error-correction ability of the QR code is important. The error-correcting code of the QR code is generated after the data sequence code is produced according to the errorcorrection algorithm. This error-correction code can guarantee that the symbols maintain readability after suffering staining or a certain degree of damage, to ensure the QR code retains the information.
The coding used for QR code error-correction is based on Reed-Solomon (RS) cycle error control code generation. The RS code can correct random errors and burst errors, and can be used to construct alternative code. Using RS code provides a strong error correction capability with high coding efficiency, convenient construction, a relatively simple algorithm, and is easy to implement in a digital system. It is the most effective and widely used method of error-control coding and provides a two-dimensional bar code.

III. DESIGN OF NUTRITIONAL QUALITY AND SAFETY TRACEABILITY SYSTEM FOR LEAFY VEGETABLES A. STRUCTURE OF THE SYSTEM
The overall framework of the traceability system structure established in this paper is provided in Figure 2. The system is designed from the two perspectives of production enterprises and consumers. As can be seen from Figure 2, the entire traceability system is divided into the information collection layer, information processing layer, service layer, and user layer.
The information collection layer is mainly used to collect information about planting, harvesting and processing, storage and transportation, sales, origin detection, and market or supermarket entry detection recorded by enterprises that produce and circulate leafy vegetables. A product file will then be created using this information and uploaded to the traceability center database by the information processing layer to save or create traceability information. The service layer refers to the terminals that can provide traceability information, including smart phones, computers, and query terminal machines provided by the supermarket. The user layer is an interactive system that allows producers, operators, and consumers to carry out the transmission of information.
According to the overall design of the system, the seven functional modules of the quality and safety traceability system are illustrated in Figure 3. The planting information management module includes information on the production site environment, seed type, planter, and field management; the harvesting and processing information management module includes the records of harvesting information, processing information, packaging information, and operator information; the storage and transportation information management module includes information on storage and transportation methods and conditions, as well as management and transportation; the producer/pre-marketing detection information management module covers the detection information of quality and safety indicators of the leafy vegetables at the production site and before entering the market, as well as the nutritional quality evaluation results at the production site; the traceability information query module includes producer information, with quality safety and nutritional quality information stored in a two-dimensional code for consumers to access using smart phones; the login module predominantly refers to the verification of the user's identity, distinguishing the consumer user from management personnel and setting access rights.

B. SYSTEM DATABASE
The trace information and data of the leafy vegetables is the basis for constructing the entire traceability system. A system data flow chart is then created according to the structure and function design results of the quality and safety of leafy vegetables. Figure 4 illustrates how each process is generated in the system. Corresponding information must then be entered into the traceability system. According to the results of HACCP and FTA, it is necessary to collect the business information data of key points including field management, production place, quality and safety detection, and storage and transportation before the market, to ensure quality and safety traceability.

A. HACCP ANALYSIS RESULTS
According to the HACCP principle, this study analyzes the potential hazards of leafy vegetable planting, post-harvest processing, storage, transportation, and sales. The following Table 1 summarizes the potential hazards for leafy vegetables in circulation. Utilizing the principle of HACCP, the potential hazard is judged on whether it is a critical control point or not.
Results of the hazard analysis confirm that the key control points in the process of leaf vegetable production and distribution are origin selection, field management, production place inspection, storage, transportation, and supermarket inspection.

1) RESULTS OF FAULT TREE CONSTRUCTION
In this study, the peak event is identified as the problem affecting the quality and safety of leafy vegetables. The intermediate events and the basic events are confirmed by the analysis of the event, layer by layer. Qualitative analysis of the tracing process of leafy vegetables, including planting, post-harvest processing, quality and safety inspection, storage, transportation, and sales is then undertaken to determine intermediate events. Basic and non-basic events are connected to top events through logical events [19], as shown in Figure 5.
Before qualitative analysis of the fault tree can be undertaken, simplified and normalized processing is first performed. Pretreatment can reduce computational complexity and improve the analysis speed of the fault tree. Simplification mainly refers to the removal of redundant events and logical gates. The events are represented by code for further normalization such that the fault tree contains only top events, intermediate events, and basic events, as well as AND gates and OR gates [29]. The normalized fault tree is shown in Figure 6.

2) QUALITATIVE ANALYSIS RESULTS OF FTA
The main purpose of qualitative analysis of the fault tree is to identify all the minimum cutsets. The higher the number, the less reliable the system is. In this paper, the descending method (Fussell-Vesely) and Boolean algebra method are used to determine the minimum cutset [30] [31].
The steps to determine the minimum cutset based on descending method are shown in Table 5. The top event T is the OR gate, and the top events M1∼M5 are written in a column. The above five intermediate events are then searched individually. For example, the M1 is OR gate, and its three input events M6, M13, and M14 are written in one column. All M6, M13, and M14 are AND gates, and these input events are written in a line, respectively. Under M2 is the OR gate, and the input event is written into a column. Under M9 is the AND gate, and the input event is written as a line. Under M3 is the OR gate, and the basic events X2∼X5 are written into one column. Under M4 is the OR gate, M10, M11 are written as a column, M10 and M11 are all AND gates, and the input events are put into one row, respectively. Under M5 is the AND gate, and the input events are put into a row.
According to Table 2, it can be concluded that all cutsets of the fault tree are:  The minimum cutset obtained by Boolean algebra method is as follows: It can be seen that the minimum cutset obtained by Boolean algebra method is identical to the the cutset obtained by the descending method. Therefore, the 12 minimum cutsets of the fault tree in this paper are: The number of minimum cutsets can reflect the degree of danger to the system and the leafy vegetable quality. The safety fault tree includes 12 minimum cutsets, indicating that the system is more dangerous. The minimum cutset is of great significance for reducing the possibility of problems in the traceability process of leafy VOLUME 8, 2020  vegetables. According to the definition of the minimum cutset, it is known that quality problems of leafy vegetables will not occur when at least one basic event in the minimum cutset does not occur, or the occurrence probability is significantly reduced.
A single point of failure can be eliminated by removing the first-order minimum cutset [32]. The 12 minimum cutsets of the single-leaf vegetables quality and safety fault tree are the first-order minimum cutsets, indicating that the basic events {X12}, {X2}, {X3}, {X4}, and {X5} are most likely to cause the top event to occur. The first-order minimum cutset has a great influence on the reliability of the system, so the primary objective is to eliminate it as must as possible.

3) QUANTITATIVE ANALYSIS RESULTS OF FTA a: RESULTS OF STRUCTURAL IMPORTANCE ANALYSIS
The important coefficient of each basic event is calculated according to the above formula, then all basic events are sorted according to the calculation result. This process determines which basic events need to be monitored in the fault tree, and proposes control measures to improve system reliability. The importance of the quality and safety of leafy vegetables constructed in this paper are analyzed during this process, and the ranking results are provided as follows: The above results show that the basic events X2∼X5 (detection process) and X12 (harvesting process) are the events which have the highest structural importance for all basic events. Additionally, these events all belong to the first-order minimum cutset in the fault tree, which can easily affect the reliability of the system and require the most monitoring attention. The structural importance of the basic events in the planting process is generally low, and the structural importance of the basic events in the post-harvest processing, storage, transportation, and sales process is at an intermediate level.

b: RESULTS OF PROBABILITY IMPORTANCE ANALYSIS
According to the previously outlined structural importance and probability importance analysis methods, the importance analysis of the quality and safety fault tree of leafy vegetables is carried out. Table 3 lists the specific contents of each basic event in the fault tree and calculates the probability of each basic event degree. This paper lists the probability of occurrence of each basic event by summarizing the data of the predecessors and the opinions of experts. According to the data, the probability of occurrence of a fault caused by human factors in the basic event is set to 0.003 (3.00 × 10 −3 ), and the probability of occurrence of an event caused by other factors is set as the relative probability. Thus, the analysis of probability importance can be performed and the basic event with a greater degree of influence on the top event can be determined.
Based on results presented in Table 3, the following conclusions can be drawn: a. The leafy vegetable quality and safety failure tree top event occurrence probability is P(T) = 0.01495.
b. Probability importance analysis results can reflect which basic event probability reduction can reduce the top event probability. The results show that for the basic events X2, X3, X4, X5, and X12, probability changes have a greater impact on top event probability change. Larger risk factors require more monitoring and specific actions taken to prevent top events from occurring. The influence of X9, X24, and X25 is relatively small, and the remaining events are moderately affected.
c. With the development of agriculturally related technologies, the probability of basic events involved in the whole process of leafy vegetable traceability may alter, resulting in changes to the analysis of probability importance.
Based on the analysis of structural importance and probability importance of the fault tree of leafy vegetables, it can be determined that, among the various factors that cause leafy vegetables to be unable to circulate due to either quality or safety issues, the key control point is pre-marketing detection which is the last process before entering the market, and must be tested in strict accordance with the given standards. The use of fertilizers during the planting process is also a key monitoring point. Although the impact of different basic events on the top event varies, to ensure the reliability of the system, it is still necessary to consider all influencing factors and propose preventive and control measures to trace the quality and safety of leafy vegetables.

C. RESULTS OF NUTRITIONAL QUALITY CLASSIFICATION OF LEAFY VEGETABLES
Using the fuzzy function subordinate function method to process the reference values of the four leafy vegetables nutritional quality indicators, the membership function value of each index is calculated, and the results are provided in Table 4. The average membership function value is also calculated as a grading standard for comprehensive evaluation, and the grading results of leafy vegetables nutritional quality are shown in Table 5.
According to the proposed evaluation method, the data is then substituted for verification. In this investigation, leaf lettuce from Beijing Xiaotangshan, purchased from Beijing Century Hualian Supermarket, was used as a sample. The chemical quality index was tested according to the detection method described above. The test results are presented in Table 6, from which the membership function values of the respective nutritional quality indicators were calculated.
The average membership function values and differences of the two types of indicators were further calculated and compared with the reference value of the lettuce nutritional quality index ( Table 7 ). The nutritional quality of the sample was then comprehensively evaluated according to the classification results of the nutritional quality of the leafy vegetables.
According to the comparison results in Table 6, the nutritional quality of the leaf lettuce purchased at the supermarket was comprehensively evaluated. Vitamin content of the lettuce was evaluated according to a comparison of the average membership function value of the good quality index with the reference value. Nutrient quality indicators were also assessed, e.g., it was found that mineral elements present were in the middle-upper level. The average membership function value of the adverse quality index was greater than 0.5, indicating that the content of nitrates in the evaluated lettuce was too high, affecting the nutritional quality. It can also be observed that the difference between the two is small, at less than 0.1, so the nutritional quality evaluation result of the lettuce sample was judged to be poor.

V. SYSTEM IMPLEMENTATION AND ANALYSIS A. IMPLEMENTATION OF THE WHOLE PROCESS TRACEABILITY SYSTEM OF LEAFY VEGETABLES
This study combines the quality and safety traceability model of leafy vegetables using ASP.NET as the development language, and develops a full-track traceability system for leafy vegetables based on B/S architecture for production managers and consumers. The system can provide key information on important monitoring processes in the production, processing, storage, transportation, distribution, and sale of leafy vegetables. The main interface of the system includes homepage, traceability code query, standards for vegetable safety, news, and technical services, as shown in Figure 7. The user can log in through the homepage, then the code query is used to access traceability information by inputting the traceability code ( Figure 8).
Trace information of the leafy vegetable provided to the customer, including producer, quality, safety, and nutritional information, is stored in two-dimensional code which has the capacity to store the most text information (Figure 8).
The consumer only needs to scan the QR code with a smartphone to enter the traceability platform and access a large amount of traceability information. Figure 9 provides the information (seeding, prevention, irrigation, fertilization, nutrition) obtained by scanning the traceability QR code with WeChat.

B. QR CODE ERROR CORRECTION TEST RESULTS
The QR code on the package of vegetables may be damaged during the packaging, transportation, and marketing of products. The error correction ability of QR code can guarantee   some degree of recognition, but it will be hard to recognize the code if there is significant damage. The recognition rate of QR code was tested using different error correction levels in VOLUME 8, 2020 combination with different damage conditions to determine the suitable error correction level (L, M, Q, H). The test picture is shown in Figure 10. Damage condition was tested at 5%, 10%, 15%, 20%, 25%, and 30% in this research. Figure 11 shows the pretext process results of the samples which were damaged (breakage and defacement) at 15% condition under four error correction levels, L, M, Q, and H. Each damage condition of the samples was tested 25 times. The recognition results of the samples with different breakage condition for different error correction levels are provided in Table 8, and the recognition results of the samples with different defacement condition for different error correction levels are provided in Table 9.  As shown in Figure 12, the recognition rate of the QR code generated by different error correction levels can be calculated according to the results of Tables 8 and 9. To further explore the recognition ability of QR codes generated by H-level, a damage location test was conducted. In the test, 25 predicted break points were uniformly searched on the generated QR code (Figure 13(a)) for 5%, 10%, 15%, 20%, 25%, and 30% breakage tests. The recognition rate under different damage conditions is shown in Figure 13(b) and Figure 13(c).
By comparing the test results above, the following conclusions can be drawn: a. Comparing the tested pictures illustrates that the higher the error correction level, the more error correction code characters are added to the encoded text in the QR code, resulting in more complicated coding patterns.
b. The QR code generated with the error correction level H still has certain recognition ability when there is about 30% damage, and the recognition abilities of the QR code generated by levels L, M, and Q are severely degraded at 10%, 15%, and 25%, respectively. Therefore, from a single consideration of recognition performance, the error correction level H is the best QR code error correction level.
c. Regardless of error correction level, the generated QR code exhibits higher recognition ability when subjected to 5% breakage or defacement. For QR codes generated by the same error correction level, the defaced QR code is more capable of being identified than the broken QR code when the damage area is higher than 5%.
d. If the points P1, P5, and P21, which represent the position detection graphics, are damaged by more than 5%, the QR code loses the ability to be recognized. Therefore, the QR code should be placed in the position of the packaging bag where the three points will not be easily broken or defaced.

VI. CONCLUSION
According to the analysis and research carried out in this paper, the following conclusions can be obtained: a. A traceability model for quality and safety of leafy vegetables was constructed based on the HACCP system and FTA method. The key control points in the leaf-vegetable production-transport-sale process were obtained using HACCP analysis. Qualitative and quantitative analysis on related events was then conducted using FTA. According to the analysis results, it can be seen that in the process of field management and storage and transportation, the safety interval between the production environment, field management, harvesting process, place of production, and inspection by the supermarket are the key points that require monitoring in the traceability process. By monitoring these processes, problems can be discovered in time, thereby improving the reliability of the entire traceability process.
b. An index system for nutritional quality evaluation was constructed according to the nutritional quality characteristics of leafy vegetables. Specific nutritional quality indicators were determined according to the nutritional characteristics of four common leafy vegetables. The Chinese national standard was chosen as the detection method to determine each nutritional quality index. The membership function method of fuzzy mathematics was then used to evaluate the nutritional quality of leafy vegetables, allowing the leafy vegetables to be graded according to their nutritional quality. The results of the nutritional quality evaluation can be used as the nutritional quality information within the entire traceability system, which improves the traceability information of the system. c. A traceability system for the quality and safety of leafy vegetables was both designed and realized. The ASP.NET framework was used as the development language to create a quality and safety traceability system for leafy vegetables based on B/S architecture which provides comprehensive traceability information. Consumer information, including records, inquiries, and nutritional quality information, was then stored in a two-dimensional code. This method enables the consumer to use a smart phone to scan the code of leafy vegetables to quickly obtain traceability information of the product.
YUHONG DONG received the B.S. degree in agricultural mechanization and automation from Shandong Agricultural University, China, in 2016. She is currently pursuing the master's and Ph.D. degrees with the College of Agricultural Engineering, China Agricultural University, Beijing, China, in 2017. Her research interests include the measurement of soil nutrients, the model algorithm for calculating the amount of fertilization, and the improvement of fertilization devices. She also aims to establish a fertilization system by which automatic fertilization can be realized when the machine obtains soil information feedback. Her awards and honors include a second class scholarship for her master and Ph.D. studies at China Agricultural University.
ZETIAN FU received the B.S., M.S., and Ph.D. degrees in agricultural engineering from the Agricultural Mechanization Institute, Beijing, China, in 1982China, in , 1984China, in , and 1988, respectively. From 1995 to 2014, he was a Full Professor and the Vice President with China Agricultural University, where he has been a Full Professor with the Yantai Institute, since 2014. His research interests include the application of information and communication technology in agro-food quality and safety traceability systems and mobile terminal oriented agricultural information service integrated technology. He has led and contributed to over 40 research projects funded by national and international organizations. His projects have been highly recognized by different level academic organizations and the government, with more than 11 books and over 200 research articles been widely published in both national and international journals.
STEVAN STANKOVSKI (Member, IEEE) received the B.S. degree in electrical engineering from the University of Novi Sad, Novi Sad, Serbia, in 1987, the M.S. degree in computer science and automation and the Ph.D. degree in intelligent automated systems from the University of Belgrade, Belgrade, Serbia, in 1991 and 1994, respectively. Since 1987, he has been an Assistant Professor and a Full Professor with the Faculty of Technical Sciences, University of Novi Sad. He has hosted or participated in 14 national research projects and is the author of three books and more than 12 articles. His work is focused on the development and analytical and research skills of mechatronics, intelligent systems, automation, and identification. He is a member of International TEAM Society. SIYU WANG received the bachelor's degree from the College of Food Science and Technology, Nanjing Agricultural University, China, in 2014, and the M.Sc. degree in engineering from the College of Technology, China Agricultural University, Beijing, China, in 2016. Her work is predominantly focused on evaluation of the nutritional quality and the whole process quality traceability system of leafy vegetables. She aims to use the principle of HACCP and fault tree analysis method to establish the whole process tracing model of leafy vegetables and study the evaluation of leaf vegetable nutritional quality by establishing an index system of leaf vegetable nutritional quality.
XINXING LI received the B.S. degree in information management and information system from the Shenyang University of Chemical Technology, Beijing, China, in 2006, and the Ph.D. degree in agricultural engineering from China Agricultural University, Beijing, in 2012. Since 2014, he has been an Associate Professor with China Agricultural University. He has presided over or participated in seven national research projects and published 15 articles as the first author. His research interests include agricultural information, nondestructive testing of meat freshness, and the application of spectroscopy in agricultural production. He has won the Dabei Agricultural Technology Innovation Award and the Ministry of Education Science and Technology Progress Award in China. VOLUME 8, 2020