A food safety traceability system and method using data model

The food safety traceability system is built through data models, high-frequency indicators and characteristic indicator thresholds for abnormal links are established, and abnormal indicators are detected in real time, which solves the problems of long time and low accuracy of food safety traceability in the existing technology, and improves the efficiency and accuracy of food safety traceability.

CN118967172BActive Publication Date: 2025-03-11上海市大数据中心
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411184131.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2025-03-11
Estimated Expiration
2044-08-27

AI Technical Summary

Technical Problem

Existing food safety traceability technologies are difficult to quickly and accurately identify the links where food safety problems occur, resulting in too long traceability, affecting food safety and consumer confidence.

Method used

The food safety traceability system is built using a data model. By tracing the abnormal food, obtaining the abnormal links, and establishing the first problem record set and the second problem record set, obtaining the thresholds of high-frequency abnormal indicators and high-frequency characteristic indicators, detecting abnormal indicators in real time, and prioritizing the inspection of abnormal links.

Benefits of technology

It improves the accuracy and efficiency of food safety traceability, reduces the risk of consumers purchasing affected food, ensures food safety and fulfills legal responsibilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118967172B_ABST
    Figure CN118967172B_ABST
Patent Text Reader

Abstract

The present invention discloses a food safety traceability system and method using a data model, and belongs to the technical field of food safety traceability. The present invention traces the food with problems, obtains the abnormal link corresponding to the food with problems; obtains a set of food problem records for each abnormal link, collects the number of abnormal indicators in the food problem records, and establishes a first problem record set and a second problem record set; in the first problem record set, obtains the high-frequency abnormal indicator of each abnormal link, and obtains the threshold of the high-frequency abnormal indicator of a certain abnormal link; in the second problem record set, obtains the characteristic indicator of the food problem record; obtains the high-frequency characteristic indicator of each abnormal link, and obtains the threshold of the high-frequency characteristic indicator of a certain abnormal link; obtains the abnormal value of the real-time abnormal indicator, and gives priority to checking the abnormal link to improve the accuracy of traceability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of food safety traceability, and in particular to a food safety traceability system and method using a data model. Background Art

[0002] In today's society, the frequent occurrence of food safety accidents has attracted widespread attention, which not only threatens public health, but also affects the rights of consumers and the reputation of the food industry. Food safety traceability is an important food safety management method. It can record, store, manage and trace the data of each link and production process to trace the links and nodes of food from production and processing to circulation and sales, so as to ensure food safety and fulfill the legal responsibility of food safety;

[0003] When consumers discover food safety problems, tracing back the entire process from the beginning takes too long, and the problematic link cannot be found in time, resulting in more consumers buying problematic food. Therefore, it is necessary to determine the problematic link based on different food problems, give priority to inspecting the problematic link, improve the accuracy of tracing the problematic link, and prevent more consumers from buying problematic food. Summary of the invention

[0004] The purpose of the present invention is to provide a food safety traceability system and method using a data model to solve the problems raised in the above-mentioned background technology.

[0005] In order to solve the above technical problems, the present invention provides the following technical solutions: a food safety traceability method using a data model, the method comprising:

[0006] Step S100: Tracing the source of the problematic food through the food safety traceability system to obtain the abnormal link corresponding to the problematic food;

[0007] Step S200: obtaining a set of food problem records for each abnormal link, collecting the number of abnormal indicators in the food problem records, and establishing a first set of problem records and a second set of problem records;

[0008] Step S300: in the first problem record set, obtain the high-frequency abnormality index of each abnormal link, and obtain the threshold value of the high-frequency abnormality index of a certain abnormal link;

[0009] Step S400: in the second problem record set, obtaining characteristic indicators of food problem records; obtaining high-frequency characteristic indicators of each abnormal link, and obtaining a threshold value of the high-frequency characteristic indicator of a certain abnormal link;

[0010] Step S500: Perform real-time detection on food. When the food detection result is abnormal, obtain the real-time abnormal value of the real-time abnormal indicator, compare the real-time abnormal value with the threshold, obtain the abnormal link, and give priority to checking the abnormal link.

[0011] Furthermore, step S100 includes:

[0012] Step S101: Whenever receiving feedback from consumers that food has safety problems, collect the corresponding food for food safety testing. When at least one food safety indicator of the corresponding food does not meet the standard, the corresponding food is determined to be abnormal food, and the food safety indicator that does not meet the standard is the abnormal indicator; collect the corresponding indicator values ​​of all abnormal indicators of the abnormal food, extract the corresponding batch number of the abnormal food in each circulation link, and generate a food problem record accordingly;

[0013] Step S102: Set to conduct food safety testing on all foods with the same batch number as the abnormal food in the fth circulation link according to the formula:

[0014]

[0015] Among them, K f Expressed as the abnormal rate of the fth circulation link, S f It is expressed as the number of abnormal foods in the fth circulation link, H f It is expressed as the total number of foods extracted in the fth circulation link. When K f When the value is ≥ the abnormal rate threshold, the fth circulation link will be marked as abnormal;

