Full-chain food safety intelligent decision-making method and system

Through the Internet of Things sensor network and risk assessment model, a three-level risk index system is built, which solves the problems of dispersed and unreliable food safety data, and realizes dynamic management and efficient decision-making of the entire chain of food safety.

CN120542910AInactive Publication Date: 2025-08-26BEIJING YELLOW ELEPHANT FOOD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510604007.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-12
Publication Date
2025-08-26
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The data in the food production, circulation and consumption links are scattered and easily tampered with or missing, resulting in incomplete and unreliable basis for risk assessment. It is difficult for traditional methods to dynamically capture complex risk factors in the entire chain.

Method used

Collect data through the Internet of Things sensor network, build a three-level risk index system, train a food safety risk assessment model, make intelligent decisions based on impact factors, and iteratively optimize model decisions through adaptive learning.

Benefits of technology

It has achieved all-round and dynamic management of food safety, improved the efficiency and accuracy of decision-making, and ensured the public's dietary safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120542910A_ABST
    Figure CN120542910A_ABST
Patent Text Reader

Abstract

The invention discloses a full-chain food safety intelligent decision-making method and system, and the method comprises the following steps: collecting food production full-chain data and feedback information, and evaluating the reliability of the collected data through a data integrity index; cleaning and sorting the collected data to form a food safety database, constructing a three-level risk index system, and calculating index values according to the food safety database; training a food safety risk assessment model according to the three-level risk index system and the food safety database, and outputting a risk prediction value by the model; according to a prediction result of the evaluation model, adjusting in combination with an influence factor, converting an adjusted risk value into a risk level, and performing intelligent decision generation according to a decision rule; and executing a decision and collecting feedback, and iteratively optimizing the model decision according to a feedback result and adaptive learning. According to the invention, the food safety risk assessment model is trained by collecting the food full-chain data to carry out intelligent decision making, and the decision making efficiency and accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of food, and in particular to a full-chain food safety intelligent decision-making method and system. Background Art

[0002] In recent years, frequent food safety incidents around the world have garnered widespread attention. These issues, ranging from excessive pesticide residues and misuse of veterinary drugs to illegal additives, pose a serious threat to public health. Modern consumers are increasingly demanding food safety and quality. They are concerned not only with the taste and nutritional value of their food but also with its origin, production process, and compliance with health standards. Consumers' demand for transparency and traceability is driving greater attention from businesses and society.

[0003] However, data from food production, circulation, and consumption are scattered among different entities, and some data are easily tampered with or missing, resulting in incomplete and unreliable risk assessment basis. Traditional methods rely on manual experience or fixed threshold models, which makes it difficult to dynamically capture complex risk factors throughout the entire chain. The development of the Internet of Things and artificial intelligence model technology provides technical support for achieving full-chain food safety management. The entire chain includes production, processing, storage, transportation, and sales. Through real-time monitoring of each link and data analysis, potential safety hazards can be discovered and dealt with in a timely manner, effectively preventing the occurrence of food safety accidents. Based on this, the present invention proposes a full-chain food safety intelligent decision-making method and system. Summary of the Invention

[0004] The present invention provides a full-chain food safety intelligent decision-making method, which is characterized by comprising:

[0005] S10. Collect data and feedback from all aspects of food production and assess the reliability of the collected data using the data integrity index;

[0006] S20. Clean and organize the collected data to form a food safety database, build a three-level risk indicator system, and calculate indicator values ​​based on the food safety database;

[0007] S30. Train a food safety risk assessment model based on the three-level risk indicator system and the food safety database, and output a risk prediction value.

[0008] S40. Based on the prediction results of the food safety risk assessment model, adjustments are made in combination with influencing factors, the adjusted risk value is converted into a risk level, and intelligent decision making is made according to the decision rules;

[0009] S50: Execute the decision and collect feedback, and iteratively optimize the model decision based on the feedback results and adaptive learning.

