Food safety risk early warning analysis method based on sampling inspection data

By pre-processing and building a risk scoring system for food safety sampling data, combining hazardous substance toxicity data and expert experience, a food safety risk early warning analysis model is constructed, and the problems of low data utilization rate and weak analysis and prediction capabilities in the existing technology are solved. It realizes multi-level analysis and rapid identification of food safety risks, and provides effective early warning support.

CN119294897APending Publication Date: 2025-01-10YANTAI FOODMATE INFORMATION TECH CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411387914.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

It is difficult for the existing technology to effectively integrate and analyze and deeply explore massive food safety sampling data, resulting in low data utilization and weak analysis and prediction capabilities, and it is difficult to achieve multi-level analysis and hierarchical early warning of food safety risks.

Method used

A food safety risk early warning analysis method based on random inspection data is proposed. Through data preprocessing, a risk scoring system is constructed, a food safety risk early warning analysis model is constructed, and a visual analysis and warning report is generated to realize multi-level analysis and rapid identification of food safety risks. .

Benefits of technology

It has achieved multi-level analysis and rapid identification and prediction of food safety risks, providing effective basis and support for the prevention and resolution of food safety risks, and reducing economic losses caused by food safety risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119294897A_ABST
    Figure CN119294897A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of food safety, and provides a food safety risk early warning analysis method based on sampling inspection data, which comprises the following steps of: preprocessing a selected food safety sampling inspection data set; a food safety risk early warning analysis model is constructed according to the food category risk scoring system, the sampling inspection data risk scoring system, the disqualification degree risk scoring system and the hazardous substance risk scoring system, the risk level is calculated and output, and a visual analysis early warning report is formed. According to the food safety risk early warning analysis method based on sampling inspection data provided by the invention, multilevel analysis of food safety risks and rapid identification and prediction of the risks can be realized, and effective basis and support are provided for rapid identification and early warning of the food safety risks, so that the risks are prevented and resolved, and the safety of the food safety risks is improved. And the economic loss caused by food safety risks is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of food safety, and in particular relates to a food safety risk early warning analysis method based on sampling data. Background Art

[0002] Food safety supervision and random inspections play a huge role in ensuring food safety. Massive food safety random inspection data has also become one of the important means for food production and operation enterprises and food regulatory departments to analyze food safety situations and risks. However, due to the characteristics of food safety random inspection data with diverse types, non-uniform field structures, complex standards, uneven attributes, and some missing or redundant data, it is still necessary to manually process the random inspection data to make it conform to the standards. These data problems seriously affect the normal progress of food safety risk analysis. At the same time, the current large amount of food safety random inspection data is generally based on traditional statistical principles, resulting in low data utilization, weak analysis and prediction capabilities, and difficulty in digging out the deeper impact relationships behind the data.

[0003] In addition, food safety risk analysis and early warning are important components of food safety risk management. However, the existing food safety sampling risk early warning methods generally provide risk early warnings for unqualified information (such as unqualified rates) in food safety sampling data. This can only achieve a single-dimensional early warning for food safety sampling. Usually, an early warning is issued for a certain type of product after an abnormal situation occurs in the sampling. It is difficult to comprehensively consider food safety from multiple directions and different angles, and it is impossible to play the role of graded early warning. There is a lack of effective use, analysis and mining of data.

[0004] It can be seen that how to integrate and analyze food safety sampling data and conduct in-depth mining, and how to realize intelligent analysis and early warning of food safety risks are technical issues that the food industry urgently needs to solve. Summary of the invention

[0005] In order to solve the above technical problems, the present invention proposes a food safety risk early warning analysis method based on sampling data, which can realize multi-level analysis of food safety risks and rapid identification and prediction of risks, and provide an effective basis and support for the rapid identification and early warning of food safety risks, thereby preventing and resolving risks and reducing the economic losses caused by food safety risks.

[0006] The technical solution of the present invention is:

[0007] The present invention proposes a food safety risk early warning analysis method based on sampling data, the method comprising:

[0008] S1, select the food safety sampling data set and preprocess the data set;

[0009] S2, constructing a food category risk scoring system based on the static risk factor quantitative score table to generate food category risk scores;

[0010] S3, construct a sampling data risk scoring system based on product qualification rate, product sampling possibility, product unqualified ratio, and number of unqualified product items, and generate sampling data risk scores;

