Food safety monitoring method and system based on processing data

By using a cause-and-effect graph and causal chain propagation mechanism in food processing, the food safety risk score is dynamically calculated, which solves the problems of inaccurate risk assessment and improper resource allocation in traditional methods, and realizes precise modeling and efficient management of food safety risks.

CN120317696BActive Publication Date: 2025-11-25JIANGXI XUWEINONG FOOD CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510806819.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-17
Publication Date
2025-11-25
Estimated Expiration
2045-06-17

AI Technical Summary

Technical Problem

Traditional food safety monitoring methods rely on static thresholds and single-variable judgments, which cannot adapt to the dynamic changes and outlier interference in complex food processing processes, making it difficult to identify potential hazards, resulting in inaccurate risk assessments and improper resource allocation.

Method used

By modeling processing data using a causal graph of food processing, food safety risk scores are dynamically calculated, risk propagation paths and key influencing nodes are identified, and chain propagation is carried out using a causal chain propagation mechanism to achieve precise modeling and dynamic management of food safety risks.

Benefits of technology

It significantly improves the accuracy of risk assessment and the efficiency of monitoring resource utilization, enabling more precise identification and management of food safety risks and optimizing resource allocation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120317696B_ABST
    Figure CN120317696B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of food safety management, and particularly relates to a food safety monitoring method and system based on processing data.A food safety monitoring system based on processing data comprises a processing data acquisition module, a node risk score calculation module, an abnormal activation causal chain determination module, a food safety risk score module and a monitoring resource allocation module.The present application models processing data through a food processing causal diagram, and dynamically calculates a food safety risk score based on a causal chain propagation mechanism.Compared with prior art which only relies on static threshold or single variable judgment, the present application can comprehensively consider the causal relationship between multiple processing variables, identify the propagation path of risk and key impact nodes;on this basis, through chain propagation of abnormal activation causal chain, a more mechanism-explaining overall risk score is obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of food safety management technology, and specifically to a food safety monitoring method and system based on processing data. Background Technology

[0002] In the field of food safety management, traditional monitoring methods typically rely on static thresholds and single-variable judgments, that is, determining whether a processing procedure is qualified by setting maximum allowable values ​​for certain key variables (such as temperature, time, etc.). These methods are easy to implement and low in cost, but they also have significant limitations.

[0003] First, static thresholds cannot cope with the complex dynamic changes in actual production. Variables in food processing often exhibit strong time dependence. For example, fluctuations in sterilization temperature are related to multiple factors such as cleaning status and equipment switching frequency. Threshold judgments for a single variable cannot fully reflect the interactions between these complex factors and their combined impact on food safety. Furthermore, single-variable judgments struggle to capture the interdependencies between variables. For instance, whether cleaning operations are completed, whether sterilization temperature is stable, and whether fermentation time is controlled within an appropriate range—the combined effects of these variables often determine the quality and safety of the final product.

[0004] Secondly, static threshold methods are susceptible to interference from outliers, especially when dealing with batch variations or production fluctuations. Many anomalies in the processing stages do not immediately lead to obvious non-compliance, but may gradually accumulate into hidden food safety risks, which traditional methods often cannot detect in a timely manner.

[0005] Therefore, food safety monitoring methods that rely solely on static thresholds or single variables are ill-suited to the increasingly complex production environment and ever-changing processing procedures. Summary of the Invention

[0006] This invention models processing data using a causal graph of food processing and dynamically calculates food safety risk scores based on a causal chain propagation mechanism. Compared to existing technologies that rely solely on static thresholds or single-variable judgments, this invention comprehensively considers the causal relationships between multiple processing variables, identifies the propagation path of risks, and identifies key influencing nodes. Furthermore, by chain-like propagation of the causal chain of abnormal activations, a more mechanistically interpretable overall risk score is obtained. This score guides the priority allocation of monitoring resources to variable nodes with a greater impact on food safety, achieving refined modeling and dynamic management of food safety risks, and significantly improving the accuracy of risk assessment and the efficiency of monitoring resource utilization.

[0007] This invention provides a food safety monitoring method based on processing data, comprising:

[0008] Step S1: During food processing, obtain the processing data at the current timestamp, match the processing variables in the processing data to the variable nodes in the food processing causal graph, and calculate the node risk score corresponding to the processing variables in the processing data; the food processing causal graph includes several directed food processing causal association pairs and the propagation weights corresponding to the food processing causal association pairs. The storage format of the food processing causal association pairs is (variable node, variable node).

[0009] Step S2: Determine the causal chain of abnormal activation based on the node risk scores corresponding to the processing variables and the causal graph of food processing;

[0010] Step S3: Based on the node risk score corresponding to the processing variable, calculate the local food safety risk score corresponding to each abnormal activation causal chain through chain propagation operation, and then perform a weighted summation operation on all local food safety risk scores to obtain the food safety risk score. If the food safety risk score is higher than the risk score threshold, proceed to step S5; if the food safety risk score is not higher than the risk score threshold, proceed to step S4.

[0011] Step S4: Determine the high-risk node set and the low-risk node set, perform monitoring resource allocation based on the high-risk node set and the low-risk node set, and return to step S1 to perform the next round of processing data analysis;

[0012] Step S5: Stop the food processing operation and output the set of high-risk nodes from the previous round.

[0013] As a preferred approach, calculating the node risk score corresponding to the processing variables in the processing data includes the following steps:

[0014] For any processing variable, obtain the normal probability density function corresponding to the processing variable, and calculate the integral of the normal probability density function corresponding to the processing variable from negative infinity to the processing variable as the cumulative probability CDF. Then, the node risk score corresponding to the processing variable is R=2|CDF-0.5|.

[0015] The normal distribution probability density function corresponding to the processing variable is constructed as follows: the mean and standard deviation of the normal distribution corresponding to the processing variable are fitted by the historical qualified training set of processing variables, and then the normal distribution probability density function corresponding to the processing variable is constructed based on the obtained mean and standard deviation.

[0016] As a preferred approach, the abnormal activation causal chain is determined based on the node risk score corresponding to the processing variable and the food processing causal graph, specifically including the following steps:

[0017] Variable nodes that are not pointed to by any variable nodes are called source variable nodes, and variable nodes that do not point to any variable nodes are called leaf variable nodes.

[0018] Traverse the cause-effect graph of food processing and construct several candidate cause-effect chains. Each candidate cause-effect chain includes several variable nodes, with the first and last nodes being the source variable node and the last node being the leaf variable node, respectively.

[0019] Traverse all candidate causal chains. If the number of variable nodes with risk scores higher than the risk score threshold in the selected candidate causal chain is higher than the threshold for the number of abnormal nodes, record the selected candidate causal chain as an abnormally activated causal chain.

[0020] As a preferred approach, based on the node risk scores corresponding to the processing variables, a local food safety risk score is calculated for each abnormal activation causal chain through a chain propagation operation. Then, all local food safety risk scores are weighted and summed to obtain the food safety score. The specific steps include the following:

[0021] The abnormal activation causal chain is divided into several food processing causal association pairs. For each food processing causal association pair, the variable node in the former of the food processing causal association pair and the corresponding propagation weight are multiplied to obtain the propagation risk score. Then, the difference between 1 and the propagation risk score is calculated and recorded as the safety score.

[0022] Perform a multiplication operation on the safety score corresponding to each food processing causal relationship to obtain the cumulative safety score, and then calculate the difference between 1 and the cumulative safety score, which is recorded as the local food safety risk score corresponding to the abnormal activation causal chain.

[0023] Then, a weighted summation of all local food safety risk scores is performed to obtain the food safety risk score.

[0024] As a preferred aspect, the propagation weights of all food processing causal relationships in the food processing causal graph are determined as follows:

[0025] Initialize all propagation weights;

[0026] Obtain a historical qualified training and processing dataset, which includes several historical qualified training and processing data. Label the historical qualified training and processing data using node risk scores.

[0027] The labeled historical qualified training dataset is used to form a propagation weight training set. The propagation weight training set is used to train the corresponding propagation weights for all food processing causal relationships in the food processing causal graph. The specific training method is as follows: For any labeled historical qualified training dataset, the labeled node risk score is matched to the variable node in the food processing causal graph. Then, the node risk score corresponding to the variable node in the food processing causal graph is reconstructed through forward propagation to construct the corresponding predicted node risk score. Taking the loss value between the node risk score corresponding to the variable node in the food processing causal graph and the predicted node risk score as the objective, all propagation weights are updated through gradient descent until the training converges. The trained propagation weights are then output.