[0010] As described above, a full-chain intelligent decision-making method for food safety is used, in which data from each link of food production is collected, including production link data, circulation link data, sales link data, and consumer feedback data.

[0011] As described above, a full-chain intelligent decision-making method for food safety is proposed, in which the three-level risk indicator system breaks down food safety issues layer by layer into specific and quantifiable indicators, including production risks, circulation risks, and consumption risks.

[0012] As described above, a full-chain food safety intelligent decision-making method is described, in which the training process of the food safety risk assessment model is to initialize the base learner; calculate the negative gradient direction of the loss function as an approximate value of the residual; use the residual as a new label to train the next round of weak learners; and weightedly sum the prediction results of all weak learners to obtain the final model prediction value.

[0013] As described above, a full-chain food safety intelligent decision-making method is used, in which the prediction results output by the model are adjusted by combining food safety regulations, industry standards and expert experience to adjust the output results.

[0014] As described above, a full-chain food safety intelligent decision-making method is provided, wherein the process of generating intelligent decisions is to dynamically adjust the plan according to the decision rules and multi-objective optimization function based on the adjusted model output prediction value.

[0015] As described above, a full-chain food safety intelligent decision-making method is used, in which the conditions for model adaptive iteration are that the results of the same type of warning decisions are lower than expected for three consecutive times; new national standards are released or industry risk factors undergo major changes; and the model prediction accuracy is lower than the threshold for two consecutive weeks.

[0016] The present invention also provides a full-chain food safety intelligent decision-making system, comprising:

[0017] Collection parameter module: collects data and feedback information from all aspects of food production, and evaluates the reliability of the collected data through the data integrity index;

[0018] Database and indicator system module: cleans and organizes the collected data to form a food safety database, builds a three-level risk indicator system and calculates indicator values ​​based on the food safety database;

[0019] Training model module: trains the food safety risk assessment model based on the three-level risk indicator system and the food safety database, and the model outputs the risk prediction value;

[0020] Decision generation module: Based on the prediction results of the food safety risk assessment model, adjustments are made in combination with influencing factors, the adjusted risk value is converted into a risk level, and intelligent decision generation is performed according to the decision rules;

[0021] Optimization module: Executes decisions and collects feedback, iteratively optimizes model decisions based on feedback results and adaptive learning.

[0022] The beneficial effects achieved by the present invention are as follows: the present invention collects data from the entire food chain to train a food safety risk assessment model for intelligent decision-making, thereby improving the efficiency and accuracy of decision-making. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments described in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0024] Figure 1 This is a flow chart of a full-chain food safety intelligent decision-making method provided in Example 1 of this application.

[0025] Figure 2 This is a schematic diagram of a full-chain food safety intelligent decision-making system provided in Example 2 of this application. DETAILED DESCRIPTION

[0026] The following is a clear and complete description of the technical solutions in the embodiments of the present invention, in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0027] Example 1

[0028] like Figure 1 As shown, the first embodiment of the present application provides a full-chain food safety intelligent decision-making method, including:

[0029] S10. Collect data and feedback information from all aspects of food production, and evaluate the reliability of the collected data through the data integrity index.

[0030] Deploy a density-adaptive IoT sensor network to collect data in the production, circulation, and sales links. The sensor optimizes the node distribution based on the clustering algorithm to ensure that the data coverage of key risk points is clear. The formula is: D opt is the optimal sensor deployment density, k is the number of scene clusters, S i is the sample set of the i-th scene, h is the data point in the sample set of the i-th scene, μ i The sensor density is dynamically adjusted according to real-time environmental parameters to form cluster centers.

[0031] Collect production data and raw material information, including soil composition and water quality data from agricultural product production areas, to understand soil nutrient content, heavy metal contamination, and the pH and microbial content of irrigation water. For processed food ingredients, record supplier qualifications and raw material batch inspection reports, including indicators such as pesticide residues, veterinary drug residues, and additive content. Collect production process parameters, using IoT devices to collect real-time data on food production lines, including temperature, humidity, pressure, and processing time.

