Intelligent detection and early warning method and system for quality and safety of edible agricultural products

By establishing a correlation model and in-batch calibration parameters, the shortcomings of multi-source data calibration and conflict sample identification in the quality and safety supervision of edible agricultural products have been addressed, achieving the accuracy of sample comparability and disposal scope, and improving the reliability and intelligence of testing.

CN122264630APending Publication Date: 2026-06-23SHENZHEN LAIBO BIOTECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN LAIBO BIOTECHNOLOGY CO LTD
Filing Date
2026-04-13
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing food safety supervision schemes for edible agricultural products have shortcomings in terms of unified calibration of multi-source data, identification of conflicting samples, and accurate generation of disposal scope, leading to problems such as misjudgment of samples within a batch, inaccurate identification of conflicting samples, and imprecise disposal scope.

Method used

By establishing a correlation model, batch anchor samples are identified and intra-batch calibration parameters are generated. Image data, detection data, and environmental time-series data are calibrated to generate cross-modal consistency residuals. The risk propagation relationship is calculated by combining the correlation model, and the preceding parameters are corrected in reverse through the verification results, thereby improving the comparability of samples and the accuracy of the disposal scope.

Benefits of technology

It improves the comparability of multi-source data for samples in the same batch, enhances the accuracy of identifying conflicting samples and the precision of the chain-like handling scope, and forms a closed-loop update mechanism from detection and judgment to feedback correction, thereby improving the reliability and intelligence level of food safety testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122264630A_ABST
    Figure CN122264630A_ABST
Patent Text Reader

Abstract

The present application relates to the quality and safety supervision technical field of edible agricultural products, and especially relates to an edible agricultural product quality and safety intelligent detection and early warning method and system which fuses internet of things sensing, multi-source data collection, intelligent detection, risk identification, risk early warning, automatic tracing and closed-loop supervision. The present application first establishes a correlation model, then determines batch anchor samples and generates batch calibration parameters, calibrates image data, detection data and environmental time series data, generates cross-modal consistency residuals and completes shunt determination, then generates risk propagation relationships, determines chain disposal scope and triggers disposal tasks, and finally modifies the model according to subsequent reinspection results, thereby improving the comparability of multi-source data, the accuracy of conflict identification and the disposal accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of edible agricultural product quality and safety supervision technology, and in particular to an intelligent detection and early warning method and system for edible agricultural product quality and safety that integrates Internet of Things sensing, multi-source data acquisition, intelligent detection, risk identification, risk warning, automatic traceability and closed-loop supervision. Background Technology

[0002] Existing regulatory schemes for the quality and safety of edible agricultural products can typically complete sample registration, test value recording, abnormal result early warning, and circulation information traceability. However, they still have significant shortcomings in unified calibration of multi-source data, identification of conflicting samples, and accurate generation of the scope for handling. First, although different samples within the same batch may have similar origins, they often differ in sampling time, testing terminal status, imaging brightness, and environmental disturbance intensity. If the original image data, original test data, and original environmental time-series data are directly sent into the judgment process, deviations within the batch that are not originally significant for quality and safety may be mistakenly treated as abnormalities. Second, a common practice in existing schemes is to simply stitch together multi-source data to form a fusion result and then make a single judgment based on it. This approach usually works when the multi-source data is generally consistent, but when there is a significant conflict between a certain modality pair, ordinary fusion methods can easily drown out strong local conflicts in the overall average value, causing samples that should enter the review path to be directly judged as normal, or samples that should be directly judged to be sent into the review path by mistake. Third, existing solutions, after an anomaly occurs, mostly determine the scope of handling based on expansion within the same batch, the same entity, or the same distribution chain. This static expansion method does not incorporate the anomaly intensity into the handling scope calculation, thus easily leading to over- or under-handling. Fourth, even after obtaining verification and subsequent re-inspection results, existing solutions often merely record the results without using them to re-evaluate front-end calibration parameters, judgment thresholds, and propagation weights. As a result, the system cannot gradually correct the source of error as the number of runs increases.

[0003] Based on the above, it is necessary to provide a new technical solution that allows samples within a batch to first undergo unified benchmark calibration, then cross-modal consistency judgment and diversion judgment processing, and further combine the correlation model to generate risk propagation relationships and chain disposal scope. Finally, the re-inspection results are used to reverse correct the preceding parameters, so as to improve the comparability of samples within a batch, improve the accuracy of conflict sample identification, and improve the accuracy of disposal scope. Summary of the Invention

[0004] The purpose of this invention is to provide an intelligent detection and early warning method for the quality and safety of edible agricultural products, as well as an intelligent detection and early warning system for the quality and safety of edible agricultural products, to address the shortcomings of existing technologies. The invention aims to improve the comparability of multi-source data from the same batch of samples, improve the accuracy of identifying conflicting samples and the relevance of verification, improve the accuracy of determining the scope of chain-like disposal, and establish a parameter correction mechanism based on subsequent re-inspection results, thereby enhancing the reliability, stability, and intelligence level of detection and early warning for the quality and safety of edible agricultural products.

[0005] This invention achieves the above objectives through the following technical solution: an intelligent detection and early warning method for the quality and safety of edible agricultural products. First, it acquires the sample identification information, batch information, subject information, and circulation node information corresponding to the target edible agricultural product, and then establishes a correlation model based on the above information. The correlation model includes at least sample nodes, batch nodes, subject nodes, and circulation nodes, as well as the association edges between these nodes. Sample nodes represent a single sample to be processed; batch nodes represent the batch's topping range; subject nodes represent the production entity, operating entity, warehousing entity, transportation entity, or testing entity corresponding to the batch or sample; and circulation nodes represent the warehousing nodes, transportation nodes, transaction nodes, sampling nodes, or re-inspection nodes that the sample experiences. The above correlation model is not merely for information recording but serves as the structural basis for subsequent risk propagation relationship calculations.

[0006] After establishing the correlation model, anomaly detection is not directly performed on the image data, detection data, and environmental time-series data corresponding to the target agricultural products. Instead, intra-batch calibration is initiated first. Specifically, batch anchor samples are determined from the sample set corresponding to the batch information. Intra-batch calibration parameters are then generated based on the detection data, image data, and environmental time-series data corresponding to the batch anchor samples. Batch anchor samples can be understood as stable samples within the same batch used to provide a reference benchmark. To improve the representativeness of anchor samples, a sample stability score can be generated based on the detection data dispersion, image data integrity, and environmental time-series data volatility of each sample in the sample set. The batch anchor samples are then determined based on the sample stability score. Detection data dispersion reflects the degree of deviation of the sample detection results relative to other samples within the batch; image data integrity reflects the usability of the effective target area in the image; and environmental time-series data volatility reflects the stability of environmental changes within the sampling time window. The higher the sample stability score, the more suitable the sample is as an intra-batch reference sample.

[0007] After determining the batch anchor samples, the corresponding detection data, image data, and environmental time-series data are extracted to form an intra-batch baseline vector. The intra-batch baseline vector includes at least the anchor detection baseline value, the anchor image brightness baseline value, and the anchor environmental disturbance baseline value. Subsequently, the detection data, image data, and environmental time-series data corresponding to the target edible agricultural product are compared with the intra-batch baseline vector, and intra-batch calibration parameters are generated from the comparison results. The intra-batch calibration parameters include at least detection drift correction parameters, image brightness correction parameters, and environmental disturbance correction parameters. The detection drift correction parameters are used to reduce detection value shifts caused by differences in detection terminals, detection time-series differences, or detection path differences; the image brightness correction parameters are used to reduce image shifts caused by differences in image acquisition brightness; and the environmental disturbance correction parameters are used to reduce interference caused by short-term environmental spike fluctuations on environmental time-series judgment.

[0008] After obtaining the intra-batch calibration parameters, image data, detection data, and environmental time-series data corresponding to the target edible agricultural products are collected. The intra-batch calibration parameters are then used to perform calibration processing on the image data, detection data, and environmental time-series data respectively, resulting in a calibrated multi-source dataset. The calibrated multi-source dataset has been brought back to a unified reference standard within the same batch in terms of scale, brightness, and the impact of environmental fluctuations, making it more suitable as input for consistency judgment.