[0028] The forward propagation method is as follows: any variable node in the food processing causal graph is recorded as the target variable node, and the variable nodes in the food processing causal graph that point to the target variable node are recorded as forward variable nodes. The node risk scores corresponding to all forward variable nodes are weighted and summed with their corresponding propagation weights to obtain the predicted node risk score corresponding to the target variable node.

[0029] As a preferred aspect, determining the high-risk node set and the low-risk node set specifically includes the following steps: Recording all variable nodes with overlapping anomalous activation causal chains as high-risk nodes, and using the number of times a high-risk node overlaps in all anomalous activation causal chains as the risk weight of the high-risk node; traversing all high-risk nodes, forming a high-risk node set from all high-risk nodes whose risk weight is higher than the risk weight threshold; recording all variable nodes in the food processing causal graph other than those corresponding to all anomalous activation causal chains as low-risk nodes, and forming a low-risk node set from all low-risk nodes.

[0030] As a preferred approach, monitoring resource allocation is performed based on high-risk node sets and low-risk node sets, specifically including the following steps: processing variables corresponding to variable nodes in the high-risk node set are collected at a high collection frequency, while processing variables corresponding to variable nodes in the low-risk node set are collected at a low collection frequency.

[0031] The present invention also provides a food safety monitoring system based on processing data, comprising:

[0032] The processing data acquisition module is used to acquire processing data at the current timestamp;

[0033] The node risk score calculation module is used to match the processing variables in the processing data to the variable nodes in the food processing causal graph and calculate the node risk score corresponding to the processing variables in the processing data. The food processing causal graph includes several directed food processing causal association pairs and the propagation weights corresponding to the food processing causal association pairs. The storage format of the food processing causal association pairs is (variable node, variable node).

[0034] The module for determining the causal chain of abnormal activation is used to determine the causal chain of abnormal activation based on the node risk score corresponding to the processing variable and the causal graph of food processing.

[0035] The food safety risk scoring module is used to calculate the local food safety risk score corresponding to each abnormal activation causal chain based on the node risk score corresponding to the processing variable through chain propagation operation, and then perform a weighted summation operation on all local food safety scores to obtain the food safety risk score.

[0036] The monitoring resource allocation module is used to identify high-risk and low-risk node sets, and to perform monitoring resource allocation on the high-risk and low-risk node sets.

[0037] The present invention has the following advantages:

[0038] This invention models processing data using a causal graph of food processing and dynamically calculates food safety risk scores based on a causal chain propagation mechanism. Compared to existing technologies that rely solely on static thresholds or single-variable judgments, this invention comprehensively considers the causal relationships between multiple processing variables, identifies the propagation path of risks, and identifies key influencing nodes. Furthermore, by chain-like propagation of the causal chain of abnormal activations, a more mechanistically interpretable overall risk score is obtained. This score guides the priority allocation of monitoring resources to variable nodes with a greater impact on food safety, achieving refined modeling and dynamic management of food safety risks, and significantly improving the accuracy of risk assessment and the efficiency of monitoring resource utilization. Attached Figure Description

[0039] Figure 1 This is a schematic diagram of the food safety monitoring system based on processing data used in an embodiment of the present invention. Detailed Implementation

[0040] To enable those skilled in the art to better understand the technical solutions of this invention, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of this invention.

[0041] Example 1: A food safety monitoring method based on processing data, comprising:

[0042] Step S1: During food processing, acquire processing data at the current timestamp. Taking dairy products as an example, the processing data specifically includes processing variables from sensors such as sterilization temperature, sterilization duration, homogenization pressure, fermentation time, fermentation temperature, and pH value. It also includes data from operation logs such as whether cleaning is complete, whether operation steps are skipped, and the number of abnormal operations. Match the processing variables in the processing data to variable nodes in the food processing cause-effect graph. It should be noted that these variable nodes include physical nodes (temperature, time, concentration) and behavioral nodes (whether cleaning is complete, whether operation steps are skipped, and the number of abnormal operations). Calculate the node risk score corresponding to the processing variables in the processing data. The node risk score can reflect the abnormality of specific process parameters or operational behaviors. This provides a foundation for subsequent risk communication. The food processing causal graph includes several directed food processing causal relationships and their corresponding propagation weights. The food processing causal relationships are stored in the form of (variable node, variable node), and the two variable nodes in a food processing causal relationship are not the same. The food processing causal relationships are constructed by experts based on HACCP, SOP specifications, and empirical rules, describing the prior causal relationship between variable nodes, such as "whether the cleaning operation is completed - the fluctuation range of the sterilization temperature". In addition to being set according to HACCP, SOP specifications, and empirical rules, it also includes determining the association between variable nodes based on the temporal changes between variables, and further determining the food processing causal relationships, such as "fermentation time deviation - pH value".

[0043] Step S2: Based on the node risk scores corresponding to the processing variables and the food processing causal graph, determine the anomaly activation causal chain. The anomaly activation causal chain represents the path of food safety anomaly propagation. Each variable node on these paths will affect the food safety score of downstream variable nodes. That is, anomalies in the processing data corresponding to one variable node will propagate to the processing data corresponding to other variable nodes through the anomaly activation causal chain, thereby affecting the overall food safety score. For example, the anomaly activation causal chain "equipment switching frequency - whether cleaning operation is completed - sterilization temperature fluctuation range - fermentation time deviation - pH value" means that when the equipment switching frequency is high, the equipment cleaning pressure is high, which will increase the probability of cleaning operation failure, resulting in the possibility of incomplete cleaning operation. Incomplete cleaning operation will lead to increased surface contamination of the equipment, which will lead to unstable sterilization temperature control (increased fluctuation). Unstable sterilization temperature will lead to increased fermentation time deviation, which will increase the risk of pH value anomalies. By using the anomaly activation causal chain, we can more accurately analyze the food safety situation based on considering the causal relationship between processing data.

[0044] Step S3: Based on the node risk scores corresponding to the processing variables, calculate the local food safety risk score corresponding to each abnormal activation causal chain through chain propagation operation, and then perform a weighted summation operation on all local food safety risk scores to obtain the food safety risk score. If the food safety risk score is higher than the risk score threshold, proceed to step S5. The risk score threshold is set in advance by the operator to reflect the tolerance for food processing safety; if the food safety risk score is not higher than the risk score threshold, proceed to step S4.

[0045] Step S4: Record all variable nodes with overlapping abnormal activation causal chains as high-risk nodes. High-risk nodes represent processing variables that have a significant impact on food safety risks. The processing variables corresponding to these high-risk nodes need to be focused on in the subsequent monitoring process. The number of times a high-risk node overlaps in all abnormal activation causal chains is used as the risk weight of the high-risk node. Traverse all high-risk nodes and form a high-risk node set for all high-risk nodes whose risk weight is higher than the risk weight threshold. The risk weight threshold is also set in advance by the operator to reflect the impact of the processing variables corresponding to the high-risk nodes on food safety. Record the variable nodes in the food processing causal graph other than those corresponding to all abnormal activation causal chains as low-risk nodes. Form a low-risk node set for all low-risk nodes. Perform monitoring resource allocation based on the high-risk node set and the low-risk node set, and return to step S1 to perform the next round of processing data analysis.

[0046] Step S5: At this point, the food safety risk has exceeded expectations, so it is necessary to stop the food processing operation and output the high-risk node set output in the previous round. The high-risk node set output in the previous round can reflect the main processing variables that lead to the food safety risk, and provide a reference for the subsequent operation and maintenance of the operators.

[0047] This application models processing data using a causal graph of food processing and dynamically calculates food safety risk scores based on a causal chain propagation mechanism. Compared to existing technologies that rely solely on static thresholds or single-variable judgments, this approach comprehensively considers the causal relationships between multiple processing variables, identifying risk propagation paths and key influencing nodes. Furthermore, by propagating the causal chain of abnormal activations, a more mechanistic and interpretable overall risk score is obtained. This score guides the priority allocation of monitoring resources to variable nodes with a greater impact on food safety, achieving refined modeling and dynamic management of food safety risks. This significantly improves the accuracy of risk assessment and the efficiency of monitoring resource utilization.

