Agricultural residual risk assessment method based on Bayesian network

By using Bayesian network assessment methods and combining expert scoring with measured data to optimize the model, the lack of risk assessment for veterinary drug residues in beef and mutton has been addressed, enabling scientific and accurate risk assessment and dynamic early warning, and improving regulatory efficiency.

CN121961206APending Publication Date: 2026-05-01NORTHWEST A & F UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NORTHWEST A & F UNIV
Filing Date
2025-12-18
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

In the field of agricultural residue risk early warning, there is a lack of systematic risk assessment for multiple types of veterinary drug residues in beef and mutton, and a lack of scientific and accurate risk prevention and control system.

Method used

A risk assessment method based on Bayesian networks is adopted. The impact and probability of occurrence of risk indicators are determined by expert scoring. A Bayesian network topology is constructed, and the model is optimized by combining measured agricultural residue data to achieve risk assessment and early warning.

Benefits of technology

It has achieved scientific and accurate risk status assessment and dynamic early warning, possesses risk tracing capabilities, and improves the pertinence and efficiency of regulatory actions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121961206A_ABST
    Figure CN121961206A_ABST
Patent Text Reader

Abstract

The invention discloses an agricultural residue risk assessment method based on a Bayesian network, and relates to the technical field of agricultural residue risk early warning. The method comprises the following steps: pre-selecting risk sources and risk indexes, and obtaining expert scores of the influence degree and occurrence probability of each risk index; calculating to obtain the risk level of each risk index and the risk level of each type of risk source; constructing an initial model: constructing a Bayesian network topological structure by taking the overall risk level, the risk source and the risk index of the region as nodes; converting the calculated data into an initial probability, and importing the initial probability into a modeling tool to obtain an initial prior probability; the actually measured data is preprocessed and then combined with the initial prior probability, network parameters of the initial model are learned by using an expectation maximization algorithm to generate an optimization condition probability table, and the optimization condition probability table is imported into the initial model to obtain an early warning model; and inputting the detection data to the early warning model for risk assessment. According to the invention, scientific field risk assessment can be carried out, the method has the potential of dynamic early warning, and the pertinence and effectiveness of supervision are improved.
Need to check novelty before this filing date? Find Prior Art

Description

A Bayesian Network-Based Approach to Agricultural Residue Risk Assessment Technical Field

[0001] This application relates to the field of agricultural residue risk early warning technology, and in particular to an agricultural residue risk assessment method based on Bayesian networks. Background Technology

[0002] With intensive farming becoming the dominant production model, veterinary drugs have evolved into "production inputs" rather than simply diagnostic tools. Their exogenous residues can migrate along the "pasture-slaughter-dinner table" pathway, achieving trace but continuous exposure in the human body, inducing potential health risks such as allergic reactions, intestinal microecological imbalances, the spread of bacterial resistance, and endocrine disruption. As a major livestock production base in the world, my country's beef and mutton industry holds significant strategic importance for regional economic development and people's livelihoods. However, in some regions, factors such as arid climates, unique farming practices, and the high-meat diets of ethnic minorities may further exacerbate the risk of veterinary drug residues, making risk prevention and control even more urgent.

[0003] Currently, commonly used risk assessment methods in the field of food safety risk early warning include logistic regression, analytic hierarchy process (AHP), support vector machines (SVM), Bayesian networks, and decision trees. Among these, Bayesian networks have gradually gained widespread use due to their unique advantages. This model constructs a directed acyclic graph based on probabilistic graphical theory, which can reveal the joint action mechanism of complex risk factors by quantifying the conditional dependencies between variables. In risk early warning and analysis, it can not only achieve accurate early warning based on probabilistic inference but also visualize the risk propagation path, supporting bidirectional reasoning from risk prediction to source tracing. Furthermore, Bayesian networks have the ability to integrate prior knowledge and dynamically updated data, reducing the complexity and cost of model reconstruction while integrating new information. Currently, Bayesian networks have been applied to a certain extent in the field of food quality control. For example, Qiao Ruolan used Bayesian network models to provide methodological support for the risk assessment of food raw material suppliers for Company K, optimizing its risk management process; Yu Jiabin et al. constructed Bayesian network models to analyze sampling data of hazardous substances in Chinese rice, achieving an effective assessment of the risk level of hazardous substances in rice; Yuan Hao used Bayesian decision networks to model emergency decision-making for cascading risks in food safety, thereby making reasonable predictions about the evolution trend of food safety incidents. Bayesian network models, by quantifying the probabilistic dependencies between risk factors, enable intelligent decision-making for food safety evaluation and risk warning.

