Agricultural product pesticide residue detection method and system based on artificial intelligence

By integrating multi-source heterogeneous data and building prediction models, and combining pesticide degradation laws for time-division prediction, the problem of difficult to accurately predict pesticide residues in agricultural products is solved, and high-precision and stable dynamic prediction of pesticide residues is achieved.

CN119692541APending Publication Date: 2025-03-25NINGXIA INST OF AGRI PROD QUALITY STANDARDS & TESTING TECH (NINGXIA AGRI PROD QUALITY MONITORING CENT)
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411750611.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

In the detection of pesticide residues for agricultural products, how to integrate multi-source heterogeneous data to accurately predict pesticide residues, especially when the pesticide degradation process is complex and the residues show nonlinear changes over time.

Method used

By integrating agricultural operation records, meteorological monitoring data, environmental monitoring data and agricultural product image data, a multi-source heterogeneous data set is constructed, key features related to pesticide residues are screened out, pesticide residue prediction model is trained, and a time-divided prediction curve is constructed based on pesticide degradation laws. Finally, the prediction value is fused with the average residue to achieve dynamically updated pesticide residue prediction.

Benefits of technology

It improves the accuracy and stability of pesticide residue prediction, provides effective decision-making support for agricultural product quality and safety supervision, and realizes dynamic real-time prediction of pesticide residues.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119692541A_ABST
    Figure CN119692541A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of agricultural detection, and discloses an agricultural product pesticide residue detection method and system based on artificial intelligence, and the method comprises the steps: constructing a multi-source heterogeneous data set according to agricultural operation records, meteorological monitoring data, environment monitoring data and agricultural product image data, and screening out key features related to pesticide residues; forming an optimized feature subset; training a pesticide residue prediction model based on the optimized feature subset; inputting to-be-detected agricultural product image data into the trained pesticide residue prediction model to obtain a pesticide residue prediction value of a to-be-detected agricultural product sample; according to the degradation rules of pesticides in different agricultural products, a mathematical model that the pesticide residue changes along with time is constructed, a pesticide residue time-phased prediction curve is formed by fitting pesticide residue detection data, and the average pesticide residue in each time interval is obtained; and fusing the pesticide residue prediction value with the average pesticide residue to obtain a comprehensive pesticide residue prediction result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of agricultural detection technology, and in particular to an artificial intelligence-based agricultural product pesticide residue detection method and system. Background Art

[0002] In the detection of pesticide residues in agricultural products, we are faced with the technical challenge of how to integrate multi-source heterogeneous data to predict pesticide residues. In the entire life cycle of agricultural products from planting to harvesting, pesticide residues are affected by many factors, including pesticide application time, application dosage, application method, meteorological conditions, soil environment, etc. How to mine the key factors related to pesticide residues from massive agricultural operation records, meteorological monitoring data, environmental monitoring data, and agricultural product image data, and build a pesticide residue prediction model based on multiple factors is a key technical problem that needs to be solved urgently.

[0003] In addition, the degradation process of pesticides in agricultural products is complex, and the residues show a nonlinear trend over time. How to analyze the changing patterns of pesticide residues over time based on agricultural product image data, establish time-divided pesticide residue prediction curves for different agricultural products, and integrate them with the results based on multi-factor prediction models to form a set of dynamically updated and real-time prediction methods for pesticide residue estimation is also a challenging technical problem. This requires the comprehensive use of artificial intelligence technologies such as data mining and machine learning to continuously optimize the prediction model and improve the intelligence level of pesticide residue detection. Summary of the invention

[0004] In order to solve the above technical problems, the present invention provides an agricultural product pesticide residue detection method and system based on artificial intelligence, which can accurately predict the pesticide residues in agricultural products, improve the prediction accuracy and stability, and provide effective decision-making support for agricultural product quality and safety supervision.

[0005] A method for detecting pesticide residues in agricultural products based on artificial intelligence, the method comprising:

[0006] Based on agricultural operation records, meteorological monitoring data, environmental monitoring data and agricultural product image data, data fusion technology is used to construct a multi-source heterogeneous data set;

[0007] Based on multi-source heterogeneous data sets, key features related to pesticide residues are screened to form an optimized feature subset;

[0008] Based on the optimized feature subset, the pesticide residue prediction model is trained;

[0009] Input the image data of the agricultural product to be tested into the trained pesticide residue prediction model to obtain the predicted value of the pesticide residue of the agricultural product sample to be tested;