[0048] Calculating the node risk score corresponding to the processing variables in the processing data includes the following steps:

[0049] For any processing variable, obtain the normal probability density function corresponding to the processing variable, and calculate the integral of the normal probability density function corresponding to the processing variable from negative infinity to the processing variable as the cumulative probability CDF. Then, the node risk score corresponding to the processing variable is R=2|CDF-0.5|.

[0050] The normal distribution probability density function corresponding to the processing variable is constructed as follows: The mean and standard deviation of the normal distribution corresponding to the processing variable are fitted using a historical qualified training set of processing variables. Then, the normal distribution probability density function corresponding to the processing variable is constructed based on the obtained mean and standard deviation. Here, the historical qualified training set of processing variables refers to the set of processing variables obtained when no food safety incidents have occurred. For example, for sterilization temperature, the historical qualified training set of processing variables is {T1, T2, T3, ..., Ti, ..., TI}, where Ti is the sterilization temperature obtained when no food safety incidents have occurred. The mean μ and standard deviation σ are calculated for the historical qualified training set of processing variables {T1, T2, T3, ..., Ti, ..., TI}, and the corresponding normal distribution probability density function f(T) = (2πσ) / (2πσ) is constructed. 2 ) -0.5 exp(-(T-μ)) 2 / 2σ 2 ), where T is the corresponding processing variable, such as sterilization temperature;

[0051] Based on the node risk scores corresponding to processing variables and the causal graph of food processing, the abnormal activation causal chain is determined, specifically including the following steps:

[0052] Variable nodes that are not pointed to by any variable nodes are called source variable nodes, and variable nodes that do not point to any variable nodes are called leaf variable nodes.

[0053] Traverse the cause-effect graph of food processing and construct several candidate cause-effect chains. Each candidate cause-effect chain includes several variable nodes, with the first and last nodes being the source variable node and the last node being the leaf variable node, respectively.

[0054] Traverse all candidate causal chains. If the number of variable nodes with risk scores higher than the risk score threshold in the selected candidate causal chain is higher than the threshold for the number of abnormal nodes, record the selected candidate causal chain as an abnormal activated causal chain. The threshold for the number of abnormal nodes is set in advance by the operator.

[0055] Based on the node risk scores corresponding to the processing variables, the local food safety risk score corresponding to each abnormal activation causal chain is calculated through chain propagation. Then, all local food safety risk scores are weighted and summed to obtain the food safety score. The specific steps include the following:

[0056] The abnormal activation causal chain is divided into several food processing causal association pairs. For each food processing causal association pair, the variable node in the former of the food processing causal association pair and the corresponding propagation weight are multiplied to obtain the propagation risk score. Then, the difference between 1 and the propagation risk score is calculated and recorded as the safety score.

[0057] Perform a multiplication operation on the safety score corresponding to each food processing causal relationship to obtain the cumulative safety score, and then calculate the difference between 1 and the cumulative safety score, which is recorded as the local food safety risk score corresponding to the abnormal activation causal chain.

[0058] Then, a weighted summation operation is performed on all local food safety risk scores to obtain the food safety risk score. It should be noted that during the weighted summation operation on all local food safety risk scores, the weight of each local food safety risk score is determined by the leaf variable node at the end of the abnormal activation causal chain corresponding to the local food safety risk score. Generally, each leaf variable node will be assigned a weight by the operator.

[0059] The propagation weights of all food processing causal relationships in the food processing causal graph are determined as follows:

[0060] Initialize all propagation weights, typically by setting them to random values ​​between 0 and 1;

[0061] Obtain a historical qualified training and processing dataset, which includes several historical qualified training and processing datasets. These historical qualified training and processing datasets were obtained before any food safety incidents occurred. The historical qualified training and processing datasets are labeled using node risk scores.