[0011] S4, constructing a non-conforming risk scoring system according to the degree of deviation between the test value in the data set and the standard limit, and generating a non-conforming risk score;

[0012] S5, constructing a hazard risk scoring system based on the limit values ​​of the hazard and generating a hazard risk score;

[0013] S6, constructing a food safety risk early warning analysis model according to the food category risk scoring system, the sampling data risk scoring system, the non-conformity degree risk scoring system, and the hazard risk scoring system, and calculating the risk score value and risk level of the data set;

[0014] S7, generating and outputting a visual analysis warning report based on the food safety risk warning analysis model.

[0015] Preferably, in step S1, the preprocessing includes data selection, data cleaning, and data reduction operations.

[0016] Preferably, the data selection selects corresponding sampling data sets according to food classification;

[0017] The data cleaning performs missing value processing and consistency processing on the data set after the data selection;

[0018] The data specification performs unified and standardized processing on the data set after the data cleaning, and adds management attributes to each piece of data.

[0019] Preferably, the management attributes include food category attributes, unqualified item classification attributes, origin attributes, and sampling region attributes.

[0020] Preferably, in step S3, the sampling data risk scoring system includes a product qualification rate scoring index constructed based on the product qualification rate, a product sampling possibility scoring index constructed based on the product sampling possibility, a product unqualified proportion scoring index constructed based on the product unqualified proportion, and a product unqualified item number scoring index constructed based on the number of product unqualified items, so as to respectively generate a product qualification rate risk score, a product sampling possibility risk score, a product unqualified proportion risk score, and a product unqualified item number risk score.

[0021] Preferably, the calculation formula for the sampling data risk score is as follows:

[0022] in,

[0023] a, is the risk score of product qualification rate;

[0024] b. Score the risk of possible product inspection;

[0025] c. Risk score for product failure ratio;

[0026] d, is the risk score for the number of unqualified items in the product.

[0027] Preferably, in step S4, the deviation degree calculation formula is as follows:

[0028] in,

[0029] i, is the number of sampled data in the data set;

[0030] L i , is the deviation degree of the i-th data in the data set;

[0031] V i , is the detection value of the i-th data in the data set;

[0032] Min i , is the lower limit of the standard limit of the i-th data in the data set;

[0033] Max i , is the upper limit value of the standard limit of the i-th data in the data set.

[0034] Preferably, step S6 further comprises the following steps: constructing a risk level classification system using an optimal binning algorithm according to the risk score value of the data set, and obtaining a risk level corresponding to the risk score value.

[0035] Preferably, the input variables of the food safety risk early warning analysis model include food name, production month, notification month, type of inspected site, notification province, production province, and inspection item;

[0036] The output variables of the food safety risk early warning analysis model include risk level.

[0037] Preferably, the analysis and early warning report includes a trend analysis report, a spatiotemporal analysis report, a product origin analysis report, an unqualified item analysis report, a sampling unit analysis report, a sampled location analysis report, and a spatial correlation analysis report.

[0038] Compared with the prior art, the present invention has the following advantages and effects:

[0039] The food safety risk early warning analysis method based on sampling data provided by the present invention combines, on the one hand, historical data of food safety sampling, and on the other hand, toxicity data of hazards and expert experience data (static risk factor quantitative score table, standard detection limit) to construct a food safety risk early warning analysis model, thereby comprehensively determining risk score values ​​and risk levels, achieving multi-level analysis of food safety risks and rapid identification and prediction of risks, and providing an effective basis and support for rapid identification and early warning of food safety risks; at the same time, through visual analysis of early warning reports, early warnings are carried out in a comprehensive, intuitive, clear and detailed manner, thereby achieving accurate prevention and mitigation of risks. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 Schematic diagram of a food safety risk early warning analysis method based on sampling data in an embodiment of the present invention;

[0041] Figure 2 This figure shows the influence of different characteristic attributes on the risk level prediction of fresh vegetables in the food safety risk early warning analysis method based on sampling data in an embodiment of the present invention. DETAILED DESCRIPTION

[0042] In order to enable those skilled in the art to better understand the present invention, the present invention is further described in conjunction with specific implementation methods.

