Cloud edge collaboration based agricultural product safety detection big data platform and supervision system
By combining cloud-edge collaborative big data platform and regulatory system for agricultural product safety testing with dual-modal detection and deep learning analysis, the problems of speed and accuracy in agricultural product safety testing have been solved, enabling rapid and accurate detection and proactive early warning, thereby improving testing efficiency and data reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGZHOU RUISEN BIOTECH
- Filing Date
- 2025-06-20
- Publication Date
- 2026-04-28
AI Technical Summary
Current agricultural product safety testing suffers from several problems, including difficulty in balancing testing speed and accuracy, fragmented data storage lacking integrated analysis, disconnect between testing and supervision, and delayed risk warnings.
By adopting a cloud-edge collaborative big data platform and regulatory system for agricultural product safety testing, combined with dual-modal detection, intelligent data processing and deep learning analysis, rapid and accurate detection and proactive early warning can be achieved.
It improved detection accuracy by 25%, detection efficiency by 75%, data reliability by 60%, and risk warning capability by 65%, while optimizing system resource allocation and reducing data transmission volume by 65%.
Smart Images

Figure CN120672140B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of agricultural product safety testing technology, specifically to a cloud-edge collaborative big data platform and regulatory system for agricultural product safety testing. Background Technology
[0002] With increasing public concern about food safety, agricultural product safety testing has become a crucial aspect of safeguarding people's livelihoods. Currently, agricultural product safety testing faces the following main problems: First, traditional testing methods often employ single testing technologies, making it difficult to balance testing speed and accuracy; second, testing data is stored in a fragmented manner, lacking an effective integration and analysis mechanism; third, testing and supervision are disconnected, making it difficult to form a closed-loop management system; and fourth, risk warnings are delayed, hindering proactive prevention and control.
[0003] In existing technologies, agricultural product safety testing typically employs laboratory testing methods, requiring samples to be sent for testing and awaiting results. This process is time-consuming, costly, and makes large-scale monitoring difficult. Furthermore, test data is usually presented in report form, lacking systematic data management and analysis capabilities, making it difficult to extract data value. In addition, traditional testing technologies often rely on single detection methods, such as gas chromatography or liquid chromatography, which involve expensive equipment and complex operations, hindering widespread application at the grassroots level.
[0004] Therefore, there is an urgent need to develop an agricultural product safety testing system that integrates detection, analysis, and supervision to achieve rapid, accurate, and comprehensive agricultural product safety monitoring and risk warning. Summary of the Invention
[0005] The purpose of this invention is to provide a big data platform and regulatory system for agricultural product safety testing based on cloud-edge collaboration. By establishing technologies such as dual-modal detection, intelligent data processing, and deep learning analysis, it enables rapid detection, accurate analysis, and proactive early warning of agricultural product safety.
[0006] This invention proposes a big data platform and regulatory system for agricultural product safety testing based on cloud-edge collaboration, including:
[0007] The regulatory layer module is used to manage the results of agricultural product safety testing and to report agricultural product safety early warning information to the cloud platform. The regulatory layer module includes multiple regulatory nodes, each of which is connected to the data acquisition sensors in the agricultural product safety testing institution and transmits the received agricultural product safety testing results to the cloud platform. The testing results include agricultural product safety testing data and the corresponding geographical location information of the agricultural product's planting location.
[0008] A cloud platform module, connected to the regulatory layer module, is used to model and analyze big data from agricultural product safety testing, and feeds the analysis results back to the regulatory layer module and the farmer-end module. The cloud platform module includes a data collection layer warehouse, an analysis layer warehouse, and a data mart. The data collection layer warehouse receives agricultural product safety testing data, geographical location information, production entity information, and information on violations by regulatory authorities, and stores them in a distributed file storage system. The analysis layer warehouse analyzes the agricultural product safety testing data, geographical location information, production entity information, and information on violations by regulatory authorities to generate result data, and writes the result data into a Hive database. The data mart is connected to the data collection layer warehouse and the analysis layer warehouse, retrieves data from them, and provides data query services to external users.
[0009] The farmer-side module is connected to the cloud platform module and is used to obtain agricultural product safety testing information and generate expert guidance information based on the agricultural product quality and safety information and risk assessment results returned by the cloud platform module.
[0010] The dual-modal detection module, connected to the regulatory layer module, includes a characteristic substance detection channel and a spectral detection channel, used to simultaneously acquire characteristic substance detection data and spectral detection data. The characteristic substance detection channel includes an adjustable light source, a colorimetric plate, a light source brightness detection module, an imaging module, and a light source brightness compensation module, used for precise quantitative detection of known characteristic substances. The spectral detection channel includes a spectral module, a spectral preprocessing module, and a data transmission module, used to discover potentially risky substances through broad-spectrum scanning.
[0011] The data verification and cleaning module is connected to the dual-modal detection module and the cloud platform module. It is used to perform cross-validation and intelligent cleaning of the spectral detection data based on the feature substance detection data to generate high-quality detection data.
[0012] The feature extraction and data fusion module is connected to the data verification and cleaning module and the cloud platform module. It is used to extract feature material features and spectral features from the high-quality detection data, and to fuse the feature material features and spectral features at multiple levels to generate a fused feature vector.
[0013] The safety assessment and risk mapping module, connected to the feature extraction and data fusion module and the cloud platform module, is used to assess the safety level of agricultural products based on the fused feature vector and generate an agricultural product safety risk map in combination with the geographic location information.
[0014] Preferably, the cloud platform module further includes:
[0015] The agricultural product safety assessment unit is used to evaluate the safety of agricultural products and generate agricultural product safety assessment results by using deep learning algorithms based on the agricultural product safety testing data, geographical location information, production entity information, and illegal information of law enforcement by regulatory authorities stored in the big data warehouse of the collection layer.
[0016] The agricultural product safety early warning unit is used to calculate and generate an agricultural product safety risk map based on the agricultural product safety rating results and the distribution of agricultural product production areas, and write the agricultural product safety risk map and the corresponding agricultural product safety rating results into the Hive database and push them to the regulatory layer module.
[0017] Preferably, the cloud platform module further includes:
[0018] The production entity information management unit is used to receive basic information of farmers, including: the farmer's location, production scale, planting varieties, crop production area distribution, farmer identity information, and historical production information. It visualizes the basic information and the geographical location information and provides query and modification functions.
[0019] Preferably, the cloud platform module further includes an expert guidance generation unit, used to generate the expert guidance information based on the geographical location information of the agricultural product planting and the safety rating results of the agricultural product.
[0020] Preferably, the cloud platform module further includes:
[0021] The testing agency supervision unit is used to collect testing information and geographical location information of agricultural product safety testing agencies, visualize the testing agencies and their corresponding testing results, and provide query and modification functions.
[0022] Preferably, the dual-modal detection module includes:
[0023] An edge preprocessing unit is used to perform noise removal, background correction, and light intensity normalization on the feature substance detection data and the spectral detection data to generate preprocessed data.
[0024] The data metadata tagging unit is used to add metadata tags such as timestamps, geographic locations, and device IDs to the preprocessed data to generate tokenized data.
[0025] A data compression unit is used to perform lossless compression on the tokenized data to reduce the transmission burden;
[0026] An anomaly detection unit is used to perform anomaly detection on the labeled data based on statistical features and to filter out obviously abnormal collection results.
[0027] Preferably, the data verification and cleaning module includes:
[0028] A data association unit is used to assign a unique identifier to each sample and associate the characteristic substance detection data with the spectral detection data.
[0029] A cross-validation unit is used to analyze the baseline characteristics of the sample based on the detection data of the characteristic substances, and to analyze the consistency between the spectral detection data and the baseline characteristics;
[0030] The anomaly marking unit is used to mark inconsistent data and set the anomaly level;
[0031] A data filtering unit is used to decide whether to retain, correct, or remove corresponding data based on the anomaly level.
[0032] The quality assessment unit is used to assess the quality of the processed data and generate a quality report.
[0033] Preferably, the feature extraction and data fusion module includes:
[0034] The feature extraction unit is used to extract the concentration, relative content, and time change features of the feature substances from the feature substance detection data.
[0035] The spectral feature extraction unit is used to extract differential spectra, peak features, and curve morphology features from the spectral detection data.
[0036] The feature filtering unit is used to perform correlation analysis on the extracted features and remove redundant features;
[0037] A feature association unit is used to establish the association relationship between the feature substance features and the spectral features;
[0038] A feature vector construction unit is used to construct a unified feature vector based on the association relationship;
[0039] The category adaptation unit is used to adjust the feature selection strategy and weights according to different agricultural product categories.
[0040] Preferably, the security assessment and risk mapping module includes:
[0041] Multi-level model units are used to construct a multi-level deep learning model system that includes agricultural product category identification models, specific category evaluation models, comprehensive risk assessment models, and spatiotemporal prediction models.
[0042] The safety level assessment unit is used to build a three-level standard system based on national standards, industry standards and local standards, and to classify the risk level into four levels: low, medium, high and extremely high.
[0043] Geocoding units are used to accurately geocode the test samples and to divide the regions into multiple levels based on administrative divisions and natural areas;
[0044] The risk mapping construction unit is used to build a multi-level risk map from the village / township level to the provincial level, automatically identify high-risk areas, and mark them as key areas.
[0045] The risk propagation analysis unit is used to analyze possible risk propagation paths based on the logistics network.
[0046] The real-time update unit is used to update the risk map in real time based on newly added data.
[0047] Preferably, the regulatory layer module includes:
[0048] The task distribution unit is used to receive the testing instruction, determine the testing plan according to the type of agricultural product and the testing purpose, and distribute the testing plan to the corresponding testing terminal.
[0049] The data receiving unit is used to receive the agricultural product safety testing data and the geographical location information transmitted by the dual-modal detection module;
[0050] The early warning processing unit is used to receive the agricultural product safety risk map and the agricultural product safety rating result pushed by the cloud platform module, and generate early warning information;
[0051] The law enforcement information management unit is used to record illegal information discovered during the regulatory enforcement process and upload the illegal information to the cloud platform module;
[0052] The regulatory decision support unit is used to provide decision support to regulatory authorities based on the agricultural product safety risk map and the agricultural product safety rating results.
[0053] The present invention has the following beneficial effects:
[0054] 1. By combining dual-modal detection technology with characteristic substance detection and spectral detection, a balance between detection speed and accuracy is achieved. Compared with single detection methods, the accuracy is improved by about 25% and the detection efficiency is improved by about 75%.
[0055] 2. The intelligent verification and cleaning mechanism for spectral data driven by the detection of characteristic substances effectively solves the problem of unstable data quality in traditional spectral detection, improving data reliability by about 60%.
[0056] 3. Based on multi-source data fusion technology, deep integration of characteristic substance data and spectral data was achieved, fully exploring the value of the data and improving the comprehensiveness and accuracy of the analysis.
[0057] 4. By adopting a deep learning-driven risk assessment model and combining it with geographic information system technology, a risk map of agricultural product safety was constructed, realizing the transformation from passive response to proactive early warning, and improving risk early warning capabilities by approximately 65%.
[0058] 5. By using a cloud-edge collaborative architecture, the system resource configuration was optimized, reducing data transmission volume by approximately 65% and improving system response speed and stability. Attached Figure Description
[0059] Figure 1 This is the overall architecture diagram of the cloud-edge collaborative big data platform and regulatory system for agricultural product safety testing of the present invention;
[0060] Figure 2 This is a schematic diagram of the dual-modal detection module of the present invention;
[0061] Figure 3 This is a flowchart illustrating the workflow of the data verification and cleaning module of the present invention.
[0062] Figure 4 This is a schematic diagram of the feature extraction and data fusion module of the present invention;
[0063] Figure 5 This is a flowchart of the safety assessment and risk mapping module of the present invention. Detailed Implementation
[0064] Please refer to the attached document. Figure 1-5 The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. All features disclosed in this specification, or steps in all disclosed methods or processes, may be combined in any way, except for mutually exclusive features and / or steps.
[0065] like Figure 1 As shown, the cloud-edge collaborative big data platform and regulatory system for agricultural product safety testing provided by this invention mainly includes a regulatory layer module 1, a cloud platform module 2, a farmer terminal module 3, a dual-modal detection module 4, a data verification and cleaning module 5, a feature extraction and data fusion module 6, and a safety assessment and risk mapping module 7.
[0066] The regulatory layer module 1 manages the results of agricultural product safety testing and reports them to the cloud platform module 2 upon receiving agricultural product safety early warning information. The regulatory layer module 1 includes multiple regulatory nodes 11, each connected to a data acquisition sensor in the agricultural product safety testing institution, transmitting the received agricultural product safety testing results to the cloud platform module 2. The testing results include agricultural product safety testing data and the corresponding geographical location information of the agricultural product's planting location.
[0067] In embodiments of the present invention, the monitoring node 11 is typically deployed in municipal and county-level agricultural product quality and safety supervision departments, and establishes a connection with the data collection sensors of testing institutions via wired or wireless networks. Preferably, the monitoring node 11 employs data encryption transmission technology to ensure the security of data transmission. Taking vegetable safety supervision in a certain province as an example, the province has set up 32 county-level monitoring nodes, each node connecting an average of 15 testing institutions, collecting an average of approximately 5GB of data per day, and transmitting the data to the cloud platform in real time via a 4G private network.
[0068] Cloud platform module 2 is connected to regulatory layer module 1 and is used to model and analyze big data from agricultural product safety testing, feeding the analysis results back to regulatory layer module 1 and farmer-side module 3. Cloud platform module 2 includes a data collection layer big data warehouse 21, an analysis layer big data warehouse 22, and a data mart 23. Data collection layer big data warehouse 21 receives agricultural product safety testing data, geographic location information, production entity information, and information on violations by regulatory authorities, and stores it in a distributed file storage system. Analysis layer big data warehouse 22 analyzes the agricultural product safety testing data, geographic location information, production entity information, and information on violations by regulatory authorities to generate result data, which is then written to a Hive database. Data mart 23 is connected to data collection layer big data warehouse 21 and analysis layer big data warehouse 22, retrieves data from them, and provides data query services to external users.
[0069] In its implementation, the data acquisition layer big data warehouse 21 is built on the Hadoop Distributed File System (HDFS) and supports petabyte-level data storage. In a provincial-level agricultural product safety supervision platform, the data acquisition layer big data warehouse 21 employs a 3-replica storage strategy, achieving a data storage capacity of 500TB and supporting a write speed of 1000 data entries per second. The analysis layer big data warehouse 22 is built on Hive and utilizes distributed computing frameworks such as MapReduce and Spark for data analysis, supporting complex data analysis and query operations. The data mart 23 provides a RESTful API interface to support the data access needs of the supervision layer module 1 and the farmer-side module 3.
[0070] The farmer-side module 3 is connected to the cloud platform module 2 to obtain agricultural product safety testing information and generate expert guidance information based on the agricultural product quality and safety information and risk assessment results returned by the cloud platform module 2. In this specific implementation, the farmer-side module 3 is provided to farmers as a mobile application, supporting both Android and iOS platforms, with over 100,000 installations. In addition to receiving guidance information, the farmer-side module 3 can also upload planting information, including plant varieties, planting area, pesticide usage, etc., providing basic data support for the cloud platform module 2.
[0071] The dual-modal detection module 4 is connected to the regulatory module 1 and includes a characteristic substance detection channel 41 and a spectral detection channel 42, used to simultaneously acquire characteristic substance detection data and spectral detection data. The characteristic substance detection channel 41 includes an adjustable light source 411, a colorimetric plate 412, a light source brightness detection module 413, an imaging module 414, and a light source brightness compensation module 415, used for accurate quantitative detection of known characteristic substances. The spectral detection channel 42 includes a spectral module 421, a spectral preprocessing module 422, and a data transmission module 423, used to discover potentially risky substances through broad-spectrum scanning.
[0072] In a preferred embodiment, the adjustable light source 411 provides a light beam with a wavelength range of 400-800nm, supporting a resolution of 2nm. Taking the detection of organophosphorus pesticide residues in vegetables as an example, the adjustable light source 411 will specifically provide a 550nm light beam, which is the characteristic wavelength of the colorimetric reaction of organophosphorus pesticides. The colorimetric plate 412 adopts a standard 96-well design, compatible with different types of samples. The light source brightness detection module 413 and the light source brightness compensation module 415 work together to ensure that the light intensity is stable within ±0.5%. When the detected light intensity fluctuation exceeds the threshold (usually 0.3%), the light source brightness compensation module 415 will automatically adjust the current to restore the light intensity to the standard level. The imaging module 414 uses a 2-megapixel CMOS sensor, supports 16-bit grayscale resolution, and can set the acquisition interval from 5 seconds to 10 minutes.
[0073] The spectral module 421 covers a wavelength range of 350-2500nm, including the visible and near-infrared regions, with a visible light resolution ≤1nm and a near-infrared resolution ≤4nm, and a signal-to-noise ratio ≥1000:1 (@550nm). Taking the detection of pesticide residues in fruits and vegetables as an example, the spectral module 421 can complete a full-spectrum scan within 1 minute, generating spectral data at 2150 wavelength points. The spectral preprocessing module 422 performs smoothing and denoising processing on the raw spectral data, using the Savitzky-Golay algorithm to improve data quality. The data transmission module 423 is responsible for transmitting the processed spectral data to the edge preprocessing unit.
[0074] The data verification and cleaning module 5 is connected to the dual-modal detection module 4 and the cloud platform module 2. It is used to perform cross-validation and intelligent cleaning of spectral detection data based on the characteristic substance detection data to generate high-quality detection data. The data verification and cleaning module 5 implements a spectral data correction mechanism driven by characteristic substance detection, which is one of the key innovations of this invention.
[0075] In an embodiment of the present invention, the data verification and cleaning module 5 includes a data association unit 51, a cross-validation unit 52, an anomaly marking unit 53, a data filtering unit 54, and a quality assessment unit 55. The data association unit 51 assigns a unique identifier to each sample, associating characteristic substance detection data and spectral detection data. The cross-validation unit 52 analyzes the baseline characteristics of the sample based on the characteristic substance detection data and analyzes the consistency between the spectral detection data and the baseline characteristics. The anomaly marking unit 53 marks inconsistent data and sets an anomaly level. The data filtering unit 54 decides to retain, correct, or remove the corresponding data based on the anomaly level. The quality assessment unit 55 performs a quality assessment on the processed data and generates a quality report.
[0076] Preferably, the cross-validation unit 52 uses the following algorithm to perform consistency analysis on the characteristic substance detection data and the spectral detection data:
[0077] ,
[0078] in: is the consistency index of sample i, representing the correlation between the characteristic substance detection data and the spectral detection data, with a value range of [0,1]. is the normalized value of the j-th feature in the feature substance detection, ranging from [0,1]; This is the normalized value corresponding to the j-th feature in the spectral detection, ranging from [0,1]. This refers to the number of features, typically 5-20 features; This represents the summation of all features from 1 to n; The square root operator calculates the cosine similarity between two sets of feature vectors; the closer the value is to 1, the higher the consistency.
[0079] Taking the detection of organophosphorus pesticide residues in leafy vegetables as an example, the characteristic substance detection may detect methamidophos content of 0.08 mg / kg (normalized value). The content of dimethoate was 0.12 mg / kg (normalized value). ), and the characteristic values of spectral detection in the corresponding bands are respectively and The consistency index is then calculated as follows:
[0080] The consistency index was 0.993, indicating that the results of the two detection methods were highly consistent.
[0081] when When, it is judged as high consistency; when When, it is judged as moderate consistency; when When these thresholds are reached, the data is considered low consistency. These thresholds are determined based on statistical analysis of a large amount of experimental data and can effectively distinguish between different levels of consistency.
[0082] Anomaly marking unit 53 according to consistency index Data anomalies are classified into three levels: Level 1 anomalies ( Level 2 abnormality Level 3 abnormality Level 1 anomalies typically indicate a significant discrepancy between the results of characteristic substance detection and spectroscopic detection, which may be due to sample contamination, instrument malfunction, or operational errors. Level 2 anomalies indicate a large discrepancy, but this may be resolved through data correction. Level 3 anomalies indicate a slight discrepancy, which usually does not affect the analytical results.
[0083] Data filtering unit 54 employs different processing strategies for data with different anomaly levels. For level two anomaly data, the following correction algorithm is used:
[0084] ,
[0085] in: These are the corrected spectral characteristic values, ranging from [0,1]. These are weighting coefficients, dynamically adjusted based on the consistency index. The range is [0,1]; These are the original spectral feature values, ranging from [0,1]. The characteristic value is defined as [0,1] for the detection of the characteristic substance. This formula combines the results of two detection methods using a weighted average to generate a more reliable characteristic value.
[0086] Taking the secondary abnormal data in a certain test as an example, the consistency index of a certain vegetable sample =0.65, a certain characteristic value in spectral detection =0.3, corresponding to the characteristic substance detection value =0.5, then the corrected eigenvalue is:
[0087] ,
[0088] The corrected eigenvalue of 0.37 falls between the original spectral eigenvalue of 0.3 and the characteristic substance detection value of 0.5, but leans more towards the spectral detection value. This is due to the weighting coefficient. The spectral detection results were given higher weight.
[0089] Quality assessment unit 55 calculates the quality index for the processed data:
[0090] ,
[0091] in: This is a data quality index, ranging from [0,1], representing the overall quality of the data; This is the normalized value of the signal-to-noise ratio, ranging from [0,1], representing the signal quality of the data; The consistency index, ranging from [0,1], represents the degree of consistency between the results of the two detection methods. This is a repeatability index, ranging from [0,1], representing the stability of repeated measurements; , , Here, are weighting coefficients, representing the importance of signal-to-noise ratio, consistency, and repeatability in quality assessment, respectively, satisfying the following conditions: The preferred values are 0.3, 0.5, and 0.2, respectively. These weight values are determined based on the analysis of actual system operation data and can reasonably balance the influence of different quality factors.
[0092] Taking the testing of a batch of vegetable samples as an example, the normalized signal-to-noise ratio of the processed data is... Consistency Index Repeatability indicators The quality index is then calculated as follows:
[0093] ,
[0094] The quality index is 0.891, which is considered good (0.8 ≤ <0.9).
[0095] when When the value is 0.8 or less, it is considered high-quality data and can be directly used for high-precision analysis; when 0.8 ≤ When <0.9, the data is considered good and suitable for routine analysis; when 0.7≤ When <0.8, it is considered medium data and should be used with caution; when Data that is deemed low-quality and not recommended for use is considered unsuitable. These thresholds are determined based on actual application results to ensure the reliability of data analysis.
[0096] The feature extraction and data fusion module 6 is connected to the data verification and cleaning module 5 and the cloud platform module 2. It is used to extract feature material features and spectral features from high-quality detection data, and to fuse the feature material features and spectral features at multiple levels to generate a fused feature vector.
[0097] In an embodiment of the present invention, the feature extraction and data fusion module 6 includes a feature substance feature extraction unit 61, a spectral feature extraction unit 62, a feature screening unit 63, a feature association unit 64, a feature vector construction unit 65, and a category adaptation unit 66. The feature substance feature extraction unit 61 extracts the concentration, relative content, and time-varying features of the feature substances from the feature substance detection data. The spectral feature extraction unit 62 extracts differential spectral characteristics, peak features, and curve morphology features from the spectral detection data. The feature screening unit 63 performs correlation analysis on the extracted features and removes redundant features. The feature association unit 64 establishes the association relationship between the feature substance features and the spectral features. The feature vector construction unit 65 constructs a unified feature vector based on the association relationship. The category adaptation unit 66 adjusts the feature selection strategy and weights according to different agricultural product categories.
[0098] The feature extraction unit 61 calculates the concentration of feature substances based on the standard curve method, and constructs an index library containing more than 100 feature substances, including common pesticide residues, heavy metals, and additives. Taking a vegetable sample as an example, multiple pesticide residues were detected: methamidophos 0.08 mg / kg (standard limit 0.1 mg / kg, relative standard limit ratio 80%), and dimethoate 0.12 mg / kg (standard limit 0.2 mg / kg, relative standard limit ratio 60%). The extracted features include: concentration value vector [0.08, 0.12] mg / kg, relative standard limit ratio vector [80%, 60%], relative content [40%, 60%] (methamidophos accounts for 40% of the total detected substances, and dimethoate accounts for 60%), and time change trend (e.g., methamidophos content change rate -5% and dimethoate change rate +8% in the last 7 days).
[0099] The spectral feature extraction unit 62 extracts spectral features using the following method: First, key bands are selected, choosing characteristic bands for different types of agricultural products and detection targets; then, differential spectra are calculated. :
[0100] ,
[0101] in: wavelength Differential spectral values at [location], units and spectral values same; wavelength Spectral values at; wavelength Spectral values at; The wavelength interval is typically 2-5 nm. Differential spectroscopy can highlight the variation characteristics of the spectral curve and enhance weak characteristic peaks.
[0102] Taking the detection of pesticide residues in vegetables as an example, a characteristic absorption peak exists around 550nm. , Then the difference spectrum is calculated as follows: Assuming , ,but The result indicates a positive spectral change at 550 nm, which may be related to the presence of some pesticide residue.
[0103] Next, the position of the characteristic peak is extracted. ,high ,width and area :
[0104] ,
[0105] ,
[0106] ,
[0107] in: The peak position is the wavelength at which the spectral value reaches a local extremum, expressed in nm. Peak height represents the difference between the peak value and the baseline. The spectral value at the peak position; The baseline spectral value is usually determined by connecting the points on both sides of the peak. Peak width represents the wavelength difference between the two ends of the peak, expressed in nm. and λ represents the wavelength at both ends of the peak, in nm. The peak area represents the area between the peak and the baseline, calculated through integration. Indicates the wavelength range Integrating within, d It represents a tiny change in wavelength.
[0108] Finally, the slope of the spectral curve is calculated. and curvature feature:
[0109] ,
[0110] ,
[0111] in: wavelength The spectral slope at a point represents the rate of change of the spectral curve at that point; wavelength The spectral curvature at a point indicates the degree of curvature of the spectral curve at that point; wavelength Spectral values at; The wavelength interval is typically 1-3 nm.
[0112] Taking the spectrum of a vegetable sample at 450nm as an example, if , , ,Pick Then the slope and curvature are calculated as follows:
[0113] ,
[0114] ,
[0115] The slope is This indicates that the spectrum shows an upward trend at 450 nm; the curvature is This indicates that the spectral curve bends slightly upward at that point.
[0116] Feature filtering unit 63 uses correlation analysis to remove redundant features. First, it calculates the correlation coefficient matrix R between features, where elements... The Pearson correlation coefficient between feature i and feature j is:
[0117] ,
[0118] in: is the Pearson correlation coefficient between feature i and feature j, with a value range of [-1, 1]; Let i be the i-th feature value of the k-th sample; Let j be the feature value of the k-th sample; The average value of feature i; is the average value of feature j; m is the number of samples; This represents summing over all samples from 1 to m. Then, a threshold θ (usually 0.85) is set, when... When selecting a feature, retain the one with more information and remove the other. Information content is determined by the mutual information between the feature and the target variable. calculate:
[0119] ,
[0120] in: Features With target variable Mutual information, representing features Includes information about the target variable The amount of information, measured in bits; Features Values And the target variable Values The joint probability; Features Values The marginal probability; For target variable Values The marginal probability; Indicates the feature Sum all possible values of ; Indicates the target variable Sum all possible values of ; Let represent a base-2 logarithm such that the unit of mutual information is bits.
[0121] Feature association unit 64 uses canonical correlation analysis (CCA) to establish the association between the characteristics of the characteristic substances and the spectral characteristics. CCA seeks a linear combination of the two sets of variables that maximizes their correlation.
[0122] ,
[0123] in: The canonical correlation coefficient represents the maximum correlation between two linear combinations of variables, and its value ranges from [0,1]. For dimension The vector of 1 represents the weight vector of the first group of variables (characteristic material characteristics); For dimension The vector represents the weight vector of the second set of variables (spectral features); For dimension The matrix represents the covariance matrix of the two sets of features; For dimension The matrix represents the autocovariance matrix of the first set of features; For dimension The matrix represents the autocovariance matrix of the second set of features; and They represent and Transpose of; This indicates the search for the expression that maximizes the sum of its parts. and .
[0124] Taking pesticide residue detection as an example, characteristic substances include the concentration of methamidophos and dimethoate, while spectral characteristics include the absorption peak height at 550 nm and the slope at 630 nm. Through CCA analysis, the first pair of canonical variables may be found to be a linear combination of the characteristics of the characteristic substances. Methamidophos concentration Linear combination of dimethoate concentration and spectral characteristics The absorption peak height at nm The slope at nm, and the correlation coefficient between the two =0.92, indicating a strong correlation between the two sets of features.
[0125] Based on the correlation analysis results, the feature vector construction unit 65 divides the feature hierarchy into three levels: basic feature layer, feature substance feature layer, and spectral feature layer, and constructs a unified feature vector. :
[0126] ,
[0127] in: The final fused feature vector has a dimension of . ; For dimension The vector represents the basic feature vector, which contains basic sample information such as sampling location, time, and type of agricultural product. For dimension The vector represents the feature vector of the feature substance, which contains information such as the concentration and proportion of various feature substances; For dimension The vector represents the spectral feature vector, which contains the key features of the spectrum; This represents the vertical connection operation of vectors.
[0128] To address the scaling issue of features with different dimensions, the feature vectors are normalized:
[0129] ,
[0130] in: The normalized feature vectors have dimensions of ... same; For dimensions and The same vector represents the mean of each feature; For dimensions and The same vector represents the standard deviation of each feature; the operations on the numerator and denominator are element-wise operations.
[0131] Taking the safety testing of a batch of vegetables as an example, the basic features extracted include the place of origin code, planting method, and sampling time; the characteristic substance features include the concentration of five common pesticide residues; and the spectral features include the feature values at 10 key wavelengths. Therefore, the feature vector dimension is (3+5+10)=18. After normalization, the feature values are unified on a similar scale, facilitating subsequent analysis.
[0132] The category adaptation unit 66 dynamically adjusts feature selection and weights based on agricultural product categories. First, it constructs an agricultural product category feature template library covering common agricultural product categories; then, it establishes compensation factors for different seasons and production areas; finally, it dynamically adjusts feature weights based on sample characteristics. Preferably, the weight adjustment formula is:
[0133] ,
[0134] in: Features The adjusted weights; Features The basic weights are usually determined by expert experience or historical data analysis; This is a category factor, reflecting the influence of a specific agricultural product category on the importance of the feature, with a value range of [-0.3, 0.3]. This is a seasonal factor, reflecting the influence of seasonal variations on the importance of features, with a value range of [0.8, 1.2]. The regional factor reflects the influence of different production areas on the importance of characteristics, and its value ranges from [0.9, 1.1].
[0135] Taking leafy vegetables as an example, the basic weighting might be: pesticide residue concentration weighting. Spectral feature weights Basic information weight Targeting summer ( South China region ( spinach ( The adjusted weights are:
[0136] ,
[0137] This indicates that under these specific conditions, the weight of pesticide residue concentration was increased from 0.5 to 0.616, reflecting the increased importance of pesticide residue detection in spinach in South China during the summer.
[0138] The safety assessment and risk mapping module 7 is connected to the feature extraction and data fusion module 6 and the cloud platform module 2. It is used to assess the safety level of agricultural products based on the fused feature vector and generate an agricultural product safety risk map by combining geographical location information.
[0139] In an embodiment of the present invention, the safety assessment and risk mapping module 7 includes a multi-level model unit 71, a safety level assessment unit 72, a geocoding unit 73, a risk mapping construction unit 74, a risk propagation analysis unit 75, and a real-time update unit 76. The multi-level model unit 71 constructs a multi-level deep learning model system including an agricultural product category identification model, a specific category assessment model, a comprehensive risk assessment model, and a spatiotemporal prediction model. The safety level assessment unit 72 constructs a three-level standard system based on national standards, industry standards, and local standards, classifying risk levels into four levels: low, medium, high, and extremely high. The geocoding unit 73 performs precise geocoding of the tested samples and performs multi-level regional division based on administrative divisions and natural regions. The risk mapping construction unit 74 constructs a multi-level risk map from villages and towns to provincial levels, automatically identifying high-risk areas and marking them prominently. The risk propagation analysis unit 75 analyzes possible risk propagation paths based on logistics networks. The real-time update unit 76 updates the risk map in real time based on newly added data.
[0140] Multi-level model unit 71 employs deep learning technology to construct a multi-level model architecture. The agricultural product category recognition model uses a convolutional neural network (CNN) structure, containing 5 convolutional layers and 3 fully connected layers. The inputs are spectral data and image data, and the output is the probability distribution of agricultural product categories. The specific category evaluation model adopts a customized network structure for different agricultural product categories, mainly including feature extraction layers, feature fusion layers, and evaluation layers. The comprehensive risk assessment model uses a deep neural network enhanced with an attention mechanism, which can adaptively focus on the importance of different features. The spatiotemporal prediction model combines a long short-term memory network (LSTM) and a graph convolutional network (GCN) to achieve joint modeling of time series and spatial relationships.
[0141] Taking a provincial agricultural product safety supervision platform as an example, the system has established dedicated specific category assessment models for 20 major agricultural products. Each specific category assessment model is trained based on at least 5,000 historical samples, achieving an accuracy rate of over 92%. The comprehensive risk assessment model integrates the results of multiple specific category models and incorporates geographical, temporal, and other dimensional information to form a global risk assessment result.
[0142] Safety rating unit 72 is based on a multi-level standard system to comprehensively assess the safety level of agricultural products. The risk score calculation formula is:
[0143] ,
[0144] in: Risk scores represent the overall safety risk level of agricultural products; The number of risk factors is usually the number of characteristic substances detected. For the first The weight coefficients of each risk factor reflect the relative importance of that factor and satisfy the following conditions: For the first The detection values for each risk factor are typically expressed in mg / kg. For the first Limit standard values for each risk factor, in units of same; This is a risk impact factor, related to the severity of the risk factor, and its value range is usually [1,2]. The greater the severity, the higher the value. This represents the summation of all risk factors from 1 to m.
[0145] Taking a vegetable sample as an example, three pesticide residues were detected: methamidophos 0.08 mg / kg (limit standard 0.1 mg / kg, weight 0.4, impact factor 1.5), dimethoate 0.12 mg / kg (limit standard 0.2 mg / kg, weight 0.3, impact factor 1.2), and carbofuran 0.03 mg / kg (limit standard 0.05 mg / kg, weight 0.3, impact factor 1.8). The risk score is calculated as follows:
[0146] ,
[0147] The risk score is 1.02, which is considered high risk (1.0≤R<2.0).
[0148] A risk score R < 0.5 indicates low risk, meaning the agricultural product is highly safe and requires no special attention; 0.5 ≤ R < 1.0 indicates medium risk, requiring enhanced monitoring; 1.0 ≤ R < 2.0 indicates high risk, requiring targeted measures; and R ≥ 2.0 indicates extremely high risk, requiring immediate intervention. These thresholds are determined based on extensive real-world case analysis and effectively differentiate between different risk levels.
[0149] Geocoding Unit 73 employs high-precision geocoding technology to convert the location information of detected samples into standardized geographic coordinates with an accuracy of ≤10 meters. Simultaneously, based on administrative divisions and natural regional characteristics, it constructs a multi-level regional division system, including five levels: provincial, municipal, county, township, and village. In a certain province's agricultural product safety supervision system, Geocoding Unit 73 has processed location information for over 500,000 sampling points, covering more than 95% of the province's agricultural product production areas.
[0150] Unit 74, the risk mapping construction unit, constructs a risk map of agricultural product safety based on interpolation algorithms and cluster analysis. First, spatial interpolation is performed on discrete risk score points to generate a continuous risk distribution surface. Then, high-risk areas are identified through hotspot analysis. Finally, risk maps at different scales are constructed based on multi-level regional division. The spatial interpolation employs an improved inverse distance weighted (IDW) algorithm.
[0151] ,
[0152] in: For prediction points The interpolation result, i.e., the risk score estimate for that location; For known points The risk score is derived from actual test results; For known points For prediction points The weights are calculated by the following formula; N is the number of known points participating in the interpolation calculation, usually 8-12 points closest to the predicted point are selected; This represents the summation over all known points from 1 to N.
[0153] ,
[0154] in: For prediction points With known points The Euclidean distance between them is usually in meters; p is the distance power, which controls the degree of influence of distance on weight, and is usually taken as 2. The larger the value, the smaller the influence of distant points. For known points The reliability weight, with a value range of [0.8, 1.2], is related to the sample quality; the higher the quality, the greater the weight.
[0155] Taking the construction of a safety risk map for agricultural products in a certain county as an example, the county has 100 monitoring points, each with a corresponding risk score. To predict the risk score of an unsampled point, interpolation is performed using the 10 closest known points. Assuming the distances between these 10 points are [500, 600, 650, 800, 900, 950, 1000, 1100, 1200, 1300] meters, and the risk scores are [0.8, 0.9, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.3, 0.4], with a reliability weight of 1.0 and a distance power p=2, the weights of each point are calculated as follows:
[0156] ,
[0157] ,
[0158] And so on...
[0159] The interpolation result is then calculated as follows:
[0160] ,
[0161] The predicted point has a risk score of 0.65, classifying it as medium risk. By performing similar calculations on all grid points within the region, a continuous risk distribution surface can be generated, forming a risk map.
[0162] Risk propagation analysis unit 75 analyzes risk propagation paths based on a logistics network model. First, it constructs an agricultural product distribution network. ,in It is a set of nodes (including production areas, wholesale markets, retail terminals, etc.). Let the set of edges (representing logistics relationships) be defined; then the risk propagation probability is defined. This indicates that the risk originates from the node. propagation to nodes The probability of risk propagation is calculated; finally, network analysis algorithms are used to identify key propagation paths and risk hotspots. The formula for calculating the probability of risk propagation is:
[0163] ,
[0164] in: Risk from nodes propagation to nodes The probability of , with a value range of [0,1]; The basic propagation rate represents the maximum propagation probability under ideal conditions, and is typically set to 0.6-0.8. For nodes To the node The logistics weight represents the logistics intensity between two nodes; For nodes The set of adjacent nodes, i.e., the set of nodes with which the node is located. All nodes with direct logistical relationships; Represents a node The sum of the logistics weights of all adjacent nodes; For nodes Risk score; This is the risk impact coefficient, which controls the degree of influence of the risk score on the transmission probability, and is usually set to 0.5. It is an exponential function, representing the risk score. The corresponding attenuation factor.
[0165] Taking a certain agricultural product wholesale market (node) For example, let's assume the market's risk score... (High risk), with logistical relationships with three retail markets, the logistics weights are as follows: , , Basic propagation rate Risk impact coefficient The probability that the risk propagates to the first retail market is:
[0166] ,
[0167] This indicates that the agricultural product safety risk at the wholesale market has a 18.5% probability of spreading to the first retail market. Similarly, the probability of spreading to other retail markets can be calculated, and the propagation path of the risk throughout the entire logistics network can be further analyzed.
[0168] The real-time update unit 76 dynamically updates the risk map based on newly added detection data. The update frequency is adaptively adjusted according to the data volume and risk level, ranging from hourly to daily. Preferably, the update frequency is increased for high-risk areas and decreased for low-risk areas, optimizing system resource utilization. In a provincial agricultural product safety supervision platform, the real-time update unit 76 implements an update frequency of once every 2 hours for high-risk areas, once every 12 hours for medium-risk areas, and once every 24 hours for low-risk areas, ensuring the effective allocation of supervision resources.
[0169] In another embodiment of the present invention, the cloud platform module 2 further includes an agricultural product safety assessment unit 24 and an agricultural product safety early warning unit 25. The agricultural product safety assessment unit 24, based on agricultural product safety testing data, geographical location information, production entity information, and information on violations by regulatory authorities stored in the big data warehouse 21 at the data collection layer, uses a deep learning algorithm to evaluate the safety of agricultural products and generate agricultural product safety assessment results. The agricultural product safety early warning unit 25, based on the agricultural product safety rating results and the distribution of agricultural product production areas, calculates and generates an agricultural product safety risk map, writes the agricultural product safety risk map and the corresponding agricultural product safety rating results into the Hive database, and pushes it to the regulatory layer module 1.
[0170] In a preferred embodiment of the present invention, the agricultural product safety assessment unit 24 employs a deep learning algorithm to construct an assessment model, which includes a feature extraction layer, a feature fusion layer, and an assessment layer. The feature extraction layer uses a multilayer perceptron (MLP) structure to extract the implicit representations of different types of features; the feature fusion layer uses an attention mechanism to dynamically adjust the weights of different features; and the assessment layer outputs a safety rating result. The model training adopts a supervised learning approach, using historical detection results as labels, and optimizes the model parameters through a backpropagation algorithm.
[0171] A provincial agricultural product safety supervision platform's safety assessment model, trained on 100,000 historical monitoring records, covers 20 major agricultural product types, achieving an assessment accuracy of 94%. The model employs a three-layer MLP structure for feature extraction, with hidden layer neurons numbering 128, 64, and 32 respectively, and using ReLU activation. The feature fusion layer utilizes a multi-head attention mechanism with four heads, effectively capturing the correlations between different features. The assessment layer outputs probability distributions for four safety levels (low risk, medium risk, high risk, and extremely high risk).
[0172] The agricultural product safety early warning unit 25 generates a safety risk map based on spatial statistical methods. First, it correlates agricultural product safety rating results with geographical location information; then, it uses kernel density estimation to calculate the spatial distribution of risk; finally, it combines administrative divisions to generate a tiered risk map. The early warning triggering mechanism is based on risk thresholds and spatiotemporal clustering; when the risk in a certain area exceeds the threshold or the risk rises rapidly in a short period, an early warning is automatically triggered.
[0173] The formula for estimating nuclear density is:
[0174] ,
[0175] in: For position The kernel density estimate at a given location represents the spatial distribution intensity of the risk; This represents the number of sample points. This is a bandwidth parameter that controls the degree of smoothing. It is usually selected based on the characteristics of the data distribution; the larger the value, the more obvious the smoothing effect. For kernel functions, commonly used ones include Gaussian kernel, Epanechnikov kernel, etc. For the first The location of each sample point; Indicates position With sample points Standardized distance between them; Indicates all Summing of sample points.
[0176] When using the Gaussian kernel function, the kernel function expression is:
[0177] ,
[0178] in: The Gaussian kernel function; For standardized distance ; These are the normalization coefficients; It is an exponential function, representing the effect of distance on density.
[0179] Taking the agricultural product safety risk early warning system of a certain county as an example, the county has 50 high-risk monitoring points. The kernel density estimation method was used to analyze the spatial clustering of risks. A bandwidth parameter h = 1000 meters (i.e., 1 kilometer) was selected, and a Gaussian kernel function was used. Calculations showed that the risk density in a certain area in the northeast of the county was significantly higher than in other areas, reaching the early warning threshold (usually set at 3 times the average density). The system automatically triggered an early warning and pushed it to relevant regulatory departments.
[0180] In another embodiment of the present invention, the cloud platform module 2 further includes a production entity information management unit 26, which is used to receive basic information of farmers, including: the farmer's location, production scale, planting varieties, crop production area distribution, farmer identity information and historical production information, and to visualize the basic information and geographical location information, and provide query and modification functions.
[0181] Production entity information management unit 26 uses a distributed database to store basic information about farmers, supporting high-concurrency access and fast queries. Visualization utilizes GIS technology to intuitively present the distribution of farmers and their planting conditions. In a provincial agricultural product safety supervision platform, this unit manages the basic information of over 200,000 farmers, including planting area, main varieties, and production scale. The system supports multi-dimensional queries by region (accurate to the village level), by variety (covering major local crops), and by scale (divided into small, medium, and large-scale), with a response time of <0.5 seconds.
[0182] Preferably, the cloud platform module 2 further includes an expert guidance generation unit 27, used to generate expert guidance information based on the geographical location information of agricultural product planting and the safety rating results of agricultural products. The expert guidance generation unit 27, based on knowledge graph and natural language generation technology, automatically generates targeted guidance suggestions based on the detection results and risk ratings.
[0183] The knowledge graph covers knowledge in areas such as pesticide use, fertilizer application, and pest and disease control, containing over 5,000 knowledge points and 10,000 relationships. Taking vegetables found to have excessive levels of organophosphorus pesticides as an example, the system will retrieve relevant control measures through the knowledge graph, such as recommending suitable pesticide alternatives, suggesting adjustments to spraying intervals, and providing information on pesticide degradation cycles. The natural language generation module translates professional knowledge into easy-to-understand guidance language, such as suggesting that you use XX biological pesticide to replace the currently used organophosphorus pesticide, and strictly controlling the interval between the last spray and harvest to be no less than 7 days, thus improving the guidance effect.
[0184] In another preferred embodiment of the present invention, the cloud platform module 2 further includes a testing institution supervision unit 28, which is used to collect testing information and geographical location information of agricultural product safety testing institutions, visualize the testing institutions and their corresponding testing results, and provide query and modification functions. The testing institution supervision unit 28 realizes comprehensive supervision of testing institutions, including functions such as qualification review, capability assessment, and result review.
[0185] A provincial agricultural product safety supervision platform manages 156 testing institutions across the province through this unit, providing real-time information on each institution's testing capabilities, testing items, testing volume, and accuracy. The system uses multi-dimensional charts to visually present the distribution and capabilities of testing institutions, supporting searches by institution name, qualification type (divided into A, B, and C levels), region, and other criteria. The system also establishes a reputation scoring mechanism for testing institutions, dynamically assessing their reliability based on factors such as the accuracy and timeliness of historical data, guiding the allocation of regulatory resources.
[0186] In one embodiment of the present invention, the dual-modal detection module 4 includes an edge preprocessing unit 43, a data element marking unit 44, a data compression unit 45, and an anomaly detection unit 46. The edge preprocessing unit 43 performs noise removal, background correction, and light intensity normalization on the feature substance detection data and spectral detection data to generate preprocessed data. The data element marking unit 44 adds metadata tags such as timestamps, geographic locations, and device IDs to the preprocessed data to generate tagged data. The data compression unit 45 performs lossless compression on the tagged data to reduce transmission burden. The anomaly detection unit 46 performs anomaly detection on the tagged data based on statistical characteristics, filtering out obviously abnormal acquisition results.
[0187] The edge preprocessing unit 43 uses signal processing algorithms to process the raw data. Noise removal employs wavelet transform to effectively suppress high-frequency noise; background correction uses a combination of blank sample subtraction and polynomial fitting to remove background interference; and light intensity normalization uses the internal standard method to eliminate the influence of light source fluctuations. In a vegetable detection application, db4 wavelet was used for 6-level decomposition, retaining the approximation coefficients and some detail coefficients of levels 4-6, resulting in an improvement in the signal-to-noise ratio of approximately 15 dB after reconstruction. Background correction uses 5th-order polynomial fitting with a fitting accuracy of R² > 0.98. Light intensity normalization uses the internal standard added to the sample as a reference, adjusting the internal standard peak intensity of all samples to the same level.
[0188] Data element tagging unit 44 adds rich metadata to each data entry, including: acquisition time (accurate to milliseconds), geographic coordinates (latitude and longitude, accuracy ≤10 meters), device ID, operator ID, sample ID, sample type, and testing batch. The metadata is stored in JSON format, with a typical metadata record as follows:
[0189] json
[0190] {
[0191] "timestamp":"2024-05-01T10:15:23.456Z",
[0192] "location":{"latitude":30.5123,"longitude":114.3089,"accuracy":8},
[0193] "device_id":"SPD-A2103",
[0194] "operator_id":"OP00789",
[0195] "sample_id":"VEG20240501120",
[0196] "sample_type":"leafy_vegetable",
[0197] "batch_id":"B20240501-03"
[0198] }
[0199] This standardized metadata format facilitates subsequent data management, querying, and analysis.
[0200] The data compression unit 45 employs a lossless compression algorithm, achieving an average compression ratio of 5:1. For feature substance detection image data, an improved PNG compression algorithm is used, with parameter settings optimized for the characteristics of the detection images, resulting in an approximately 20% increase in compression ratio. For spectral data, a method combining differential coding and Huffman coding is employed.
[0201] ,
[0202] in: This represents the i-th data point after differential encoding; This refers to the i-th point of the original spectral data; This represents the (i-1)th point of the original spectral data. Differential coding utilizes the continuous nature of spectral data to convert the original data into difference values. Most of these difference values are distributed within a small range, making them suitable for subsequent entropy coding.
[0203] Anomaly detection unit 46 identifies anomalous data based on statistical features. First, it calculates the statistical features (mean) of historical data. Standard deviation Quartiles , Then, set anomaly detection rules; finally, mark data points that exceed the normal range. Commonly used anomaly detection rules include:
[0204] 1. Principle: If data points satisfy If so, it is considered abnormal;
[0205] 2. Box plot rule: If data points satisfy or If it is, then it is judged as abnormal, where It is the interquartile range.
[0206] Taking the pesticide residue test of a certain batch of vegetables as an example, the average of historical data Standard deviation If the test value of a certain sample is ,but ,according to Data deemed abnormal by principle needs to be marked and further verified.
[0207] In another embodiment of the present invention, the regulatory layer module 1 includes a task distribution unit 12, a data receiving unit 13, an early warning processing unit 14, an enforcement information management unit 15, and a regulatory decision support unit 16. The task distribution unit 12, upon receiving a testing instruction, determines a testing plan based on the type of agricultural product and the testing objective, and distributes the testing plan to the corresponding testing terminal. The data receiving unit 13 receives agricultural product safety testing data and geographic location information transmitted by the dual-modal testing module 4. The early warning processing unit 14 receives the agricultural product safety risk map and agricultural product safety rating results pushed by the cloud platform module 2, and generates early warning information. The enforcement information management unit 15 records illegal information discovered during regulatory enforcement and uploads the illegal information to the cloud platform module 2. The regulatory decision support unit 16 provides decision support to regulatory departments based on the agricultural product safety risk map and agricultural product safety rating results.
[0208] Task distribution unit 12 employs an intelligent scheduling algorithm to optimize task allocation based on factors such as task priority, terminal load, and geographical location. Task distribution unit 12 of a provincial agricultural product safety supervision platform processes approximately 300 testing tasks daily, covering 89 counties and districts across the province. The system uses a weighted task allocation algorithm.
[0209] ,
[0210] in: For testing terminals Overall score; To account for the number of factors to consider, typically 3-5 factors are considered. For the first The weight coefficients of each factor satisfy the following conditions: For testing terminals In the The scores on each factor are usually normalized to the [0,1] interval; This represents the summation over all k factors.
[0211] Factors considered typically include: current load (weight 0.4), geographical distance (weight 0.3), historical performance (weight 0.2), and equipment capability matching (weight 0.1). The system selects the detection terminal with the highest overall score to execute the task, achieving a reasonable allocation of detection resources and reducing the average task execution time by 25% compared to traditional methods.
[0212] Data receiving unit 13 employs a reliable data transmission protocol to ensure complete data reception. In a provincial agricultural product safety supervision platform, data receiving unit 13 uses the MQTT protocol combined with message queue technology, supporting breakpoint resumption and data recovery functions, ensuring data integrity even under unstable network conditions. The system receives approximately 20GB of data daily, with a peak reception rate of 50MB / s and a data integrity rate >99.99%.
[0213] The early warning processing unit 14 adopts different handling strategies based on the risk level: for extremely high risk, an emergency response is immediately triggered, and relevant responsible persons and emergency response teams are notified; for high risk, key monitoring is conducted and the frequency of detection is increased; for medium risk, daily supervision is strengthened; and for low risk, routine supervision is maintained. In the province's agricultural product safety supervision platform, early warning information is sent to relevant personnel through multiple channels such as SMS, WeChat official accounts, and dedicated apps, achieving 100% coverage and an average response time of less than 30 minutes.
[0214] Enforcement Information Management Unit 15 records issues discovered during enforcement inspections, including information such as the violating entity, the illegal act, and the penalties. Standardized enforcement forms are used to ensure data integrity. In a provincial agricultural product safety supervision platform, Enforcement Information Management Unit 15 utilizes a mobile enforcement terminal, supporting on-site enforcement information collection, evidence gathering for violations, and penalty decision generation, significantly improving enforcement efficiency and standardization. The system has accumulated over 3,000 enforcement cases, forming a complete enforcement database and providing strong support for risk assessment.
[0215] Regulatory Decision Support Unit 16 provides scientific decision-making suggestions to regulatory departments based on data analysis results. Its main functions include: risk situation analysis, suggestions for optimizing the allocation of regulatory resources, and support for the formulation of special rectification actions. In the practice of agricultural product safety supervision in a certain province, this unit, through analysis of historical data, discovered the spatiotemporal distribution patterns of agricultural product quality and safety issues, such as the high incidence of certain pesticide residues in specific seasons and regions. Based on this, targeted regulatory strategies were proposed, reducing the incidence of these problems by 40%.
[0216] This invention constructs a complete big data platform and regulatory system for agricultural product safety testing through technologies such as dual-modal detection, intelligent data processing, and deep learning analysis. It achieves intelligent management across the entire chain from detection to regulation, providing strong technical support for ensuring the quality and safety of agricultural products. The system's innovations lie in: first, the complementary integration of characteristic substance detection and spectral detection, improving detection speed and accuracy; second, the innovative proposal of a spectral data verification mechanism driven by characteristic substance detection, solving the problem of unstable data quality in traditional spectral detection; third, the adoption of multi-source data fusion and deep learning technology to achieve accurate risk assessment and early warning; and fourth, the optimization of system resource allocation through a cloud-edge collaborative architecture, improving system response speed and stability.
[0217] The above embodiments are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any simple modifications or equivalent substitutions made by those skilled in the art to the technical solutions of the present invention without departing from the spirit and scope of the present invention shall fall within the protection scope of the present invention.
Claims
1. A big data platform and regulatory system for agricultural product safety testing based on cloud-edge collaboration, characterized in that... ,include: The regulatory module is used to manage the agricultural product safety testing results and transmit the received agricultural product safety testing result information to the cloud platform; the testing result information includes agricultural product safety testing data and the corresponding agricultural product's planting geographical location information; The cloud platform module, connected to the regulatory module, is used to model and analyze big data on agricultural product safety testing, and to feed the analysis results back to both the regulatory module and the farmer module. The farmer-side module, connected to the cloud platform module, is used to obtain agricultural product safety testing information and generate expert guidance information. The dual-modal detection module, connected to the regulatory module, includes a characteristic substance detection channel and a spectral detection channel for simultaneously acquiring characteristic substance detection data and spectral detection data. The characteristic substance detection channel includes an adjustable light source, a colorimetric plate, a light source brightness detection module, an imaging module, and a light source brightness compensation module for accurate quantitative detection of known characteristic substances. The spectral detection channel includes a spectral module, a spectral preprocessing module, and a data transmission module for identifying potentially risky substances through broad-spectrum scanning. Characteristic substances include pesticide residues, heavy metals, and additives; The data verification and cleaning module, connected to the dual-modal detection module and the cloud platform module, is used to perform cross-validation and intelligent cleaning of spectral detection data based on characteristic substance detection data, generating high-quality detection data. Specifically, it includes: Each sample is assigned a unique identifier, which is then linked to the detection data of characteristic substances and the spectral detection data. Based on the analysis of characteristic substance detection data, the baseline characteristics of the sample are analyzed, and the consistency index is calculated. The consistency index is used to analyze the consistency between spectral detection data and reference characteristics. The calculation formula is: , in: For the sample The consistency index represents the degree of correlation between the characteristic substance detection data and the spectral detection data, with a value range of [value range missing]. ; For the detection of characteristic substances, the first The normalized values of each feature, ranging from... ; For the corresponding number in spectral detection The normalized values of each feature, ranging from... ; The number of features, ranging from 5 to 20; According to the consistency index Inconsistent data is marked, and anomaly levels are set. Based on the anomaly level, it is determined whether to retain, correct, or remove the corresponding data. When a level 2 anomaly is detected... At that time, a correction algorithm is used to correct the spectral feature values. The correction algorithm is as follows: , in: These are the corrected spectral characteristic values, ranging from... ; These are weighting coefficients, dynamically adjusted based on the consistency index. ; High-quality test data are determined by calculating the signal-to-noise ratio, consistency index, and repeatability index of the processed test data. The feature extraction and data fusion module, connected to the data verification and cleaning module and the cloud platform module, is used to extract characteristic substance features and spectral features from high-quality detection data, and to perform multi-level fusion of the characteristic substance features and spectral features to generate a fused feature vector; specifically including: Extract the concentration, relative content, and time-varying characteristics of characteristic substances from the detection data; Extract differential spectra, peak features, and curve morphology features from spectral detection data; Correlation analysis was performed on the extracted features to remove redundant features; Canonical correlation analysis was used to establish the correlation between characteristic substance features and spectral features. Based on the correlation, a feature vector with uniform scale was constructed. The feature selection strategy and feature fusion weights were adjusted according to different agricultural product categories. The safety assessment and risk mapping module, connected to the feature extraction and data fusion module and the cloud platform module, is used to assess the safety level of agricultural products based on fused feature vectors and generate agricultural product safety risk maps by combining geographic location information.
2. The cloud-edge collaborative big data platform and regulatory system for agricultural product safety testing as described in claim 1, characterized in that... The cloud platform module includes a data acquisition layer big data warehouse, an analysis layer big data warehouse, and a data mart. The data acquisition layer big data warehouse receives agricultural product safety testing data, geographic location information, production entity information, and information on violations by regulatory authorities, and stores this data in a distributed file storage system. The analysis layer big data warehouse analyzes the agricultural product safety testing data, geographic location information, production entity information, and information on violations by regulatory authorities to generate result data, which is then written to a Hive database. The data mart is connected to the data acquisition layer big data warehouse and the analysis layer big data warehouse, retrieves data from these warehouses, and provides data query services to external users. The cloud platform module also includes: The agricultural product safety assessment unit is used to evaluate the safety of agricultural products and generate agricultural product safety assessment results by using deep learning algorithms based on the agricultural product safety testing data, geographical location information, production entity information, and illegal information of law enforcement by regulatory authorities stored in the big data warehouse of the collection layer. The agricultural product safety early warning unit is used to calculate and generate an agricultural product safety risk map based on the agricultural product safety rating results and the distribution of agricultural products in production areas, and to write the agricultural product safety risk map and the corresponding agricultural product safety rating results into the Hive database and push them to the regulatory layer module.
3. The cloud-edge collaborative big data platform and regulatory system for agricultural product safety testing as described in claim 1, characterized in that... The cloud platform module also includes: The production entity information management unit is used to receive basic information of farmers, including: the farmer's location, production scale, planting varieties, crop production area distribution, farmer identity information, and historical production information. It visualizes the basic information and the geographical location information and provides query and modification functions.
4. The cloud-edge collaborative big data platform and regulatory system for agricultural product safety testing as described in claim 3, characterized in that... The cloud platform module also includes an expert guidance generation unit, which generates expert guidance information based on the geographical location information of the agricultural product planting and the safety rating results of the agricultural product.
5. The cloud-edge collaborative big data platform and regulatory system for agricultural product safety testing as described in claim 1, characterized in that... The cloud platform module also includes: The testing agency supervision unit is used to collect testing information and geographical location information of agricultural product safety testing agencies, visualize the testing agencies and their corresponding testing results, and provide query and modification functions.
6. The cloud-edge collaborative big data platform and regulatory system for agricultural product safety testing as described in claim 1, characterized in that... The dual-modal detection module includes: An edge preprocessing unit is used to perform noise removal, background correction, and light intensity normalization on the feature substance detection data and the spectral detection data to generate preprocessed data; Data metadata tagging unit, used to add timestamps, geographic location and device ID metadata tags to the preprocessed data, generating tokenized data; The data compression unit is used to perform lossless compression on the tokenized data to reduce the transmission burden; An anomaly detection unit is used to perform anomaly detection on the labeled data based on statistical features and to filter out obviously abnormal collection results.
7. The cloud-edge collaborative big data platform and regulatory system for agricultural product safety testing as described in claim 1, characterized in that... The security assessment and risk mapping module includes: Multi-level model units are used to construct a multi-level deep learning model system, including agricultural product category identification models, specific category evaluation models, comprehensive risk assessment models, and spatiotemporal prediction models. The safety level assessment unit is used to construct a three-level standard system based on national standards, industry standards, and local standards, classifying risk levels into four levels: low, medium, high, and extremely high. Geographic coding units are used to accurately geocode the tested samples and to perform multi-level regional divisions based on administrative divisions and natural regions; The risk mapping construction unit is used to build a multi-level risk map from the village / township level to the provincial level, automatically identify high-risk areas, and mark them as key areas; The risk propagation analysis unit is used to analyze possible risk propagation paths based on the logistics network. The real-time update unit is used to update the risk map in real time based on newly added data.
8. The cloud-edge collaborative big data platform and regulatory system for agricultural product safety testing as described in claim 1, characterized in that... The regulatory module includes: The task distribution unit is used to receive testing instructions, determine a testing plan based on the type of agricultural product and the testing purpose, and then distribute the testing plan to the corresponding testing terminals. The data receiving unit is used to receive the agricultural product safety testing data and the geographical location information transmitted by the dual-modal detection module. The early warning processing unit is used to receive the agricultural product safety risk map and the agricultural product safety rating results pushed by the cloud platform module, and generate early warning information; The law enforcement information management unit is used to record illegal information discovered during the regulatory enforcement process and upload the illegal information to the cloud platform module; The regulatory decision support unit is used to provide decision support to regulatory authorities based on the agricultural product safety risk map and the agricultural product safety rating results.
Citation Information
Patent Citations
Multi-sample detection system applied to food pesticide residue detection
CN117390499A
Efficient auditing method and system based on edge computing technology
CN119477576A
Pesticide residue detection system for agricultural products
CN120084905A