[0016] Step S103: In each food problem record, each circulation link of the corresponding abnormal food is sorted according to the circulation order, and the position of each circulation link is determined; when there are several circulation links marked as abnormal, among the several circulation links, the circulation link with the smallest position is selected and set as the abnormal link; when only one circulation link is marked as abnormal, the circulation link marked as abnormal is set as the abnormal link;

[0017] The food safety traceability system is to test all foods that have passed through this link according to the link where the problem occurs when food problems occur. Food problems include but are not limited to corruption, contamination by packaging materials, containers, and transportation vehicles, and expiration of shelf life. The abnormal indicators of food safety are collected in order to summarize the same abnormal indicators and provide data support for subsequent data analysis;

[0018] Because when food enters the circulation link, it may not be properly preserved or expired in a certain circulation link, causing problems with the food. However, most food is packed in boxes, which makes it impossible to inspect it at every circulation link. As a result, it will lead to failure to discover problematic food in time. Therefore, when problems occur with food, sampling and testing should be carried out on the same batch of food at each circulation link through which the food passes to determine which circulation link the abnormality occurs.

[0019] Further, step S200 includes:

[0020] Step S201: Collect the abnormal links of a food problem record from among all food problem records, summarize the collected abnormal links, and obtain a set of food problem records of the abnormal links;

[0021] Step S202: in a food problem record set of a certain abnormal link, collect abnormal indicators in a certain food problem record to obtain an abnormal indicator set of the certain food problem record;

[0022] Step S203: collecting the number of abnormal indicators in the abnormal indicator set of the food problem record, setting the food problem record with one abnormal indicator in the abnormal indicator set of the food problem record as the first problem record, setting the food problem record with multiple abnormal indicators in the abnormal indicator set of the food problem record as the second problem record, classifying all food problem records in the food problem record set of a certain abnormal link, and obtaining the first problem record set and the second problem record set of a certain abnormal link;

[0023] Because in one food problem record, multiple food safety indicators exceed the standard range at the same time, in order to avoid mixed analysis of single and multiple food safety indicators, it is necessary to classify them according to the number of food safety indicators to improve the accuracy of subsequent data analysis.

[0024] Furthermore, step S300 includes:

[0025] Step S301: in the first problem record set of a certain abnormal link, collect the abnormal indicators of a certain food problem record, summarize the collected abnormal indicators to obtain a food problem record set of a certain abnormal indicator, collect the number of food problem records in the food problem record set of a certain abnormal indicator, compare the number of food problem records in the food problem record sets of all abnormal indicators, and select the abnormal indicator with the largest number of food problem records as the high-frequency abnormal indicator of a certain abnormal link;

[0026] Step S302: collecting and summarizing food problem records of high-frequency abnormal indicators of a certain abnormal link, and setting the food problem record set of high-frequency abnormal indicators of a certain abnormal link as the first characteristic record set of the certain abnormal link;

[0027] Step S303: In the first characteristic record set of a certain abnormal link, the abnormal values ​​of the high-frequency abnormal indicators in a certain food problem record are collected, the collected abnormal values ​​are arranged from small to large, and the largest abnormal value is selected as the threshold of the high-frequency abnormal indicator of the certain abnormal link;

[0028] Because there may be several problem records with the same abnormal link as the judgment result, it is necessary to judge each abnormal indicator in the abnormal link to find out which abnormal indicator often appears in the abnormal link.

[0029] Furthermore, step S400 includes:

[0030] Step S401: In the second problem record set of a certain abnormal link, the abnormal value of the i-th abnormal indicator in the p-th food problem record is collected according to the formula:

[0031]

[0032] Among them, M pi It is expressed as the deviation rate of the ith abnormal indicator in the pth food problem record, m pi It is represented as the abnormal value of the ith abnormal indicator in the pth food problem record, m i is the i-th indicator threshold;

[0033] Step S402: collecting the deviation rate of each abnormal indicator in a food problem record, arranging the collected deviation rates from small to large, and selecting the abnormal indicator corresponding to the largest deviation rate as the characteristic indicator of the food problem record;

[0034] Step S403: collecting characteristic indicators of a certain food problem record, summarizing the collected characteristic indicators to obtain a food problem record set of a certain characteristic indicator, collecting the number of food problem records in the food problem record set of a certain characteristic indicator, comparing the number of food problem records in the food problem record sets of all characteristic indicators, and selecting the characteristic indicator with the largest number of food problem records as the high-frequency characteristic indicator of a certain abnormal link;

[0035] Step S404: collecting food problem records of high-frequency characteristic indicators of a certain abnormal link, summarizing the collected food problem records of high-frequency characteristic indicators, and setting the food problem record set of high-frequency characteristic indicators of a certain abnormal link as the second characteristic record set of a certain abnormal link;

[0036] Step S405: In the second feature record set of a certain abnormal link, the abnormal values ​​of the high-frequency feature indicators in a certain food problem record are collected, the collected abnormal values ​​are arranged from small to large, and the largest abnormal value is selected as the threshold of the high-frequency feature indicator of the certain abnormal link;