[0043] It should be noted that the following embodiments specifically select food safety supervision sampling data publicly released by market supervision departments at all levels at the national and local (provincial, autonomous region, and municipality directly under the central government) from 2017 to September 2022 for a total of 5 years for verification and explanation, including qualified and unqualified sampling data, totaling more than 4.23 million data.

[0044] The data list field structure includes food name, specification, production date, product batch number, manufacturer name and address, whether it is qualified, test items, unqualified items, test values, standard and regulatory limits, standard and regulatory basis, sampled unit name, sampled location, testing agency, sampling agency (law enforcement agency), sampling date, data source, food category attributes, unqualified item classification attributes, origin attributes, sampling region attributes, etc. The data with missing or redundant fields will be removed.

[0045] Example:

[0046] like Figure 1 As shown, the present invention provides a food safety risk early warning analysis method based on sampling data, which specifically includes the following steps:

[0047] S1, select a food safety sampling data set and preprocess the data set; wherein the preprocessing includes data selection, data cleaning, and data reduction operations.

[0048] Since the risk characteristics of different food categories vary greatly, it is necessary to conduct risk analysis for different food categories and establish different food safety risk early warning analysis models respectively, so as to form a food safety risk early warning analysis model for different food types in the entire industry.

[0049] Therefore, in the data selection operation, it is necessary to select the corresponding sampling data set according to the food classification; specifically, because the ADI value data of fresh vegetable pesticides and pollutants are relatively complete, and the corresponding standard value values ​​and units are relatively standardized, this embodiment selects the provincial level 2020-2021 fresh vegetable pesticide and pollutant unqualified data, a total of 3246 data for display and explanation. It should be noted that, because only the unqualified data in the sampling data have published the sampling items and test values, and fresh vegetables contain pesticides, pollutants and other hazards, this type of data is selected as the research content in this embodiment, which is not a limitation on the scope of application of the present invention, and it can be applied to safety risk warning analysis of other food categories.

[0050] Data cleaning performs missing value processing and consistency processing on the data set after data selection; specifically, the missing value processing operation includes: removing the data with missing attributes in the data set, such as clearing the data with unpublished test result values ​​and units; the values ​​of missing data in the "specification" and "trademark" attributes are marked as "no specification" and "no trademark". The consistency processing operation includes: unifying the units of data in which the test value and the standard value in the data set are inconsistent; for data without values ​​in the standard value, such as "not to be detected", they are uniformly processed into the value type "0".

[0051] Data specification unifies and standardizes the data set after data cleaning, and adds management attributes to each piece of data. Due to the non-uniform formats and diverse types of various fields in the sampling data, it is necessary to unify and standardize the fields that affect the analysis, such as the date fields such as the production date and sampling date, and convert them into the year-month-day format; for a piece of data with multiple unqualified items, they are uniformly separated and marked; for the names of the unqualified reasons that are not standardized and unified, a unified unqualified item standard name library is established for the unqualified reasons, and the digital coding is unified; for the inconsistent standards and regulations, a standard and regulation coding library is established, and the standards and regulations are converted into digital coding. In order to achieve in-depth analysis and utilization of data, combined with the needs of food safety risk analysis, management attributes are added to each piece of data, including food category attributes, unqualified item classification attributes, origin attributes, and sampling area attributes, and they are coded and processed uniformly with digital assignments to improve accuracy.

[0052] Specifically, according to the food category scope and requirements of the implementation rules of food supervision and random inspections, the product name is matched with the food category to which it belongs. A three-level hierarchical structure is set up for food categories to achieve refined management of food categories and provide data support for multi-level analysis; according to the classification of safety indicators, unqualified item categories are set up, including pesticides, veterinary drugs, additives, pollutants, biological toxins, microorganisms, etc., and the reasons for unqualified sampling data are classified and summarized; according to the name and specific address of the product manufacturer / sampling enterprise, combined with China's geographic coding, the enterprises are divided into administrative regions and automatic matching is achieved.

[0053] S2. Build a food category risk scoring system based on the static risk factor quantitative score table to generate food category risk scores. Specifically, according to the relevant scoring content of the static risk factor quantitative score table for food production enterprises in the "Regulations on Risk Grading of Food Production Enterprises (Draft for Comments)" of the State Administration for Market Regulation, "Table 1-1.1: Static Risk Factor Quantitative Scoring Table for Food and Food Additive Producers", the highest risk is 40 points, which will be converted proportionally into the highest score of 25 points.

