Food safety risk analysis and prediction method based on big data

By constructing a big data food safety risk assessment index system and using the BERT model for data processing, the existing technology has solved the problems of relying on expert experience and incomplete risk factors, achieved real-time and accurate assessment and prediction of food safety risks, and enhanced Objectivity of assessment and ability to compare across firms.

CN118710043APending Publication Date: 2024-09-27CHINA NAT RES INST OF FOOD & FERMENTATION IND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410722126.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-05
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

Existing food safety risk analysis and prediction methods rely on expert experience, do not fully consider risk factors, are difficult to achieve real-time updates and accurate predictions, and are difficult to quantify and assess.

Method used

Construct a personalized food safety risk assessment index system based on big data, use Citespace, knowledge graph, Delphi method and BERT model to collect, clean, quantify and normalize data, combine with supervised learning model and web crawler to automatically extract data and establish Intelligent programs conduct risk assessment and prediction.

Benefits of technology

It improves the objectivity and accuracy of food safety risk assessment, realizes real-time updates and predictions, can comprehensively consider risk factors, and conduct horizontal comparisons between enterprises.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118710043A
    Figure CN118710043A
Patent Text Reader

Abstract

The invention provides an enterprise-level food safety risk analysis and prediction method based on big data. Belongs to the food safety field. Firstly, a food safety risk factor keyword library of a specific food industry is determined, then information about food safety is extracted from different data sources through a deep learning model, such as a BERT model, and then an evaluation index system for evaluating specific food safety risk factors is constructed. The system comprises an evaluation index framework of risk factors, and a credible data source type and a data quantification scheme table of specific indexes. And finally, on the basis of the constructed food safety risk index system, performing comparison of transverse food safety risk current situations between different enterprises of the same type according to the same standard. According to the method, food safety big data and deep learning technologies are utilized, the accuracy of food safety risk prediction is improved, and a more quantitative and objective food safety risk assessment scheme and tool are provided for enterprises.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of food safety, and more specifically relates to a food safety risk analysis and prediction method based on big data. Background Art

[0002] Food safety risk prevention and control is very important. It is a basic work in the production and operation management of food enterprises, and it is the bottom line and red line. It puts great pressure on the first responsible person (food safety director, food safety manager); the prevention and control of food safety risks is a systematic project, which requires scientific theoretical guidance, organizational mechanism guarantee, and the coordinated participation of multiple departments; food safety risk identification, assessment, and control require a large amount of data, information and expert experience support, and is the key research direction for improving enterprise management efficiency.

[0003] Although some risk prediction models already exist, such as statistical models, Bayesian networks, and neural networks, many models cannot make good use of the large amount of food safety data that exists in diverse data sources, or these models only focus on one link in the food production process and ignore the consistency of the food life cycle.

[0004] Therefore, compared with previous qualitative methods and post-processing, a theoretical framework and specific methods that can be used to quantitatively analyze and predict food safety risks within a specific organization, together with a data platform that supports the collection, recording and quantitative scoring of food safety risk information data from raw materials to production, sales and consumption, can truly solve the pain points of food safety risk management within an organization that is difficult to quantify and assess. Summary of the invention

[0005] The present invention aims to solve the shortcomings of existing food safety risk analysis and prediction methods, such as over-reliance on expert experience and subjective judgment, incomplete consideration of risk factors, and difficulty in achieving real-time updates and accurate predictions. By constructing an indicator system for personalized assessment of enterprise food safety risks based on big data, and using Citespace, knowledge graphs, Delphi method, BERT model, etc. to collect, clean, quantify and normalize data, the objectivity and accuracy of food safety risk assessment can be improved, and real-time updates and predictions of individual risk factors and overall enterprise risk levels can be achieved.

[0006] In order to solve the above problems, the present invention is implemented by adopting the following technical solutions: the method comprises:

[0007] Constructing a food safety risk indicator system: Conducting a comprehensive analysis of food safety risk factors within a specific organization, using probability, harmfulness, and social sensitivity as evaluation criteria, and constructing a data-supported, quantitative food safety risk assessment method system; including a framework for various risk factors, as well as specific indicators for measuring these risk factors;