[0032] Collect data on distribution links and logistics information. Using global positioning systems and logistics management software, we capture data on food transportation routes, transportation duration, storage conditions, and other information. We also collect storage data, including food storage location, storage time, and inventory turnover rates. We also monitor temperature, humidity, ventilation, and the implementation of pest and rodent control measures within the warehouse to ensure food quality and safety during storage.

[0033] Collect sales data, market sampling results, and test data from random samples collected by food regulatory authorities, including sensory, physical, chemical, and microbiological indicators. Gather consumer feedback on food quality, taste, odor, and spoilage through online review platforms, complaint hotlines, and questionnaires. This information can promptly reveal potential safety issues in the food sales process.

[0034] To ensure the comprehensiveness and reliability of data collection, a data integrity index is defined to quantify the coverage and accuracy of data collection. The formula is: α is the weight coefficient for measuring the degree of data missing, N valid N is the number of valid data entries that pass the validation rules, total is the theoretical number of data items that should be collected, β is the weight coefficient for evaluating the error control level of the data acquisition equipment, e i is the theoretical accuracy of the i-th data, It is the average error of the actual collected data. When the DCI value is greater than the threshold, it is judged as high integrity and triggers subsequent analysis. Otherwise, additional data or equipment calibration is required.

[0035] S20. Clean and organize the collected data to form a food safety database, build a three-level risk indicator system and calculate the indicator values ​​based on the food safety database.

[0036] S21. Clean and organize the collected data.

[0037] Clean all collected data to remove duplicate, erroneous, and incomplete data. Integrate data from different sources and formats to build a unified food safety database. Use standardized data formats and coding rules to facilitate data query and analysis.

[0038] S22. Construct a three-level risk indicator system and calculate indicator weights and indicator values.

[0039] Construct a three-level risk indicator system, the first-level indicators are: production risk P, circulation risk D, consumer risk C, second-level indicators: production risk P includes raw material safety P1, processing compliance P2, equipment hygiene P3, personnel health P4; circulation risk D includes transportation safety D1, storage conditions D2, packaging integrity D3; the second-level indicator of consumer risk C is public opinion risk o. Third-level indicators: raw material safety P1 includes pesticide residue content P 11 , heavy metal index P 12 , Raw material traceability completeness rate P 13 ; Processing compliance P2 includes sterilization process compliance rate P 21 , Compliance of Additive Use 22 , Process standardization execution rate P 23 ; Equipment hygiene P3 includes production equipment cleanliness P 31 , disinfection frequency and standard implementation 32 , Equipment maintenance record completeness rate P 33 ; Personnel health P4 includes the employee health certificate holding rate P 41 , the pass rate of hygienic operation standard training P 42 , Health status compliance during production 43 Transport safety D1 including transport temperature fluctuations D 11 , Logistics path compliance D 12 , Transport hygiene compliance rate D 13 ; Storage conditions D2 include storage humidity control D 21 , Inventory turnover rationality D 22 , Cleanliness of storage environment D 23 ; Packaging integrity D3 includes packaging damage rate D 31 , effectiveness of protective measures D 32 , Packaging material safety compliance D 33 Public opinion risk includes complaint rate (o1), negative review keyword density (o2), and media exposure index (o3). The three-tier indicator system breaks down food safety issues into specific, quantifiable indicators layer by layer.

[0040] The entropy weight method is used to calculate the indicator weight, and the formula is: The entropy value p ij is the standardized value of the jth indicator of the i-th sample, and m is the number of samples.

[0041] Calculate the results of various indicators based on the indicators of the three-level system in the food safety database.

[0042] S30. Train a food safety risk assessment model based on the three-level risk indicator system and the food safety database, and the model outputs a risk prediction value.

[0043] The data in the food safety database is divided into a training set and a validation set, each with corresponding risk value labels. Using the training set data and the results of each indicator in the three-level system, a food safety risk assessment model is constructed and trained to predict safety risks across the entire food supply chain. Predictions are coded as low risk, medium risk, and high risk, represented by 0, 1, and 2, respectively.