[0010] According to the degradation law of pesticides in different agricultural products, a mathematical model of the change of pesticide residues over time is constructed. By fitting the pesticide residue detection data, a time period prediction curve of pesticide residues is formed. Based on the time period prediction curve of pesticide residues, the average pesticide residue in each time interval is obtained.

[0011] The predicted value of pesticide residues is combined with the average pesticide residue to obtain a comprehensive prediction result of pesticide residues.

[0012] Preferably, based on the farming operation record data, the time, type and dosage information of pesticide use in the crop planting process are extracted to form structured pesticide use record data; the meteorological monitoring data include temperature, humidity, light and wind; the environmental monitoring data include soil physical and chemical properties and irrigation water quality; the agricultural product image data includes processing the agricultural product image using an image segmentation algorithm to extract the color, shape and size characteristics of the agricultural product.

[0013] Preferably, based on the multi-source heterogeneous data set, the key features related to the pesticide residues are screened out to form an optimized feature subset including:

[0014] Obtain multi-source heterogeneous pesticide residue-related data, clean and pre-process the data, and unify the data format and spatiotemporal scale;

[0015] Based on the preprocessed pesticide residue data set, the Pearson correlation coefficient was used to analyze the correlation between each feature and the pesticide residue, and the features whose correlations met the preset requirements were preliminarily screened out;

[0016] Based on the initial screening features, the recursive feature elimination method is used to gradually eliminate redundant or irrelevant features until the optimal feature combination, i.e. the optimized feature subset, is obtained.

[0017] Preferably, based on the optimized feature subset, training the pesticide residue prediction model includes:

[0018] According to meteorological conditions and environmental factors, the pesticide application records are grouped, and pesticide residue prediction models are constructed for the application data under different meteorological conditions.

[0019] The selected key features are sorted according to the time series, and the time series features of the application time and dosage characteristics are extracted;

[0020] A machine learning algorithm was used to train the pesticide residue prediction model using the optimized feature subset as input;

[0021] Use the trained pesticide residue prediction model to predict the newly collected pesticide application data. Combined with the set pesticide residue threshold, it is determined whether there is a risk of exceeding the standard for agricultural products, and corresponding risk warnings and decision-making recommendations are given.

[0022] Preferably, inputting the image data of the agricultural product to be tested into the trained pesticide residue prediction model to obtain the predicted value of the pesticide residue of the agricultural product sample to be tested includes:

[0023] Acquire image data of agricultural products to be tested, and pre-process the image data;

[0024] The image segmentation algorithm is used to segment the preprocessed agricultural product image and extract the area of ​​the agricultural product;

[0025] According to the segmented agricultural product area, the location and size information of the agricultural products are detected using the target detection algorithm;

[0026] According to the target detection results, the color features of agricultural products are extracted and the average color value of the agricultural product area is calculated;

[0027] The size and color characteristics of the agricultural product are input into the trained pesticide residue prediction model to obtain the predicted value of the pesticide residue of the agricultural product.

[0028] Preferably, based on the pesticide residue time period prediction curve, obtaining the average pesticide residue in each time interval includes:

[0029] Obtain the detection data of pesticide residues in different agricultural products, including the detection time and the corresponding residue values;

[0030] According to the degradation law of pesticides in different agricultural products, the exponential decay model is selected;

[0031] According to each agricultural product and pesticide combination, the parameters of the exponential decay model are determined by fitting the residue detection data;

[0032] Substituting the determined model parameters into the exponential decay model, the prediction curve of the change of pesticide residues over time was obtained;

[0033] According to the prediction curve, the prediction time period is divided into several intervals, and the average pesticide residue in each time interval is calculated.

[0034] Preferably, the pesticide residue prediction value is integrated with the average pesticide residue to obtain a comprehensive pesticide residue prediction result including:

[0035] Obtain the output results of the prediction model and the output results of the prediction curve;

[0036] According to the preset weight coefficient, the output results of the prediction model and the output results of the prediction curve are weighted;

[0037] Add the weighted prediction model output result and the prediction curve output result to obtain a weighted average value;

[0038] The least square method is used to perform curve fitting on the output results of the prediction model and the output results of the prediction curve to obtain a fitting curve;

[0039] The output results of the weighted average and the fitting curve are combined to obtain the comprehensive prediction value of pesticide residues.