[0054] S3, construct a sampling data risk scoring system based on product qualification rate, product sampling possibility, product unqualified ratio, and number of unqualified product items, and generate sampling data risk scores;

[0055] The sampling data risk scoring system includes a product qualification rate scoring index constructed based on the product qualification rate, a product sampling possibility scoring index constructed based on the product sampling possibility, a product unqualified proportion scoring index constructed based on the product unqualified proportion, and a product unqualified item number scoring index constructed based on the number of product unqualified items, so as to generate a product qualification rate risk score, a product sampling possibility risk score, a product unqualified proportion risk score, and a product unqualified item number risk score respectively.

[0056] Among them, the product qualification rate scoring indicators are shown in the following table:

[0057] Product qualification rate range Risk Scorea >98% 5 points ≤98% and >95% 10 points ≤95% and >90% 15 points ≤90% and >85% 20 points ≤85% 25 points

[0058] The possibility of product sampling is expressed by the ratio of the total amount of specific product sampling to the total amount of sampling of the category. The specific scoring indicators of product sampling possibility are shown in the following table:

[0059]

[0060]

[0061] The unqualified product ratio can be specifically expressed by the unqualified product ratio of this category in a certain province. The specific scoring indicators of the unqualified product ratio are shown in the following table:

[0062] Product unqualified ratio range Risk Scorec ≤1% 5-10 points ≤2% and >1% 10-14 points ≤3% and >2% 15-19 points ≤5% and >3% 20-24 points >5% 25 points

[0063] Where the risk score is a range value (including product unqualified ratio ranges of ≤1%, ≤2% and >1%, ≤3% and >2%, ≤5% and >3%), the specific calculation formula for the risk score c is as follows:

[0064] in,

[0065] p is the specific value of the unqualified product ratio;

[0066] p min , is the minimum value of the corresponding product unqualified ratio range;

[0067] p max , is the maximum value of the corresponding product unqualified ratio range;

[0068] c min , is the minimum value of the corresponding risk score range;

[0069] c max , is the maximum value of the corresponding risk score range.

[0070] The number of unqualified product items will be counted by category. The specific scoring indicators for the number of unqualified product items are shown in the following table:

[0071]

[0072]

[0073] Specifically, the total sampling data risk score calculation formula is as follows:

[0074] in,

[0075] a, is the risk score of product qualification rate;

[0076] b. Score the risk of possible product inspection;

[0077] c. Risk score for product failure ratio;

[0078] d, is the risk score for the number of unqualified items in the product.

[0079] S4, constructing a non-conforming risk scoring system according to the degree of deviation between the test value in the data set and the standard limit, and generating a non-conforming risk score;

[0080] The degree of deviation is used to indicate the degree to which the test value is close to or far from the standard limit. The calculation formula for the degree of deviation is as follows:

[0081] in,

[0082] i, is the number of sampled data in the data set;

[0083] L i , is the deviation degree of the i-th data in the data set;

[0084] V i , is the detection value of the i-th data in the data set;

[0085] Min i , is the lower limit of the standard limit of the i-th data in the data set;

[0086] Max i , is the upper limit value of the standard limit of the i-th data in the data set.

[0087] The specific non-conformity risk scoring system is shown in the following table:

[0088]

[0089]

[0090] Among them, for the case where the non-conformity risk score is a range value (including the deviation degree in the range of [0.3, 0.5], (0.5, 0.7], (0.7, 0.9]), the specific calculation formula of the non-conformity risk score k is as follows:

[0091] in,

[0092] L i , is the deviation degree of the i-th data in the data set;

[0093] L min , is the minimum value of the corresponding deviation range;

[0094] L max , is the maximum value of the corresponding deviation range;

[0095] k min , is the minimum value of the corresponding risk score range;

[0096] k max , is the maximum value of the corresponding risk score range.

[0097] S5, constructing a hazard risk scoring system based on the limit values ​​of the hazard and generating a hazard risk score;

[0098] The hazard risk scoring system is shown in the following table:

[0099] Hazard ADI limit value (mg / kg bw) Risk Scoring 1<ADI 5-9 points 0.1<ADI≤1 10-14 points 0.01<ADI≤0.1 15-19 points 0.001<ADI≤0.01 20-24 points ADI≤0.001 25 points