[0009] Based on the calibrated multi-source dataset, image features, detection numerical features, and environmental temporal features are extracted separately, and further image representation values, detection representation values, and environmental representation values ​​are generated. Image representation values ​​are used to map image features to a unified comparison scale, detection representation values ​​are used to map detection numerical features to a unified comparison scale, and environmental representation values ​​are used to map environmental temporal features to a unified comparison scale. After generating these representation values, the differences between image representation values ​​and detection representation values, the differences between detection representation values ​​and environmental representation values, and the differences between image representation values ​​and environmental representation values ​​are calculated respectively, thus forming image-detection residuals, detection-environment residuals, and image-environment residuals. These three residuals together constitute the basis of cross-modal consistency residuals.

[0010] To avoid using the three residuals merely as parallel results, this application further defines a composite residual value and a maximum component residual value. The composite residual value is a weighted combination of the image-detection residual, detection-environment residual, and image-environment residual, used to reflect the overall consistency of the multi-source data. The maximum component residual value is selected from the image-detection residual, detection-environment residual, and image-environment residual, with the largest absolute value, used to reflect the degree of deviation of the mode pair with the strongest local conflict. In other words, the composite residual value describes the overall deviation level, while the maximum component residual value describes the level of the strongest local conflict. Both serve as dual criteria for subsequent splitting decisions.

[0011] During the triage and determination phase, a first residual threshold and component residual thresholds are set. The first residual threshold constrains the overall residual value, and the component residual thresholds constrain the maximum component residual value. When the overall residual value is not greater than the first residual threshold, and the maximum component residual value is not greater than the component residual threshold, the target edible agricultural product is identified as a direct determination object, and a safety determination result is output. When the overall residual value is greater than the first residual threshold, or the maximum component residual value is greater than the component residual threshold, the target edible agricultural product is identified as a conflict review object, and review and determination processing is triggered. The significance of this setting is that samples with small overall deviations but significant local modal conflicts will not be mistakenly placed into the direct determination path, and samples with significant overall deviations will not bypass the review path, thus naturally separating objects with high consistency from objects with strong conflicts.

[0012] In a further implementation, the conflict source mode pair can be determined based on the residual type corresponding to the maximum component residual value. When the maximum component residual value corresponds to the image-detection residual, it indicates the most significant conflict between the image result and the detection result; when the maximum component residual value corresponds to the detection-environment residual, it indicates the most significant conflict between the detection result and the environmental influence; and when the maximum component residual value corresponds to the image-environment residual, it indicates the most significant conflict between the image state and the environmental influence. Based on this, conflict review objects can be routed to different review decision paths to improve the targeting of review processing.

[0013] After obtaining the safety assessment result or the review assessment result, this application further enters the propagation and disposal stage. The propagation and disposal stage does not simply expand objects according to the same batch or the same subject, but rather generates risk propagation relationships by combining a correlation model. The propagation weight between nodes is determined at least by the batch co-existence coefficient, the circulation adjacency coefficient, and the residual amplification factor. The batch co-existence coefficient characterizes the degree of batch association between objects, the circulation adjacency coefficient characterizes the degree of contact between objects in the circulation link, and the residual amplification factor characterizes the amplification ability of the target anomalous result on the propagation intensity. The residual amplification factor is determined by the comprehensive residual value and the maximum component residual value; that is, the stronger the overall anomaly of the target sample or the stronger the local modal conflict, the larger the residual amplification factor, and the more significant the amplification effect on the propagation weight. Therefore, the propagation weight is no longer a simple structural relationship weight, but the result of the combined effect of structural association strength and anomaly strength.

[0014] After obtaining the propagation weight, the cumulative propagation weight of the propagation path is further calculated. The cumulative propagation weight can be understood as the cumulative impact value after the abnormal risk spreads along the node path. If the cumulative propagation weight is greater than the first-level response threshold, the corresponding object is identified as a first-level response object; if the cumulative propagation weight is not greater than the first-level response threshold but greater than the second-level response threshold, the corresponding object is identified as a second-level response object. First-level response objects correspond to stronger response actions, while second-level response objects correspond to milder response actions that still require continuous monitoring. Based on the above chain-like response scope, corresponding response tasks are triggered. First-level response objects can trigger at least one of the following: re-inspection task, batch locking task, circulation interception task, and delisting task. Second-level response objects can trigger at least one of the following: key monitoring task and additional sampling task. Through the above method, the response scope corresponding to the abnormal sample is no longer mechanically expanded, but is determined by both the structural relationship and the intensity of the abnormality.

[0015] Following the dissemination and disposal steps, this application also introduces a model correction step. Based on the review and judgment processing results, the actual disposal results corresponding to the chained disposal range, and subsequent re-inspection results, the model correction step corrects the intra-batch calibration parameters, the first residual threshold, the component residual threshold, and the dissemination weights. When the subsequent re-inspection results are inconsistent with the safety judgment results or the review and judgment processing results, it indicates a source of deviation between the preceding judgment and the actual results. In this case, the batch anchor sample reselection frequency corresponding to the batch containing the target edible agricultural product is increased, and at least one of the first residual threshold, the component residual threshold, and the primary disposal threshold is tightened simultaneously. Through the above methods, the detection and disposal paths for subsequent batches of the same type will converge in a more robust direction, forming a closed-loop update mechanism from detection and judgment to feedback correction.

[0016] Corresponding to the above method, this application also provides an intelligent detection and early warning system for the quality and safety of edible agricultural products. The system includes an association modeling unit, an intra-batch calibration unit, a data calibration unit, a residual generation unit, a diversion determination unit, a propagation handling unit, and a model correction unit. The output of the association modeling unit supports the generation of risk propagation relationships by the propagation handling unit. The intra-batch calibration parameters generated by the intra-batch calibration unit are input to the data calibration unit. The calibrated multi-source dataset output by the data calibration unit is input to the residual generation unit. The residual results output by the residual generation unit are input to the diversion determination unit and the propagation handling unit. The safety determination result or review determination result output by the diversion determination unit is input to the propagation handling unit and the model correction unit. The chain-like handling range corresponding results output by the propagation handling unit are input to the model correction unit. The output of the model correction unit is further fed back to the intra-batch calibration unit, the diversion determination unit, and the propagation handling unit. Thus, a continuous input-output relationship and feedback relationship are formed between the units within the system, rather than an isolated stack of modules.

[0017] The beneficial effects of this invention are: First, by using batch anchor samples and intra-batch calibration parameters, image data, detection data, and environmental time-series data within the same batch are unified under an intra-batch reference benchmark, significantly improving the comparability between samples within the batch. Second, by forming a comprehensive residual value and a maximum component residual value from image-detection residuals, detection-environment residuals, and image-environment residuals, both overall deviations and strong local conflicts are included in the judgment criteria, thereby reducing the risk of conflicting samples mistakenly entering the direct judgment path. Third, by incorporating batch co-existence coefficients, circulation adjacency coefficients, and residual amplification factors into the propagation weight calculation, the chain-like processing range is no longer just a static relationship extension result, but rather a result of the combined effects of structural relationships and anomaly intensity. Finally, through model correction processing, the verification results and subsequent re-inspection results are fed back to the batch anchor sample reselection frequency, residual threshold, and processing threshold, thereby gradually improving the stability of the entire scheme with each round of operation. Attached Figure Description

[0018] Figure 1 This is a schematic diagram of the signal flow for the execution steps of the method of the present invention.

[0019] Figure 2 This is a schematic block diagram of the overall system structure of the present invention. Detailed Implementation

[0020] The technical solutions in the embodiments of the present invention will be clearly and completely described below.

[0021] refer to Figures 1-2 The technical solution adopted in this application is not a mechanical splicing of several independent steps, but a complete technical system organized around the same continuous processing link. The entire process first establishes a correlation model around the target edible agricultural product, then determines the batch anchor sample within the same batch and generates intra-batch calibration parameters, and then uses the intra-batch calibration parameters to uniformly calibrate image data, detection data, and environmental time-series data. After obtaining the calibrated multi-source dataset, image characterization values, detection characterization values, and environmental characterization values ​​are further generated, and on this basis, image-detection residuals, detection-environment residuals, and image-environment residuals are formed. Then, a comprehensive residual value and a maximum component residual value are generated from the three component residuals. Subsequently, a diversion judgment is performed based on the comprehensive residual value and the maximum component residual value, so that the target edible agricultural product enters the direct judgment path or the conflict review path. Finally, the risk propagation relationship is generated by combining the correlation model, and the chain disposal range is determined based on the propagation weight and the cumulative propagation weight of the path, and the corresponding disposal task is triggered. If the review judgment processing results, actual disposal results, and re-inspection results are subsequently obtained, the preceding parameters are further corrected. Therefore, the output of the previous processing stage will naturally become the input of the next processing stage, and the whole solution forms a complete closed loop.