[0004] However, in the field of agricultural residue risk early warning, there is still a lack of systematic risk assessments for multiple types of veterinary drug residues in beef and mutton. It is necessary to establish a more scientific and accurate risk prevention and control system based on large-scale testing data and advanced risk assessment models. Summary of the Invention

[0005] This application provides a method for assessing agricultural residue risk based on Bayesian networks to address the problems in the prior art.

[0006] On the one hand, this application provides a method for assessing agricultural residue risk based on Bayesian networks, including: determining pre-selected risk sources and risk indicators belonging to the risk sources based on historical data of regional agricultural residues, having experts score the risk indicators, and obtaining expert scores on the degree of influence and probability of occurrence of each risk indicator.

[0007] Furthermore, based on historical data of regional agricultural residues, pre-selected risk sources and risk indicators attributable to these risk sources were identified. The Delphi method was used to create tables of risk indicators, and experts were consulted through questionnaires to obtain expert scores on the impact and probability of occurrence of each risk indicator.

[0008] Based on expert scores of the impact and probability of occurrence of each risk indicator, the risk level of each risk indicator and the risk level of each type of risk source are calculated.

[0009] Furthermore, the calculation of the risk level of each risk indicator and the risk level of each type of risk source includes: calculating the risk level score of each risk indicator based on expert scores that measure the degree of influence and probability of occurrence of each risk indicator using a Likert scale; obtaining the score weight of each risk indicator using the information entropy weighting method based on the risk level score of each risk indicator; normalizing the risk level score of each risk indicator into the risk level of each risk indicator through a risk level matrix; and calculating the risk level of each type of risk source based on the risk level of each risk indicator and the score weight of each risk indicator.

[0010] Furthermore, the information entropy weighting method is used to obtain the scoring weight for each risk indicator, which includes: obtaining an a×b scoring matrix T based on the risk level score of each risk indicator, where a is the number of experts, b is the number of risk indicators, and elements... This represents the score given by the i-th expert to the j-th risk indicator.

[0011] Will Normalization is performed using the following formula:

[0012] in, This represents the normalized score of the i-th expert on the j-th risk indicator.

[0013] The score entropy value is calculated using the following formula:

[0014] in, Let the score entropy value of the j-th risk indicator be . This is the normalization coefficient for the entropy value.

[0015] The scoring difference coefficient is calculated using the following formula:

[0016] in, Let be the score difference coefficient for the j-th risk indicator.

[0017] The scoring weights are calculated using the following formula:

[0018] in, Let be the scoring weight of the j-th risk indicator.

[0019] Furthermore, the risk levels for each risk indicator are: low risk (L), medium risk (M), and high risk (H).

[0020] Furthermore, calculating the risk level of each type of risk source includes: assigning a risk level to each risk indicator according to its category, with the result serving as the risk level of the risk indicator; and calculating the risk level of the risk source based on the risk level of the risk indicator using the following formula:

[0021] in, Let n represent the risk level of the m-th risk source, and n be the number of risk indicators belonging to the m-th risk source. The weight of the k-th risk indicator in the m-th risk category is given by [the following]. Let be the risk level of the k-th risk indicator in the m-th risk category.

[0022] The initial model is constructed by: taking the overall risk level of the region as the target node, the risk source as the intermediate node, and the risk indicator as the root node, and constructing a Bayesian network topology; converting the risk level of each risk indicator and the risk level of each type of risk source into the initial probability of each node and importing them into the Bayesian network modeling tool to generate an initial conditional probability table and obtain the initial prior probability.