[0100] Among them, for the case where the hazard risk score is a range value (including the hazard ADI limit value in the range of >1, >0.1 and ≤1, >0.01 and ≤0.1, >0.001 and ≤0.01), the specific calculation formula of the hazard risk score w is as follows:

[0101] in,

[0102] U is the limit value of ADI of a certain hazard;

[0103] U min , is the minimum value of the ADI limit range of the corresponding hazard;

[0104] U max , is the maximum value of the ADI limit value range of the corresponding hazard;

[0105] w min , is the minimum value of the corresponding risk score range;

[0106] w max , is the maximum value of the corresponding risk score range.

[0107] S6. Construct a food safety risk warning analysis model based on the food category risk scoring system, sampling data risk scoring system, non-conformity degree risk scoring system, and hazard risk scoring system, and calculate the risk score value and risk level of the data set; that is, use four dimensions to calculate the risk score value of the data set: food category risk, sampling data risk, non-conformity degree risk, and hazard risk. After adding up the risk scores of the four dimensions, the risk score value of each sampled product (data set) can be obtained.

[0108] In the process of calculating the risk level, the optimal binning algorithm is used to construct a risk level classification system based on the risk score value of the data set, and the risk level corresponding to the risk score value is obtained through the risk level classification system. Specifically, K-means clustering is first used to divide the risk score value into three categories, and similar risk scores are grouped. After clustering is completed, the optimal binning algorithm of SPSS is used for binning, and the risk score is further graded to determine the range of the risk level score value. After the score range is rounded off, the risk level classification system is constructed.

[0109] K-means clustering divides data into different clusters according to the distribution of data. The center point of each cluster reflects the representative position of the cluster. Compared with traditional equidistant or equifrequency binning, K-means center points are directly obtained from data through algorithms, reflecting the inherent pattern of data and avoiding the subjective bias that may be caused by manually selecting bin boundaries.

[0110] The risk level classification system is shown in the following table:

[0111]

[0112]

[0113] The input variables of the food safety risk early warning analysis model include food name, production month, notification month, type of inspected site, notification province, production province, and inspection items; the output variables of the food safety risk early warning analysis model include risk level.

[0114] The data set is divided into a training set and a test set, with 70% for the training set and 30% for the test set. SPSS Modeler is used to implement C5.0, support vector machine (SVM), and BP neural network algorithms for prediction, and the importance of each feature attribute is determined. The three classification algorithms are selected to predict the pass / fail results of the random inspection, and the accuracy (%), precision (%), and recall (%) are compared. The specific experimental results are shown in the table below:

[0115] Algorithm Type Accuracy (%) Accuracy (%) Recall rate (%) C5.0 Decision Tree 76.26 75.68 73.47 SVM 71.80 70.75 69.86 BP Neural Network 69.19 67.84 66.39

[0116] From the above experimental results, it can be seen that the accuracy of the C5.0 decision tree is 76.26%. Among these algorithms, its accuracy, precision and recall are the highest, so it is more appropriate to choose the C5.0 decision tree algorithm as the food safety risk early warning analysis model. The food safety risk early warning analysis model is used to predict the risk level and compare the accuracy of the three levels of low, medium and high. The specific results are shown in the following table:

[0117] Risk Level Accuracy (%) Low risk 56.60 Medium risk 72.70 High risk 91.11

[0118] It can be seen that the accuracy of high risk identification rate is the highest at 91.11%, followed by medium risk, and the lowest is low risk. This shows that the model can play a better role in high risk levels. Since the selected sampling data are only unqualified data, sampling items and test values, the risk level is only for the classification of unqualified products. Therefore, when the selected sampling data contains comprehensive qualified and unqualified data, a comprehensive risk analysis of the overall risk classification of qualified and unqualified products can be obtained.

[0119] Conduct experiments on the importance of each feature attribute (input variable) to determine the importance of the feature attribute. For specific results, see Figure 2 It can be seen that for the risk level prediction of fresh vegetables, the attributes of the sampling items are important influencing factors.

[0120] The data obtained after the original sampling data is processed through the above steps are shown in the following table (only part of the data is shown):

[0121]

[0122]

[0123] S7, generate and output a visual analysis and warning report based on the food safety risk warning analysis model. Specifically, the analysis and warning report includes a trend analysis report, a spatiotemporal analysis report, a product origin analysis report, a non-conforming item analysis report, a sampling unit analysis report, a sampled location analysis report, a spatial correlation analysis report, etc.