[0037] Because in the second problem set, each problem record has multiple abnormal indicators, so we must first determine which indicator has a larger deviation rate. The indicator with a larger deviation rate often plays a decisive role in determining the abnormal link.

[0038] Furthermore, step S500 includes:

[0039] Step S501: Perform real-time detection on the food reported by the consumer to have problems. When the detection result is abnormal, collect the food safety indicators with abnormal detection results to obtain the real-time abnormal values ​​of the real-time abnormal indicators and obtain the number of real-time abnormal indicators;

[0040] Step S502: when the number of real-time abnormal indicators is one, the real-time abnormal value of the real-time abnormal indicator is compared with the threshold of the same high-frequency abnormal indicator. When the real-time abnormal value exceeds the threshold, the abnormal link corresponding to the high-frequency abnormal indicator is preferentially sampled and detected;

[0041] Step S503: When there are multiple real-time abnormal indicators, the deviation rates of the real-time abnormal indicators are compared to obtain real-time characteristic indicators, and the real-time abnormal value of the real-time characteristic indicator is compared with the threshold of the same high-frequency characteristic indicator. When the real-time abnormal value exceeds the threshold, the abnormal link corresponding to the high-frequency characteristic indicator is preferentially sampled and detected.

[0042] In order to better implement the above method, a food safety traceability system using a data model is also proposed, the system includes a history analysis module, a record classification module, a first problem record collection module, a second problem record collection module and a real-time analysis module;

[0043] Historical analysis module: Through the food safety traceability system, the source of problematic food is traced to obtain the abnormal links corresponding to the problematic food;

[0044] Record classification module: obtains the food problem record set of each abnormal link, collects the number of abnormal indicators in the food problem record, and establishes the first problem record set and the second problem record set;

[0045] First problem record collection module: in the first problem record collection, obtain the high-frequency abnormal index of each abnormal link, and obtain the threshold value of the high-frequency abnormal index of a certain abnormal link;

[0046] Second problem record set module: in the second problem record set, obtain characteristic indicators of food problem records; obtain high-frequency characteristic indicators of each abnormal link, and obtain the threshold value of the high-frequency characteristic indicators of a certain abnormal link;

[0047] Real-time analysis module: Perform real-time detection on food. When the food detection result is abnormal, obtain the real-time abnormal value of the real-time abnormal indicator, compare the real-time abnormal value with the threshold, obtain the abnormal link, and give priority to checking the abnormal link.

[0048] Furthermore, the historical analysis module includes an abnormal food problem collection unit and an abnormal link judgment unit;

[0049] Abnormal food problem collection unit: receiving feedback from consumers that food has safety problems, collecting the corresponding food for food safety testing, and determining that the corresponding food is abnormal food when at least one food safety indicator of the corresponding food does not meet the standard, and the food safety indicator that does not meet the standard is the abnormal indicator; collecting the corresponding indicator values ​​of all abnormal indicators of the abnormal food, extracting the corresponding batch number of the abnormal food in each circulation link, and generating a food problem record accordingly;

[0050] Abnormal link judgment unit: all foods with the same batch number as the abnormal food in each circulation link are sampled for food safety testing. When the abnormality rate of the circulation link is greater than or equal to the abnormality rate threshold, the circulation link is marked as abnormal. When there are several circulation links marked as abnormal, among the several circulation links, the circulation link with the smallest position is selected and set as the abnormal link. When only one circulation link is marked as abnormal, the circulation link marked as abnormal is set as the abnormal link.

[0051] Further, the first problem record set module includes a first problem record set analysis unit and a threshold unit for calculating a high-frequency abnormality index;

[0052] First problem record set analysis unit: in the first problem record set of the abnormal link, abnormal indicators of food problem records are collected, the collected abnormal indicators are summarized to obtain a food problem record set of abnormal indicators, the number of food problem records in the food problem record set of all abnormal indicators is compared, and the abnormal indicator with the largest number of food problem records is selected as the high-frequency abnormal indicator of a certain abnormal link;

[0053] Calculate the threshold value unit of high-frequency abnormal indicators: collect and summarize the food problem records of the high-frequency abnormal indicators of the abnormal link, and set the set of food problem records of the high-frequency abnormal indicators of the abnormal link as the first feature record set of the abnormal link; in the first feature record set of the abnormal link, collect the abnormal values ​​of the high-frequency abnormal indicators in the food problem records, arrange the collected abnormal values ​​from small to large, and select the largest abnormal value as the threshold value of the high-frequency abnormal indicators of the abnormal link.

[0054] Further, the second question record set module includes a second question record set analysis unit and a threshold unit for calculating high-frequency feature indicators;

[0055] Second problem record set analysis unit: in the second problem record set of the abnormal link, the deviation rate of each abnormal indicator in the food problem record is collected, and the abnormal indicator corresponding to the largest deviation rate is selected as the characteristic indicator of the food problem record;