[0023] The process of optimizing the initial model to obtain the early warning model includes: preprocessing the measured agricultural residue data to obtain an identifiable dataset; using the identifiable dataset and the initial prior probability, employing the expectation-maximization algorithm to learn the network parameters of the initial model to generate an optimized conditional probability table; and importing the optimized conditional probability table into the initial model to obtain the early warning model.

[0024] Risk assessment is conducted by calculating posterior probabilities based on an early warning model that inputs agricultural residue detection data.

[0025] The agricultural residue risk assessment method based on Bayesian networks presented in this application has the following advantages: The Bayesian network model constructed in this application can not only conduct scientific and accurate risk status assessments, but also has the potential for dynamic early warning. Local departments can set a high-risk probability threshold based on long-term risk probability values ​​or regulatory objectives. As sampling data is imported, when the high-risk probability output by the model continuously or significantly exceeds this threshold in the short term, the system can trigger an early warning signal to advance the risk assessment. In addition, the Bayesian network model of this application also has a risk source tracing and early warning function. Through sensitivity analysis and reverse reasoning of the annual sampling data, it can further pinpoint which type or even which specific drug the risk may originate from, allowing for targeted regulation of regional drug use and breeding processes, thereby greatly improving the targeting and efficiency of regulatory actions. Attached Figure Description

[0026] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 is a Bayesian network topology diagram provided in an embodiment of this application.

[0028] Figure 2 is a schematic diagram of the risk level matrix.

[0029] Figure 3 shows a schematic diagram of the Bayesian network of the initial model.

[0030] Figure 4 is a heatmap of clustering data for veterinary drug residue detection.

[0031] Figure 5 is a schematic diagram of the Bayesian network of the early warning model.

[0032] Figure 6 is a reverse reasoning diagram when the overall risk level of a certain province is high risk = 100%.

[0033] Figure 7 is a reverse reasoning diagram showing the overall risk level of a province, and the high risk of tetracyclines, quinolones, receptor agonists, and sulfonamides = 100%. The detailed embodiments of this application will be described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0034] Figure 1 is a Bayesian network topology diagram provided in an embodiment of this application. This embodiment of the application provides a method for assessing agricultural residue risk based on Bayesian networks, including: determining pre-selected risk sources and risk indicators belonging to the risk sources based on historical data of regional agricultural residues; having experts score the risk indicators to obtain expert scores on the degree of influence and probability of occurrence of each risk indicator.

[0035] One possible implementation involves obtaining expert scores for the impact and probability of occurrence of each risk indicator, including: determining pre-selected risk sources and risk indicators attributable to the risk sources based on historical data of regional agricultural residues; tabulating the risk indicators using the Delphi method; consulting experts in the form of questionnaires to obtain expert scores for the impact and probability of occurrence of each risk indicator.

[0036] For example, based on the food safety supervision and sampling information announcements and reports published by the market supervision administration of a certain province over the past 10 years, and the reports on food non-compliance caused by veterinary drug residues in the province over the past 10 years, a "Questionnaire on the Safety Risk of Major Veterinary Drug Residues in Beef and Mutton in a Certain Province" was created. The expert questionnaire was screened based on drug use frequency, farming methods, and drug detection events in recent years. Subsequently, using the Delphi method, the pre-selected indicators were tabulated and presented as a questionnaire to nine experts (3 experts in animal husbandry, 3 experts in veterinary pharmacology, 2 food safety monitoring personnel, and 1 drug risk assessment personnel).

[0037] Based on expert scores of the impact and probability of occurrence of each risk indicator, the risk level of each risk indicator and the risk level of each type of risk source are calculated. In one possible implementation, calculating the risk level of each risk indicator and the risk level of each type of risk source includes: obtaining the score weight of each risk indicator using the information entropy weighting method based on the expert scores of the impact and probability of occurrence of each risk indicator; calculating the risk level score of each risk indicator based on expert scores measuring the impact and probability of occurrence of each risk indicator using a Likert scale; normalizing the risk level score of each risk indicator to the risk level of each risk indicator using a risk level matrix; and calculating the risk level of each type of risk source based on the risk level of each risk indicator and the score weight of each risk indicator.