[0022] In the initial processing stage, the sample identification information, batch information, entity information, and circulation node information corresponding to the target edible agricultural product are first obtained. Sample identification information uniquely identifies a single sample to be processed; batch information identifies the batch to which the sample belongs; entity information represents at least one of the following: production entity, operating entity, warehousing entity, transportation entity, or testing entity; and circulation node information represents at least one of the following: warehousing node, transportation node, transaction node, sampling node, and re-inspection node. Based on the above information, a single sample is abstracted as a sample node, the batch to which the sample belongs is abstracted as a batch node, the responsible entity is abstracted as a entity node, and the circulation process experienced by the sample is abstracted as a circulation node. Affiliation relationships are established between sample nodes and batch nodes; a responsibility relationship is established between batch nodes and entity nodes; a positional relationship is established between sample nodes and circulation nodes; and a transfer relationship is established between batch nodes and circulation nodes. The relational model constructed in this way is not only used to record the sample source and circulation process, but more importantly, it provides a unified relational foundation for subsequent anomaly propagation and chain-like disposal. That is, the reason why any object subsequently enters the disposal scope is not based on human experience, but on calculation using this relational model.

[0023] After completing the aforementioned relationship modeling, instead of directly judging anomalies in the data corresponding to the target agricultural products, intra-batch calibration is performed first. This is because even if multiple samples belong to the same batch, differences may still exist in sampling time, detection terminal status, image acquisition brightness, and environmental disturbance intensity. If these differences are ignored and the original image data, original detection data, and original environmental time-series data are directly used for subsequent judgment, deviations caused by different acquisition conditions may be mistakenly identified as quality and safety anomalies. Therefore, this application first determines batch anchor samples from the sample set corresponding to batch information. These batch anchor samples are equivalent to reference samples within the current batch, providing a unified comparison benchmark for other samples in the same batch.

[0024] The batch anchor samples are not randomly selected based on experience, but rather a stability evaluation is performed on each sample in the sample set. Specifically, the dispersion of detection data, the integrity of image data, and the volatility of environmental temporal data are calculated. Detection data dispersion reflects the degree of deviation of a sample's detection value from the detection values ​​of other samples in the same batch. The smaller the deviation, the closer the sample is to the stable state of the current batch in terms of detection. Image data integrity reflects whether the target area in the sample image is complete, clear, and whether there is significant occlusion. The higher the integrity, the more suitable the image is as a visual reference within the batch. Environmental temporal data volatility reflects whether the environmental changes experienced by the sample within a predetermined time window before and after sampling are stable. The smaller the volatility, the more suitable the sample is as an environmental reference sample. After normalizing the above three quantities, they are combined according to predetermined weights to obtain a sample stability score. The higher the sample stability score, the lower the detection bias, the higher the image integrity, and the more stable the environmental background, making the sample more suitable as a batch anchor sample. Subsequently, the sample with the highest stability score is selected from the sample set, or the candidate samples with the highest scores are selected first and then further filtered based on additional conditions, ultimately yielding the batch anchor sample. In this way, the determination of the batch anchor sample has a clear basis and does not rely on subjective judgment.

[0025] After determining the batch anchor samples, the corresponding detection data, image data, and environmental time-series data are extracted to construct an intra-batch reference vector. This intra-batch reference vector includes at least the anchor detection reference value, the anchor image brightness reference value, and the anchor environmental disturbance reference value. The anchor detection reference value can be obtained from the target detection value of the batch anchor samples or a combination of multiple detection items. The anchor image brightness reference value can be obtained from the average brightness of the target area, the comprehensive color intensity, or a combination of brightness and contrast. The anchor environmental disturbance reference value can be obtained from the average value, trend value, or fluctuation baseline of temperature, humidity, gas concentration, or cold chain status within a predetermined time window. Next, the detection data, image data, and environmental time-series data corresponding to the target edible agricultural product are compared with the corresponding reference values ​​in the aforementioned intra-batch reference vector to obtain the offset relationship, and further, detection drift correction parameters, image brightness correction parameters, and environmental disturbance correction parameters are generated. These three parameters correspond to subsequent detection data calibration, image data calibration, and environmental time-series data calibration, respectively, with clear sources and explicit directions.

[0026] During the calibration of detection data, detection drift correction parameters are used to perform normalization correction on the detection data. If the detection drift correction parameter is in the form of an interpolation, the calibrated detection value can be obtained by adding the original detection value to the correction parameter; if the detection drift correction parameter is in the form of a ratio, the calibrated detection value can be obtained by multiplying the original detection value to the correction parameter. The purpose of this processing is to reduce the detection value deviation caused by changes in the detection terminal state, differences in detection time, or differences in detection path. During the calibration of image data, image brightness correction parameters are used to perform brightness uniformity correction on the image data. In practice, the average brightness, comprehensive chromaticity, or contrast of the target area can be extracted first, and then the corresponding pixel values ​​or image feature values ​​can be adjusted according to the image brightness correction parameters to bring the target image back to the same brightness scale as the batch anchor sample. During the calibration of environmental time-series data, environmental disturbance correction parameters are used to perform fluctuation suppression correction on the environmental time-series data. In practice, short-term abnormal peaks in temperature, humidity, gas concentration, or cold chain status sequences can be smoothed, and then combined with environmental disturbance correction parameters to bring the environmental state back to the batch reference range. After the above processing, the calibrated multi-source dataset is obtained. At this point, the spurious differences between different samples caused by different collection conditions have been significantly weakened, and the results of subsequent consistency analysis of the data will be closer to the true state of the samples themselves.

[0027] After obtaining the calibrated multi-source dataset, image features, detection numerical features, and environmental temporal features are further extracted. Image features may include at least one of color distribution features, texture features, defect area features, contour integrity features, or surface uniformity features; detection numerical features may include at least one of target detection values, detection value change rate, detection value offset, fluctuation amplitude, or stability features; environmental temporal features may include at least one of environmental mean features, change slope features, fluctuation amplitude features, and abnormal peak features. Subsequently, image features are mapped to image representation values, detection numerical features are mapped to detection representation values, and environmental temporal features are mapped to environmental representation values. The purpose of this is to unify data from different sources, with different units, and different representation methods, into the same comparable scale range, creating conditions for subsequent residual calculation.

[0028] After obtaining image representation values, detection representation values, and environmental representation values, the deviations between the image representation values ​​and detection representation values ​​are calculated separately to obtain the image-detection residual; the deviations between the detection representation values ​​and environmental representation values ​​are calculated to obtain the detection-environment residual; and the deviations between the image representation values ​​and environmental representation values ​​are calculated to obtain the image-environment residual. The image-detection residual reflects the consistency between the visual state and the detection result, the detection-environment residual reflects the consistency between the detection result and the environmental influence, and the image-environment residual reflects the consistency between the visual state and the environmental influence. In this way, the system no longer passively fuses the three types of data into a single result, but first observes whether they match each other, thus enabling a more accurate understanding of the relationships between multi-source data.

[0029] Based on the three component residuals mentioned above, a comprehensive residual value and a maximum component residual value are generated. The comprehensive residual value is obtained by weighting the image-detection residual, detection-environment residual, and image-environment residual according to predetermined weights. The comprehensive residual value represents the overall degree of inconsistency, that is, from a global perspective, whether the three types of data deviate significantly from each other. At the same time, the one with the largest absolute value among the image-detection residual, detection-environment residual, and image-environment residual is selected as the maximum component residual value. The maximum component residual value represents the strongest local conflict, that is, which modality pair has the largest deviation. The significance of setting these two values ​​is that if only the comprehensive residual value is considered, the extremely strong local conflict may be masked by the overall averaging effect; if only the maximum component residual value is considered, the overall trend is easily ignored. Therefore, the comprehensive residual value and the maximum component residual value together constitute the dual basis for subsequent flow determination.