[0044] Initialize the base learner, the initial prediction value of the model is the mean of the training set labels, the formula is F0(x) is the predicted value of the initial base learner, n is the number of all samples in the training set, L(y i ,γ) is the loss function, which measures the true label y of a single sample i The difference between the current predicted value γ.

[0045] In an iterative manner, a new weak learner is trained in each round to correct the residual of the previous round model, and the model performance is improved by continuously reducing the residual. For the tth round iteration, the negative gradient direction of the loss function is calculated as the approximate value of the residual. The formula is r ti is the pseudo residual of the i-th sample in the t-th round, To find the partial derivative, F t-1 (x i ) is the cumulative prediction value of the model for the i-th sample after t-1 rounds of iteration, L is the loss function, y i is the true label of the i-th sample, and the negative sign indicates updating the model along the gradient descent direction to reduce the loss function value. Use the pseudo residual as the new label to train a new weak learner h t (x), by adjusting the structure of the weak learner, minimizing the predicted value h t (x i ) and pseudo residual r ti By fitting the pseudo residuals, the model gradually learns the deficiencies of the previous round of predictions and makes targeted corrections, ultimately reducing the overall prediction error. Let the updated model after round t be F t (x) = F t-1 (x)+η t h t (x), η t is the step size to be determined, that is, the learning rate.

[0046] pass Minimize the loss of all samples, the loss function is expanded to F t-1 (x i )+η t h t (x i )=(y i -F t-1 (x i )-η t h t (x i )) 2 , substitute the formula and set the derivative to zero to get After expanding the calculation, the step size is obtained

[0047] The prediction results of all weak learners are weighted and summed to obtain the final model prediction value. The specific formula is F0(x) is the prediction value of the initial base learner, T is the total number of iterations, η t is the step size of the weak learner in round t, h t (x) is the weak learner trained in round t.

[0048] Train and optimize the model, improving its accuracy and generalization capabilities through methods such as cross-validation. Regularly update the model to incorporate new data to adapt to changes in the food production, distribution, and consumption environment.

[0049] S40. Based on the prediction results of the food safety risk assessment model, adjustments are made in combination with influencing factors, the adjusted risk values ​​are converted into risk levels, and intelligent decisions are generated based on decision-making rules.

[0050] According to the prediction results of the risk assessment model, combined with food safety regulations, industry standards and expert experience, the output results are adjusted. When new food safety data is input into the system, the risk assessment model calculates the risk value R of the food in real time. The adjustment formula is: Where R' is the adjusted risk value, is the overall adjustment factor, which is used to control the impact of external factors on the original risk value R. F is food safety regulations, I is food industry standards, E is food industry expert experience, δ is the exponential weight of food safety regulations, ε is the exponential weight of food industry standards, φ is the exponential weight of food industry expert experience, κ is used to control the growth rate of the denominator to prevent division by zero or explosive growth, and λ is the inhibition factor. When the influencing factors are all weak, the model output is suppressed. When the three influencing factors are all strong, their inhibitory effect is weakened.

[0051] Use the validation set data to input the model, generate risk values, and verify the accuracy of the model output.

[0052] The adjusted risk value is converted into a risk level. The intelligent decision-making module automatically generates corresponding decision recommendations based on the risk level and decision-making rules. For high-risk foods, the decision-making rules include an immediate suspension of sales, product recall, and comprehensive inspection of the manufacturer. For medium-risk foods, the frequency of market spot checks is increased, and companies are required to provide rectification reports. For low-risk foods, relevant indicators are continuously monitored. The decision-making rules are flexible and adjustable, and can be dynamically updated based on actual conditions. When new food safety issues arise or regulations and policies are adjusted, the decision-making rules are promptly revised.