[0038] In one possible implementation, the risk level of each risk indicator includes: low risk (L), medium risk (M), and high risk (H).

[0039] For example, the Likert scale is used to measure the degree of influence and probability of occurrence of each risk indicator by expert scoring. The formula for calculating the risk level score of each risk indicator is as follows: ,in, For the i-th expert, the risk level score for the j-th risk indicator is given. Let i be the probability score given by the i-th expert for the j-th risk indicator. The i-th expert scores the degree of influence of the j-th risk indicator. The obtained questionnaire dataset is normalized using the risk level matrix shown in Figure 2, which involves multiplying the expert's score for the degree of influence of the risk factor by the score for the probability of occurrence of the risk factor to obtain the level corresponding to that risk. Here, L represents low risk, M represents medium risk, and H represents high risk.

[0040] In one possible implementation, obtaining the scoring weight for each risk indicator using the information entropy weighting method includes: obtaining an a×b scoring matrix T based on expert scores of the impact and probability of occurrence of each risk indicator, where a is the number of experts, b is the number of risk indicators, and elements... Let represent the score given by the i-th expert to the j-th risk indicator; Normalization is performed using the following formula:

[0041] in, Let represent the normalized score of the i-th expert on the j-th risk indicator. The score entropy value is calculated using the following formula:

[0042] in, Let the score entropy value of the j-th risk indicator be . This is the normalization coefficient for the entropy value. The rating difference coefficient is calculated using the following formula: ,in, Let be the coefficient of variation in the scores for the j-th risk indicator. The score weight is calculated using the following formula:

[0043] in, Let be the scoring weight of the j-th risk indicator.

[0044] For example, the expert scoring weighting table in this application is shown in Table 1 below:

[0045] In one possible implementation, calculating the risk level of each type of risk source includes: assigning a risk level to each risk indicator by category, with the assignment result serving as the risk level of the risk indicator; and calculating the risk level of the risk source based on the risk level of the risk indicator using the following formula:

[0046] in, Let n represent the risk level of the m-th risk source, and n be the number of risk indicators belonging to the m-th risk source. The weight of the k-th risk indicator in the m-th risk category is given by [the following]. Let be the risk level of the k-th risk indicator in the m-th risk category.

[0047] For example, this application assigns risk levels L, M, and H values ​​of 1, 2, and 3, respectively.

[0048] For example, SPSSAU 25.0 is used to process the expert rating results in this application, and WPS Office 11.1.0 is used to perform statistical analysis of the data.

[0049] The initial model is constructed by: taking the overall risk level of the region as the target node, the risk source as the intermediate node, and the risk indicator as the root node, and constructing a Bayesian network topology; converting the risk level of each risk indicator and the risk level of each type of risk source into the initial probability of each node and importing them into a Bayesian network modeling tool to generate an initial conditional probability table and obtain the initial prior probability.

[0050] For example, the Bayesian network modeling tool used in this application is Genie 4.0.

[0051] For example, as shown in the Bayesian network diagram of the initial model in Figure 3, this application takes the overall risk level A of a certain province as the target node, and the risk sources tetracyclines B, quinolones C, and receptor agonists D as intermediate nodes. Risk indicators belonging to tetracycline category B are: tetracycline B1, oxytetracycline B2, chlortetracycline B3, doxycycline B4; risk indicators belonging to quinolones category C are: enrofloxacin C1, norfloxacin C2, pefloxacin C3, ofloxacin C4, dafloxacin C5, lomefloxacin C6, sarafloxacin C7; risk indicators belonging to receptor agonists category D are: clenbuterol D1, ractopamine D2, terbutaline D3, cimaterol D4, salbutamol D5, cibuterol D6, tobuterol D7, chlorpromazine D8; and sulfonamide category E (because the national standard only specifies the maximum residue limit for the total concentration of sulfonamide drugs). Residue Limit (MRL) ≤ Therefore, it is no longer specific to a single risk indicator) as the root node. Based on their genus-species relationships, directed arcs are used to connect the nodes, resulting in a Bayesian network topology.