[0062] The labeled historical qualified training dataset is used to form a propagation weight training set. The propagation weight training set is used to train the corresponding propagation weights for all food processing causal relationships in the food processing causal graph. The specific training method is as follows: For any labeled historical qualified training dataset, the labeled node risk score is matched to the variable node in the food processing causal graph. Then, the node risk score corresponding to the variable node in the food processing causal graph is reconstructed through forward propagation to construct the corresponding predicted node risk score. Taking the loss value between the node risk score corresponding to the variable node in the food processing causal graph and the predicted node risk score as the objective, all propagation weights are updated through gradient descent until the training converges. Here, training convergence means that all propagation weights no longer change significantly. The trained propagation weights are then output.

[0063] The forward propagation method is as follows: any variable node in the food processing cause-effect graph is recorded as the target variable node, and the variable node in the food processing cause-effect graph that points to the target variable node is recorded as the forward variable node. The node risk scores corresponding to all forward variable nodes are weighted and summed with the corresponding propagation weights to obtain the predicted node risk score corresponding to the target variable node.

[0064] Training the propagation weights for causal relationships in food processing is essentially unsupervised training of the food processing causal graph as a graphical autoencoder. The training objective is to achieve propagation consistency within the food processing causal graph.

[0065] The monitoring resource allocation is performed based on high-risk and low-risk node sets, specifically including the following steps: For the processing variables corresponding to the variable nodes in the high-risk node set, a high collection frequency is collected, which is set by the operator. For the processing variables corresponding to the variable nodes in the low-risk node set, a low collection frequency is collected, which is also set by the operator. It can be expected that changing the collection frequency will cause the collection timestamps to be misaligned. In this case, the most recently collected processing data with a pre-set timestamp can be used as the timestamp for the processing data.

[0066] It should be added that the risk scoring thresholds, abnormal node scoring thresholds, and risk weight thresholds mentioned above are all set based on expert experience and will be adjusted based on actual food safety monitoring feedback during the system development process.

[0067] Example 2, a food safety monitoring system based on processing data, see [link / reference] Figure 1 ,include:

[0068] The processing data acquisition module is used to acquire processing data with the current timestamp during food processing. Taking dairy products as an example, the processing data specifically includes processing variables from sensors such as sterilization temperature, sterilization duration, homogenization pressure, fermentation time, fermentation temperature, and pH value, as well as data from operation logs such as whether cleaning is completed, whether operation steps are skipped, and the number of abnormal operations.

[0069] The node risk score calculation module is used to match processing variables in the processing data to variable nodes in the food processing causal graph. It should be noted that these variable nodes include physical nodes (temperature, time, concentration) and behavioral nodes (whether cleaning is complete, whether operation steps are skipped, and the number of abnormal operations). The module calculates the node risk score corresponding to the processing variables in the processing data. The node risk score can reflect the abnormality of specific process parameters or operational behaviors, providing a basis for subsequent risk propagation. The food processing causal graph includes several directed food processing causal association pairs and their corresponding propagation weights. The storage format of the food processing causal association pairs is (variable node, variable node), and the two variable nodes in a food processing causal association pair are not identical. The construction of the food processing causal association pairs is set by experts according to HACCP, SOP specifications, and empirical rules, describing the prior causal relationship between variable nodes, such as "whether cleaning operation is complete - sterilization temperature fluctuation range". In addition to being set according to HACCP, SOP specifications, and empirical rules, it also includes determining the association between variable nodes based on the temporal changes between variables, and further determining the food processing causal association pairs, such as "fermentation time deviation - pH value".

[0070] The anomaly activation causal chain determination module is used to determine the anomaly activation causal chain based on the node risk scores corresponding to processing variables and the food processing causal graph. The anomaly activation causal chain represents the path of food safety anomaly propagation. Each variable node on these paths will affect the food safety scores of downstream variable nodes. That is, anomalies in the processing data corresponding to one variable node will propagate to the processing data corresponding to other variable nodes through the anomaly activation causal chain, thereby affecting the overall food safety score. For example, the anomaly activation causal chain "equipment switching frequency - whether cleaning operation is completed - sterilization temperature fluctuation range - fermentation time deviation - pH value" means that when the equipment switching frequency is high, the equipment cleaning pressure is high, which will increase the probability of cleaning operation failure, resulting in the possibility of incomplete cleaning operation. Incomplete cleaning operation will lead to increased surface contamination of equipment, which will lead to unstable sterilization temperature control (increased fluctuation). Unstable sterilization temperature will lead to increased fermentation time deviation, which will increase the risk of pH value anomalies. By using the anomaly activation causal chain, food safety can be analyzed more accurately based on considering the causal relationship between processing data.