[0053] Generate decision formula Z solution =R grade +J rule +max(θ risk ,1-θ cost ,θ speed ), where Z solution is the decision-making plan, R grade is the risk level, J rule is the decision rule, max(θ risk ,1-θ cost ,θ speed ) is a multi-objective optimization function, θ risk is the risk reduction rate, θ cost is the execution cost ratio, θ speed Decision response speed. The decision-making scheme can be adjusted by adjusting the proportions of different items in the multi-objective optimization function, and the generated decision can be adjusted based on satisfaction. The decision-making process and results are automatically recorded during the decision-making process to facilitate subsequent traceability and auditing.

[0054] S50: Execute the decision and collect feedback, and iteratively optimize the model decision based on the feedback results and adaptive learning.

[0055] Food safety managers take action based on the decision recommendations generated by the system. The results of the executed decisions are fed back to the system as new data input. This data, including the actual recovery rate of recalled food and the results of re-inspections of manufacturers following rectification, is used to evaluate the effectiveness of the decisions. Based on this feedback, the risk assessment model and decision-making rules are optimized. If a decision rule is found to be ineffective in actual implementation, the reasons are analyzed and the rule is adjusted. If there is a significant deviation between the model's predictions and the actual situation, the model is retrained or its parameters are adjusted to continuously improve the accuracy and practicality of the intelligent food safety decision-making approach across the entire food safety chain.

[0056] System iterations are automatically triggered when the following conditions occur: The effectiveness of similar early warning decisions falls short of expectations for three consecutive times; new national standards are released or industry risk factors undergo significant changes; or the model's prediction accuracy falls below 85% for two consecutive weeks. The optimization process includes adding new monitoring indicators during data collection, retraining network parameters during model training, and updating the reinforcement learning strategy library during decision-making, ensuring the system consistently maintains optimal decision-making effectiveness.

[0057] Through the above full-chain food safety intelligent decision-making method, all-round and dynamic management of food safety is achieved, effectively improving the efficiency and level of food safety management and ensuring the public's food safety.

[0058] Example 2

[0059] like Figure 2 As shown, the second embodiment of the present application provides a full-chain food safety intelligent decision-making system, including:

[0060] Collection parameter module: collects data and feedback information from all aspects of food production, and evaluates the reliability of the collected data through the data integrity index.

[0061] Deploy a density-adaptive IoT sensor network to collect data in the production, circulation, and sales links. The sensor optimizes the node distribution based on the clustering algorithm to ensure that the data coverage of key risk points is clear. The formula is: D opt is the optimal sensor deployment density, k is the number of scene clusters, S i is the sample set of the i-th scene, h is the data point in the sample set of the i-th scene, μ i The sensor density is dynamically adjusted according to real-time environmental parameters to form cluster centers.

[0062] Collect production data and raw material information, including soil composition and water quality data from agricultural product production areas, to understand soil nutrient content, heavy metal contamination, and the pH and microbial content of irrigation water. For processed food ingredients, record supplier qualifications and raw material batch inspection reports, including indicators such as pesticide residues, veterinary drug residues, and additive content. Collect production process parameters, using IoT devices to collect real-time data on food production lines, including temperature, humidity, pressure, and processing time.

[0063] Collect data on distribution links and logistics information. Using global positioning systems and logistics management software, we capture data on food transportation routes, transportation duration, storage conditions, and other information. We also collect storage data, including food storage location, storage time, and inventory turnover rates. We also monitor temperature, humidity, ventilation, and the implementation of pest and rodent control measures within the warehouse to ensure food quality and safety during storage.

[0064] Collect sales data, market sampling results, and test data from random samples collected by food regulatory authorities, including sensory, physical, chemical, and microbiological indicators. Gather consumer feedback on food quality, taste, odor, and spoilage through online review platforms, complaint hotlines, and questionnaires. This information can promptly reveal potential safety issues in the food sales process.