[0052] Optimizing the initial model to obtain an early warning model includes: preprocessing measured agricultural residue data to obtain an identifiable data set; using the identifiable data set and the initial prior probability, learning the network parameters of the initial model using the expectation-maximization algorithm to generate an optimized conditional probability table; and importing the optimized conditional probability table into the initial model to obtain an early warning model.

[0053] For example, the measured agricultural residue data in this application include a province-wide sampling data table of beef and mutton and the results of experimental testing provided by a certain province.

[0054] For example, the sample types in this application include beef (1157 samples) and mutton (1322 samples), totaling 2479 samples; the sample collection time was from July 2023 to July 2024, and all samples were collected from 14 different counties (districts) in a certain province.

[0055] The reagents and instruments used included: methanol, acetonitrile, formic acid, ethyl acetate (chromatographic grade), disodium ethylenediaminetetraacetate, disodium hydrogen phosphate, sodium dihydrogen phosphate, citric acid, sodium hydroxide, concentrated ammonia, trichloroacetic acid (analytical grade), HLB solid-phase extraction column (6 mL, 150 mg); ultra-high performance liquid chromatography-mass spectrometry, DC150-2 nitrogen blowing apparatus, HC-3016R refrigerated centrifuge, TH16-W centrifuge, BHS-4 water bath, PHS-3E pH meter, MX-S vortex mixer, and CR-060 ultrasonic cleaner.

[0056] The detection methods for risk source categories include: For the detection of tetracycline, sulfonamide, and quinolone veterinary drug residues, refer to GB31658.17-2021 "Determination of Tetracycline, Sulfonamide, and Quinolone Drug Residues in Animal-Derived Foods by Liquid Chromatography-Tandem Mass Spectrometry". The key steps are as follows: After ultrasonic extraction with disodium ethylenediaminetetraacetate buffer and phosphate buffer, the supernatant is collected by centrifugation and purified using a solid-phase extraction column. The eluent is collected, dried under nitrogen, and then reconstituted and diluted to volume with the initial mobile phase. The solution is filtered through a 0.22 mL filter. Organic phase was filtered through a membrane and then analyzed.

[0057] The ultra-high performance liquid chromatography-mass spectrometry (UHPLC-MS / MS) system used a Waters BEH C18 column (100 mm × 2.1 mm, 1.7 m³ / h). The column temperature was set to 35℃, and the injection volume was set to 10. The flow rate was set to 0.3 mL / min. Gradient elution mode was used, with mobile phase A being 0.1% formic acid solution and mobile phase B being methanol:acetonitrile (2:8, V:V, containing 0.1% formic acid).

[0058] Liquid phase elution conditions for tetracyclines, sulfonamides and quinolones are shown in Table 2 below.

[0059]

[0060] An electrospray ionization source was used, with positive ion scanning mode, multiple reaction monitoring (MRM) mode, electrospray ionization voltage of 3.0 kV, and atomization temperature of 450 °C.

[0061] The specific pretreatment methods, liquid chromatography conditions and mass spectrometry conditions for the detection of β2-receptor agonists are as follows: (1) Extraction of β2-receptor agonist veterinary drug residues: Take 1g of sample, add 7mL of 5% trichloroacetic acid solution, mix thoroughly, sonicate at 80℃ for 30min, and centrifuge at 0℃ and 10000r / min for 15min, and collect the supernatant; then repeat the above operation in the residue after centrifugation; combine the two supernatants for the next step of purification.

[0062] (2) Purification of β2-receptor agonist veterinary drug residues: The residues were purified using an HLB solid-phase extraction column. The specific steps were as follows: First, the solid-phase extraction column was activated with 5 mL of methanol and water. The supernatant was then slowly added to the column, followed by rinsing with 10 mL of 5% methanol-water solution, and finally eluting with 6 mL of subsequent methanol solution. The collected eluent was dried at 50°C using a nitrogen blower, reconstituted with 1 mL of methanol-0.1% formic acid solution (1:9, V:V), and then purified with 0.22... Organic-based membrane filtration is used for subsequent mass spectrometry detection.