[0071] The food safety risk scoring module is used to calculate the local food safety risk score corresponding to each abnormal activation causal chain based on the node risk score corresponding to the processing variable through chain propagation operation, and then perform a weighted summation operation on all local food safety scores to obtain the food safety risk score.

[0072] The monitoring resource allocation module is used to mark all variable nodes with overlapping abnormal activation causal chains as high-risk nodes. High-risk nodes represent processing variables that have a significant impact on food safety risks. The processing variables corresponding to these high-risk nodes need to be focused on in the subsequent monitoring process. The number of times a high-risk node overlaps in all abnormal activation causal chains is used as the risk weight of the high-risk node. All high-risk nodes are traversed, and all high-risk nodes with risk weights higher than the risk weight threshold are grouped into a high-risk node set. The risk weight threshold is also set in advance by the operator to reflect the impact of the processing variables corresponding to high-risk nodes on food safety. Variable nodes in the food processing causal graph other than those corresponding to all abnormal activation causal chains are marked as low-risk nodes. All low-risk nodes are grouped into a low-risk node set, and monitoring resource allocation is performed based on the high-risk node set and the low-risk nodes.

[0073] It should be understood that those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims. Parts not described in detail in this specification are prior art known to those skilled in the art.

Claims

1. A food safety monitoring method based on processing data, characterized in that, include: Step S1: During food processing, obtain the processing data at the current timestamp, match the processing variables in the processing data to the variable nodes in the food processing causal graph, and calculate the node risk score corresponding to the processing variables in the processing data; the food processing causal graph includes several directed food processing causal association pairs and the propagation weights corresponding to the food processing causal association pairs. The storage format of the food processing causal association pairs is (variable node, variable node). Step S2: Determine the causal chain of abnormal activation based on the node risk scores corresponding to the processing variables and the causal graph of food processing; Step S3: Based on the node risk score corresponding to the processing variable, calculate the local food safety risk score corresponding to each abnormal activation causal chain through chain propagation operation, and then perform a weighted summation operation on all local food safety risk scores to obtain the food safety risk score. If the food safety risk score is higher than the risk score threshold, proceed to step S5; if the food safety risk score is not higher than the risk score threshold, proceed to step S4. Step S4: Determine the high-risk node set and the low-risk node set, perform monitoring resource allocation based on the high-risk node set and the low-risk node set, and return to step S1 to perform the next round of processing data analysis; Step S5: Stop the food processing operation and output the set of high-risk nodes from the previous round; Calculating the node risk score corresponding to the processing variables in the processing data includes the following steps: For any processing variable, obtain the normal probability density function corresponding to the processing variable, and calculate the integral of the normal probability density function corresponding to the processing variable from negative infinity to the processing variable as the cumulative probability CDF. Then, the node risk score corresponding to the processing variable is R=2|CDF-0.5|. The normal distribution probability density function corresponding to the processing variable is constructed as follows: the mean and standard deviation of the normal distribution corresponding to the processing variable are fitted by the historical qualified training processing variable set, and then the normal distribution probability density function corresponding to the processing variable is constructed based on the obtained mean and standard deviation. Based on the node risk scores corresponding to processing variables and the causal graph of food processing, the abnormal activation causal chain is determined, specifically including the following steps: Variable nodes that are not pointed to by any variable nodes are called source variable nodes, and variable nodes that do not point to any variable nodes are called leaf variable nodes. Traverse the cause-effect graph of food processing and construct several candidate cause-effect chains. Each candidate cause-effect chain includes several variable nodes, with the first and last nodes being the source variable node and the last node being the leaf variable node, respectively. Traverse all candidate causal chains. If the number of variable nodes with risk scores higher than the risk score threshold in the selected candidate causal chain is higher than the threshold for the number of abnormal nodes, record the selected candidate causal chain as an abnormally activated causal chain.