[0065] To ensure the comprehensiveness and reliability of data collection, a data integrity index is defined to quantify the coverage and accuracy of data collection. The formula is: α is the weight coefficient for measuring the degree of data missing, N valid N is the number of valid data entries that pass the validation rules, total is the theoretical number of data items that should be collected, β is the weight coefficient for evaluating the error control level of the data acquisition equipment, e i is the theoretical accuracy of the i-th data, It is the average error of the actual collected data. When the DCI value is greater than the threshold, it is judged as high integrity and triggers subsequent analysis. Otherwise, additional data or equipment calibration is required.

[0066] Database and indicator system module: including the sorting sub-module and the three-level risk indicator system sub-module.

[0067] Arrangement submodule: used to clean and organize the collected data.

[0068] Clean all collected data to remove duplicate, erroneous, and incomplete data. Integrate data from different sources and formats to build a unified food safety database. Use standardized data formats and coding rules to facilitate data query and analysis.

[0069] Three-level risk indicator system submodule: used to construct a three-level risk indicator system and calculate indicator weights and indicator values.

[0070] Construct a three-level risk indicator system, the first-level indicators are: production risk P, circulation risk D, consumer risk C, second-level indicators: production risk P includes raw material safety P1, processing compliance P2, equipment hygiene P3, personnel health P4; circulation risk D includes transportation safety D1, storage conditions D2, packaging integrity D3; the second-level indicator of consumer risk C is public opinion risk o. Third-level indicators: raw material safety P1 includes pesticide residue content P 11 , heavy metal index P 12 , Raw material traceability completeness rate P 13 ; Processing compliance P2 includes sterilization process compliance rate P 21 , Compliance of Additive Use 22 , Process standardization execution rate P 23; Equipment hygiene P3 includes production equipment cleanliness P 31 , disinfection frequency and standard implementation 32 , Equipment maintenance record completeness rate P 33 ; Personnel health P4 includes the employee health certificate holding rate P 41 , the pass rate of hygienic operation standard training P 42 , Health status compliance during production 43 Transport safety D1 including transport temperature fluctuations D 11 , Logistics path compliance D 12 , Transport hygiene compliance rate D 13 ; Storage conditions D2 include storage humidity control D 21 , Inventory turnover rationality D 22 , Cleanliness of storage environment D 23 ; Packaging integrity D3 includes packaging damage rate D 31 , effectiveness of protective measures D 32 , Packaging material safety compliance D 33 Public opinion risk includes complaint rate (o1), negative review keyword density (o2), and media exposure index (o3). The three-tier indicator system breaks down food safety issues into specific, quantifiable indicators layer by layer.

[0071] The entropy weight method is used to calculate the indicator weight, and the formula is: The entropy value p ij is the standardized value of the jth indicator of the i-th sample, and m is the number of samples.

[0072] Calculate the results of various indicators based on the indicators of the three-level system in the food safety database.

[0073] Training model module: Train the food safety risk assessment model based on the three-level risk indicator system and food safety database, and the model outputs the risk prediction value.

[0074] The data in the food safety database is divided into a training set and a validation set, each with corresponding risk value labels. Using the training set data and the results of each indicator in the three-level system, a food safety risk assessment model is constructed and trained to predict safety risks across the entire food supply chain. Predictions are coded as low risk, medium risk, and high risk, represented by 0, 1, and 2, respectively.

[0075] Initialize the base learner, the initial prediction value of the model is the mean of the training set labels, the formula is F0(x) is the predicted value of the initial base learner, n is the number of all samples in the training set, L(y i ,γ) is the loss function, which measures the true label y of a single sample i The difference between the current predicted value γ.

[0076] In an iterative manner, a new weak learner is trained in each round to correct the residual of the previous round model, and the model performance is improved by continuously reducing the residual. For the tth round iteration, the negative gradient direction of the loss function is calculated as the approximate value of the residual. The formula is r ti is the pseudo residual of the i-th sample in the t-th round, To find the partial derivative, F t-1 (x i ) is the cumulative prediction value of the model for the i-th sample after t-1 rounds of iteration, L is the loss function, y i is the true label of the i-th sample, and the negative sign indicates updating the model along the gradient descent direction to reduce the loss function value. Use the pseudo residual as the new label to train the new weak learner h t (x), by adjusting the structure of the weak learner, minimizing the predicted value h t (x i ) and pseudo residual r ti By fitting the pseudo residuals, the model gradually learns the deficiencies of the previous round of predictions and makes targeted corrections, ultimately reducing the overall prediction error. Let the updated model after round t be F t (x) = F t-1 (x)+η t h t (x), η t is the step size to be determined, that is, the learning rate.