[0063] The ultra-high performance liquid chromatography-mass spectrometry (UHPLC-MS / MS) system used a Waters BEH C18 column (100 mm × 2.1 mm, 1.7 m³ / h). The column temperature was set to 40℃, and the injection volume was set to 10. The flow rate is set to 300. Gradient elution mode was used, with mobile phase A being a 0.1% aqueous formic acid solution and mobile phase B being a 0.1% aqueous acetonitrile solution.

[0064] The liquid phase elution conditions for β2-receptor agonists are shown in Table 3 below.

[0065]

[0066] The electrospray ionization source was used, the scanning mode was positive ion scanning, the monitoring method was multiple reaction monitoring, the temperature was 100℃, the electrospray ionization voltage was 5.5kV, and the atomization temperature was set to 550℃.

[0067] For example, the preprocessing of measured agricultural residue data includes: In view of the differences in the maximum residue limits of different drugs, in order to unify the data dimensions and improve the analysis efficiency, this study performs discretization processing on the original data according to the drug index calculation formula, so as to normalize it to the [0,1] interval.

[0068] Special handling for sulfonamide drugs: None of these drugs were detected in this test, in accordance with relevant standards (total detected concentration of all sulfonamide drugs > 100). (If it is determined to be out of standard), it is treated as a separate node during modeling.

[0069] For tetracyclines and quinolones, since no non-compliance was found in the tested samples, they were classified into three levels based on concentration: level 1 (0~0.3 MRL), level 2 (0.3~0.6 MRL), and level 3 (0.6~1.0 MRL). β2-receptor agonists, being prohibited substances, are judged by the criterion of "not detectable," and are therefore divided into two risk levels: level 1 (not detected, low risk) and level 2 (detected, high risk). The formula for calculating the drug risk index is:

[0070] in, Let the risk level of the j-th detection index be the i-th sample. This refers to the specific detection value of the j-th indicator for the i-th type of meat product. It is the maximum residue limit for the j-th detection indicator of the i-th type of meat product.

[0071] For example, sulfonamides were not detected in any of the samples. In beef, tetracycline was detected in 140 samples, chlortetracycline in 11 samples, oxytetracycline in 60 samples, doxycycline in 74 samples, and enrofloxacin in 36 samples; all of these were within the acceptable limits. However, clenbuterol and tobuterol were detected in one sample each in excess of the acceptable limits. In mutton, tetracycline was detected in 19 samples, chlortetracycline in 5 samples, oxytetracycline in 11 samples, and doxycycline in 8 samples; all of these were within the acceptable limits.

[0072] The maximum residue limits for veterinary drugs tested in this application are shown in Table 4 below:

[0073] The overall detection results of veterinary drug residues are presented using heatmaps, as shown in Figure 4, which is a cluster heatmap of veterinary drug residue detection data.

[0074] For example, this application uses Origin2021 to generate heatmaps.

[0075] Risk assessment is conducted by calculating posterior probabilities based on an early warning model that inputs agricultural residue detection data.

[0076] For example, Figure 5 is a schematic diagram of the Bayesian network of the early warning model. Figure 5 shows that the overall risk level of veterinary drug residues in beef and mutton in a certain province has a 74% probability of being low risk, a 16% probability of being medium risk, and a high risk probability of approximately 10%. Among the middle-level nodes, the high-risk value of tetracyclines is higher than that of the other three categories, indicating that tetracyclines contribute more to the high risk of the target node than other nodes, perhaps due to the tendency of tetracyclines to accumulate in the livestock production environment. The low, medium, and high risks of tetracyclines, sulfonamides, and quinolones in the figure are discussed within the maximum detection limits of each drug; therefore, high risk does not necessarily mean exceeding the detection limit, but only indicates the need for strengthened supervision. The model's results can provide a certain theoretical reference for risk assessment and risk control of veterinary drug residues in beef and mutton in a certain province.