[0040] The present invention also provides an artificial intelligence-based agricultural product pesticide residue detection system, the system is used to implement any one of the methods described, and is characterized by a multi-source heterogeneous data fusion module, a feature selection and optimization module, a machine learning prediction model module, an image feature extraction module, a pesticide residue time period prediction module, and a prediction result fusion module;

[0041] The multi-source heterogeneous data fusion module is used to construct a multi-source heterogeneous data set using data fusion technology based on farming operation records, meteorological monitoring data, environmental monitoring data and agricultural product image data;

[0042] The feature selection and optimization module is used to screen out key features related to pesticide residues based on multi-source heterogeneous data sets to form an optimized feature subset;

[0043] The machine learning prediction model module is used to train a pesticide residue prediction model based on the optimized feature subset;

[0044] The image feature extraction module is used to input the image data of the agricultural product to be tested into the trained pesticide residue prediction model to obtain the predicted value of the pesticide residue of the agricultural product sample to be tested;

[0045] The pesticide residue time period prediction module is used to construct a mathematical model of the change of pesticide residue over time according to the degradation law of pesticides in different agricultural products, form a pesticide residue time period prediction curve by fitting the pesticide residue detection data, and obtain the average pesticide residue in each time interval based on the pesticide residue time period prediction curve;

[0046] The prediction result fusion module is used to fuse the pesticide residue prediction value with the average pesticide residue to obtain a comprehensive pesticide residue prediction result.

[0047] Compared with the prior art, the present invention has the following beneficial effects:

[0048] The present invention discloses a method and system for detecting pesticide residues in agricultural products based on artificial intelligence. In view of the problem that pesticide residues in agricultural products are difficult to predict accurately, a multi-source heterogeneous data set is constructed by integrating farming operation records, meteorological monitoring data, environmental monitoring data and agricultural product image data. The recursive feature elimination method is used to screen key features, and the prediction model is trained in combination with a support vector machine or a random forest algorithm. At the same time, computer vision technology is used to extract the morphological characteristics of agricultural products as auxiliary information, and a time-division prediction curve is constructed based on the pesticide degradation law. By integrating the machine learning prediction model with the time-division prediction curve, an online update mechanism is established to realize the dynamic prediction of pesticide residues. The present invention can accurately predict the pesticide residues in agricultural products, improve the prediction accuracy and stability, and provide effective decision-making support for the quality and safety supervision of agricultural products. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0050] Figure 1 The present invention is a flowchart of an artificial intelligence-based agricultural product pesticide residue detection method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0051] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0052] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should be understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the embodiments of the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0053] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0054] Embodiment 1

[0055] like Figure 1 As shown, an embodiment of the present invention provides a method for detecting pesticide residues in agricultural products based on artificial intelligence, the method comprising:

[0056] Based on agricultural operation records, meteorological monitoring data, environmental monitoring data and agricultural product image data, data fusion technology is used to construct a multi-source heterogeneous data set;

[0057] Based on multi-source heterogeneous data sets, key features related to pesticide residues are screened to form an optimized feature subset;

[0058] Based on the optimized feature subset, the pesticide residue prediction model is trained;

[0059] Input the image data of the agricultural product to be tested into the trained pesticide residue prediction model to obtain the predicted value of the pesticide residue of the agricultural product sample to be tested;

[0060] According to the degradation law of pesticides in different agricultural products, a mathematical model of the change of pesticide residues over time is constructed. By fitting the pesticide residue detection data, a time period prediction curve of pesticide residues is formed. Based on the time period prediction curve of pesticide residues, the average pesticide residue in each time interval is obtained.

[0061] The predicted value of pesticide residues is combined with the average pesticide residue to obtain a comprehensive prediction result of pesticide residues.

[0062] In this embodiment, based on the agricultural operation record data, the time, type and dosage information of pesticide use in the crop planting process are extracted to form structured pesticide use record data; the meteorological monitoring data includes temperature, humidity, light and wind speed; the environmental monitoring data includes soil physical and chemical properties and irrigation water quality; the agricultural product image data includes the use of image segmentation algorithm to process the agricultural product image and extract the color, shape and size characteristics of the agricultural product.

[0063] In this embodiment, based on the multi-source heterogeneous data set, the key features related to the pesticide residues are screened out to form an optimized feature subset including:

[0064] Obtain multi-source heterogeneous pesticide residue-related data, clean and pre-process the data, and unify the data format and spatiotemporal scale;