[0008] Establish an intelligent program for food safety information summary and classification based on expert knowledge and experience, and use supervised learning models to identify data and information changes related to potential food safety risks in specific food categories; automatically extract useful data from various data sources by using web crawlers, industry keyword libraries, information source lists and customized information retrieval strategies;

[0009] Processing of risk factor data: Processing of risk factor data includes data cleaning, quantification, and normalization steps;

[0010] Risk assessment and prediction: Based on the established food safety risk indicator system, use risk factor data to assess and predict food safety risks;

[0011] Horizontal comparison: Use risk assessment and forecasting results to conduct horizontal comparison of enterprises.

[0012] In one embodiment, the intelligent program uses the BERT model to collect data including:

[0013] Data collection: Use programs to crawl text information from news media, social media, corporate announcements, and government announcements;

[0014] Text preprocessing: Clean unnecessary noise data, such as removing tweet links, symbols pointing to other users, and special characters. At the same time, in order to enable the model to better understand the text, the text needs to be marked and segmented;

[0015] Use the BERT model: First, convert the preprocessed text into a form accepted by the BERT model, that is, a form in which TokenEmbeddings, Segment Embeddings, and Position Embeddings are combined;

[0016] Vector representation of text information: The BERT model will output a vector representation of each input text, which contains the deep information of the input text.

[0017] In one solution, the food safety risk indicator system is constructed as follows:

[0018] Determine the main evaluation indicators: According to food safety-related laws and regulations, expert opinions and industry practices, determine the main evaluation indicators of an enterprise's food safety risk; including: acute toxicity and chronic toxicity of risk factors, the possibility of risk occurrence, social sensitivity of risk, and the level of risk monitoring;

[0019] Determine secondary evaluation indicators: For each main evaluation indicator, it is further refined into some secondary evaluation indicators; including: teratogenicity, carcinogenicity, mutagenicity, statistical values ​​of risk sampling and risk monitoring data, mainstream media news coverage rate, social media hot search index, and the level of risk control measures;

[0020] Assign weights to indicators: Each evaluation indicator has a different degree of impact on the food safety risk of the enterprise; the weight allocation is determined by methods such as expert evaluation and hierarchical analysis;

[0021] Form an indicator system: Integrate all the above evaluation indicators to form an evaluation indicator system for enterprise food safety risks;

[0022] A matrix called a "judgment matrix" is created to quantify this hierarchy; a judgment matrix is ​​essentially a square matrix whose rows and columns represent various aspects or attributes of the decision;

[0023] There are n attributes, then the judgment matrix A will be an nxn matrix, where each element a ij Describes the importance of attribute i relative to attribute j;

[0024] The value of this element is given by expert judgement, either by asking expert decision makers or by conducting a survey, and the matrix is ​​as follows:

[0025] A=|a 11 ,a 12 ,...,a 1n |

[0026] |a 21 ,a 22 ,...,a 2n |

[0027] |...,...,...,...|

[0028] |a n1 ,a n2 ,...,a nn |

[0029] In the matrix, the element a in the i-th row and j-th column is ij The value of represents the importance of attribute i relative to attribute j; if a ij If the value of is greater than 1, it means that attribute i is more important than attribute j;

[0030] If a ij If the value of is less than 1, it means that attribute i is less important than attribute j;

[0031] The diagonal elements, i=j, are always equal to 1, indicating that the two attributes being compared are themselves and have equal importance;

[0032] To quantify this importance, a scale of 1 to 9 is used, where 1 represents "equally important", 3 represents "weak advantage", 5 represents "significant advantage", 7 represents "strong advantage", 9 represents "absolute advantage", and 2, 4, 6 and 8 are intermediate values ​​of these main scales.

[0033] Furthermore, the processing of the risk factor data includes:

[0034] Data cleaning: including deleting duplicate values, handling missing values, outliers and consistency checks;

[0035] Data quantification: convert non-numerical risk factor data, such as text descriptions and grade classifications, into numerical data; some data are expressed as "high", "medium", and "low", and they are converted into numerical values, with "high" being 2, "medium" being 1, and "low" being 0;

[0036] Data normalization: Normalization is the process of changing data to the same range. The specific formula is:

[0037] Xnorm=(X-Xmin) / (Xmax-Xmin)