[0077] Through single-factor analysis, backward reasoning, and sensitivity analysis, the output of the Bayesian network early warning model constructed in this application can be used for early warning applications.

[0078] Univariate analysis: The purpose of univariate analysis is to quantify the marginal contribution or impact of a single risk factor on the risk level of a target node when it is in an extremely unfavorable state, under isolated conditions. For example, when the high risk of enrofloxacin is 100%, the high risk level of a province's overall risk level increases from 12% to 15%. Based on this analytical method, the changes in the risk probability of the affected nodes under different node changes are summarized in Table 5, the table of single-node impact probability changes.

[0079]

[0080] The relative impact results show that tetracycline has the greatest impact at 6.55; followed by chlortetracycline and doxycycline, which have significant impacts on the high-risk target node at 6.55 and 5.86 respectively. Among quinolones, enrofloxacin, norfloxacin, and ofloxacin have significant impacts on the high-risk target node at 6.21, 5.52, and 5.52 respectively. Clenbuterol and tobuterol, both β2-receptor agonists, have significant impacts on the high-risk target node, while the impacts on the target node from the high-risk target node are relatively average. The overall impact of sulfonamides on the high-risk target node is moderate.

[0081] Reverse reasoning: Reverse reasoning in Bayesian networks, also known as diagnostic reasoning, is suitable for analyzing the probability of accidents or risks occurring at each node under specific environments and conditions. If the probability of high risk H in the overall risk of a province is 100%, as shown in Figure 6 (reverse reasoning diagram when high risk = 100% in the overall risk level of a province), analysis of the upper-level nodes using a Bayesian network reveals that: tetracyclines, due to their common residues and wide concentration distribution, show a prominent performance in this indicator; while β2-receptor agonists have a lower risk level, mainly due to their extremely low detection rate, but this does not necessarily mean their actual harm is low; sulfonamides have a lower risk level, possibly because the utilization rate of orally administered sulfonamides in cattle and sheep is low, resulting in fewer drug residues. Next, by setting the high-risk probability of all four parent nodes of the overall risk level of a province to 100% simultaneously, the risk of specific drugs can be inferred. As shown in Figure 7, when the overall risk level of the province, tetracyclines, quinolones, receptor agonists, and sulfonamides are all set to 100% for high risk, doxycycline has the lowest low-risk probability, a relatively high medium-risk probability, and the highest high-risk probability. Among quinolones, enrofloxacin and norfloxacin have the lowest low-risk levels and relatively high high-risk levels. Among receptor agonists, tobuterosol and clenbuterol have relatively high risk levels. Based on the results of this reverse reasoning, specific drugs can be subject to certain regulatory measures.

[0082] Sensitivity Analysis: Sensitivity analysis helps identify the variables that have the greatest impact on the model output in a Bayesian network. Using "Overall Risk of a Province" as the target node, sensitivity analysis was performed. The approximate sensitivity was determined by the node's color, and the specific sensitivity value can be viewed in the lower right corner of the node. Table 6 below shows that nodes with higher sensitivity, such as tetracyclines, sulfonamides, and quinolones, are sensitive factors affecting the safety risk level of veterinary drug residues in beef and mutton in a certain province. Small changes in these risk factors under different circumstances may lead to an increase in the overall risk of the province. Therefore, relevant control measures need to be implemented for these sensitive risk factors to improve the food quality and safety of beef and mutton.

[0083]

[0084] Sensitivity analysis and backward reasoning revealed that tetracyclines had the most significant impact on overall risk, with a sensitivity value of 0.37. Under high-risk conditions, they could increase the probability of risk at the target node by 9.5%, making them a key influencing factor in the model. This result is related to the widespread use of tetracyclines in animal husbandry and their strong metabolic characteristics and structural stability, suggesting that these drugs should be a key monitoring target. Furthermore, enrofloxacin among quinolones had a high impact, with all three exceeding 8.7%, indicating that the toxicity risk of quinolones should not be underestimated and requires further strengthening of regulation in the future. Although β2-receptor agonists were detected very infrequently, as prohibited drugs, their detection signifies high risk. The impact of these drugs was relatively evenly distributed across nodes in the model, reflecting a "zero-tolerance" policy towards their presence.