[0056] A threshold unit for calculating high-frequency characteristic indicators: collecting food problem records of high-frequency characteristic indicators of abnormal links, summarizing the collected food problem records of high-frequency characteristic indicators, and setting the set of food problem records of high-frequency characteristic indicators of abnormal links as the second characteristic record set of the abnormal links; in the second characteristic record set of the abnormal links, collecting abnormal values ​​of high-frequency characteristic indicators in the food problem records, arranging the collected abnormal values ​​from small to large, and selecting the largest abnormal value as the threshold of the high-frequency characteristic indicators of the abnormal links.

[0057] Compared with the prior art, the beneficial effects achieved by the present invention are as follows: through the food safety traceability system, the problematic food is traced to obtain the abnormal link corresponding to the problematic food; a set of food problem records for each abnormal link is obtained, the number of abnormal indicators in the food problem records is collected, and a first problem record set and a second problem record set are established. This method classifies different numbers of abnormal indicators into sets, which provides data support for subsequent analysis thresholds; in the first problem record set, high-frequency abnormal indicators for each abnormal link are obtained, and the threshold of the high-frequency abnormal indicators for a certain abnormal link is obtained; in the second problem record set, characteristic indicators of the food problem records are obtained; high-frequency characteristic indicators for each abnormal link are obtained, and the threshold of the high-frequency characteristic indicators for a certain abnormal link is obtained. This method obtains the threshold of the abnormal link according to different numbers of abnormal indicators, and the threshold is more accurate; real-time detection of food is performed, and when the food detection result is abnormal, the abnormal value of the real-time abnormal indicator is obtained, and different abnormal links are obtained through different numbers of real-time abnormal indicators. The abnormal links are checked first, the accuracy of tracing is improved, and more consumers are prevented from buying problematic food. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0059] Figure 1 It is a flow chart of a food safety traceability method using a data model according to the present invention;

[0060] Figure 2 It is a structural schematic diagram of a food safety traceability system using a data model according to the present invention. DETAILED DESCRIPTION

[0061] See also Figure 1 and Figure 2 The present invention provides a technical solution: a food safety traceability method using a data model, the method comprising:

[0062] Step S100: Tracing the source of the problematic food through the food safety traceability system to obtain the abnormal link corresponding to the problematic food;

[0063] Wherein, step S100 includes:

[0064] Step S101: Whenever receiving feedback from consumers that food has safety problems, collect the corresponding food for food safety testing. When at least one food safety indicator of the corresponding food does not meet the standard, the corresponding food is determined to be abnormal food, and the food safety indicator that does not meet the standard is the abnormal indicator; collect the corresponding indicator values ​​of all abnormal indicators of the abnormal food, extract the corresponding batch number of the abnormal food in each circulation link, and generate a food problem record accordingly;

[0065] Step S102: Set to conduct food safety testing on all foods with the same batch number as the abnormal food in the fth circulation link according to the formula:

[0066]

[0067] Among them, K f Expressed as the abnormal rate of the fth circulation link, S f It is expressed as the number of abnormal foods in the fth circulation link, H f It is expressed as the total number of foods extracted in the fth circulation link. When K f When the value is ≥ the abnormal rate threshold, the fth circulation link will be marked as abnormal;

[0068] Step S103: In each food problem record, each circulation link of the corresponding abnormal food is sorted according to the circulation order, and the position of each circulation link is determined; when there are several circulation links marked as abnormal, among the several circulation links, the circulation link with the smallest position is selected and set as the abnormal link; when only one circulation link is marked as abnormal, the circulation link marked as abnormal is set as the abnormal link;

[0069] For example, for the first food problem record, the order of the circulation links of the corresponding abnormal food is {1st circulation link, 2nd circulation link, 3rd circulation link}, and the 2nd circulation link and the 3rd circulation link are marked as abnormal. Since 2<3, the abnormal circulation link of the first food problem record is the 2nd circulation link;

[0070] For the second food problem record, the order of circulation links of the corresponding abnormal food is {1st circulation link, 2nd circulation link, 3rd circulation link}, and the 3rd circulation link is marked as abnormal. Therefore, the abnormal circulation link of the second food problem record is the 3rd circulation link.

[0071] Step S200: obtaining a set of food problem records for each abnormal link, collecting the number of abnormal indicators in the food problem records, and establishing a first set of problem records and a second set of problem records;

[0072] Wherein, step S200 includes:

[0073] Step S201: Collect the abnormal links of a food problem record from among all food problem records, summarize the collected abnormal links, and obtain a set of food problem records of the abnormal links;

[0074] Step S202: in a food problem record set of a certain abnormal link, collect abnormal indicators in a certain food problem record to obtain an abnormal indicator set of the certain food problem record;

[0075] Step S203: collecting the number of abnormal indicators in the abnormal indicator set of the food problem record, setting the food problem record with one abnormal indicator in the abnormal indicator set of the food problem record as the first problem record, setting the food problem record with multiple abnormal indicators in the abnormal indicator set of the food problem record as the second problem record, classifying all food problem records in the food problem record set of a certain abnormal link, and obtaining the first problem record set and the second problem record set of a certain abnormal link;