[0038] Among them, Xnorm is the normalized value, X is the current value to be normalized, Xmin is the minimum value in the data set, and Xmax is the maximum value in the data set.

[0039] Furthermore, the risk assessment and prediction process is as follows:

[0040] There are n risk factors (F1, F2, ..., Fn), each risk factor Fi has a corresponding weight Wi and a corresponding risk level value Fi of the risk factor val ; Then, the risk level R of the entire enterprise is calculated by the following formula:

[0041] R=W1*F1 val +W2*F2 val +...+Wn*Fn val .

[0042] Furthermore, the horizontal comparison process is as follows:

[0043] First, conduct a risk assessment on each enterprise E and calculate their overall risk level R. The formula is as follows:

[0044] R E =W1*F1 valE +W2*F2 valE +...+Wn*Fn valE

[0045] Here, "F1 valE " represents the risk level value of enterprise E on risk factor F1, and so on for other risk factors; then, the overall risk level R of each enterprise is obtained E ;

[0046] For the risk levels of two or more companies, directly compare R E The value of; if there are enterprise A and enterprise B, then their risk comparison is as follows:

[0047] Ratio: R = R EA / R EB

[0048] Difference: D = R EA -R EB

[0049] If R is greater than 1, it means that the risk level of enterprise A exceeds that of enterprise B, and vice versa.

[0050] If D is positive, it means that the risk level of enterprise A exceeds that of enterprise B. Otherwise, it means that the risk level of enterprise B exceeds that of enterprise A.

[0051] Beneficial effects of the present invention:

[0052] Increased objectivity: By using the BERT model and big data analysis, the present invention reduces the reliance on subjective evaluation by experts, making the assessment of food safety risks more objective and improving the accuracy of the assessment.

[0053] Comprehensive consideration of risk factors: By constructing a food safety risk indicator system and data collection, the present invention helps to more comprehensively consider and explore all possible factors of food safety risks.

[0054] Real-time update of risk levels: The present invention uses deep learning technology to enable risk assessment to be updated in real time when new data is obtained, thereby providing companies with more timely and accurate food safety risk assessments and predictions.

[0055] Prediction function: Furthermore, this method can not only assess the current risk level, but also predict the risks that may arise in the future, which can help companies take preventive measures before possible problems occur to prevent or mitigate food safety incidents. This method can not only predict risks, but also conduct horizontal comparisons between different companies. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 is a general flow chart of the method of the present invention;

[0057] Figure 2 It is a data collection flow chart of food safety information summary and classification intelligent program of the present invention;

[0058] Figure 3 FIG. 4 is a flow chart of processing risk factor data of the present invention. DETAILED DESCRIPTION

[0059] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. Typical embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described in the present invention. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.

[0060] Unless otherwise defined, all technical and scientific terms used in the present invention have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0061] like Figure 1 As shown, the method comprises:

[0062] S1. Construct a food safety risk indicator system: Use risk matrix method, hierarchical analysis method, comprehensive fuzzy evaluation method and other methods to conduct a comprehensive analysis of food safety risk factors within a specific organization, use possibility, harmfulness and social sensitivity as evaluation criteria, and construct a data-supported and quantitative food safety risk assessment method system. This system includes a framework for various risk factors and specific indicators for measuring these risk factors.

[0063] The food safety risk indicator system is as follows:

[0064] Determine the main evaluation indicators: According to food safety-related laws and regulations, expert opinions and industry practices, determine the main evaluation indicators of an enterprise's food safety risk; including: acute toxicity and chronic toxicity of risk factors, the possibility of risk occurrence, social sensitivity of risk, and the level of risk monitoring, etc.;

[0065] Determine secondary evaluation indicators: For each main evaluation indicator, it is necessary to further refine it into some secondary evaluation indicators; including: teratogenicity, carcinogenicity, mutagenicity, statistical values ​​of risk sampling and risk monitoring data, mainstream media news coverage rate, social media hot search index, risk control measures, etc.

[0066] Assign weights to indicators: Each evaluation indicator has a different degree of impact on the food safety risk of the enterprise; the weight allocation is determined by methods such as expert evaluation and hierarchical analysis;

[0067] Form an indicator system: Integrate all the evaluation indicators in the above steps to form an evaluation indicator system for enterprise food safety risks.