[0030] In the triage and determination phase, the overall residual value is first compared with the first residual threshold, and then the maximum component residual value is compared with the component residual threshold. When the overall residual value is not greater than the first residual threshold and the maximum component residual value is not greater than the component residual threshold, it indicates that both the overall deviation and the strongest local deviation are within the allowable range. In this case, the target edible agricultural product is identified as the direct determination object, and a safe determination result is output. When the overall residual value is greater than the first residual threshold, or the maximum component residual value is greater than the component residual threshold, it indicates that the overall deviation is too large or the strongest local conflict is too large. In this case, the target edible agricultural product is identified as the conflict review object, and review determination processing is triggered. Through this dual constraint method, both samples with obvious overall anomalies and samples that appear stable overall but have strong local conflicts can be identified, thereby preventing conflicting samples from mistakenly entering the direct determination path.

[0031] After the target agricultural product is identified as a conflict verification target, conflict localization processing is further performed based on the residual type corresponding to the maximum component residual value. If the maximum component residual value comes from the image-detection residual, it indicates the most significant conflict between the image state and the detection result; if the maximum component residual value comes from the detection-environment residual, it indicates the most significant conflict between the detection result and the environmental impact; and if the maximum component residual value comes from the image-environment residual, it indicates the most significant conflict between the image state and the environmental impact. After conflict localization, verification routing processing is performed based on the conflict source modality, assigning the target agricultural product to the corresponding verification judgment processing path. In this way, subsequent verification is no longer a uniform, indiscriminate verification, but rather targeted based on the conflict source. For example, when the conflict between the image state and the detection result is the greatest, the image acquisition stage and the detection terminal stage can be checked first; when the conflict between the detection result and the environmental impact is the greatest, the environmental sampling window and the detection path can be checked first; and when the conflict between the image state and the environmental impact is the greatest, the consistency of the image environment can be checked first. Through this processing, the verification process becomes more directional, and verification resources can be used more efficiently.

[0032] After obtaining the security assessment result or reviewing the assessment result, the next step is the propagation and handling stage. The propagation and handling stage first calculates the propagation weight based on the correlation model. The propagation weight is determined by at least the batch co-attribution coefficient, the circulation adjacency coefficient, and the residual amplification factor. The batch co-attribution coefficient characterizes the proximity of two objects in batch affiliation. Objects in the same batch can be assigned a higher batch co-attribution coefficient, adjacent batch objects can be assigned a middle value, and objects without direct batch association are assigned a lower value. The circulation adjacency coefficient characterizes the closeness of contact between two objects in the circulation chain. For example, objects passing through the same warehousing node, the same transportation node, or the same transaction node have a higher circulation adjacency coefficient; a middle value is used when only some circulation nodes overlap; and a lower value is used when there is no circulation intersection. The residual amplification factor is used to incorporate the current anomaly strength into the propagation judgment. The larger the overall residual value and the larger the maximum component residual value, the larger the residual amplification factor, thus giving the current anomaly a higher weight in the propagation judgment. Finally, the batch co-attribution coefficient, the circulation adjacency coefficient, and the residual amplification factor are combined according to predetermined weights to generate the propagation weight. The resulting propagation weight is no longer a static relationship value, but a dynamic risk value resulting from the combined effects of structural relationships and anomaly intensity.

[0033] After obtaining the propagation weight, path accumulation processing is performed along the propagation path in the association model to obtain the path cumulative propagation weight. The path cumulative propagation weight is used to represent the cumulative impact of abnormal risks as they expand along the relationship path. In implementation, a weighted accumulation method can be used, or an attenuation factor can be added during the accumulation process to gradually reduce the impact on nodes farther from the risk source. Subsequently, the path cumulative propagation weight is compared with the primary and secondary disposal thresholds. If the path cumulative propagation weight is greater than the primary disposal threshold, the corresponding object is included in the primary disposal scope; if the path cumulative propagation weight is not greater than the primary disposal threshold but is greater than the secondary disposal threshold, the corresponding object is included in the secondary disposal scope. Thus, the chain disposal scope is no longer simply expanded according to "full investigation of the same batch," "full investigation of the same subject," or "full investigation of the same circulation chain," but is calculated based on the actual propagation intensity.

[0034] After determining the scope of the chain-like disposal, the system triggers corresponding disposal tasks based on different disposal levels. For Level 1 disposal targets, at least one of the following can be triggered: re-inspection, batch locking, circulation interception, and removal from shelves. Re-inspection is used to reconfirm abnormal results; batch locking is used to block the continued circulation of the same batch; circulation interception is used to prevent the abnormal object from further spreading in the circulation process; and removal from shelves is used to promptly remove abnormal objects that have entered the sales or display stage from the market. For Level 2 disposal targets, at least one of the following can be triggered: key monitoring and additional sampling. Key monitoring is used to continuously observe subsequent changes, and additional sampling is used to obtain more samples to determine whether the risk has escalated. Through this tiered triggering method, disposal resources can be prioritized for targets with a higher cumulative risk of transmission.

[0035] After the transmission control is completed, model correction processing continues. Model correction processing receives at least three types of results: the review and judgment results, the actual control results corresponding to the chain control scope, and the subsequent re-inspection results. The review and judgment results reflect the review conclusions of the previous round of conflict samples; the actual control results reflect the implementation status after the chain control scope was implemented; and the subsequent re-inspection results reflect the actual state of the target edible agricultural products at subsequent times. Based on this, further correction processing is performed on the intra-batch calibration parameters, the first residual threshold, the component residual threshold, and the transmission weights. If the subsequent re-inspection results show that the preceding judgment is basically correct, the current parameter system can remain unchanged or only be slightly modified; if the subsequent re-inspection results show that the preceding judgment has significant deviations, it indicates that at least some of the front-end calibration parameters, diversion judgment thresholds, or transmission parameters are no longer well adapted to the current batch or current sample type.

[0036] When subsequent re-inspection results differ from previous safety assessment results or review assessment results, the frequency of batch anchor sample reselection for the batch containing the target edible agricultural product is further increased, and at least one of the first residual threshold, component residual threshold, and primary disposal threshold is tightened simultaneously. Increasing the frequency of batch anchor sample reselection means that previously, batch anchor samples might have been updated only once every few batches, time periods, or rounds; now, updates are performed at shorter intervals. Tightening the first residual threshold means the system is more sensitive to overall inconsistencies; tightening the component residual threshold means the system is more sensitive to the strongest local conflicts; and tightening the primary disposal threshold means high-risk transmission paths are more likely to be included in the primary disposal scope. Through this process, the processing of similar samples in the next round will be more conservative and robust, and the system will gradually converge towards a more accurate state.

[0037] At the system implementation level, the correlation modeling unit is responsible for outputting the correlation model; the intra-batch calibration unit is responsible for outputting batch anchor point samples and intra-batch calibration parameters; the data calibration unit is responsible for performing calibration on image data, detection data, and environmental time-series data using the intra-batch calibration parameters; the residual generation unit is responsible for outputting image-detection residuals, detection-environment residuals, image-environment residuals, comprehensive residual values, and maximum component residual values; the diversion decision unit is responsible for outputting security decision results or review decision processing results; the propagation handling unit is responsible for outputting the chained handling range and handling tasks; and the model correction unit is responsible for reapplying the review results and subsequent re-inspection results to the aforementioned intra-batch calibration, diversion decision, and propagation handling parameters. Thus, there are clear input-output and feedback relationships between the units within the system, rather than simply a stacking of isolated functional modules.

[0038] The following description, in conjunction with the implementation methods, further illustrates this technical solution. For ease of implementation, several core quantities are explained uniformly first. The sample stability score is used to select batch anchor samples from within the same batch; the intra-batch benchmark vector represents the reference benchmark state within the current batch; the comprehensive residual value characterizes the overall inconsistency of the three types of component residuals; the maximum component residual value characterizes the deviation degree of the mode pair with the strongest local conflict; the residual amplification factor is used to incorporate the anomaly intensity into the propagation weight calculation; and the path cumulative propagation weight characterizes the cumulative impact intensity of the anomaly risk after it spreads along the propagation path. With these definitions, those skilled in the art can complete the corresponding processing simply by following the formulas and procedures below.