[0076] For example, in the second abnormal link, the abnormal indicator set of the first food problem record is {the first abnormal indicator}, the abnormal indicator set of the second food problem record is {the second abnormal indicator}, and the abnormal indicator set of the third food problem record is {the first abnormal indicator, the second abnormal indicator}. Then the first problem record set of the second abnormal link is {the first food problem record, the second food problem record}, ​​and the second problem record set of the second abnormal link is {the third food problem record}.

[0077] Step S300: in the first problem record set, obtain the high-frequency abnormality index of each abnormal link, and obtain the threshold value of the high-frequency abnormality index of a certain abnormal link;

[0078] Wherein, step S300 includes:

[0079] Step S301: in the first problem record set of a certain abnormal link, collect the abnormal indicators of a certain food problem record, summarize the collected abnormal indicators to obtain a food problem record set of a certain abnormal indicator, collect the number of food problem records in the food problem record set of a certain abnormal indicator, compare the number of food problem records in the food problem record sets of all abnormal indicators, and select the abnormal indicator with the largest number of food problem records as the high-frequency abnormal indicator of a certain abnormal link;

[0080] Step S302: collecting and summarizing food problem records of high-frequency abnormal indicators of a certain abnormal link, and setting the food problem record set of high-frequency abnormal indicators of a certain abnormal link as the first characteristic record set of the certain abnormal link;

[0081] Step S303: In the first feature record set of a certain abnormal link, the abnormal values ​​of the high-frequency abnormal indicators in a certain food problem record are collected, the collected abnormal values ​​are arranged from small to large, and the largest abnormal value is selected as the threshold of the high-frequency abnormal indicator of a certain abnormal link.

[0082] Step S400: in the second problem record set, obtaining characteristic indicators of food problem records; obtaining high-frequency characteristic indicators of each abnormal link, and obtaining a threshold value of the high-frequency characteristic indicator of a certain abnormal link;

[0083] Wherein, step S400 includes:

[0084] Step S401: In the second problem record set of a certain abnormal link, the abnormal value of the i-th abnormal indicator in the p-th food problem record is collected according to the formula:

[0085]

[0086] Among them, M pi It is expressed as the deviation rate of the ith abnormal indicator in the pth food problem record, m pi It is represented as the abnormal value of the ith abnormal indicator in the pth food problem record, m i is the i-th indicator threshold;

[0087] Step S402: collecting the deviation rate of each abnormal indicator in a food problem record, arranging the collected deviation rates from small to large, and selecting the abnormal indicator corresponding to the largest deviation rate as the characteristic indicator of the food problem record;

[0088] Step S403: collecting characteristic indicators of a certain food problem record, summarizing the collected characteristic indicators to obtain a food problem record set of a certain characteristic indicator, collecting the number of food problem records in the food problem record set of a certain characteristic indicator, comparing the number of food problem records in the food problem record sets of all characteristic indicators, and selecting the characteristic indicator with the largest number of food problem records as the high-frequency characteristic indicator of a certain abnormal link;

[0089] Step S404: collecting food problem records of high-frequency characteristic indicators of a certain abnormal link, summarizing the collected food problem records of high-frequency characteristic indicators, and setting the food problem record set of high-frequency characteristic indicators of a certain abnormal link as the second characteristic record set of a certain abnormal link;

[0090] Step S405: In the second feature record set of a certain abnormal link, the abnormal values ​​of the high-frequency feature indicators in a certain food problem record are collected, the collected abnormal values ​​are arranged from small to large, and the largest abnormal value is selected as the threshold of the high-frequency feature indicator of the certain abnormal link;

[0091] For example, in the second problem record set of the second abnormal link, the deviation rate of the first abnormal indicator in the third food problem record is calculated to be 60%, and the deviation rate of the second abnormal indicator is 15%. Then the characteristic indicator of the third food problem record is the first abnormal indicator.

[0092] Step S500: Perform real-time detection on food. When the food detection result is abnormal, obtain the real-time abnormal value of the real-time abnormal index, compare the real-time abnormal value with the threshold, obtain the abnormal link, and give priority to checking the abnormal link;

[0093] Wherein, step S500 includes:

[0094] Step S501: Perform real-time detection on the food reported by the consumer to have problems. When the detection result is abnormal, collect the food safety indicators with abnormal detection results to obtain the real-time abnormal values ​​of the real-time abnormal indicators and obtain the number of real-time abnormal indicators;

[0095] Step S502: when the number of real-time abnormal indicators is one, the real-time abnormal value of the real-time abnormal indicator is compared with the threshold of the same high-frequency abnormal indicator. When the real-time abnormal value exceeds the threshold, the abnormal link corresponding to the high-frequency abnormal indicator is preferentially sampled and detected;

[0096] Step S503: When there are multiple real-time abnormal indicators, the deviation rates of the real-time abnormal indicators are compared to obtain real-time characteristic indicators, and the real-time abnormal value of the real-time characteristic indicator is compared with the threshold of the same high-frequency characteristic indicator. When the real-time abnormal value exceeds the threshold, the abnormal link corresponding to the high-frequency characteristic indicator is preferentially sampled and detected.