[0068] In AHP, a hierarchy is created to describe the decision problem and this hierarchy is quantified by creating a matrix called a “judgment matrix.” A judgment matrix is ​​essentially a square matrix (i.e., a matrix with an equal number of rows and columns) whose rows and columns represent various aspects or attributes of the decision.

[0069] There are n attributes, then the judgment matrix A will be an nxn matrix, where each element a ij Describes the importance of attribute i relative to attribute j;

[0070] The value of this element is given by expert judgement, either by asking expert decision makers or by conducting a survey, and the matrix is ​​as follows:

[0071] A=|a 11 ,a 12 ,...,a 1n |

[0072] |a 21 ,a 22 ,...,a 2n |

[0073] |...,...,...,...|

[0074] |a n1 ,a n2 ,...,a nn |

[0075] In the matrix, the element a in the i-th row and j-th column is ij The value of represents the importance of attribute i relative to attribute j; if a ij If the value of is greater than 1, it means that attribute i is more important than attribute j.

[0076] If a ij If the value of is less than 1, it means that attribute i is less important than attribute j.

[0077] The diagonal elements, i.e., i=j, are always equal to 1, indicating that the two attributes being compared are themselves and have equal importance.

[0078] To quantify this importance, a scale of 1 to 9 is used, where 1 represents "equally important", 3 represents "weak advantage", 5 represents "significant advantage", 7 represents "strong advantage", 9 represents "absolute advantage", and 2, 4, 6 and 8 are intermediate values ​​of these main scales.

[0079] S2. Establish an intelligent program for food safety information summarization and classification based on expert knowledge and experience, using a typical supervised learning model as a baseline to identify changes in data and information related to potential food safety risks in specific food categories. Use web crawlers, industry keyword libraries, information source lists, and customized information retrieval strategies to automatically extract useful data from various data sources. For example, the BERT model is used to extract key entity characters such as organization, food, risk, and regulations from news reports. Then, this text information is converted into data for algorithmic analysis, which significantly reduces manual work and improves the timeliness and accuracy of tracking and quantifying dynamically changing food safety risk data.

[0080] Data collection using the BERT model: First, the deep learning model BERT (Bidirectional Encoder Representations from Transformers) is used to extract text information about food safety from different data sources (such as news media, social media, corporate announcements, government announcements, etc.). Then, this text information is converted into data that can be used for algorithm analysis.

[0081] like Figure 2 As shown, the data collection using the BERT model includes:

[0082] S201. Data collection: Use programs to crawl text information from news media, social media, corporate announcements, and government announcements.

[0083] S202. Text preprocessing: Clean unnecessary noise data, such as removing tweet links, symbols pointing to other users, and special characters. At the same time, in order to enable the model to better understand the text, the text needs to be marked and segmented.

[0084] S203. Use the BERT model: First, convert the preprocessed text into a form accepted by the BERT model, that is, a form in which Token Embeddings, Segment Embeddings, and Position Embeddings are combined.

[0085] Embedding for each word i has:

[0086] E_i=T_i+S_i+P_i

[0087] Among them, E_i is the final Embedding, T_i is the Token Embedding, S_i is the Segment Embedding, and P_i is the Position Embedding.

[0088] Then input into the BERT model.

[0089] S204. Vector representation of text information: The BERT model will output a vector representation of each input text. This vector contains the deep information of the input text.

[0090] These vector representations are used in subsequent risk analysis and prediction algorithms, such as using these vectors as input features of machine learning models to predict food safety risk levels.

[0091] S3. Processing of risk factor data: The processing of risk factor data includes steps such as data cleaning, quantification, and normalization. Data cleaning is to remove irrelevant or erroneous data from the data set. Data quantification is to convert non-numerical risk factors into numerical data for further analysis. Data normalization is to convert all data to the same magnitude to eliminate the dimensional effects between data.

[0092] like Figure 3 As shown, the processing of risk factor data includes:

[0093] S301, data cleaning: including deleting duplicate values, processing missing values, outliers and consistency checks. Usually, this step does not have a specific mathematical formula, but is carried out through logical judgment and data quality rules.