[0039] In one implementation, sample identification information, batch information, entity information, and circulation node information corresponding to the target edible agricultural product are first collected, and a correlation model is established. Sample identification information uniquely identifies each sample to be processed; batch information characterizes the batch range to which the sample belongs; entity information characterizes the production entity, operating entity, warehousing entity, transportation entity, or testing entity corresponding to the sample or batch; and circulation node information characterizes the warehousing nodes, transportation nodes, transaction nodes, sampling nodes, or re-inspection nodes the sample has passed through. Then, each sample is abstracted as a sample node, its batch as a batch node, the responsible entity as a entity node, and its circulation location as a circulation node. Attribution association edges are established between sample nodes and batch nodes; responsibility association edges are established between batch nodes and entity nodes; location association edges are established between sample nodes and circulation nodes; and flow association edges are established between batch nodes and circulation nodes. The resulting correlation model is directly invoked in subsequent dissemination and processing.

[0040] After establishing the association model, batch anchor samples are selected from the sample set corresponding to batch information. To ensure that batch anchor samples have repeatable selection criteria, a sample stability score is first calculated for each sample in the sample set. Let the... The normalized value of the dispersion of the detection data for each sample is The image data integrity normalization value is The normalized value of environmental time series data fluctuation is Then the sample stability score It can be in the following form: ; in, , , These are the weighting coefficients, and they satisfy... The smaller the dispersion of the detection data, the higher the completeness of the image data, and the smaller the fluctuation of the environmental time-series data, the higher the sample stability score. Ultimately, the following criteria are selected: The largest sample is used as the batch anchor sample.

[0041] Table 1 provides a set of examples of sample stability scoring parameters that can be directly used.

[0042]

[0043] After the batch anchor samples are determined, the detection data, image data, and environmental time-series data corresponding to the batch anchor samples are extracted to generate an intra-batch baseline vector. The intra-batch baseline vector can be represented as: ; in, This represents the reference value for anchor point detection. This represents the reference value for the brightness of the anchor point image. This represents the baseline value for environmental disturbance at the anchor point. If the calibration vector corresponding to the target sample is represented as: ; Then detect drift correction parameters Image brightness correction parameters Environmental disturbance correction parameters It can be directly generated from the offset. In one example of addition correction, we have: ; If a proportional correction method is used, it can also be written as: ; in, To prevent extremely small positive numbers with a denominator of zero, the above processing yields the batch calibration parameters.

[0044] During the data calibration phase, image data, detection data, and environmental time-series data corresponding to the target edible agricultural product are collected, and calibration processing is performed on these three types of data using in-batch calibration parameters. If additive correction is used, the calibrated detection values... Image brightness value and environmental disturbance values They are represented as follows: ; If a proportional correction is used, it can be expressed as follows: ; The detection data can be pesticide residue values, veterinary drug residue values, heavy metal values, pathogenic bacteria detection values, or detection vectors composed of multiple detection items; image data can be the average brightness of the target area, comprehensive chromaticity, texture statistics, or more complex visual features; environmental time-series data can be feature quantities obtained through statistical analysis of temperature, humidity, gas concentration, and cold chain status sequences. After the above calibration processing, a calibrated multi-source dataset is obtained.

[0045] Based on the calibrated multi-source dataset, image features, detection numerical features, and environmental temporal features are further extracted, and image representation values, detection representation values, and environmental representation values ​​are generated. Let the image feature vector be... The detected numerical feature vector is The environmental time-series feature vector is Then the corresponding representation value can be expressed as: ; in, , , The weight vector is either a preset weight vector or a weight vector obtained through training. After obtaining the three representation values, the difference between the image representation value and the detection representation value is calculated to obtain the image-detection residual. The difference between the detection characterization value and the environmental characterization value is used to obtain the detection-environment residual. The image-environment residual is obtained by calculating the difference between the image representation value and the environment representation value. : ; Based on the three component residuals, the composite residual value The following weighted combination can be used: ; in, Maximum component residual value Then it is defined as: ; In this way, both the overall degree of inconsistency and the degree of strongest local conflict are preserved.

[0046] Table 2 provides a set of examples of residual parameters that can be directly used.

[0047]

[0048] When determining the flow split, a first residual threshold is set. and component residual threshold .when and At that time, the target edible agricultural product is identified as the direct assessment object, and the safety assessment result is output. or At that time, the target agricultural product is identified as the object of conflict review and the review decision process is triggered. Furthermore, the conflict source mode pair can be determined based on which component residual the maximum component residual value originates from. The image result and the detection result will conflict the most; if The test results will then conflict most with the environmental impact; if In this case, the conflict between the image state and the environmental influence is greatest. Subsequently, based on the conflict source modality, the conflict verification objects are assigned to the corresponding verification decision paths. The effect of this is to separate objects with high overall consistency from objects with strong local conflicts.

[0049] After obtaining the security assessment result or the review and processing result, the risk propagation relationship is generated by combining it with the correlation model. The propagation weight between nodes is then considered. At least by batch co-existence coefficient Adjacency coefficient and residual amplification factor The residual amplification factor can be jointly determined by the combined residual value and the maximum component residual value, for example: ; in, and This is the adjustment coefficient. Subsequently, the propagation weights are... It can be defined as: ; in, Thus, the propagation weight is no longer just the strength of structural relationships, but the result of the combined effect of structural relationships and anomaly strength.

[0050] Following the propagation path in the association model, the cumulative propagation weight of the path is further calculated. (Cumulative propagation weight of the path) The decay accumulation method can be used: ; in, Indicates the first path The propagation weight of the edge, This is the path attenuation coefficient. A fidelity accumulation method can also be used. ; Then, With the first-level treatment threshold and secondary treatment threshold Comparison. If If so, the corresponding object will be designated as a first-level disposal object; if If so, the corresponding object will be designated as a secondary disposal object; if If an item is not included in the current round of handling, only its observation record will be retained. For Level 1 handling items, at least one of the following tasks can be triggered: re-inspection, batch locking, circulation interception, and removal from shelves. For Level 2 handling items, at least one of the following tasks can be triggered: key monitoring and additional sampling. In this way, the determination of the handling scope no longer relies on manual experience, but is directly calculated by the cumulative propagation weight of the path.

[0051] Table 3 provides a set of propagation parameter examples.

[0052]

[0053] After the dissemination and disposal are completed, a model correction process is also performed. This model correction process, based on the review and judgment results, the actual disposal results corresponding to the chain disposal range, and subsequent re-inspection results, corrects the in-batch calibration parameters, the first residual threshold, the component residual threshold, and the dissemination weights. When the subsequent re-inspection results are inconsistent with the safety judgment results or the review and judgment results, the batch anchor sample reselection frequency corresponding to the batch of the target edible agricultural product is increased, and at least one of the first residual threshold, the component residual threshold, and the primary disposal threshold is tightened simultaneously. In one feasible approach, the following correction rules can be adopted: ; in, , , To correspond to the correction ratio, the value should be greater than zero and less than one. If the system continuously detects inconsistencies in subsequent re-inspections across multiple batches, the batch anchor sample reselection frequency can be increased from each... Batch reselection increased to one per The data can be reselected once per batch or once per batch. In this way, the data calibration and diversion determination for subsequent batches will gradually converge in a more robust direction.

[0054] Table 4 provides a set of examples of model correction parameters.

[0055]

[0056] In terms of system implementation, the correlation modeling unit is responsible for generating the correlation model; the intra-batch calibration unit is responsible for outputting batch anchor samples and intra-batch calibration parameters; the data calibration unit is responsible for outputting the calibrated multi-source dataset; the residual generation unit is responsible for outputting image-detection residuals, detection-environment residuals, image-environment residuals, comprehensive residual values, and maximum component residual values; the triage judgment unit is responsible for outputting safety judgment results or review judgment processing results; the propagation handling unit is responsible for outputting risk propagation relationships and chain handling scope; and the model correction unit is responsible for reapplying the review results and subsequent re-inspection results to the aforementioned intra-batch calibration, triage judgment, and propagation handling parameters. There are clear input-output and feedback relationships between the units within the system; they are not isolated modules pieced together.