[0097] In order to better implement the above method, a food safety traceability system using a data model is also proposed, the system includes a history analysis module, a record classification module, a first problem record collection module, a second problem record collection module and a real-time analysis module;

[0098] Historical analysis module: Through the food safety traceability system, the source of problematic food is traced to obtain the abnormal links corresponding to the problematic food;

[0099] Among them, the historical analysis module includes an abnormal food problem collection unit and an abnormal link judgment unit;

[0100] Abnormal food problem collection unit: receiving feedback from consumers that food has safety problems, collecting the corresponding food for food safety testing, and determining that the corresponding food is abnormal food when at least one food safety indicator of the corresponding food does not meet the standard, and the food safety indicator that does not meet the standard is the abnormal indicator; collecting the corresponding indicator values ​​of all abnormal indicators of the abnormal food, extracting the corresponding batch number of the abnormal food in each circulation link, and generating a food problem record accordingly;

[0101] Abnormal link judgment unit: all foods with the same batch number as the abnormal food in each circulation link are sampled for food safety testing. When the abnormality rate of the circulation link is greater than or equal to the abnormality rate threshold, the circulation link is marked as abnormal. When there are several circulation links marked as abnormal, among the several circulation links, the circulation link with the smallest position is selected and set as the abnormal link. When only one circulation link is marked as abnormal, the circulation link marked as abnormal is set as the abnormal link.

[0102] Record classification module: obtains the food problem record set of each abnormal link, collects the number of abnormal indicators in the food problem record, and establishes the first problem record set and the second problem record set;

[0103] First problem record collection module: in the first problem record collection, obtain the high-frequency abnormal index of each abnormal link, and obtain the threshold value of the high-frequency abnormal index of a certain abnormal link;

[0104] Wherein, the first problem record set module includes a first problem record set analysis unit and a threshold unit for calculating high-frequency abnormality indicators;

[0105] First problem record set analysis unit: in the first problem record set of the abnormal link, abnormal indicators of food problem records are collected, the collected abnormal indicators are summarized to obtain a food problem record set of abnormal indicators, the number of food problem records in the food problem record set of all abnormal indicators is compared, and the abnormal indicator with the largest number of food problem records is selected as the high-frequency abnormal indicator of a certain abnormal link;

[0106] Calculate the threshold value unit of high-frequency abnormal indicators: collect and summarize the food problem records of the high-frequency abnormal indicators of the abnormal link, and set the set of food problem records of the high-frequency abnormal indicators of the abnormal link as the first feature record set of the abnormal link; in the first feature record set of the abnormal link, collect the abnormal values ​​of the high-frequency abnormal indicators in the food problem records, arrange the collected abnormal values ​​from small to large, and select the largest abnormal value as the threshold value of the high-frequency abnormal indicators of the abnormal link.

[0107] Second problem record set module: in the second problem record set, obtain characteristic indicators of food problem records; obtain high-frequency characteristic indicators of each abnormal link, and obtain the threshold value of the high-frequency characteristic indicators of a certain abnormal link;

[0108] The second question record set module includes a second question record set analysis unit and a threshold unit for calculating high-frequency feature indicators;

[0109] Second problem record set analysis unit: in the second problem record set of the abnormal link, the deviation rate of each abnormal indicator in the food problem record is collected, and the abnormal indicator corresponding to the largest deviation rate is selected as the characteristic indicator of the food problem record;

[0110] A threshold unit for calculating high-frequency characteristic indicators: collecting food problem records of high-frequency characteristic indicators of abnormal links, summarizing the collected food problem records of high-frequency characteristic indicators, and setting the set of food problem records of high-frequency characteristic indicators of abnormal links as the second characteristic record set of the abnormal links; in the second characteristic record set of the abnormal links, collecting abnormal values ​​of high-frequency characteristic indicators in the food problem records, arranging the collected abnormal values ​​from small to large, and selecting the largest abnormal value as the threshold of the high-frequency characteristic indicators of the abnormal links.

[0111] Real-time analysis module: Perform real-time detection on food. When the food detection result is abnormal, obtain the real-time abnormal value of the real-time abnormal indicator, compare the real-time abnormal value with the threshold, obtain the abnormal link, and give priority to checking the abnormal link.