[0094] S302, data quantification: convert non-numerical risk factor data, such as text descriptions and grade classifications, into numerical data; some data are expressed as "high", "medium", and "low", and they are converted into numerical values, "high" is 2, "medium" is 1, and "low" is 0;

[0095] S303, data normalization: Normalization is the process of changing data to the same range. The specific formula is:

[0096] Xnorm=(X-Xmin) / (Xmax-Xmin)

[0097] Among them, Xnorm is the normalized value, X is the current value to be normalized, Xmin is the minimum value in the data set, and Xmax is the maximum value in the data set.

[0098] S4. Risk assessment and prediction: Based on the established food safety risk indicator system, risk factor data is used to assess and predict food safety risks. This method can calculate the risk level of a single risk factor or the risk level of the entire enterprise.

[0099] The risk assessment and prediction process described is as follows:

[0100] There are n risk factors (F1, F2, ..., Fn), each risk factor Fi has a corresponding weight Wi and a corresponding risk level value Fi of the risk factor val ; Then, the risk level R of the entire enterprise is calculated by the following formula:

[0101] R=W1*F1 val +W2*F2 val +...+Wn*Fn val .

[0102] What this formula means is that the contribution of each risk factor to the total risk level depends on the product of its own risk level value and its weight, and the sum of the risk levels contributed by all risk factors is the risk level of the entire enterprise.

[0103] S5. Horizontal comparison: Use risk assessment and prediction results to compare enterprises horizontally. If you want to compare different enterprises horizontally, you can use the same risk assessment system and weighted sum method to calculate the risk levels of different enterprises respectively, and then compare them. The weights of the same risk factors are the same for all enterprises, so as to ensure the fairness of the comparison. The calculation results of the risk level can reflect the advantages and disadvantages of the enterprise in food safety management, and then serve as the basis for improvement measures.

[0104] The horizontal comparison process is as follows:

[0105] First, conduct a risk assessment on each enterprise E and calculate their overall risk level R. The formula is as follows:

[0106] R E =W1*F1 valE +W2*F2 valE +...+Wn*Fn valE

[0107] Here, "F1 valE " represents the risk level value of enterprise E on risk factor F1, and so on for other risk factors; then, the overall risk level R of each enterprise is obtained E ;

[0108] For the risk levels of two or more companies, directly compare R EThe value of; if there are enterprise A and enterprise B, then their risk comparison is as follows:

[0109] Ratio: R = R EA / R EB

[0110] Difference: D = R EA -R EB

[0111] If R is greater than 1, it means that the risk level of enterprise A exceeds that of enterprise B, and vice versa.

[0112] If D is positive, it means that the risk level of enterprise A exceeds that of enterprise B. Otherwise, it means that the risk level of enterprise B exceeds that of enterprise A.

[0113] Embodiment 1:

[0114] Construct a food safety risk analysis process between different industries and enterprises:

[0115] Assume that there are four companies, which are respectively specialized in the production of liquor (Company A), dairy products (Company B), meat products (Company C) and baked goods (Company D). Their food safety risk levels need to be assessed.

[0116] First, we need to use the BERT model to collect food safety-related data from different data sources such as news media, social media, corporate announcements, and government announcements. Assume that the following data is collected:

[0117] Company A recently had a news report that its liquor contained excessive methanol.

[0118] On the social media of Company B, consumers reported that its dairy products had gone bad.

[0119] Company C's corporate announcement shows that it has passed the ISO 22000 food safety management system certification.

[0120] A government announcement from Company D showed that its baked goods had problems with using expired ingredients.

[0121] Next, a food safety risk indicator system will be established, including primary and secondary evaluation indicators. These indicators may include: the integrity and effectiveness of the food safety management system, product quality compliance, production environment safety, raw material procurement compliance, etc.

[0122] Then, the risk factor data will be cleaned, quantified, and normalized according to the data. For example, for Company A, the problem of excessive methanol in liquor may be converted into a low-level value of the "product quality compliance" indicator, "high" is 2, "medium" is 1, and "low" is 0. This problem is "low", so the value is 0.

[0123] By continuing in this way, the food safety risk level of each company can be calculated. For example, since Company C has passed the ISO 22000 food safety management system certification, it will get a higher value in the "integrity and effectiveness of the food safety management system".