[0065] Based on the preprocessed pesticide residue data set, the Pearson correlation coefficient was used to analyze the correlation between each feature and the pesticide residue, and the features whose correlations met the preset requirements were preliminarily screened out;

[0066] Based on the initial screening features, the recursive feature elimination method is used to gradually eliminate redundant or irrelevant features until the optimal feature combination, i.e. the optimized feature subset, is obtained.

[0067] In this embodiment, based on the optimized feature subset, training the pesticide residue prediction model includes:

[0068] According to meteorological conditions and environmental factors, the pesticide application records are grouped, and pesticide residue prediction models are constructed for the application data under different meteorological conditions.

[0069] The selected key features are sorted according to the time series, and the time series features of the application time and dosage characteristics are extracted;

[0070] A machine learning algorithm was used to train the pesticide residue prediction model using the optimized feature subset as input;

[0071] Use the trained pesticide residue prediction model to predict the newly collected pesticide application data. Combined with the set pesticide residue threshold, it is determined whether there is a risk of exceeding the standard for agricultural products, and corresponding risk warnings and decision-making recommendations are given.

[0072] Specific implementation process: Multiple linear regression is a commonly used mathematical analysis method, which is mostly used to study the correlation between the dependent variable and multiple independent variables. It can predict the results of other samples based on the experimental data. The multiple linear regression model refers to a linear regression model containing multiple independent variables, which is used to explain the linear relationship between the dependent variable and other independent variables.

[0073] The dependent variable in the regression model is the pesticide residue amount, and the independent variables are the pesticide application amount, the pesticide application interval, the number of pesticide applications, and the harvest interval. An independence test is performed on the independent variables to ensure that the independent variables are independent of each other and there is no multicollinearity. There is an approximate linear relationship between the independent variables, that is, a certain independent variable can be approximately described by a linear function of other independent variables. There is a high correlation between two or more independent variables in the regression model, resulting in the distortion of the model results. When there is multicollinearity, one or two variables need to be removed. There are many ways to judge multicollinearity. One is to use the variance inflation factor (VIF) for detection. VIF refers to the degree to which the confidence interval of the variable regression parameter can be inflated to an independent variable independent of the model. Generally, when 0 < VIF < 10, it is considered that there is no multicollinearity; when 10 < VIF < 100, there is a strong multicollinearity between the independent variables; when VIF ≥ 100, there is a serious multicollinearity between the independent variables. The second is to use the characteristic root. The characteristic root is to perform a principal component analysis on the independent variables. When there are multiple index eigenvalues close to 0, there may be a multicollinearity problem with the selected independent variables. The third is the condition index. When the condition index is less than 30, it is considered that the variables are independent of each other and there is no multicollinearity. When the independent variables do not have multicollinearity, that is, the independent variables are independent of each other, it means that all independent variables can be included in the regression equation.

[0074] For the 18 kinds of tested pesticide data, the natural logarithm transformation is performed on the dependent variable in the COX - BOX transformation to meet the normal distribution and homoscedasticity. Multiple linear regression analysis is performed on the transformed dependent variable, that is, the pesticide residue amount, and the independent variables of the pesticide application amount, the pesticide application interval, the number of pesticide applications, and the harvest interval. The dependent variable of the pesticide residue amount is z, and after taking the natural logarithm, it is denoted as y. Multiple linear regression analysis is performed, and after obtaining the regression model, it is transformed to obtain the predicted pesticide residue amount value.

[0075] log10z

[0076] z = 110y

[0077] The established regression analysis model is:

[0078] The mathematical expression of the multiple linear regression model is:

[0079]

[0080] In the formula, the change of the dependent variable y can be explained by two parts: one is the change part of y caused by the change of j variables x; the other is the change part of y caused by other random factors, that is, ε. a, b1, b2......, b j are the unknown parameters in the model, which are called the regression constant and the partial regression coefficient respectively. ε is called the error and is a random variable. If the regression constant a and the partial regression coefficient b j, j = 1, 2, ..., the value of p, usually the least squares method is used, that is, a and b that minimize the sum of squares of the errors j as a best estimate.

[0081] In this embodiment, the image data of the agricultural product to be tested is input into the trained pesticide residue prediction model to obtain the predicted value of the pesticide residue of the agricultural product sample to be tested, including:

[0082] Acquire image data of agricultural products to be tested, and pre-process the image data;

[0083] The image segmentation algorithm is used to segment the preprocessed agricultural product image and extract the area of ​​the agricultural product;