2. The food safety monitoring method based on processing data according to claim 1, characterized in that, Based on the node risk scores corresponding to the processing variables, the local food safety risk score corresponding to each abnormal activation causal chain is calculated through chain propagation. Then, all local food safety risk scores are weighted and summed to obtain the food safety score. The specific steps include the following: The abnormal activation causal chain is divided into several food processing causal association pairs. For each food processing causal association pair, the variable node in the former of the food processing causal association pair and the corresponding propagation weight are multiplied to obtain the propagation risk score. Then, the difference between 1 and the propagation risk score is calculated and recorded as the safety score. Perform a multiplication operation on the safety score corresponding to each food processing causal relationship to obtain the cumulative safety score, and then calculate the difference between 1 and the cumulative safety score, which is recorded as the local food safety risk score corresponding to the abnormal activation causal chain. Then, a weighted summation of all local food safety risk scores is performed to obtain the food safety risk score.

3. The food safety monitoring method based on processing data according to claim 2, characterized in that, The propagation weights of all food processing causal relationships in the food processing causal graph are determined as follows: Initialize all propagation weights; Obtain a historical qualified training and processing dataset, which includes several historical qualified training and processing data. Label the historical qualified training and processing data using node risk scores. The labeled historical qualified training dataset is used to form a propagation weight training set. The propagation weight training set is used to train the corresponding propagation weights for all food processing causal relationships in the food processing causal graph. The specific training method is as follows: For any labeled historical qualified training dataset, the labeled node risk score is matched to the variable node in the food processing causal graph. Then, the node risk score corresponding to the variable node in the food processing causal graph is reconstructed through forward propagation to construct the corresponding predicted node risk score. Taking the loss value between the node risk score corresponding to the variable node in the food processing causal graph and the predicted node risk score as the objective, all propagation weights are updated through gradient descent until the training converges. The trained propagation weights are then output. The forward propagation method is as follows: any variable node in the food processing causal graph is recorded as the target variable node, and the variable nodes in the food processing causal graph that point to the target variable node are recorded as forward variable nodes. The node risk scores corresponding to all forward variable nodes are weighted and summed with their corresponding propagation weights to obtain the predicted node risk score corresponding to the target variable node.

4. The food safety monitoring method based on processing data according to claim 3, characterized in that, Determining the high-risk node set and the low-risk node set involves the following steps: Record all variable nodes with overlapping anomalous activation causal chains as high-risk nodes, and use the number of times a high-risk node overlaps in all anomalous activation causal chains as its risk weight. Traverse all high-risk nodes, and form a high-risk node set from all high-risk nodes whose risk weights are higher than the risk weight threshold. Record all variable nodes in the food processing causal graph, excluding those corresponding to all anomalous activation causal chains, as low-risk nodes, and form a low-risk node set from all low-risk nodes.

5. A food safety monitoring method based on processing data according to claim 4, characterized in that, The monitoring resource allocation is performed based on high-risk node sets and low-risk node sets, specifically including the following steps: the processing variables corresponding to the variable nodes in the high-risk node set are collected at a high collection frequency, and the processing variables corresponding to the variable nodes in the low-risk node set are collected at a low collection frequency.

6. A food safety monitoring system based on processing data, characterized in that, The system employs a food safety monitoring method based on processing data as described in any one of claims 1-5, comprising: The processing data acquisition module is used to acquire processing data at the current timestamp; The node risk score calculation module is used to match the processing variables in the processing data to the variable nodes in the food processing causal graph and calculate the node risk score corresponding to the processing variables in the processing data. The food processing causal graph includes several directed food processing causal association pairs and the propagation weights corresponding to the food processing causal association pairs. The storage format of the food processing causal association pairs is (variable node, variable node). The module for determining the causal chain of abnormal activation is used to determine the causal chain of abnormal activation based on the node risk score corresponding to the processing variable and the causal graph of food processing. The food safety risk scoring module is used to calculate the local food safety risk score corresponding to each abnormal activation causal chain based on the node risk score corresponding to the processing variable through chain propagation operation, and then perform a weighted summation operation on all local food safety scores to obtain the food safety risk score. The monitoring resource allocation module is used to determine the high-risk node set and the low-risk node set, and to perform monitoring resource allocation based on the high-risk node set and the low-risk node set.

Citation Information

Patent Citations

  • Safety management method and system for major hazard source in chemical industry park

    CN120046968A