[0124] Embodiment 2:

[0125] Horizontal comparison of companies in the same industry

[0126] Suppose we have three dairy companies, namely Company E, Company F and Company G. We need to assess their food safety risk levels.

[0127] First, we used the BERT model to extract text information about food safety from multiple data sources. The following data was collected:

[0128] On the social media of Enterprise E, consumers reported that their milk had gone bad.

[0129] Company F's corporate announcement shows that it has passed the ISO 22000 food safety management system certification.

[0130] News reports about Company G showed that its dairy products had problems with using expired ingredients.

[0131] In the horizontal comparison example of the dairy industry, we have the main risk assessment indicators, such as the integrity of the food safety management system, product quality compliance, compliance of raw material procurement, etc. We score the risks according to the evaluation system of 0-2, such as 2 for excellent integrity of the safety management system, 1 for general, 0 for poor, and so on for other indicators.

[0132] For enterprises E, F, and G, we give the following scores for their main risk assessment indicators based on the information we collected:

[0133] Company E: The integrity of the safety management system is 1, the product quality compliance is 0, and the compliance of raw material procurement is 2.

[0134] Company F: The integrity of the safety management system is 2, the compliance of product quality is 2, and the compliance of raw material procurement is 2.

[0135] Company G: The integrity of the safety management system is 1, the product quality compliance is 1, and the compliance of raw material procurement is 0.

[0136] Assuming that the weights of each major risk assessment indicator are 0.4, 0.3, and 0.3 respectively (determined by expert evaluation method and hierarchical analysis method), we can calculate the risk rating of each company:

[0137] The risk value of Enterprise E = the weight of the safety management system integrity index (the score of the safety management system) + the weight of the product quality compliance index (the score of the product quality compliance) + the weight of the raw material procurement compliance index (the score of raw material procurement) = 0.41 + 0.30 + 0.32 = 1.0.

[0138] The risk value of enterprise F = 0.42 + 0.32 + 0.3*2 = 2.0.

[0139] The risk value of enterprise G = 0.41 + 0.31 + 0.3*0 = 0.7.

[0140] From the calculation results we can see that enterprise F has the highest risk level and enterprise G has the lowest risk level.

[0141] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).

[0142] It should be understood that the detailed description of the technical solutions of the present invention by means of the preferred embodiments is illustrative rather than restrictive. A person skilled in the art may modify the technical solutions described in the embodiments, or replace some of the technical features by equivalents, based on reading the specification of the present invention; and these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A food safety risk analysis and prediction method based on big data, characterized by: The method includes: Constructing a food safety risk indicator system: Conducting a comprehensive analysis of food safety risk factors within a specific organization, using probability, harmfulness, and social sensitivity as evaluation criteria, and constructing a data-supported, quantitative food safety risk assessment method system; including a framework for various risk factors, as well as specific indicators for measuring these risk factors; Establish an intelligent program for food safety information summary and classification based on expert knowledge and experience, and use supervised learning models to identify data and information changes related to potential food safety risks in specific food categories; automatically extract useful data from various data sources by using web crawlers, industry keyword libraries, information source lists and customized information retrieval strategies; Processing of risk factor data: Processing of risk factor data includes data cleaning, quantification, and normalization steps; Risk assessment and prediction: Based on the established food safety risk indicator system, risk factor data is used to assess and predict food safety risks; Horizontal comparison: Use risk assessment and forecasting results to conduct horizontal comparison of enterprises.

2. A food safety risk analysis and prediction method based on big data according to claim 1, characterized in that: The intelligent program, using the BERT model for data collection, includes: Data collection: Use programs to crawl text information from news media, social media, corporate announcements, and government announcements; Text preprocessing: Clean unnecessary noise data, such as removing tweet links, symbols pointing to other users, and special characters. At the same time, in order to enable the model to better understand the text, the text needs to be marked and segmented; Use the BERT model: First, convert the preprocessed text into a form accepted by the BERT model, that is, a form in which TokenEmbeddings, Segment Embeddings, and Position Embeddings are combined; Vector representation of text information: The BERT model will output a vector representation of each input text, which contains the deep information of the input text.

