System for monitoring and standardization of quality and safety of agri-food products based on technical trade measures
By designing a monitoring system for the quality and safety of agricultural and food products based on technical trade measures, and employing multivariate time series analysis and fuzzy logic reasoning, the system addresses the problem of low efficiency in data collection and evaluation in existing systems. It enables dynamic assessment and rapid response to the quality and safety of agricultural and food products, ensuring that products meet international trade requirements and reducing losses for enterprises.
Patent Information
- Application Number
- CN202510505248.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-22
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2045-04-22
AI Technical Summary
Existing agricultural and food product quality and safety monitoring systems suffer from low data collection and processing efficiency, lack of multi-source data integration and dynamic risk assessment capabilities in response to technical trade measures, resulting in inaccurate assessment results and difficulty in responding quickly to quality and safety issues.
A monitoring and standardization system for the quality and safety of agricultural and food products based on technical trade measures was designed. The system includes modules for data acquisition, data processing, model training and risk assessment, and standardization implementation. Risk assessment is conducted using multivariate time series analysis and autoregressive moving average models, and standardization measures are formulated through fuzzy logic reasoning.
It enables dynamic risk assessment of the quality and safety of agricultural and food products, rapid response to quality and safety issues, ensures that products comply with technical trade measures, improves the accuracy and efficiency of assessment, and reduces losses caused by trade barriers.
Smart Images