[0112] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0113] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A food safety traceability method using a data model, characterized in that: Methods include: Step S100: Tracing the source of the problematic food through the food safety traceability system to obtain the abnormal link corresponding to the problematic food; Step S200: obtaining a set of food problem records for each abnormal link, collecting the number of abnormal indicators in the food problem records, and establishing a first set of problem records and a second set of problem records; Step S300: in the first problem record set, obtain the high-frequency abnormality index of each abnormal link, and obtain the threshold value of the high-frequency abnormality index of a certain abnormal link; Step S400: in the second problem record set, obtaining characteristic indicators of food problem records; obtaining high-frequency characteristic indicators of each abnormal link, and obtaining a threshold value of the high-frequency characteristic indicator of a certain abnormal link; The step S400 includes: Step S401: In the second problem record set of a certain abnormal link, the abnormal value of the i-th abnormal indicator in the p-th food problem record is collected according to the formula: ; Among them, M pi It is expressed as the deviation rate of the ith abnormal indicator in the pth food problem record, m pi It is represented as the abnormal value of the ith abnormal indicator in the pth food problem record, m i is the i-th indicator threshold; Step S402: collecting the deviation rate of each abnormal indicator in a food problem record, arranging the collected deviation rates from small to large, and selecting the abnormal indicator corresponding to the largest deviation rate as the characteristic indicator of the food problem record; Step S403: collecting characteristic indicators of a certain food problem record, summarizing the collected characteristic indicators to obtain a food problem record set of a certain characteristic indicator, collecting the number of food problem records in the food problem record set of a certain characteristic indicator, comparing the number of food problem records in the food problem record sets of all characteristic indicators, and selecting the characteristic indicator with the largest number of food problem records as the high-frequency characteristic indicator of a certain abnormal link; Step S404: collecting food problem records of high-frequency characteristic indicators of a certain abnormal link, summarizing the collected food problem records of high-frequency characteristic indicators, and setting the food problem record set of high-frequency characteristic indicators of a certain abnormal link as the second characteristic record set of a certain abnormal link; Step S405: In the second feature record set of a certain abnormal link, the abnormal values ​​of the high-frequency feature indicators in a certain food problem record are collected, the collected abnormal values ​​are arranged from small to large, and the largest abnormal value is selected as the threshold of the high-frequency feature indicator of the certain abnormal link; Step S500: Perform real-time detection on food. When the food detection result is abnormal, obtain the real-time abnormal value of the real-time abnormal index, compare the real-time abnormal value with the threshold, obtain the abnormal link, and give priority to checking the abnormal link; The step S500 includes: Step S501: Real-time detection is performed on the food reported by the consumer to have problems. When the detection result is abnormal, the food safety index with abnormal detection result is collected to obtain the real-time abnormal value of the real-time abnormal index and the number of the real-time abnormal index; Step S502: when the number of real-time abnormal indicators is one, the real-time abnormal value of the real-time abnormal indicator is compared with the threshold of the same high-frequency abnormal indicator. When the real-time abnormal value exceeds the threshold, the abnormal link corresponding to the high-frequency abnormal indicator is preferentially sampled and detected; Step S503: When there are multiple real-time abnormal indicators, the deviation rates of the real-time abnormal indicators are compared to obtain real-time characteristic indicators, and the real-time abnormal value of the real-time characteristic indicator is compared with the threshold of the same high-frequency characteristic indicator. When the real-time abnormal value exceeds the threshold, the abnormal link corresponding to the high-frequency characteristic indicator is preferentially sampled and detected.

2. A food safety traceability method using a data model according to claim 1, characterized in that: The step S100 includes the following steps: Step S101: Whenever receiving feedback from consumers that food has safety problems, collect the corresponding food for food safety testing. When at least one food safety indicator of the corresponding food does not meet the standard, the corresponding food is determined to be abnormal food, and the food safety indicator that does not meet the standard is the abnormal indicator; collect the corresponding indicator values ​​of all abnormal indicators of the abnormal food, extract the corresponding batch number of the abnormal food in each circulation link, and generate a food problem record accordingly; Step S102: Set to conduct food safety testing on all foods with the same batch number as the abnormal food in the fth circulation link according to the formula: ; Among them, K f Expressed as the abnormal rate of the fth circulation link, S f It is expressed as the number of abnormal foods in the fth circulation link, H f It is expressed as the total number of foods extracted in the fth circulation link. When K f When the value is ≥ the abnormal rate threshold, the fth circulation link will be marked as abnormal; Step S103: In each food problem record, each circulation link of the corresponding abnormal food is sorted in the order of circulation to determine the position of each circulation link; when there are several circulation links marked as abnormal, among the several circulation links, the circulation link with the smallest position is selected and set as the abnormal link; when only one circulation link is marked as abnormal, the circulation link marked as abnormal is set as the abnormal link.

3. A food safety traceability method using a data model according to claim 2, characterized in that: The step S200 includes the following steps: Step S201: Collect the abnormal links of a food problem record from among all food problem records, summarize the collected abnormal links, and obtain a set of food problem records of the abnormal links; Step S202: In a food problem record set of a certain abnormal link, collect abnormal indicators in a certain food problem record to obtain an abnormal indicator set of the certain food problem record; Step S203: Collect the number of abnormal indicators in the abnormal indicator set of food problem records, set the food problem record with one abnormal indicator in the abnormal indicator set of food problem records as the first problem record, set the food problem record with multiple abnormal indicators in the abnormal indicator set of food problem records as the second problem record, classify all food problem records in the food problem record set of a certain abnormal link, and obtain the first problem record set and the second problem record set of a certain abnormal link.