[0124] To sum up, the food safety risk early warning analysis method based on sampling data provided by the present invention can realize multi-level analysis of food safety risks and rapid identification and prediction of risks, and provide an effective basis and support for the rapid identification and early warning of food safety risks, thereby preventing and resolving risks and reducing the economic losses caused by food safety risks.

[0125] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. All equivalent changes and modifications made within the scope of the present invention should still fall within the scope of the present invention.

Claims

1. A food safety risk early warning analysis method based on sampling data, characterized in that: The method comprises: S1, select the food safety sampling data set and preprocess the data set; S2, constructing a food category risk scoring system based on the static risk factor quantitative score table to generate food category risk scores; S3, construct a sampling data risk scoring system based on product qualification rate, product sampling possibility, product unqualified ratio, and number of unqualified product items, and generate sampling data risk scores; S4, constructing a non-conforming risk scoring system according to the degree of deviation between the test value in the data set and the standard limit, and generating a non-conforming risk score; S5, constructing a hazard risk scoring system based on the limit values ​​of the hazard and generating a hazard risk score; S6, constructing a food safety risk early warning analysis model according to the food category risk scoring system, the sampling data risk scoring system, the non-conformity degree risk scoring system, and the hazard risk scoring system, and calculating the risk score value and risk level of the data set; S7, generating and outputting a visual analysis warning report based on the food safety risk warning analysis model.

2. The food safety risk early warning analysis method based on sampling data according to claim 1 is characterized by: In step S1, the preprocessing includes data selection, data cleaning, and data reduction operations.

3. The food safety risk early warning analysis method based on sampling data according to claim 2 is characterized in that: The data selection selects corresponding sampling data sets according to food classification; The data cleaning performs missing value processing and consistency processing on the data set after the data selection; The data specification performs unified and standardized processing on the data set after the data cleaning, and adds management attributes to each piece of data.

4. The food safety risk early warning analysis method based on sampling data according to claim 3 is characterized by: The management attributes include food category attributes, unqualified item classification attributes, origin attributes, and sampling area attributes.

5. The food safety risk early warning analysis method based on sampling data according to claim 1 is characterized in that: In step S3, the sampling data risk scoring system includes a product qualification rate scoring index constructed according to the product qualification rate, a product sampling possibility scoring index constructed according to the product sampling possibility, a product unqualified proportion scoring index constructed according to the product unqualified proportion, and a product unqualified item number scoring index constructed according to the number of product unqualified items, so as to generate a product qualification rate risk score, a product sampling possibility risk score, a product unqualified proportion risk score, and a product unqualified item number risk score, respectively.

6. The food safety risk early warning analysis method based on sampling data according to claim 5 is characterized in that: The calculation formula for the sampling data risk score is as follows: in, a, is the risk score of product qualification rate; b. Score the risk of possible product inspection; c. Risk score for product failure ratio; d, is the risk score for the number of unqualified items in the product.

7. The food safety risk early warning analysis method based on sampling data according to claim 1 is characterized in that: In step S4, the deviation degree calculation formula is as follows: in, i, is the number of sampled data in the data set; L i , is the deviation degree of the i-th data in the data set; V i , is the detection value of the i-th data in the data set; Min i , is the lower limit of the standard limit of the i-th data in the data set; Max i , is the upper limit value of the standard limit of the i-th data in the data set.

8. The food safety risk early warning analysis method based on sampling data according to claim 1 is characterized in that: Step S6 also includes the following steps: According to the risk score value of the data set, an optimal binning algorithm is used to construct a risk level classification system, and a risk level corresponding to the risk score value is obtained.

9. The food safety risk early warning analysis method based on sampling data according to claim 1 is characterized by: The input variables of the food safety risk early warning analysis model include food name, production month, notification month, type of sampled site, notification province, production province, and sampled items; The output variables of the food safety risk early warning analysis model include risk level.

10. The food safety risk early warning analysis method based on sampling data according to claim 1, characterized in that: The analysis and early warning report includes a trend analysis report, a time-space analysis report, a product origin analysis report, a non-conforming item analysis report, a sampling unit analysis report, a sampled location analysis report, and a spatial correlation analysis report.