Figure CN120387737B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of standardization management, and particularly relates to a quality and safety monitoring and standardization system for agricultural and food products based on technical trade measures. BACKGROUND
[0002] With the acceleration of globalization, international trade of agricultural and food products is becoming increasingly frequent. Technical trade measures (TBT) are a series of technical regulations, standards and qualification procedures adopted by countries to protect human health, animal and plant life safety and the environment. These measures not only guarantee product quality and safety, but also have an important impact on international trade.
[0003] However, the existing quality and safety monitoring system for agricultural and food products still has some deficiencies in dealing with technical trade measures. At present, the quality and safety monitoring system for agricultural and food products mainly relies on traditional detection methods and manual management methods. The existing system often only focuses on data in one aspect, such as production process data or market detection data, and lacks comprehensive collection and integration of technical trade measure data. Traditional methods rely on manual data processing, which is inefficient and prone to errors, and cannot meet the processing needs of large-scale data. The existing system uses static evaluation methods, which cannot dynamically reflect the quality and safety risk of agricultural and food products at different time periods, resulting in inaccurate evaluation results. Due to the lack of effective risk assessment mechanism, the existing system cannot develop and implement standardized measures in a timely manner, and cannot quickly respond to quality and safety problems.
[0004] The existing agricultural product quality and safety monitoring system mainly relies on laboratory testing and on-site inspection, and the data collection and processing efficiency is low, which cannot meet the needs of modern agricultural product trade. Although the Internet of Things technology has certain application in agricultural product quality and safety traceability, it still has deficiencies in dealing with technical trade measures, and lacks the ability to integrate multi-source data and dynamically assess risks.
[0005] In view of the deficiencies of the prior art, the present application provides a quality and safety monitoring and standardization system for agricultural and food products based on technical trade measures. SUMMARY
[0006] The purpose of the present application is to provide a quality and safety monitoring and standardization system for agricultural and food products based on technical trade measures to improve the deficiencies of the prior art. The technical solution of the present application is as follows:
[0007] The quality and safety monitoring and standardization system for agricultural and food products based on technical trade measures comprises a data collection module, a data processing module, a model training and risk assessment module and a standardization implementation module connected in sequence.
[0008] Further, the data collection module is configured to acquire basic data from multiple data sources, the basic data including technical trade measure data related to quality safety of agricultural and food products and production control sequence data of the agricultural and food products, the technical trade measure data at least including product standards, inspection and quarantine requirements, certification systems and label identification provisions; and send the collected basic data to the data processing module.
[0009] Further, the data preprocessing module is configured to clean, convert and integrate the received basic data to form preprocessed data with a unified data format and send the preprocessed data to the model training and risk assessment module.
[0010] Further, the model training and risk assessment module is configured to perform quality safety risk assessment on the agricultural and food products based on the preprocessed data, and train a prediction model based on the preprocessed data and perform quantitative prediction on the risk of the agricultural and food products at the next time based on the prediction model.
[0011] Further, the standardized implementation module is configured to develop and implement corresponding standardized measures according to the risk assessment results.
[0012] Further, the data collection module at least includes a web crawler sub-module, a data interface sub-module and a user input sub-module.
[0013] The web crawler sub-module is configured to crawl public technical trade measure data from the Internet; the data interface sub-module is configured to interface with data systems of production enterprises, government departments and industry associations to acquire production control sequence data of the agricultural and food products and proprietary data related to technical trade measures; and the user input sub-module is configured to collect data manually input by users.
[0014] Further, the model training and risk assessment module includes a risk assessment model based on multivariate time series analysis, and the model uses the following formula to perform risk assessment:
[0015]
[0016] wherein, represents a risk assessment value at time , is a constant term of the model, , is a regression coefficient of each variable , is a number of input variables, represents input variables at time , including technical trade measure data and production control sequence data; is time an error term of time instant, which obeys a normal distribution.
[0017] In addition, the model further comprises an autoregressive moving average sub-model for capturing the autocorrelation of the data:
[0018]
[0019] wherein, is a coefficient of the autoregressive part; is a coefficient of the moving average part; and are the order of autoregression and moving average, respectively.
[0020] Further, the model training and risk assessment module comprises a data division sub-module, a feature selection sub-module and a model evaluation sub-module.
[0021] The data division sub-module is used to divide the preprocessed data into a training set and a test set for model training and verification.
[0022] The feature selection sub-module is used to select feature variables that have a significant impact on the quality and safety risk assessment of agricultural food products from the preprocessed data.
[0023] The model evaluation sub-module is used to evaluate the trained model with test set data, calculate evaluation indicators such as accuracy, recall rate, F1 score, etc. of the model, to determine the performance and reliability of the model.
[0024] The model training and risk assessment module is trained based on the training set data using multivariate time series analysis and autoregressive moving average sub-model, and the model is optimized and adjusted according to the evaluation indicators of the model evaluation sub-module.
[0025] Further, the quantification prediction of the next time risk of agricultural food products based on the prediction model comprises: extracting time series data from the preprocessed data, inputting the time series data into the trained prediction model; calculating the risk assessment value of the next time outputting the risk assessment value as the quantification prediction result of the next time risk.
[0026] Further, the standardization execution module formulates standardization measures based on fuzzy logic reasoning, which is expressed as:
[0027]
[0028] wherein, represents the output value of the standardization measure, represents the input variable corresponding fuzzy membership function. represents the output value of each fuzzy rule.
[0029] The rule used in fuzzy logic reasoning is expressed as: ; wherein, and represents the input variable; and represents the fuzzy set of the input variable; represents the fuzzy set of the output variable.
[0030] Further, the standardization execution module is further used for feeding back the effect of the executed standardization measures to the model training and risk assessment module, and the model training and risk assessment module adjusts and optimizes the model according to the feedback information, regularly updates data and re-trains the model.
[0031] Further, the feature selection sub-module selects the feature variable which has a significant influence on the quality and safety risk assessment of the agricultural food product from the preprocessed data through feature selection, calculates the correlation of each feature variable and the target variable, and selects the feature variable which has a significant influence.
[0032] The formula of feature selection is expressed as:
[0033]
[0034] wherein, represents the correlation of the feature variable and the target variable, represents the feature variable, represents the target variable, and respectively represent the mean of the feature variable and the target variable, is the sample quantity.
[0035] The beneficial effects of the present application are as follows:
[0036] The present application comprehensively acquires technical trade measures data and production control sequence data, adopts a data preprocessing module to clean, convert and integrate the collected data, forms preprocessed data in a unified format, dynamically assesses the quality and safety risk of the agricultural food product based on multivariate time series analysis and autoregressive moving average model, formulates and executes corresponding standardization measures according to the risk assessment result through fuzzy logic reasoning, quickly responds to quality and safety problems, ensures that the product meets the requirements of technical trade measures, and provides technical support for related enterprises to cope with technical trade measures. BRIEF DESCRIPTION OF DRAWINGS
[0037] Figure 1 It is a composition schematic diagram of the agricultural food product quality and safety monitoring and standardization system based on technical trade measures. DETAILED DESCRIPTION
[0038] In order to make the objectives, technical solutions and advantages of the present application clearer, the technical solutions in the present application are described below clearly and completely. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0039] As shown in Figure 1 FIG. 1 is a schematic diagram of a quality and safety monitoring and standardization system for agricultural food products based on technical trade measures, which comprises data acquisition module, data processing module, model training and risk assessment module and standardization execution module connected in sequence.
[0040] The data acquisition module is configured to acquire basic data from a plurality of data sources, wherein the basic data comprises technical trade measure data related to quality and safety of agricultural food products and production control sequence data of the agricultural food products, and the technical trade measure data at least comprises product standards, inspection and quarantine requirements, certification systems and label identification regulations; and the acquired basic data is sent to the data processing module.
[0041] The data preprocessing module is configured to clean, convert and integrate the received basic data to form preprocessed data with a unified data format, and send the preprocessed data to the model training and risk assessment module.
[0042] When the data processing module processes the received basic data, data cleaning is performed first, including removing outliers, filling missing values and eliminating duplicate data. For example, for an abnormally high value in a pesticide use record, the system uses the moving median method for correction; for missing detection data, the data is interpolated and completed according to the data of adjacent time points. Data conversion includes unit unification, format standardization and numerical normalization processing, such as converting pesticide residue limit standards of different countries into mg / kg unit. Data integration associates data from different sources according to product categories, time sequences and quality indicators, etc. dimensions to form a structured data set, providing a basis for subsequent modeling.
[0043] The model training and risk assessment module is configured to perform quality and safety risk assessment on agricultural food products based on the preprocessed data, and the model training and risk assessment module is further configured to train a prediction model based on the preprocessed data, and to quantitatively predict the risk of the agricultural food products at the next time based on the prediction model.
[0044] The standardization execution module is configured to develop and execute corresponding standardization measures according to the risk assessment results.
[0045] The data collection module at least includes a web crawler submodule, a data interface submodule and a user input submodule.
[0046] The web crawler submodule is used to crawl public technical trade measures data from the Internet; the data interface submodule is used to interface with the data systems of production enterprises, government departments and industry associations to obtain production control sequence data of agricultural food products and proprietary data related to technical trade measures; and the user input submodule is used to collect data manually input by users. The web crawler submodule adopts a distributed crawler architecture and automatically crawls the latest technical trade measures information from more than 50 official websites such as the World Trade Organization (WTO), the International Food Codex Commission (CAC) and the European Food Safety Authority (EFSA) every day. The system uses natural language processing technology to process the crawled unstructured text, and identifies key limit standards, test methods and compliance requirements. The data interface submodule supports REST API and SOAP interface modes, and securely interfaces with enterprise ERP systems and government regulatory platforms to synchronize production process data, test reports and certification records and other information in real time, with an average data transmission delay of less than 5 seconds.
[0047] Taking the quality safety monitoring and standardization of apples produced by a certain formula of agricultural food products as an example, the web crawler submodule crawls technical trade measures data about apples from the Internet, including product standards, inspection and quarantine requirements, certification systems and label identification regulations; the data interface submodule interfaces with the data systems of apple production enterprises, government departments and industry associations to obtain apple production control sequence data; and the user input submodule collects data manually input by users, such as farmer production logs and field management records.
[0048] The technical trade measures data includes product standards, such as apple size, color and sugar content; inspection and quarantine requirements, such as pesticide residue limits and heavy metal limits; certification systems, such as organic certification and green food certification; and label identification regulations, such as place of origin, production date and shelf life. The production control sequence data includes fertilization records, pesticide use records, irrigation records and picking records.
[0049] The model training and risk assessment module includes a risk assessment model based on multivariate time series analysis, which uses the following formula for risk assessment:
[0050]
[0051] wherein, represents the risk assessment value at time , is a constant term of the model, , is each variable the regression coefficient of the input variable, the number of input variables, denotes time the input variable at time t, including technical trade measures data and production control sequence data; is the time error term at time t, which follows a normal distribution.
[0052] In addition, the model also includes an autoregressive moving average sub-model to capture the autocorrelation of the data:
[0053]
[0054] wherein, is the coefficient of the autoregressive part; is the coefficient of the moving average part; and are the orders of autoregression and moving average, respectively.
[0055] The model training and risk assessment module includes a data division sub-module, a feature selection sub-module, and a model evaluation sub-module.
[0056] The data division sub-module is used to divide the preprocessed data into a training set and a test set for model training and validation.
[0057] The feature selection sub-module is used to select feature variables that have a significant impact on the quality and safety risk assessment of agricultural food products from the preprocessed data. In actual application, the feature selection sub-module filters out key variables with greater impact by calculating the correlation between different feature variables and quality and safety risks.
[0058] For example, for fruit products, the correlation between pesticide residue, heavy metal content, and microbial indicators and quality and safety risks is usually high (correlation coefficient >0.7), and they will be selected first. For some specific products, such as imported grape wine, the correlation between sulfur dioxide content and alcohol content and quality and safety risks is also significant (correlation coefficient about 0.65). The system usually selects feature variables with an absolute correlation coefficient greater than 0.4 as model inputs to ensure the accuracy and computational efficiency of the model.
[0059] The model evaluation sub-module is used to evaluate the trained model with test set data, calculate evaluation indicators such as accuracy, recall rate, and F1 score to determine the performance and reliability of the model.
[0060] The model evaluation submodule uses the cross-validation method to evaluate the model performance, and calculates the precision, recall, and F1 score, etc. For quality and safety risk assessment, taking apple products as an example, the system divides the risk assessment value R into three levels: low risk (R < 0.3), medium risk (0.3 ≤ R < 0.7), and high risk (R ≥ 0.7). On the test data set, the model's identification accuracy for high-risk apple samples reaches 92%, the recall rate is 88%, and the F1 score is 0.90; for medium-risk and low-risk samples, the F1 scores are 0.85 and 0.88, respectively. When the overall accuracy of the model is less than 85%, the system will automatically adjust the feature variable selection or model parameters and retrain.
[0061] The model training and risk assessment module is trained based on the training set data using multivariate time series analysis and autoregressive moving average submodels, and the model is optimized and adjusted according to the evaluation indicators of the model evaluation submodule.
[0062] The model training process adopts an iterative optimization strategy, using a larger learning rate (0.01) in the initial stage for fast convergence, and reducing the learning rate (0.001) in the later stage for fine adjustment. The training adopts batch processing, with each batch containing 128 samples, and the training iteration number is set to 1000 or until the loss function change rate is less than 0.1%. For different types of agricultural and food products, the system will automatically adjust the order of p and q in the model, for example, for seasonal fruit products, p is usually set to 12 (corresponding to the annual cycle), and for short-cycle vegetable products, p may be set to 4-6. After the model training is completed, the system records the key parameter values, such as for a specific product, the model's constant term α = 0.15, the regression coefficient β value range is 0.21 to 0.45, and the autoregressive part coefficient φ value range is 0.18 to 0.32.
[0063] The standardization execution module automatically generates corresponding standardization measure suggestions based on the risk assessment results; when the system detects that the pesticide residue risk assessment value of a batch of apple products exceeds the warning threshold (R > 0.65), the following standardization measures will be triggered: adjusting the pre-harvest safety interval, increasing the detection frequency of specific pesticides, improving product traceability code information, and revising internal quality control standards. In addition, the system will also automatically generate targeted improvement schemes according to the risk type and degree, such as "reduce the use of organophosphorus pesticides such as chlorpyrifos and methamidophos", "extend the interval between pesticide application and harvesting for at least 15 days", etc. to help production enterprises meet the requirements of technical trade measures of export target countries.
[0064] The risk of the agricultural food product at the next time is quantitatively predicted based on the prediction model, including: extracting time series data from the preprocessed data, inputting the time series data into the trained prediction model; calculating the risk assessment value at the next time ; outputting the risk assessment value as the quantitative prediction result of the risk at the next time.
[0065] For example, there are the following data: input variables at time t , ; regression coefficients , ; constant term ; error term . Calculate the risk assessment value at the current time :
[0066] ;
[0067] ;
[0068] ;
[0069] Calculate the risk assessment value at the next time : assuming the input variables at the next time , ;
[0070] ;
[0071] ;
[0072] .
[0073] The standardization execution module formulates standardization measures based on fuzzy logic reasoning, which is expressed as:
[0074]
[0075] Wherein, represents the output value of the standardization measure, represents the input variable corresponding fuzzy membership function; represents the output value of each fuzzy rule.
[0076] The rule used in fuzzy logic reasoning is expressed as: ; wherein, and represent input variables; and represent fuzzy sets of input variables; a fuzzy set representing the output variable.
[0077] For example, IF pesticide residue isLow AND fertilizer application isOptimal THEN risk isLow.
[0078] IF pesticide residue isHigh AND fertilizer application isExcessive THEN risk isHigh.
[0079] The standardization execution module is also used to feed back the effect of the executed standardization measures to the model training and risk assessment module, and the model training and risk assessment module adjusts and optimizes the model according to the feedback information, regularly updates the data and re-trains the model.
[0080] The standardization execution module adopts a closed-loop feedback mechanism to track and evaluate the effect of the executed standardization measures. The system sets multiple key performance indicators (KPIs), such as the qualified rate improvement amplitude, the risk value decline speed, the standard execution completion degree, etc., and establishes an evaluation period (usually 7 days or 14 days). After the end of each evaluation period, the system automatically generates a performance report, calculates the effectiveness index E = ∑ (wi×KPIi) of the measures, where wi is the weight of each indicator. When the E value is lower than the preset threshold (0.75), the system will trigger the adjustment mechanism, re-analyze the risk factors, and optimize the standardization measures. These feedback data are also used for the iterative optimization of the model training and risk assessment module, forming a complete closed loop of 'detection-evaluation-execution-feedback'.
[0081] The feature selection submodule selects feature variables that have a significant impact on the quality and safety risk assessment of agricultural food products from the preprocessed data through feature selection, calculates the correlation between each feature variable and the target variable, and selects feature variables that have a significant impact.
[0082] The formula of feature selection is:
[0083]
[0084] wherein, represents the correlation between the feature variable and the target variable, represents the feature variable, represents the target variable, and represent the mean of the feature variable and the target variable, respectively, is the sample size.
[0085] In the practical application of a certain export fruit and vegetable enterprise, after the system was deployed and ran for 6 months, the product export return rate decreased from 2.8% to 0.6%, and the loss caused by trade technical barriers was reduced by 78%. The system gave an early warning of the change of the revised pesticide residue limit standard of the European Union, so that the enterprise completed the production adjustment 45 days before the new standard was formally implemented, avoiding a potential loss of about 2 million yuan. Through the analysis of historical data, the system identified 10 high-risk pesticide varieties and 14 key control points, and optimized the production standards accordingly. The product first-time detection pass rate increased by 15.3 percentage points, and the detection cost decreased by 31.7%.
[0086] The above specific embodiments further illustrate the purposes, technical solutions and beneficial effects of the present application. It should be understood that the above description is only a specific embodiment of the present application and is not used to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A system for monitoring and standardizing the quality and safety of agri-food products based on technical trade measures, characterized in that, The system comprises a data acquisition module, a data processing module, a model training and risk assessment module and a standardization execution module connected in sequence. The data acquisition module is used to obtain basic data from multiple data sources, including technical trade measures data related to the quality safety of agricultural food products and production control sequence data of the agricultural food products, and the technical trade measures data at least includes product standards, inspection and quarantine requirements, certification systems and label identification provisions; the acquired basic data is sent to the data processing module; The data preprocessing module is used to clean, convert and integrate the received basic data to form preprocessed data with a unified data format, and send the preprocessed data to the model training and risk assessment module; The model training and risk assessment module is used to perform quality safety risk assessment on agricultural food products based on the preprocessed data, and is also used to train a prediction model based on the preprocessed data and quantitatively predict the risk of agricultural food products at the next time based on the prediction model; The model training and risk assessment module comprises a risk assessment model based on multivariate time series analysis, and the model uses the following formula for risk assessment: ; wherein, represents the risk assessment value at time , is a constant term of the model, , is a regression coefficient of each variable , is the number of input variables, represents the input variable at time , including technical trade measure data and production control sequence data; is an error term at time , which is subject to a normal distribution; The quantified prediction of the risk of the agricultural food product at the next time based on the prediction model comprises: extracting time series data from the preprocessed data, inputting the time series data into the trained prediction model; calculating a risk evaluation value at the next time ; and outputting the risk evaluation value as a quantified prediction result of the risk at the next time . The standardization execution module is used to develop and execute corresponding standardization measures according to the risk assessment results.
2. The system for monitoring and standardizing the quality and safety of agri-food products based on technical trade measures according to claim 1, characterized in that, The data acquisition module at least comprises a web crawler sub-module, a data interface sub-module and a user input sub-module; The web crawler sub-module is used to crawl public technical trade measures data from the Internet; the data interface sub-module is used to interface with the data systems of production enterprises, government departments and industry associations to obtain production control sequence data of agricultural food products and proprietary data related to technical trade measures; and the user input sub-module is used to collect data manually input by users.
3. The system for monitoring and standardizing the quality and safety of agri-food products based on technical trade measures according to claim 2, characterized in that, The model further comprises an autoregressive moving average sub-model for capturing the autocorrelation of data: ; wherein, are coefficients of the autoregressive part; are coefficients of the moving average part; and are the orders of the autoregressive and moving average, respectively.
4. The system for monitoring and standardizing the quality and safety of agricultural food products based on technical trade measures according to claim 3, characterized in that, The model training and risk assessment module comprises a data division sub-module, a feature selection sub-module and a model evaluation sub-module; The data division sub-module is used to divide the preprocessed data into a training set and a test set for model training and verification; The feature selection sub-module is used to select feature variables that have a significant influence on the quality safety risk assessment of agricultural food products from the preprocessed data; The model evaluation sub-module is used to evaluate the trained model with test set data, calculate the precision, recall rate and F1 score evaluation indicators of the model, and determine the performance and reliability of the model; The model training and risk assessment module is trained based on the training set data using multivariate time series analysis and the autoregressive moving average sub-model, and the model is optimized and adjusted according to the evaluation indicators of the model evaluation sub-module.
5. The system for monitoring and standardizing the quality and safety of agri-food products based on technical trade measures according to claim 4, characterized in that, The standardization execution module formulates standardization measures based on fuzzy logic reasoning, which is represented as: ; wherein represents the output value of the standardization measure, represents the input variable the corresponding fuzzy membership function; represents the output value of each fuzzy rule; The rules used in fuzzy logic reasoning are expressed as: ; where, and represent input variables; and represent fuzzy sets of input variables; represent fuzzy sets of output variables.
6. The system for monitoring and standardizing the quality and safety of agri-food products based on technical trade measures according to claim 5, characterized in that, The standardization execution module is also used to feed back the effects of the executed standardization measures to the model training and risk assessment module, and the model training and risk assessment module adjusts and optimizes the model according to the feedback information, regularly updates the data and re-trains the model.
7. The system for monitoring and standardizing the quality and safety of agri-food products based on technical trade measures according to claim 6, characterized in that, The feature selection sub-module selects feature variables having significant influence on the quality and safety risk assessment of agricultural food products from the pre-processed data through feature selection, calculates the correlation of each feature variable with the target variable, and selects feature variables having significant influence; The formula of feature selection is represented as: ; wherein, represents the correlation of the feature variable with the target variable, represents the feature variable, represents the target variable, and represents the mean of the feature variable and the target variable, respectively, is the number of samples.
Citation Information
Patent Citations
Food-related product risk management system and method based on data analysis
CN116739617A
Intelligent refrigerator reliability analysis method based on neural training network
CN116757534A
Big data-based CPTPP membership agricultural food product trade barrier prediction and analysis system
CN119623739A