[0057] In a specific application example, a batch of leafy vegetables enters the sampling inspection process. The system first reads the sample identification information, batch information, main body information, and circulation node information to establish a correlation model. Then, it calculates the sample stability score from the sample set of the same batch, selects the sample with the highest score as the batch anchor sample, and constructs the intra-batch benchmark vector and intra-batch calibration parameters accordingly. After that, intra-batch calibration is performed on the target sample's image data, detection data, and environmental time-series data. After calibration, image characterization values, detection characterization values, and environmental characterization values ​​are generated, and further, image-detection residuals, detection-environment residuals, image-environment residuals, comprehensive residual values, and maximum component residual values ​​are obtained. If the comprehensive residual value and the maximum component residual value do not exceed the corresponding threshold, the target sample directly outputs a safety judgment result; if any indicator exceeds the corresponding threshold, the target sample enters conflict review processing. After obtaining the final judgment result, propagation weights are generated based on the batch co-existence coefficient, circulation adjacency coefficient, and residual amplification factor, and further, path cumulative propagation weights are obtained, based on which primary disposal objects and secondary disposal objects are classified. After the subsequent re-inspection results are returned, the batch calibration parameters, residual thresholds, and handling thresholds are adjusted based on whether the re-inspection results are consistent. This achieves a complete closed loop from batch unification to cross-modal consistency judgment, to chain-like handling, and feedback correction.

[0058] In detail, the intelligent detection and early warning scheme for the quality and safety of edible agricultural products proposed in this application is not a simple combination of detection, early warning, traceability and disposal, but a complete technical system built around the same continuous data processing link and parameter correction link. The entire solution starts with the sample identification information, batch information, subject information, and circulation node information of the target edible agricultural products. First, it establishes a correlation model that can uniformly express the relationship between samples, batches, subjects, and circulation nodes. Then, within the same batch, it identifies batch anchor samples and generates intra-batch calibration parameters based on these anchor samples. Next, it uses the intra-batch calibration parameters to calibrate image data, detection data, and environmental time-series data, obtaining a calibrated multi-source dataset. Based on this, it generates image representation values, detection representation values, and environmental representation values, further forming image-detection residuals, detection-environment residuals, and image-environment residuals. Then, it generates a comprehensive residual value and a maximum component residual value based on these residuals, and uses these two values ​​to complete the triage judgment, directing the target edible agricultural products into either the direct judgment path or the conflict review path. After obtaining the safety judgment result or the review judgment processing result, it combines the correlation model to generate risk propagation relationships and determines the chain-like disposal scope based on the propagation weight and the cumulative propagation weight of the path. Finally, it corrects the preceding parameters based on the review results, actual disposal results, and subsequent re-inspection results. Thus, this application forms a closed-loop technical chain from relational modeling, batch unification, cross-modal consistency analysis, chain processing to feedback correction.

[0059] From a technical perspective, this application primarily addresses the problem of direct comparison between different samples within the same batch. Although samples within the same batch may have similar origins, they often differ in sampling time, detection terminal status, image acquisition brightness conditions, and environmental disturbance intensity. If these differences are not addressed beforehand, and the original image data, original detection data, and original environmental time-series data are directly used for judgment, deviations caused by equipment drift, changes in imaging conditions, or short-term environmental fluctuations can easily be misidentified as quality and safety anomalies. This application addresses this problem by introducing batch anchor samples and intra-batch calibration parameters. Batch anchor samples can be understood as reference samples within the current batch, whose function is to establish a unified reference benchmark for multi-source data within the same batch. To ensure the objectivity and repeatability of batch anchor samples, this application does not arbitrarily select a sample as a reference. Instead, it calculates a sample stability score based on the dispersion of detection data, the completeness of image data, and the volatility of environmental time-series data, and then determines the batch anchor sample based on the sample stability score. In this way, the selected samples are more suitable as intra-batch standards in terms of detection performance, image quality, and environmental stability, thereby improving the reliability of subsequent calibration.

[0060] After determining the batch anchor samples, this application further utilizes the detection data, image data, and environmental time-series data corresponding to the batch anchor samples to construct an intra-batch reference vector. Detection drift correction parameters, image brightness correction parameters, and environmental disturbance correction parameters are generated based on the offset relationship of the target sample relative to the intra-batch reference vector. The detection drift correction parameters are used to compensate for detection value shifts caused by changes in the detection terminal state, differences in detection time, or differences in detection path. The image brightness correction parameters are used to reduce image shifts caused by differences in imaging brightness, lighting, and imaging conditions. The environmental disturbance correction parameters are used to reduce the interference of short-term spike fluctuations and unstable disturbances in the environmental time-series data on subsequent judgments. After uniformly calibrating the original image data, original detection data, and original environmental time-series data using these parameters, the resulting calibrated multi-source dataset has been brought back to a unified reference benchmark within the same batch. Therefore, the differences between different samples more accurately reflect the sample's own state, rather than the accidental influence of sampling or detection conditions. Thus, this application effectively solves the problem of insufficient comparability of multi-source data for samples in the same batch in the prior art.

[0061] After completing the batch calibration, this application does not directly form the overall judgment result through simple fusion, but further focuses on whether the data from different sources are in a consistent descriptive state. To this end, this application first extracts image features, detection numerical features, and environmental temporal features from the calibrated multi-source dataset, and then generates image representation values, detection representation values, and environmental representation values ​​respectively. Image representation values ​​are used to convert image-side information into a unified quantitative expression, detection representation values ​​are used to convert detection-side information into a unified quantitative expression, and environmental representation values ​​are used to convert environmental influence information into a unified quantitative expression. Based on this, the deviations between image representation values ​​and detection representation values, between detection representation values ​​and environmental representation values, and between image representation values ​​and environmental representation values ​​are calculated respectively, thus forming image-detection residuals, detection-environment residuals, and image-environment residuals. Through this processing method, data from different sources are no longer passively superimposed, but are first transformed into comparable quantities that determine whether they are consistent or conflicting, enabling the system to more realistically grasp the intrinsic relationships between multi-source data.

[0062] Furthermore, this application does not stop at the level of three component residuals, but introduces a comprehensive residual value and a maximum component residual value. The comprehensive residual value reflects the overall degree of inconsistency, that is, whether the image side, detection side, and environment side are roughly consistent from a global perspective; the maximum component residual value reflects the strongest local conflict, that is, which modal pair has the most intense conflict among the three modal pairs. The fundamental reason for introducing these two quantities is that using only a single overall fusion result can easily mask local extreme biases, while using only local maximum biases can easily ignore the overall trend. By combining the comprehensive residual value and the maximum component residual value, this application can identify samples that are obviously inconsistent overall, and also identify samples that "appear stable overall but have strong conflicts locally." Thus, this application provides a more complete and stable basis for subsequent triage determination.

[0063] In the diversion and determination stage, this application employs a dual constraint mechanism. Only when the overall residual value is no greater than the first residual threshold and the maximum component residual value is no greater than the component residual threshold will the target edible agricultural product enter the direct determination path and output a safe determination result. Conversely, if the overall residual value is greater than the first residual threshold, or the maximum component residual value is greater than the component residual threshold, the target edible agricultural product enters the conflict review path and triggers review and determination processing. This design ensures that objects with large overall deviations are intercepted, as are objects with particularly strong local conflicts, preventing them from being misjudged as normal due to the overall average effect. Compared to existing schemes that rely solely on a single fusion score, this application significantly improves the ability to identify conflicting samples, effectively addressing the core problem of easy misjudgment when multiple source data conflict.

[0064] Furthermore, this application analyzes the sources of conflict. After determining that the target agricultural product is subject to conflict review, it identifies the conflict source modal pair based on the residual type corresponding to the maximum component residual value. If the maximum component residual value comes from the image-detection residual, it indicates the most significant conflict between the image state and the detection result; if the maximum component residual value comes from the detection-environment residual, it indicates the most significant conflict between the detection result and the environmental impact; and if the maximum component residual value comes from the image-environment residual, it indicates the most significant conflict between the image state and the environmental impact. After determining the conflict source modal pair, the system can assign the target agricultural product to different review and judgment processing paths. In this way, this application not only solves the problem of "whether a conflict exists," but also further addresses the problem of "where the conflict originates and which stage should be prioritized for review," thereby improving the targeting and efficiency of the review process.