[0077] pass Minimize the loss of all samples, the loss function is expanded to F t-1 (x i )+η t h t (x i )=(y i -F t-1 (x i )-η t h t (x i )) 2 , substitute the formula and set the derivative to zero to get After expanding the calculation, the step size is obtained

[0078] The prediction results of all weak learners are weighted and summed to obtain the final model prediction value. The specific formula is F0(x) is the prediction value of the initial base learner, T is the total number of iterations, η t is the step size of the weak learner in round t, h t (x) is the weak learner trained in round t.

[0079] Train and optimize the model, improving its accuracy and generalization capabilities through methods such as cross-validation. Regularly update the model to incorporate new data to adapt to changes in the food production, distribution, and consumption environment.

[0080] Decision generation module: Based on the prediction results of the food safety risk assessment model and combined with the influencing factors, the adjusted risk value is converted into a risk level, and intelligent decision generation is performed according to the decision rules.

[0081] According to the prediction results of the risk assessment model, combined with food safety regulations, industry standards and expert experience, the output results are adjusted. When new food safety data is input into the system, the risk assessment model calculates the risk value R of the food in real time. The adjustment formula is: Where R' is the adjusted risk value, is the overall adjustment factor, which is used to control the impact of external factors on the original risk value R. F is food safety regulations, I is food industry standards, E is food industry expert experience, δ is the exponential weight of food safety regulations, ε is the exponential weight of food industry standards, φ is the exponential weight of food industry expert experience, κ is used to control the growth rate of the denominator to prevent division by zero or explosive growth, and λ is the inhibition factor. When the influencing factors are all weak, the model output is suppressed. When the three influencing factors are all strong, their inhibitory effect is weakened.

[0082] Use the validation set data to input the model, generate risk values, and verify the accuracy of the model output.

[0083] The adjusted risk value is converted into a risk level. The intelligent decision-making module automatically generates corresponding decision recommendations based on the risk level and decision-making rules. For high-risk foods, the decision-making rules include an immediate suspension of sales, product recall, and comprehensive inspection of the manufacturer. For medium-risk foods, the frequency of market spot checks is increased, and companies are required to provide rectification reports. For low-risk foods, relevant indicators are continuously monitored. The decision-making rules are flexible and adjustable, and can be dynamically updated based on actual conditions. When new food safety issues arise or regulations and policies are adjusted, the decision-making rules are promptly revised.

[0084] Generate decision formula Z solution =R grade +J rule +max(θ risk ,1-θ cost ,θ speed ), where Z solution is the decision-making plan, R grade is the risk level, J rule is the decision rule, max(θ risk ,1-θ cost ,θ speed) is a multi-objective optimization function, θ risk is the risk reduction rate, θ cost is the execution cost ratio, θ speed Decision response speed. The decision-making scheme can be adjusted by adjusting the proportions of different items in the multi-objective optimization function, and the generated decision can be adjusted based on satisfaction. The decision-making process and results are automatically recorded during the decision-making process to facilitate subsequent traceability and auditing.

[0085] Optimization module: Executes decisions and collects feedback, iteratively optimizes model decisions based on feedback results and adaptive learning.

[0086] Food safety managers take action based on the decision recommendations generated by the system. The results of the executed decisions are fed back to the system as new data input. This data, including the actual recovery rate of recalled food and the results of re-inspections of manufacturers following rectification, is used to evaluate the effectiveness of the decisions. Based on this feedback, the risk assessment model and decision-making rules are optimized. If a decision rule is found to be ineffective in actual implementation, the reasons are analyzed and the rule is adjusted. If there is a significant deviation between the model's predictions and the actual situation, the model is retrained or its parameters are adjusted to continuously improve the accuracy and practicality of the intelligent food safety decision-making approach across the entire food safety chain.