[0084] According to the segmented agricultural product area, the location and size information of the agricultural products are detected using the target detection algorithm;

[0085] According to the target detection results, the color features of agricultural products are extracted and the average color value of the agricultural product area is calculated;

[0086] The size and color characteristics of the agricultural product are input into the trained pesticide residue prediction model to obtain the predicted value of the pesticide residue of the agricultural product.

[0087] In this embodiment, based on the pesticide residue time period prediction curve, obtaining the average pesticide residue in each time interval includes:

[0088] Obtain the detection data of pesticide residues in different agricultural products, including the detection time and the corresponding residue values;

[0089] According to the degradation law of pesticides in different agricultural products, the exponential decay model is selected;

[0090] According to each agricultural product and pesticide combination, the parameters of the exponential decay model are determined by fitting the residue detection data;

[0091] Substituting the determined model parameters into the exponential decay model, the prediction curve of the change of pesticide residues over time was obtained;

[0092] According to the prediction curve, the prediction time period is divided into several intervals, and the average pesticide residue in each time interval is calculated.

[0093] Specific implementation process: Residue detection of a certain pesticide in a certain apple. Apple samples were collected on the 1st, 7th, 14th and 21st days after spraying the pesticide, and sent to the laboratory for pesticide residue detection to obtain the corresponding residue values, such as 20ppm, 10ppm, 5ppm, and 5ppm. These data reflect the residual dynamics of the pesticide in apples. The degradation law of pesticides in agricultural products usually conforms to the exponential decay model. The exponential decay model can describe many natural phenomena, such as the decay of radioactive substances, the metabolism of drugs in the body, and so on. It reflects the law that the amount of a substance decreases exponentially over time. The reason for choosing the exponential decay model is that it can better fit the trend of pesticide residues over time. For the combination of apples and the pesticide, the obtained residue detection data (20ppm on the 1st day, 10ppm on the 7th day, 5ppm on the 14th day, and 5ppm on the 21st day) can be used to fit the exponential decay model. The fitting process is to determine the parameters in the model so that the model curve is as close to the actual test data as possible. Through fitting, the degradation rate of the pesticide in apples can be obtained. Substituting the fitted parameters into the exponential decay model, the prediction curve of the change of pesticide residue over time can be obtained. This curve can predict the residue of the pesticide in apples at any time point in the future. For example, the residue of the pesticide on the 30th and 40th days can be predicted. According to the prediction curve, the prediction time period can be divided into several intervals. For example, 0-7 days, 7-14 days, 14-21 days, and 21-28 days are divided into four time intervals. Next, calculate the average pesticide residue in each time interval. For example, the average residue in 0-7 days may be around 15ppm, and the average residue in 7-14 days may be around 5ppm. Finally, determine whether the average residue in each time interval is lower than the national standard for pesticide residue. Assume that the national standard for the pesticide in apples is 5ppm. Then, only in the time interval after 14 days, the pesticide residue in apples is lower than the national standard and can be put on the market for sale. In the first two time intervals, because the average residue is higher than the national standard, apples are not suitable for sale. Through the above steps, the prediction results of the pesticide residue in apples were obtained by time period, which can provide a scientific decision-making basis for the harvest and marketing period of apples. For example, it can be recommended that fruit farmers pick and sell apples at least 14 days after spraying pesticides to ensure that the pesticide residue in apples meets national standards and guarantees the food safety of consumers. This technology helps to improve the quality and safety of agricultural products and reduce the risks caused by excessive pesticide residues.

[0094] In this embodiment, the pesticide residue prediction value is integrated with the average pesticide residue to obtain a comprehensive pesticide residue prediction result including:

[0095] Obtain the output results of the prediction model and the output results of the prediction curve;

[0096] According to the preset weight coefficient, the output results of the prediction model and the output results of the prediction curve are weighted;

[0097] Add the weighted prediction model output result and the prediction curve output result to obtain a weighted average value;

[0098] The least square method is used to perform curve fitting on the output results of the prediction model and the output results of the prediction curve to obtain a fitting curve;

[0099] The output results of the weighted average and the fitting curve are combined to obtain the comprehensive prediction value of pesticide residues.

[0100] It should be noted that the method of the embodiment of the present disclosure can be performed by a single device, such as a computer or a server. The method of the present embodiment can also be applied in a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present disclosure, and the multiple devices will interact with each other to complete the described method.