[0065] After obtaining the safety assessment result or the review assessment result, this application enters the propagation and disposal stage. The propagation and disposal stage does not employ a simple, empirically-based extension logic of "investigating all items in the same batch, all items in the same entity, and all items in the same distribution chain." Instead, it first generates risk propagation relationships based on a correlation model, and then determines the objects truly needing to be included in the disposal scope based on these risk propagation relationships. In this process, the propagation weight between nodes is determined by at least the batch co-ownership coefficient, the distribution adjacency coefficient, and the residual amplification factor. The batch co-ownership coefficient reflects the proximity of objects in batch affiliation, the distribution adjacency coefficient reflects the closeness of contact between objects in the distribution chain, and the residual amplification factor reflects the strength of the current abnormal result itself. The residual amplification factor is jointly determined by the comprehensive residual value and the maximum component residual value. In other words, not only does the "closeness of the relationship" affect the propagation judgment, but also the "strength of the current anomaly" affects the propagation judgment. Thus, the propagation weight is no longer a static structural quantity, but a dynamic risk quantity resulting from the combined effect of structural relationships and anomaly strength.

[0066] After obtaining the propagation weight, this application further calculates the cumulative propagation weight along the propagation path in the association model. The cumulative propagation weight can be understood as the cumulative impact intensity formed after the abnormal risk gradually spreads along multiple levels of nodes. Subsequently, the cumulative propagation weight is compared with the primary and secondary disposal thresholds. If the cumulative propagation weight is greater than the primary disposal threshold, the corresponding object enters the primary disposal scope; if the cumulative propagation weight is not greater than the primary disposal threshold but greater than the secondary disposal threshold, the corresponding object enters the secondary disposal scope. Primary disposal objects correspond to stronger disposal tasks, such as re-inspection, batch locking, circulation interception, and removal from shelves; secondary disposal objects correspond to milder but still require continuous monitoring disposal tasks, such as key monitoring and additional sampling. Through this technical approach, this application makes the disposal scope no longer dependent on human experience, but determined by the relationship structure and the intensity of the anomaly, thereby effectively solving the problem of the disposal scope being too broad or too narrow in the background technology.

[0067] After the propagation and disposal process is completed, this application also introduces model correction processing. The role of model correction processing is that this application does not treat a single detection and disposal process as the end point, but rather feeds back the verification judgment results, actual disposal results, and subsequent re-inspection results into the front-end parameter system. Specifically, when the subsequent re-inspection results are inconsistent with the previous safety judgment results or verification judgment results, it indicates that some previous parameters still have sources of deviation. At this time, the batch anchor sample reselection frequency corresponding to the batch of the target edible agricultural product is increased, and at least one of the first residual threshold, component residual threshold, and primary disposal threshold is tightened simultaneously. Increasing the batch anchor sample reselection frequency enables more timely updates of intra-batch reference samples; tightening the residual threshold makes the system more sensitive to conflicting samples; and tightening the primary disposal threshold makes it easier for truly high-risk objects to enter the strong disposal path. In this way, this application forms a complete closed loop from front-end calibration, to intermediate diversion judgment, to back-end propagation and disposal, and back to front-end parameter correction, thereby effectively solving the problem that the previous system's preceding errors cannot converge round by round in the existing system.

[0068] From the perspective of the overall logic of the solution, this application is not a stack of isolated steps, but rather each processing result naturally becomes the input for the next processing stage. The correlation model provides the structural basis for risk propagation relationships; batch anchor samples provide a reference benchmark for intra-batch calibration parameters; intra-batch calibration parameters provide a basis for correction of multi-source data calibration; the calibrated multi-source dataset provides a unified input for residual generation; the comprehensive residual value and the maximum component residual value provide dual constraints for diversion judgment; the safety judgment result or the review judgment processing result provides risk sources for risk propagation relationships; and the review result, the disposal result, and the subsequent re-inspection result ultimately correct the front-end parameters. Because of this clear sequential relationship, this case forms a continuous technical chain from data collection to result feedback, rather than a patchwork of isolated steps.

[0069] In summary, this application achieves at least the following overall beneficial effects. First, by using batch anchor samples and intra-batch calibration parameters, the comparability of multi-source data within the same batch is significantly improved, fundamentally reducing false anomalies caused by detection drift, image brightness differences, and environmental disturbances. Second, by using image-detection residuals, detection-environment residuals, image-environment residuals, comprehensive residual values, and maximum component residual values, both overall inconsistencies and local strongest conflicts can be grasped simultaneously, thus more accurately distinguishing between directly judged objects and conflict review objects. Third, by using residual amplification factors, propagation weights, and path cumulative propagation weights, the chain processing range is no longer an empirically extended result, but a calculation result resulting from the combined effects of structural relationships and anomaly intensity. Finally, through model correction processing, the review results and subsequent re-inspection results can continuously affect the preceding parameter system, thereby making the system increasingly stable as it runs. In other words, this application does not simply improve the accuracy of a single step, but integrates "intra-batch unification, cross-modal judgment, chain-like processing and feedback correction" into a complete technical system, thereby improving the reliability, pertinence and stability of intelligent detection and early warning of the quality and safety of edible agricultural products as a whole.

Claims

1. A method for intelligent detection and early warning of the quality and safety of edible agricultural products, characterized in that, Includes the following steps: Association modeling steps: Obtain sample identification information, batch information, subject information, and circulation node information corresponding to the target edible agricultural product, and establish an association relationship model based on the sample identification information, batch information, subject information, and circulation node information. The association relationship model includes sample nodes, batch nodes, subject nodes, circulation nodes, and association edges between the sample nodes, batch nodes, subject nodes, and circulation nodes. Intra-batch calibration steps: Determine batch anchor samples from the sample set corresponding to the batch information, and generate intra-batch calibration parameters based on the detection data, image data, and environmental time series data corresponding to the batch information of the batch anchor samples. The intra-batch calibration parameters include at least detection drift correction parameters, image brightness correction parameters, and environmental disturbance correction parameters. Data calibration steps: Collect image data, detection data, and environmental time-series data corresponding to the target edible agricultural product, and perform calibration processing on the image data, detection data, and environmental time-series data using the batch calibration parameters to obtain a calibrated multi-source dataset.

2. The intelligent detection and early warning method for the quality and safety of edible agricultural products according to claim 1, characterized in that, The data calibration step also includes: The residual generation step is as follows: Based on the calibrated multi-source dataset, image features, detection numerical features, and environmental temporal features are extracted to generate image representation values, detection representation values, and environmental representation values, respectively. Based on the image representation values, the detection representation values, and the environmental representation values, a cross-modal consistency residual is generated. The cross-modal consistency residual includes at least image-detection residual, detection-environment residual, and image-environment residual. The diversion determination step is as follows: Based on the image-detection residual, the detection-environment residual, and the image-environment residual, a comprehensive residual value and a maximum component residual value are generated. When the comprehensive residual value is not greater than a first residual threshold and the maximum component residual value is not greater than a component residual threshold, the target edible agricultural product is determined as a direct determination object and a safety determination result is output. When the comprehensive residual value is greater than the first residual threshold or the maximum component residual value is greater than the component residual threshold, the target edible agricultural product is determined as a conflict review object and a review determination process is triggered. The propagation and handling steps are as follows: Based on the security judgment result or the review judgment result, and combined with the correlation model, a risk propagation relationship is generated. The propagation weight between nodes is determined by at least the batch co-existence coefficient, the circulation adjacency coefficient, and the residual amplification factor. The residual amplification factor is determined by the comprehensive residual value and the maximum component residual value. The chain-like handling range is determined based on the propagation weight and the path cumulative propagation weight. Then, the corresponding handling task is triggered based on the chain-like handling range.

3. The intelligent detection and early warning method for the quality and safety of edible agricultural products according to claim 2, characterized in that, In the batch calibration step, the process of determining the batch anchor sample includes an anchor scoring step and an anchor determination step; The anchor point scoring step generates a sample stability score based on the dispersion of detection data, the integrity of image data, and the volatility of environmental time-series data for each sample in the sample set. The anchor point determination step determines the batch of anchor point samples based on the sample stability score. In the intra-batch calibration step, the process of generating the intra-batch calibration parameters includes a benchmark construction step and a parameter generation step; The benchmark construction step generates an intra-batch benchmark vector based on the detection data, image data, and environmental time-series data of the batch anchor point samples. The parameter generation step generates the detection drift correction parameter, the image brightness correction parameter, and the environmental disturbance correction parameter based on the intra-batch reference vector and the offset between the detection data, image data, and environmental time-series data corresponding to the target edible agricultural product.