[0087] System iterations are automatically triggered when the following conditions occur: The effectiveness of similar early warning decisions falls short of expectations for three consecutive times; new national standards are released or industry risk factors undergo significant changes; or the model's prediction accuracy falls below 85% for two consecutive weeks. The optimization process includes adding new monitoring indicators during data collection, retraining network parameters during model training, and updating the reinforcement learning strategy library during decision-making, ensuring the system consistently maintains optimal decision-making effectiveness.

[0088] Through the above full-chain food safety intelligent decision-making system, all-round and dynamic management of food safety is achieved, effectively improving the efficiency and level of food safety management and ensuring the public's food safety.

[0089] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made on the basis of the technical solution of the present invention should be included in the scope of protection of the present invention.

Claims

1. A full-chain food safety intelligent decision-making method and system, characterized by: include: S10. Collect data and feedback from all aspects of food production and assess the reliability of the collected data using the data integrity index; S20. Clean and organize the collected data to form a food safety database, build a three-level risk indicator system, and calculate indicator values ​​based on the food safety database; S30. Train a food safety risk assessment model based on the three-level risk indicator system and the food safety database, and output a risk prediction value. S40. Based on the prediction results of the food safety risk assessment model, adjustments are made in combination with influencing factors, the adjusted risk value is converted into a risk level, and intelligent decision making is made according to the decision rules; S50: Execute the decision and collect feedback, and iteratively optimize the model decision based on the feedback results and adaptive learning.

2. A full-chain food safety intelligent decision-making method according to claim 1, characterized in that: Collect data from all aspects of food production, including production data, circulation data, sales data, and consumer feedback data.

3. A full-chain food safety intelligent decision-making method according to claim 1, characterized in that: The three-level risk indicator system breaks down food safety issues layer by layer into specific and quantifiable indicators, including production risks, circulation risks, and consumption risks.

4. The whole-chain food safety intelligent decision-making method according to claim 1, characterized in that: The training process of the food safety risk assessment model is to initialize the base learner; calculate the negative gradient direction of the loss function as an approximate value of the residual; use the residual as the new label to train the next round of weak learners; and weightedly sum the prediction results of all weak learners to obtain the final model prediction value.

5. The whole-chain food safety intelligent decision-making method according to claim 1, characterized in that: Adjusting the prediction results of the model output is to adjust the output results in combination with food safety regulations, industry standards and expert experience.

6. The whole-chain food safety intelligent decision-making method according to claim 1, characterized in that: The process of generating intelligent decisions is to dynamically adjust the plan based on the adjusted model output prediction value according to the decision rules and multi-objective optimization function.

7. The whole-chain food safety intelligent decision-making method according to claim 1, characterized in that: The conditions for model adaptive iteration are: the results of the same type of early warning decisions are lower than expected for three consecutive times; new national standards are released or industry risk factors undergo major changes; the model prediction accuracy is lower than the threshold for two consecutive weeks.

8. A full-chain food safety intelligent decision-making system, characterized by: include: Collection parameter module: collects data and feedback information from all aspects of food production, and evaluates the reliability of the collected data through the data integrity index; Database and indicator system module: cleans and organizes the collected data to form a food safety database, builds a three-level risk indicator system and calculates indicator values ​​based on the food safety database; Training model module: trains the food safety risk assessment model based on the three-level risk indicator system and the food safety database, and the model outputs the risk prediction value; Decision generation module: Based on the prediction results of the food safety risk assessment model, adjustments are made in combination with influencing factors, the adjusted risk value is converted into a risk level, and intelligent decision generation is performed according to the decision rules; Optimization module: Executes decisions and collects feedback, iteratively optimizes model decisions based on feedback results and adaptive learning.