3. The food safety risk analysis and prediction method based on big data according to claim 1, characterized in that: The food safety risk indicator system is as follows: Determine the main evaluation indicators: According to food safety-related laws and regulations, expert opinions and industry practices, determine the main evaluation indicators of an enterprise's food safety risk; including: acute toxicity and chronic toxicity of risk factors, the possibility of risk occurrence, social sensitivity of risk, and the level of risk monitoring; Determine secondary evaluation indicators: For each main evaluation indicator, it is further refined into some secondary evaluation indicators; including: teratogenicity, carcinogenicity, mutagenicity, statistical values ​​of risk sampling and risk monitoring data, mainstream media news coverage rate, social media hot search index, and the level of risk control measures; Assign weights to indicators: Each evaluation indicator has a different degree of impact on the food safety risk of the enterprise; the weight allocation is determined by expert evaluation and hierarchical analysis methods; Form an indicator system: Integrate all the above evaluation indicators to form an evaluation indicator system for enterprise food safety risks; A matrix called a "judgment matrix" is created to quantify this hierarchy; a judgment matrix is ​​essentially a square matrix whose rows and columns represent various aspects or attributes of the decision; There are n attributes, then the judgment matrix A will be an nxn matrix, where each element a ij Describes the importance of attribute i relative to attribute j; The value of this element is given by expert judgement, either by asking expert decision makers or by conducting a survey, and the matrix is ​​as follows: A=|a 11 ,a 12 ,...,a 1n | |a 21 ,a 22 ,...,a 2n | |...,...,...,...| |a n1 ,a n2 ,...,a nn | In the matrix, the element a in the i-th row and j-th column is ij The value of represents the importance of attribute i relative to attribute j; if a ij If the value of is greater than 1, it means that attribute i is more important than attribute j; If a ij If the value of is less than 1, it means that attribute i is less important than attribute j; The diagonal elements, i=j, are always equal to 1, indicating that the two attributes being compared are themselves and have equal importance; To quantify this importance, a scale of 1 to 9 is used, where 1 represents "equally important", 3 represents "weak advantage", 5 represents "significant advantage", 7 represents "strong advantage", 9 represents "absolute advantage", and 2, 4, 6 and 8 are intermediate values ​​of these main scales.

4. The food safety risk analysis and prediction method based on big data according to claim 1, characterized in that: The processing of risk factor data includes: Data cleaning: including deleting duplicate values, handling missing values, outliers and consistency checks; Data quantification: Convert non-numerical risk factor data, such as text descriptions and grade classifications, into numerical data; some data are expressed as "high", "medium", and "low", and they are converted into numerical values, with "high" being 2, "medium" being 1, and "low" being 0; Data normalization: Normalization is the process of changing data to the same range. The specific formula is: Xnorm=(X-Xmin) / (Xmax-Xmin) Among them, Xnorm is the normalized value, X is the current value to be normalized, Xmin is the minimum value in the data set, and Xmax is the maximum value in the data set.

5. The food safety risk analysis and prediction method based on big data according to claim 1, characterized in that: The risk assessment and prediction process described is as follows: There are n risk factors (F1, F2, ..., Fn), each risk factor Fi has a corresponding weight Wi and a corresponding risk level value Fi of the risk factor val ; Then, the risk level R of the entire enterprise is calculated by the following formula: R=W1*F1 val +W2*F2 val +...+Wn*Fn val 。 6. The food safety risk analysis and prediction method based on big data according to claim 1, characterized in that: The horizontal comparison process is as follows: First, conduct a risk assessment on each enterprise E and calculate their overall risk level R. The formula is as follows: R E =W1*F1 valE +W2*F2 valE +...+Wn*Fn valE Here, "F1 valE " represents the risk level value of enterprise E on risk factor F1, and the same applies to other risk factors; Then, the overall risk level R of each enterprise is obtained E ; For the risk levels of two or more companies, directly compare R E If there are Enterprise A and Enterprise B, their risk comparison is as follows: Ratio: R = R EA / R EB Difference: D = R EA -R EB If R is greater than 1, it means that the risk level of enterprise A exceeds that of enterprise B, and vice versa. If D is positive, it means that the risk level of enterprise A exceeds that of enterprise B. Otherwise, it means that the risk level of enterprise B exceeds that of enterprise A.