[0101] It should be noted that some embodiments of the present disclosure are described above. Other embodiments are within the scope of the attached claims. In some cases, it should be understood that the size of the serial number of each step in the above embodiment does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention. The actions or steps recorded in the claims can be performed in an order different from that in the above embodiment and still achieve the desired results. In addition, the process depicted in the accompanying drawings does not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0102] Embodiment 2

[0103] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present disclosure also provides an artificial intelligence-based agricultural product pesticide residue detection system, the system is used to implement any of the methods described, characterized by a multi-source heterogeneous data fusion module, a feature selection and optimization module, a machine learning prediction model module, an image feature extraction module, a pesticide residue time period prediction module, and a prediction result fusion module;

[0104] The multi-source heterogeneous data fusion module is used to construct a multi-source heterogeneous data set based on agricultural operation records, meteorological monitoring data, environmental monitoring data, and agricultural product image data using data fusion technology;

[0105] The feature selection and optimization module is used to screen out key features related to pesticide residues based on multi-source heterogeneous data sets to form an optimized feature subset;

[0106] The machine learning prediction model module is used to train the pesticide residue prediction model based on the optimized feature subset;

[0107] The image feature extraction module is used to input the image data of the agricultural product to be tested into the trained pesticide residue prediction model to obtain the predicted value of the pesticide residue of the agricultural product sample to be tested;

[0108] The time-division prediction module for pesticide residues is used to construct a mathematical model of the change of pesticide residues over time according to the degradation law of pesticides in different agricultural products, and to form a time-division prediction curve for pesticide residues by fitting the pesticide residue detection data. Based on the time-division prediction curve for pesticide residues, the average pesticide residue in each time interval is obtained.

[0109] The prediction result fusion module is used to fuse the predicted value of pesticide residue with the average pesticide residue to obtain a comprehensive pesticide residue prediction result.

[0110] The system of the above embodiment is used to implement a corresponding artificial intelligence-based agricultural product pesticide residue detection method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0111] It should be noted that the above-mentioned agricultural product pesticide residue detection system based on artificial intelligence is embodied in the form of functional units. The term "module" here can be implemented in the form of software and / or hardware, and is not specifically limited to this.

[0112] For example, a "module" may be a software program, a hardware circuit, or a combination of the two that implements the above functions. The hardware circuit may include an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor, or a group processor, etc.) and a memory for executing one or more software or firmware programs, a combined logic circuit, and / or other suitable components that support the described functions.

[0113] The embodiments of the present disclosure are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present disclosure should be included in the scope of protection of the present disclosure.

Claims

1. A method for detecting pesticide residues in agricultural products based on artificial intelligence, characterized in that: The method comprises: Based on agricultural operation records, meteorological monitoring data, environmental monitoring data, and agricultural product image data, data fusion technology is used to construct a multi-source heterogeneous data set; Based on multi-source heterogeneous data sets, key features related to pesticide residues are screened to form an optimized feature subset; Based on the optimized feature subset, the pesticide residue prediction model is trained; Input the image data of the agricultural product to be tested into the trained pesticide residue prediction model to obtain the predicted value of the pesticide residue of the agricultural product sample to be tested; According to the degradation law of pesticides in different agricultural products, a mathematical model of the change of pesticide residues over time is constructed. By fitting the pesticide residue detection data, a time period prediction curve of pesticide residues is formed. Based on the time period prediction curve of pesticide residues, the average pesticide residue in each time interval is obtained. The predicted value of pesticide residues is combined with the average pesticide residue to obtain a comprehensive prediction result of pesticide residues.

2. The method according to claim 1, characterized in that Based on the agricultural operation record data, the time, type and dosage information of pesticide use in the crop planting process are extracted to form structured pesticide use record data; meteorological monitoring data include temperature, humidity, light and wind speed; environmental monitoring data include soil physical and chemical properties and irrigation water quality; agricultural product image data includes the use of image segmentation algorithm to process agricultural product images and extract the color, shape and size characteristics of agricultural products.

3. The method according to claim 1, characterized in that Based on multi-source heterogeneous data sets, key features related to pesticide residues were screened out to form an optimized feature subset including: Obtain multi-source heterogeneous pesticide residue-related data, clean and pre-process the data, and unify the data format and spatiotemporal scale; Based on the preprocessed pesticide residue data set, the Pearson correlation coefficient was used to analyze the correlation between each feature and the pesticide residue, and the features whose correlations met the preset requirements were preliminarily screened out; Based on the initial screening features, the recursive feature elimination method is used to gradually eliminate redundant or irrelevant features until the optimal feature combination, i.e. the optimized feature subset, is obtained.