[0085] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.

[0086] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A method for assessing agricultural residue risk based on Bayesian networks, characterized in that, include: Based on historical data of regional agricultural residues, pre-selected risk sources and risk indicators belonging to the risk sources are identified. Experts score the risk indicators to obtain an expert score on the degree of impact and probability of occurrence of each risk indicator. Based on the expert scores of the impact degree and occurrence probability of each risk indicator, the risk level of each risk indicator and the risk level of each type of risk source are calculated. The initial model is constructed by: using the overall regional risk level as the target node, the risk sources as intermediate nodes, and the risk indicators as root nodes to construct a Bayesian network topology; converting the risk level of each risk indicator and the risk level of each type of risk source into the initial probability of each node and importing them into a Bayesian network modeling tool to generate an initial conditional probability table and obtain initial prior probabilities; optimizing the initial model to obtain an early warning model includes: preprocessing measured agricultural residue data to obtain an identifiable data set; using the identifiable data set and the initial prior probabilities, employing the expectation-maximization algorithm to learn the network parameters of the initial model to generate an optimized conditional probability table; importing the optimized conditional probability table into the initial model to obtain an early warning model; and based on the early warning model, calculating the posterior probability by inputting agricultural residue detection data to perform risk assessment.

2. The method for assessing agricultural residue risk based on Bayesian networks according to claim 1, characterized in that, The expert scores for obtaining the impact and probability of occurrence of each risk indicator include: determining pre-selected risk sources and risk indicators belonging to the risk sources based on historical data of regional agricultural residues; tabulating the risk indicators using the Delphi method; consulting experts in the form of questionnaires to obtain expert scores for the impact and probability of occurrence of each risk indicator.

3. The method for assessing agricultural residue risk based on Bayesian networks according to claim 1, characterized in that, The calculation of the risk level of each risk indicator and the risk level of each type of risk source includes: calculating the risk level score of each risk indicator based on expert scores that measure the degree of influence and probability of occurrence of each risk indicator using a Likert scale; obtaining the score weight of each risk indicator using the information entropy weighting method based on the risk level score of each risk indicator; normalizing the risk level score of each risk indicator into the risk level of each risk indicator through a risk level matrix; and calculating the risk level of each type of risk source based on the risk level of each risk indicator and the score weight of each risk indicator.

4. The method for assessing agricultural residue risk based on Bayesian networks according to claim 3, characterized in that, The method of obtaining the scoring weight for each risk indicator using the information entropy weighting method includes: obtaining an a×b scoring matrix T based on the risk level score of each risk indicator, where a is the number of experts, b is the number of risk indicators, and elements... Let represent the score given by the i-th expert to the j-th risk indicator; Normalization is performed using the following formula: in, Let represent the normalized score of the i-th expert on the j-th risk indicator; the score entropy value is calculated using the following formula: in, Let the score entropy value of the j-th risk indicator be . The normalization coefficient for the entropy value is used; the rating difference coefficient is calculated using the following formula: in, Let be the scoring difference coefficient for the j-th risk indicator; the scoring weight is calculated using the following formula: in, Let be the scoring weight of the j-th risk indicator.

5. The method for assessing agricultural residue risk based on Bayesian networks according to claim 1 or 3, characterized in that, The risk levels for each risk indicator are: low risk (L), medium risk (M), and high risk (H).

6. The method for assessing agricultural residue risk based on Bayesian networks according to claim 3, characterized in that, The calculation of the risk level for each type of risk source includes: assigning a risk level to each risk indicator according to its type, and using the assignment result as the risk level of the risk indicator; and calculating the risk level of the risk source based on the risk level of the risk indicator using the following formula: in, Let n represent the risk level of the m-th risk source, and n be the number of risk indicators belonging to the m-th risk source. The weight of the k-th risk indicator in the m-th risk category is given by [the following]. Let be the risk level of the k-th risk indicator in the m-th risk category.