4. The intelligent detection and early warning method for the quality and safety of edible agricultural products according to claim 3, characterized in that, In the data calibration step, the process of performing the calibration includes a detection calibration step, an image calibration step, and an environmental calibration step; The detection calibration step uses the detection drift correction parameter to perform normalization correction on the detection data; The image calibration step uses the image brightness correction parameters to perform brightness uniformity correction on the image data; The environmental calibration step utilizes the environmental disturbance correction parameters to perform fluctuation suppression correction on the environmental time series data. In the residual generation step, the process of generating the composite residual value and the maximum component residual value includes a component residual generation step, a composite residual generation step, and a maximum component determination step; The component residual generation step calculates the image-detection residual, the detection-environment residual, and the image-environment residual, respectively. The comprehensive residual generation step generates the comprehensive residual value based on a weighted combination of the image-detection residual, the detection-environment residual, and the image-environment residual. The maximum component determination step determines the maximum component residual value from the image-detection residual, the detection-environment residual, and the image-environment residual.

5. The intelligent detection and early warning method for the quality and safety of edible agricultural products according to claim 4, characterized in that, In the traffic splitting determination step, the process of determining the conflict verification object includes a conflict location step and a route verification step; The conflict localization step determines the conflict source mode pair based on the residual type corresponding to the maximum component residual value; The review routing step assigns the conflict review object to the corresponding review judgment and processing path according to the conflict source modality pair. In the propagation processing step, the process of generating the propagation weight includes a coefficient acquisition step, an amplification factor generation step, and a weight generation step. The coefficient acquisition step involves obtaining the batch co-existence coefficient and the circulation adjacency coefficient from the association model. The amplification factor generation step generates the residual amplification factor based on the comprehensive residual value and the maximum component residual value; The weight generation step generates the propagation weights based on the batch co-existence coefficient, the circulation adjacency coefficient, and the residual amplification factor.

6. The intelligent detection and early warning method for the quality and safety of edible agricultural products according to claim 5, characterized in that, In the propagation and disposal steps, the process of determining the scope of the chain disposal includes a path accumulation step and a scope determination step; The path accumulation step calculates the cumulative propagation weight of the propagation path based on the propagation weight; The range determination step involves determining the corresponding object as a first-level disposal object when the cumulative propagation weight is greater than the first-level disposal threshold, and determining the corresponding object as a second-level disposal object when the cumulative propagation weight is not greater than the first-level disposal threshold but greater than the second-level disposal threshold. In the propagation and handling steps, the process of triggering the handling task includes a primary task triggering step and a secondary task triggering step; The first-level task triggering step triggers at least one of the following tasks for the first-level disposal object: re-inspection task, batch locking task, circulation interception task, and delisting task. The secondary task triggering step triggers at least one of a key monitoring task and an additional sampling task for the secondary disposal object; Following the aforementioned dissemination and disposal steps, the following is also included: The model correction step involves: based on the review and judgment processing result, the actual processing result corresponding to the chain processing range, and the subsequent re-inspection result, performing correction processing on the intra-batch calibration parameter, the first residual threshold, the component residual threshold, and the propagation weight; When the subsequent re-inspection results are inconsistent with the safety determination results or the verification determination results, the batch anchor sample reselection frequency corresponding to the batch of the target edible agricultural product is increased based on the subsequent re-inspection results, and at least one of the first residual threshold, the component residual threshold and the primary disposal threshold is tightened simultaneously.

7. An intelligent detection and early warning system for the quality and safety of edible agricultural products, characterized in that, include: The association modeling unit acquires sample identification information, batch information, subject information, and circulation node information corresponding to the target edible agricultural product, and establishes an association relationship model based on the sample identification information, batch information, subject information, and circulation node information. The association relationship model includes sample nodes, batch nodes, subject nodes, circulation nodes, and association edges between the sample nodes, batch nodes, subject nodes, and circulation nodes. The batch calibration unit determines batch anchor samples from the sample set corresponding to the batch information, and generates batch calibration parameters based on the detection data, image data and environmental time series data corresponding to the batch anchor samples. The batch calibration parameters include at least detection drift correction parameters, image brightness correction parameters and environmental disturbance correction parameters. The data calibration unit collects image data, detection data, and environmental time-series data corresponding to the target edible agricultural product, and performs calibration processing on the image data, detection data, and environmental time-series data using the batch calibration parameters to obtain a calibrated multi-source dataset.

8. The intelligent detection and early warning system for the quality and safety of edible agricultural products according to claim 7, characterized in that, Also includes: The residual generation unit extracts image features, detection numerical features, and environmental temporal features based on the calibrated multi-source dataset, generates image representation values, detection representation values, and environmental representation values ​​respectively, and generates cross-modal consistency residuals based on the image representation values, the detection representation values, and the environmental representation values. The cross-modal consistency residuals include at least image-detection residuals, detection-environment residuals, and image-environment residuals. The diversion determination unit generates a comprehensive residual value and a maximum component residual value based on the image-detection residual, the detection-environment residual, and the image-environment residual. When the comprehensive residual value is not greater than a first residual threshold and the maximum component residual value is not greater than a component residual threshold, the target edible agricultural product is determined as a direct determination object and a safety determination result is output. When the comprehensive residual value is greater than the first residual threshold or the maximum component residual value is greater than the component residual threshold, the target edible agricultural product is determined as a conflict review object and a review determination process is triggered. The propagation and handling unit generates risk propagation relationships based on the security judgment result or the review judgment processing result, and in conjunction with the correlation model. The propagation weight between nodes is determined by at least the batch co-existence coefficient, the circulation adjacency coefficient, and the residual amplification factor. The residual amplification factor is determined by the comprehensive residual value and the maximum component residual value. The chain-like handling range is determined based on the propagation weight and the path cumulative propagation weight, and the corresponding handling task is triggered based on the chain-like handling range.

9. The intelligent detection and early warning system for the quality and safety of edible agricultural products according to claim 8, characterized in that, The batch calibration unit is also used to generate a batch reference vector based on the detection data, image data and environmental time series data of the batch anchor sample, and to generate the detection drift correction parameter, the image brightness correction parameter and the environmental disturbance correction parameter based on the offset between the batch reference vector and the detection data, image data and environmental time series data corresponding to the target edible agricultural product. The data calibration unit is also used to perform normalization correction on the detection data using the detection drift correction parameter, perform brightness uniformity correction on the image data using the image brightness correction parameter, and perform fluctuation suppression correction on the environmental time series data using the environmental disturbance correction parameter. The residual generation unit includes a characterization value generation module and a residual calculation module; The characterization value generation module generates image characterization values ​​based on the image features, generates detection characterization values ​​based on the detection numerical features, and generates environmental characterization values ​​based on the environmental temporal features. The residual calculation module generates the image-detection residual, the detection-environment residual, and the image-environment residual, and further generates the comprehensive residual value and the maximum component residual value; The traffic splitting determination unit includes a threshold comparison module, an object traffic splitting module, and a route verification module; The threshold comparison module generates a diversion determination result based on the comparison result between the comprehensive residual value and the first residual threshold and the comparison result between the maximum component residual value and the component residual threshold; The object sorting module determines the target edible agricultural product as the direct judgment object when the overall residual value is not greater than the first residual threshold and the maximum component residual value is not greater than the component residual threshold; and determines the target edible agricultural product as the conflict review object when the overall residual value is greater than the first residual threshold or the maximum component residual value is greater than the component residual threshold. The review routing module determines the conflict source mode pair based on the residual type corresponding to the maximum component residual value, and assigns the conflict review object to the corresponding review judgment processing path according to the conflict source mode pair.

10. The intelligent detection and early warning system for the quality and safety of edible agricultural products according to claim 9, characterized in that, The transmission processing unit also includes: Task linkage module: Triggers at least one of the following tasks for the first-level disposal object: re-inspection task, batch locking task, circulation interception task, and delisting task; and triggers at least one of the following tasks for the second-level disposal object: key monitoring task and additional sampling task. Also includes: After the propagation processing unit is executed, the model correction unit performs correction processing on the intra-batch calibration parameters, the first residual threshold, the component residual threshold, and the propagation weight based on the review and judgment processing result, the actual processing result corresponding to the chain processing range, and the subsequent re-inspection result. The model correction unit is also used to increase the batch anchor sample reselection frequency corresponding to the batch of the target edible agricultural product based on the subsequent re-inspection results when the subsequent re-inspection results are inconsistent with the safety judgment results or the review judgment processing results, and simultaneously tighten at least one of the first residual threshold, the component residual threshold and the first-level disposal threshold.