4. The method according to claim 1, characterized in that: Based on the optimized feature subset, the pesticide residue prediction model is trained including: According to meteorological conditions and environmental factors, the pesticide application records are grouped, and pesticide residue prediction models are constructed for the application data under different meteorological conditions. The selected key features are sorted according to the time series, and the time series features of the application time and dosage characteristics are extracted; A machine learning algorithm was used to train the pesticide residue prediction model using the optimized feature subset as input; Use the trained pesticide residue prediction model to predict the newly collected pesticide application data. Combined with the set pesticide residue threshold, it is determined whether there is a risk of exceeding the standard for agricultural products, and corresponding risk warnings and decision-making recommendations are given.

5. The method according to claim 1, characterized in that Input the image data of the agricultural product to be tested into the trained pesticide residue prediction model to obtain the predicted value of the pesticide residue of the agricultural product sample to be tested, including: Acquire image data of agricultural products to be tested, and pre-process the image data; The image segmentation algorithm is used to segment the preprocessed agricultural product image and extract the area of ​​the agricultural product; According to the segmented agricultural product area, the location and size information of the agricultural products are detected using the target detection algorithm; According to the target detection results, the color features of agricultural products are extracted and the average color value of the agricultural product area is calculated; The size and color characteristics of the agricultural product are input into the trained pesticide residue prediction model to obtain the predicted value of the pesticide residue of the agricultural product.

6. The method according to claim 1, characterized in that Based on the time-division prediction curve of pesticide residues, the average pesticide residues in each time interval are obtained, including: Obtain the detection data of pesticide residues in different agricultural products, including the detection time and the corresponding residue values; According to the degradation law of pesticides in different agricultural products, the exponential decay model is selected; According to each agricultural product and pesticide combination, the parameters of the exponential decay model are determined by fitting the residue detection data; Substituting the determined model parameters into the exponential decay model, the prediction curve of the change of pesticide residues over time was obtained; According to the prediction curve, the prediction time period is divided into several intervals, and the average pesticide residue in each time interval is calculated.

7. The method according to claim 1, characterized in that The predicted pesticide residue value is integrated with the average pesticide residue to obtain the comprehensive pesticide residue prediction results including: Obtain the output results of the prediction model and the output results of the prediction curve; According to the preset weight coefficient, the output results of the prediction model and the output results of the prediction curve are weighted; Add the weighted prediction model output result and the prediction curve output result to obtain a weighted average value; The least square method is used to perform curve fitting on the output results of the prediction model and the output results of the prediction curve to obtain a fitting curve; The output results of the weighted average and the fitting curve are combined to obtain the comprehensive prediction value of pesticide residues.

8. An artificial intelligence-based agricultural product pesticide residue detection system, the system is used to implement the method described in any one of claims 1 to 7, characterized in that: Multi-source heterogeneous data fusion module, feature selection and optimization module, machine learning prediction model module, image feature extraction module, pesticide residue time period prediction module, prediction result fusion module; The multi-source heterogeneous data fusion module is used to construct a multi-source heterogeneous data set using data fusion technology based on farming operation records, meteorological monitoring data, environmental monitoring data and agricultural product image data; The feature selection and optimization module is used to screen out key features related to pesticide residues based on multi-source heterogeneous data sets to form an optimized feature subset; The machine learning prediction model module is used to train a pesticide residue prediction model based on the optimized feature subset; The image feature extraction module is used to input the image data of the agricultural product to be tested into the trained pesticide residue prediction model to obtain the predicted value of the pesticide residue of the agricultural product sample to be tested; The pesticide residue time period prediction module is used to construct a mathematical model of the change of pesticide residue over time according to the degradation law of pesticides in different agricultural products, form a pesticide residue time period prediction curve by fitting the pesticide residue detection data, and obtain the average pesticide residue in each time interval based on the pesticide residue time period prediction curve; The prediction result fusion module is used to fuse the pesticide residue prediction value with the average pesticide residue to obtain a comprehensive pesticide residue prediction result.

Citation Information

Cited By

  • Analysis method for constructing pesticide and veterinary drug residue risk assessment model in key edible agricultural products based on previous detection data set

    CN121093058A