4. A food safety traceability method using a data model according to claim 3, characterized in that: The step S300 includes the following steps: Step S301: in the first problem record set of a certain abnormal link, collect the abnormal indicators of a certain food problem record, summarize the collected abnormal indicators to obtain a food problem record set of a certain abnormal indicator, collect the number of food problem records in the food problem record set of a certain abnormal indicator, compare the number of food problem records in the food problem record sets of all abnormal indicators, and select the abnormal indicator with the largest number of food problem records as the high-frequency abnormal indicator of a certain abnormal link; Step S302: collecting and summarizing food problem records of high-frequency abnormal indicators of a certain abnormal link, and setting the food problem record set of high-frequency abnormal indicators of a certain abnormal link as the first characteristic record set of the certain abnormal link; Step S303: In the first feature record set of a certain abnormal link, the abnormal values ​​of the high-frequency abnormal indicators in a certain food problem record are collected, the collected abnormal values ​​are arranged from small to large, and the largest abnormal value is selected as the threshold of the high-frequency abnormal indicator of a certain abnormal link.

5. A food safety traceability system using a data model, used to implement a food safety traceability method using a data model as described in any one of claims 1 to 4, characterized in that: The system comprises: a history analysis module, a record classification module, a first problem record collection module, a second problem record collection module and a real-time analysis module; The historical analysis module: traces the problematic food through the food safety traceability system to obtain the abnormal links corresponding to the problematic food; The record classification module: obtains a set of food problem records for each abnormal link, collects the number of abnormal indicators in the food problem records, and establishes a first problem record set and a second problem record set; The first problem record collection module: in the first problem record collection, obtains the high-frequency abnormal index of each abnormal link, and obtains the threshold value of the high-frequency abnormal index of a certain abnormal link; The second problem record set module: in the second problem record set, obtains characteristic indicators of food problem records; obtains high-frequency characteristic indicators of each abnormal link, and obtains a threshold value of the high-frequency characteristic indicator of a certain abnormal link; The real-time analysis module performs real-time detection on food. When the food detection result is abnormal, the real-time abnormal value of the real-time abnormal index is obtained, the real-time abnormal value is compared with the threshold value, the abnormal link is obtained, and the abnormal link is checked first.

6. A food safety traceability system using a data model according to claim 5, characterized in that: The historical analysis module includes an abnormal food problem collection unit and an abnormal link judgment unit; The abnormal food problem collection unit: receives feedback from consumers that food has safety problems, collects the corresponding food for food safety testing, and when at least one food safety index of the corresponding food does not meet the standard, determines that the corresponding food is an abnormal food, and the food safety index that does not meet the standard is an abnormal index; collects the corresponding index values ​​of all abnormal indicators of the abnormal food, extracts the corresponding batch number of the abnormal food in each circulation link, and generates a food problem record accordingly; The abnormal link judgment unit: performs food safety testing on samples of all foods with the same batch number as the abnormal food in each circulation link; when the abnormality rate of a circulation link is greater than or equal to the abnormality rate threshold, the circulation link is marked as abnormal; when there are several circulation links marked as abnormal, the circulation link with the smallest position is selected from the several circulation links and set as the abnormal link; when only one circulation link is marked as abnormal, the circulation link marked as abnormal is set as the abnormal link.

7. A food safety traceability system using a data model according to claim 5, characterized in that: The first problem record set module includes a first problem record set analysis unit and a threshold unit for calculating high-frequency abnormality indicators; The first problem record set analysis unit: in the first problem record set of the abnormal link, abnormal indicators of food problem records are collected, the collected abnormal indicators are summarized to obtain a food problem record set of abnormal indicators, the number of food problem records in the food problem record set of all abnormal indicators is compared, and the abnormal indicator with the largest number of food problem records is selected as the high-frequency abnormal indicator of a certain abnormal link; The threshold value unit for calculating the high-frequency abnormal index: collects and summarizes the food problem records of the high-frequency abnormal index of the abnormal link, and sets the food problem record set of the high-frequency abnormal index of the abnormal link as the first characteristic record set of the abnormal link; in the first characteristic record set of the abnormal link, collects the abnormal values ​​of the high-frequency abnormal index in the food problem records, arranges the collected abnormal values ​​from small to large, and selects the largest abnormal value as the threshold value of the high-frequency abnormal index of the abnormal link.

8. A food safety traceability system using a data model according to claim 5, characterized in that: The second problem record set module includes a second problem record set analysis unit and a threshold unit for calculating high-frequency feature indicators; The second problem record set analysis unit: in the second problem record set of the abnormal link, collects the deviation rate of each abnormal indicator in the food problem record, and selects the abnormal indicator corresponding to the largest deviation rate as the characteristic indicator of the food problem record; The threshold value unit for calculating the high-frequency characteristic index: collects food problem records of the high-frequency characteristic index of the abnormal link, summarizes the collected food problem records of the high-frequency characteristic index, and sets the food problem record set of the high-frequency characteristic index of the abnormal link as the second characteristic record set of the abnormal link; in the second characteristic record set of the abnormal link, collects abnormal values ​​of the high-frequency characteristic index in the food problem records, arranges the collected abnormal values ​​from small to large, and selects the largest abnormal value as the threshold value of the high-frequency characteristic index of the abnormal link.

Citation Information

Patent Citations

  • Source tracing method for food safety

    CN108133380A

  • Full-chain food safety intelligent decision support method and system based on big data

    CN116029744A