Food pesticide residue safety detection and analysis method based on machine learning
By combining the two-dimensional liquid chromatography-high resolution mass spectrometry combined with machine learning algorithms, and performing environmental factors and baseline drift corrections, the complexity and instability of existing pesticide residue detection methods are solved, and efficient and accurate pesticide residue detection is achieved.
Patent Information
- Application Number
- CN202411646904.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2044-11-18
AI Technical Summary
The existing pesticide residue detection methods have limitations such as complex operation, long detection time and low sensitivity, and environmental factors and instrument response deviations lead to unstable detection results.
Combining the two-dimensional liquid chromatography-high resolution mass spectrometry combination technology and machine learning algorithms, the mass spectrometry data is optimized through environmental factor correction and baseline drift correction, and a machine learning model is established to identify and classify pesticide residue components.
It improves the accuracy and efficiency of the detection, enhances the stability and reliability of the detection results, and can identify more types of pesticide residues in complex food substrates and accurately quantify their concentrations.
Smart Images

Figure CN119580877A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of food detection, and in particular to a food pesticide residue safety detection and analysis method based on machine learning. Background Art
[0002] As global food safety issues become increasingly serious, the detection of pesticide residues has become an important part of food safety monitoring. Pesticide residues may not only pose a threat to consumers' health, but also affect the export and market competitiveness of agricultural products. Therefore, rapid and accurate detection of pesticide residues in food is the key to ensuring food safety. Existing pesticide residue detection methods mainly include gas chromatography-mass spectrometry (GC-MS), liquid chromatography-mass spectrometry (LC-MS), enzyme-linked immunosorbent assay (ELISA) and high performance liquid chromatography (HPLC). Although these traditional methods have certain advantages in pesticide residue detection, they usually have limitations such as complex operation, long detection time and low sensitivity.
[0003] In recent years, with the rapid development of big data technology and machine learning algorithms, pesticide residue detection methods based on machine learning have gradually attracted attention. Machine learning can automatically learn and extract potential rules from a large amount of experimental data, thereby realizing the accurate identification and quantification of pesticide residues. By combining efficient chromatography-mass spectrometry analysis technology, machine learning models can identify different types of pesticides in complex food matrices and quantify their concentrations. However, in practical applications, the complexity of food samples and changes in the experimental environment often lead to unstable test results. Therefore, how to effectively preprocess and correct experimental data to eliminate the interference of environmental factors and instrument response is the key to improving detection accuracy and reliability.
[0004] Chromatography-mass spectrometry (such as liquid chromatography-high-resolution mass spectrometry) is widely used in pesticide residue detection due to its high resolution, high selectivity and sensitivity. This technology can accurately obtain the mass spectrum of each pesticide by separating and qualitatively analyzing the extract. However, chromatographic and mass spectrometric instruments may experience response deviation or baseline drift under different environmental conditions, such as temperature and humidity, which in turn affects the accuracy of the test results. Therefore, when performing pesticide residue analysis, the mass spectrometry data needs to be corrected to ensure the reliability of the data.
[0005] In order to improve the accuracy and efficiency of pesticide residue detection, research in recent years has begun to combine machine learning with data correction technology. By acquiring environmental information (such as temperature, humidity, etc.) in real time and correcting experimental data, the interference of environmental factors on mass spectrometry data can be effectively reduced. At the same time, building a machine learning model based on the corrected data can automatically identify the type and concentration of pesticide residues, greatly improving the detection efficiency and accuracy. Using feature extraction methods and matrix effect correction technology, data quality can be further optimized and the impact of sample matrix on test results can be reduced.
[0006] Therefore, combining chromatography-mass spectrometry technology with machine learning algorithms and adding environmental factor correction and data correction steps has become an important research direction in the field of food pesticide residue detection. This innovative technical method can not only improve the accuracy and efficiency of detection, but also provide more reliable data support in large-scale food safety monitoring. Summary of the invention
[0007] In view of this, the present invention proposes a food pesticide residue safety detection and analysis method based on machine learning, aiming to solve the problems existing in the prior art and provide a fast, accurate and adaptable food pesticide residue detection method.
[0008] The present invention proposes a food pesticide residue safety detection and analysis method based on machine learning, comprising:
[0009] Collecting a number of food samples, pre-treating all of the food samples to obtain extracts for detection; analyzing the extracts using two-dimensional liquid chromatography-high resolution mass spectrometry to obtain mass spectrometry, and converting the spectrometry data into mass spectrometry numerical data;
[0010] Correcting the mass spectrum numerical data to obtain corrected data; establishing a machine learning model based on the corrected data, wherein the machine learning model is used to identify and classify pesticide residue components in the food sample to be tested;
[0011] Extracting a pre-treatment extract of the food sample to be tested, and analyzing it using the same two-dimensional liquid chromatography-high-resolution mass spectrometry technology to obtain a mass spectrum of the food sample to be tested; converting the spectrum data of the food sample to be tested into mass spectrum numerical data to be tested; performing the same correction on the mass spectrum numerical data to be tested to obtain corrected data to be tested;
[0012] Input the corrected test data into the established machine learning model to identify and classify the pesticide residue components; perform quantitative analysis on the types and concentrations of the pesticide residues according to the results output by the model to obtain analysis results;
[0013] The analysis results are compared with the food safety standards to determine whether the food sample to be tested meets the safety standards and generate a corresponding test report.
[0014] Preferably, the mass spectrum numerical data includes ion intensity data, peak shape parameters, ion flow curve shape characteristics and retention time.
[0015] Preferably, the correction includes environmental factor correction and baseline drift correction;
[0016] The environmental factor correction includes temperature correction and humidity correction, and the environmental correction response value is calculated according to the actual temperature and the actual humidity; and the baseline correction final value is calculated according to the environmental correction response value;
[0017] The ion intensity data and peak shape parameters are corrected using the baseline corrected final value.
[0018] Preferably, the correction formula for the environmental factor correction is:
[0019] Rt=Rm·(1+kT·(Ta-Tr));
[0020] Rh=Rt·(1+kH·(Ha-Hr));
[0021] Among them, kT and kH represent the temperature and humidity correction coefficients respectively; Ta and Ha represent the actual temperature and actual humidity respectively; Tr and Hr represent the standard temperature and standard humidity respectively; Rt and Rh represent the temperature correction value and the environmental correction response value respectively;
[0022] The baseline drift correction formula is:
[0023]
[0024] Rbase=Rh-Bd;
[0025] Where N is the size of the moving average window; Rh is the environmental correction response value; and Rbase is the final value of the baseline correction.
[0026] Preferably, when the ion intensity data is corrected using the baseline correction final value, it includes:
[0027] Ic(t)=Ir(t)-Rbase(t);
[0028] Where Ic(t) represents the ion intensity after baseline correction; Ir(t) represents the original ion intensity data.
[0029] Preferably, when the peak shape parameter is corrected using the final value of the baseline correction, it includes:
[0030] The peak shape parameters include peak area, peak height and peak width;
[0031]
[0032] Hc=Hr-Rbase(tpeak);
[0033] Wc=t(Hc / 2,left)-t(Hc / 2,right);
[0034] tleft=t(Hc / 2,left);
[0035] tright=t(Hc / 2,right);
[0036] Wherein, Ac represents the peak area after baseline correction; Ic(t) represents the ion intensity after baseline correction; tpeak represents the time point when the peak height appears; Hc represents the peak height after baseline correction; Hr represents the maximum ion intensity value of the peak; tleft and tright represent the left and right time points when the peak height is half the height after baseline correction, respectively; Wc represents the peak width after baseline correction.
[0037] Preferably, the shape characteristics of the ion current curve are extracted based on the corrected ion intensity, including the calculation of the curve symmetry coefficient and the curve slope ratio:
[0038]
[0039] Where S represents the curve symmetry coefficient; Rslope represents the curve slope ratio; slopea and slopeb represent the average slopes of the ascending segment and the descending segment, respectively.
[0040] Preferably, the correction also includes standardization processing
[0041] The formula for performing the standardization process is:
[0042]
[0043] Among them, X represents the corrected data; μ and σ represent the mean and standard deviation of the corresponding data respectively; Xnor represents the data after standardization.
[0044] Preferably, a machine learning model is established based on the corrected data, and when the machine learning model is used to identify and classify pesticide residue components in the food sample to be tested, it also includes feature selection;
[0045] The feature selection adopts a recursive feature elimination method to screen the feature that contributes most to the model performance from the peak area, peak height, peak width, curve symmetry coefficient and curve slope ratio.
[0046] Preferably, the pretreatment includes washing, crushing, homogenizing, extracting, concentrating and filtering.
[0047] Compared with the prior art, the present invention has the following beneficial effects:
[0048] 1. Improve detection accuracy and reliability:
[0049] The present invention solves the problem of detection instability caused by experimental environment changes (such as temperature and humidity) and instrument response deviation in traditional pesticide residue detection methods by introducing environmental factor correction and baseline drift correction technology. The correction of environmental factors collects temperature, humidity and other data in real time to calibrate the mass spectrum numerical data, effectively eliminating the errors caused by environmental changes, thereby improving the accuracy and reliability of the detection results.
[0050] 2. Higher detection sensitivity:
[0051] Combined with two-dimensional liquid chromatography-high-resolution mass spectrometry, the present invention can achieve accurate separation and quantitative analysis of pesticide residues in complex food samples. At the same time, automated analysis based on machine learning models can identify more types of pesticide residues and accurately quantify their concentrations. Compared with traditional detection methods, the present invention has higher sensitivity, can detect pesticide residues in a low concentration range, and is adaptable to more complex food matrices.
[0052] 3. Automation and intelligence:
[0053] The present invention uses a machine learning model for data analysis, which can automatically identify and classify different types of pesticide residues. Compared with traditional manual analysis methods, the machine learning model not only improves analysis efficiency, but also reduces human operation errors. The automatic learning and optimization capabilities of the model make the detection process more intelligent, and can be continuously improved according to new data to adapt to new types of pesticides or changing detection needs.
[0054] 4. Comprehensive correction method:
[0055] The correction process of the present invention includes correction of baseline drift, correction of environmental factors, correction of matrix effect and other aspects. By correcting the ion intensity data, peak shape parameters and the like, not only the influence caused by instrument deviation and environmental change is solved, but also the feature extraction process is optimized by data preprocessing. This comprehensive correction method greatly improves the quality of data and ensures the accuracy of the machine learning model in the analysis.
[0056] 5. Stronger interpretability of results:
[0057] When identifying and classifying pesticide residues, feature selection and importance analysis methods, such as principal component analysis (PCA) and feature importance scoring, were used to make the model's analysis results more interpretable. This not only increases the transparency of the detection process, but also provides a basis for subsequent optimization and debugging, and improves the operability and credibility of the model in practical applications.
[0058] 6. Efficient quantitative analysis:
[0059] Through the quantitative analysis results output by the machine learning model, the present invention can accurately calculate the concentration of pesticide residues and compare it with the food safety standards. In this process, combined with the corrected data and concentration calculation method, the accuracy of the pesticide residue concentration can be ensured, and whether the sample meets the safety standards can be effectively judged, reducing the number of false positives or false negatives.
[0060] 7. Strong adaptability and easy expansion:
[0061] The method of the present invention can not only be used for conventional pesticide residue detection, but can also be expanded to more food sample types and pesticide types according to demand. As new data is continuously added, the automatic update and retraining capabilities of the machine learning model make it highly adaptable and can continuously improve the detection capabilities of new types of pesticides.
[0062] In summary, the present invention has significant advantages over the existing technology and can improve the accuracy, sensitivity and efficiency of pesticide residue detection. At the same time, it solves the problems of environmental interference, data bias and so on in the existing methods through correction and optimization technology, providing a more reliable and intelligent solution for food safety detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0064] Figure 1 This is a flow chart of the food pesticide residue safety detection and analysis method based on machine learning. DETAILED DESCRIPTION
[0065] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art. It should be noted that, in the absence of conflict, the embodiments of the present invention and the features described in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0066] This embodiment provides a food pesticide residue safety detection and analysis method based on machine learning, including:
[0067] Collecting a number of food samples, pre-treating all of the food samples to obtain extracts for detection; analyzing the extracts using two-dimensional liquid chromatography-high resolution mass spectrometry to obtain mass spectrometry, and converting the spectrometry data into mass spectrometry numerical data;
[0068] Correcting the mass spectrum numerical data to obtain corrected data; establishing a machine learning model based on the corrected data, wherein the machine learning model is used to identify and classify pesticide residue components in the food sample to be tested;
[0069] Extracting a pre-treatment extract of the food sample to be tested, and analyzing it using the same two-dimensional liquid chromatography-high-resolution mass spectrometry technology to obtain a mass spectrum of the food sample to be tested; converting the spectrum data of the food sample to be tested into mass spectrum numerical data to be tested; performing the same correction on the mass spectrum numerical data to be tested to obtain corrected data to be tested;
[0070] Input the corrected test data into the established machine learning model to identify and classify the pesticide residue components; perform quantitative analysis on the types and concentrations of the pesticide residues according to the results output by the model to obtain analysis results;
[0071] The analysis results are compared with the food safety standards to determine whether the food sample to be tested meets the safety standards and generate a corresponding test report.
[0072] It can be understood that this embodiment provides a food pesticide residue safety detection and analysis method based on machine learning, which can efficiently and accurately detect and analyze pesticide residues in food.
[0073] The specific steps are as follows:
[0074] First, collect several food samples, which can be vegetables, fruits, grains, etc. All food samples are pre-treated, including washing, homogenization, extraction and other steps to remove impurities in the samples and extract pesticide residues to obtain extracts for testing.
[0075] Next, the extracts were analyzed using two-dimensional liquid chromatography-high-resolution mass spectrometry. Two-dimensional liquid chromatography provides more complex separation capabilities, while high-resolution mass spectrometry provides high-precision molecular weight and structural information. This combination of technologies yields a mass spectrum that contains a wealth of information.
[0076] The obtained mass spectrum data is converted into mass spectrum numerical data for subsequent computer processing. Necessary corrections are made to the mass spectrum numerical data, such as correcting baseline drift and eliminating noise, to improve data quality.
[0077] A machine learning model is established based on the corrected mass spectrometry numerical data. The model can be a support vector machine, random forest, neural network, etc., which is used to identify and classify the pesticide residue components in the food samples to be tested. The model training needs to be carried out using sample data with known pesticide residue components to ensure the accuracy and reliability of the model.
[0078] Extract the pre-treatment extract of the food sample to be tested, and use the same two-dimensional liquid chromatography-high-resolution mass spectrometry technology as used in training the model to analyze it to obtain the mass spectrum of the food sample to be tested. Convert the spectrum data into the mass spectrum numerical data to be tested, and perform the same correction as the training data to obtain the corrected data to be tested.
[0079] The corrected test data is input into the established machine learning model to identify and classify the pesticide residue components. The model will output the identification results, including the type and concentration of pesticide residues.
[0080] Finally, according to the output of the model, the types and concentrations of pesticide residues are quantitatively analyzed to obtain the analysis results. The analysis results are compared with the food safety standards to determine whether the food samples to be tested meet the safety standards. If they meet the standards, a qualified test report is generated; if they do not meet the standards, an unqualified test report is generated and corresponding treatment suggestions are made.
[0081] The method provided in this embodiment can achieve rapid detection and accurate analysis of pesticide residues in food, providing strong technical support for food safety supervision.
[0082] In some embodiments of the present application, the mass spectrum numerical data includes ion intensity data, peak shape parameters, ion current curve shape characteristics and retention time.
[0083] It is understandable that the mass spectrum numerical data described in the present embodiment includes ion intensity data, peak shape parameters, ion flow curve shape characteristics and retention time. Specifically, ion intensity data provides the relative or absolute quantity information of ions of different mass-to-charge ratios (m / z) at a specific time point or time period, reflecting the concentration of each component in the sample. Peak shape parameters describe the shape characteristics of each peak in the mass spectrum, such as peak height, peak width, peak area, etc., and these parameters help to evaluate the accuracy and repeatability of the analysis. The ion flow curve shape characteristics relate to the pattern of ion flow changing over time, which can be used to identify and distinguish compounds with similar mass-to-charge ratios but different dynamic behaviors. Retention time refers to the time required for a specific compound from injection to detection in a chromatographic column, which is a key parameter in chromatographic analysis for qualitative analysis of compounds. By combining these mass spectrum numerical data, a comprehensive analysis and identification of chemical components in a sample can be achieved.
[0084] In some embodiments of the present application, the correction includes environmental factor correction and baseline drift correction;
[0085] The environmental factor correction includes temperature correction and humidity correction, and the environmental correction response value is calculated according to the actual temperature and the actual humidity; and the baseline correction final value is calculated according to the environmental correction response value;
[0086] The ion intensity data and peak shape parameters are corrected using the baseline corrected final value.
[0087] It is understood that the correction process described in this embodiment includes two main steps: environmental factor correction and baseline drift correction. First, environmental factor correction is intended to adjust the impact that changes in ambient temperature and humidity may have on the measurement results. Specifically, the system monitors the current temperature and humidity in real time, and calculates the corresponding environmental correction response value based on a pre-set algorithm or lookup table. This response value reflects the specific impact of temperature and humidity changes on the measurement data.
[0088] Next, the calculated environmental correction response value will be used to further correct the baseline drift. Baseline drift refers to the slow change of the baseline (i.e., zero point) during a long measurement due to various factors (such as temperature fluctuations, instrument aging, etc.). By applying the environmental correction response value, a baseline correction final value can be obtained, which comprehensively considers the impact of environmental factors on the baseline.
[0089] Finally, the final value of the baseline correction is used to correct the ion intensity data and peak shape parameters. The ion intensity data reflects the concentration of ions in the sample, while the peak shape parameters are related to the peak shape in chromatography or mass spectrometry analysis. These parameters are crucial to the accuracy and reliability of the analysis results. By correcting these data, it can be ensured that the analysis results more accurately reflect the actual situation of the sample and reduce the errors caused by environmental factors and instrument drift.
[0090] In some embodiments of the present application, the correction formula for the environmental factor correction is:
[0091] Rt=Rm·(1+kT·(Ta-Tr));
[0092] Rh=Rt·(1+kH·(Ha-Hr));
[0093] Among them, kT and kH represent the temperature and humidity correction coefficients respectively; Ta and Ha represent the actual temperature and actual humidity respectively; Tr and Hr represent the standard temperature and standard humidity respectively; Rt and Rh represent the temperature correction value and the environmental correction response value respectively;
[0094] The baseline drift correction formula is:
[0095]
[0096] Rbase=Rh-Bd;
[0097] Where N is the size of the moving average window; Rh is the environmental correction response value; and Rbase is the final value of the baseline correction.
[0098] It is understandable that the present embodiment aims to provide an effective method for correcting environmental factors (temperature and humidity) and baseline drift, and the method comprises two key steps: correction of environmental factors and correction of baseline drift. First, the influence of temperature and humidity is adjusted using the environmental factor correction formula to obtain the temperature correction value Rt and the environmental response correction value Rh. Next, by applying the baseline drift correction formula and using the moving average window to calculate the average value of a series of environmental response correction values Rh, the final value Rbase of the baseline correction is determined. By adopting this method, the interference of environmental factors and baseline drift on the measurement results can be significantly reduced, thereby improving the accuracy and credibility of the measurement data. By implementing these correction formulas, the corrected ion intensity data and peak shape parameters can be obtained to ensure that the analysis results more accurately reflect the actual state of the sample and reduce the errors caused by environmental factors and instrument drift.
[0099] In some embodiments of the present application, when the ion intensity data is corrected using the baseline correction final value, it includes:
[0100] Ic(t)=Ir(t)-Rbase(t);
[0101] Where Ic(t) represents the ion intensity after baseline correction; Ir(t) represents the original ion intensity data.
[0102] It can be understood that the present embodiment aims to correct the raw ion intensity data Ir(t) by the final value Rbase of baseline correction to eliminate or reduce the influence of baseline drift on the ion intensity measurement. The specific operation is to subtract the raw ion intensity data Ir(t) from the final value Rbase of baseline correction to obtain the ion intensity Ic(t) after baseline correction. In this way, it can be ensured that the ion intensity data more accurately reflects the actual ion concentration in the sample, thereby improving the reliability and accuracy of the analysis results. In practical applications, this correction method is crucial to improving the performance of detection technologies such as mass spectrometry and chromatography, especially when long-term monitoring or measurements are required under changing environmental conditions.
[0103] In some embodiments of the present application, when the peak shape parameter is corrected using the baseline correction final value, it includes:
[0104] The peak shape parameters include peak area, peak height and peak width;
[0105]
[0106] Hc=Hr-Rbase(tpeak);
[0107] Wc=t(Hc / 2,left)-t(Hc / 2,right);
[0108] tleft=t(Hc / 2,left);
[0109] tright=t(Hc / 2,right);
[0110] Wherein, Ac represents the peak area after baseline correction; Ic(t) represents the ion intensity after baseline correction; tpeak represents the time point when the peak height appears; Hc represents the peak height after baseline correction; Hr represents the maximum ion intensity value of the peak; tleft and tright represent the left and right time points when the peak height is half the height after baseline correction, respectively; Wc represents the peak width after baseline correction.
[0111] It is understandable that the present embodiment aims to correct the peak shape parameters by the final value Rbase of the baseline correction to ensure that the peak shape parameters can more accurately reflect the actual components in the sample. The specific operation includes recalculating the peak area Ac, peak height Hc and peak width Wc using the baseline-corrected ion intensity Ic(t). For example, the peak area Ac can be obtained by integrating the baseline-corrected ion intensity Ic(t) within a specific time range. The peak height Hc can be determined by the baseline-corrected ion intensity Ic(tpeak) at the time point tpeak where the peak height occurs. The peak width Wc can be obtained by determining the left and right time points tleft and tright when the peak height is half the height, and calculating the time difference between the two time points. In this way, the accuracy of the peak shape parameters can be ensured, thereby improving the reliability and accuracy of the analysis results. This is particularly important for occasions where accurate analysis of sample components is required, such as in the fields of drug development, environmental monitoring and food safety testing.
[0112] In some embodiments of the present application, the shape characteristics of the ion current curve are extracted based on the corrected ion intensity, including the calculation of the curve symmetry coefficient and the curve slope ratio:
[0113]
[0114] Where S represents the curve symmetry coefficient; Rslope represents the curve slope ratio; slopea and slopeb represent the average slopes of the ascending segment and the descending segment, respectively.
[0115] It can be understood that the present embodiment aims to extract shape features that can reflect the characteristics of the sample by analyzing the ion flow curve after baseline correction. The curve symmetry coefficient S can be used to describe the degree of symmetry of the peak shape, and its calculation can be achieved by comparing the average slopes of the rising and falling sections of the peak. Specifically, in the formula of the curve symmetry coefficient S, slopea and slopeb represent the average slopes of the rising and falling sections, respectively. If the value of S is close to 1, it indicates that the peak shape is symmetrical; if the value of S is greater than or less than 1, it indicates that the peak shape is asymmetric, and the size of the S value can reflect the degree of asymmetry.
[0116] The curve slope ratio Rslope can be used to describe the relative relationship between the rise and fall rates of the peak. When the curve slope ratio Rslope is greater than 1, it indicates that the rise rate is faster than the fall rate; when the Rslope value is less than 1, it indicates that the fall rate is faster than the rise rate. By analyzing the value of Rslope, we can further understand the dynamic characteristics of the sample.
[0117] By extracting these shape features, a deeper analysis of the chemical composition of the sample can be performed, thereby providing more accurate data support in areas such as drug development, environmental monitoring, and food safety testing.
[0118] In some embodiments of the present application, the correction also includes a standardization process
[0119] The formula for performing the standardization process is:
[0120]
[0121] Among them, X represents the corrected data; μ and σ represent the mean and standard deviation of the corresponding data respectively; Xnor represents the data after standardization.
[0122] It can be understood that this embodiment aims to eliminate the difference in data magnitude between different samples through standardization processing, so that the shape characteristics of ion flow curves of different samples are comparable. The data Xnor after standardization processing can be converted into a distribution with a mean of 0 and a standard deviation of 1 by subtracting the mean μ and dividing by the standard deviation σ, so that the curve characteristics between different samples can be compared and analyzed on the same scale.
[0123] In actual operation, the ion current curve data of each sample needs to be baseline corrected first to eliminate the influence of non-sample factors such as baseline drift. Then, it is standardized according to the above formula to obtain the standardized data Xnor. Based on these standardized data, the curve symmetry coefficient S and curve slope ratio Rslope of each sample can be calculated, and then the chemical composition and dynamic characteristics of the sample can be deeply analyzed.
[0124] This comprehensive analytical method can more accurately identify and distinguish the chemical components in different samples, providing more reliable data support for research and application in related fields. For example, in drug development, changes in drug ingredients can be more accurately monitored; in environmental monitoring, pollutants can be more effectively detected and identified; in food safety testing, the content of additives and harmful substances in food can be more accurately evaluated.
[0125] In some embodiments of the present application, a machine learning model is established based on the corrected data, and when the machine learning model is used to identify and classify pesticide residue components in the food sample to be tested, it also includes feature selection;
[0126] The feature selection adopts a recursive feature elimination method to screen the feature that contributes most to the model performance from the peak area, peak height, peak width, curve symmetry coefficient and curve slope ratio.
[0127] It is understood that this embodiment aims to optimize the feature set of the model through recursive feature elimination (RFE) to improve the prediction accuracy and efficiency of the model. Recursive feature elimination is a feature selection technique that works by repeatedly building a model and selecting or excluding the least important features. In each round of iteration, the model will sort the features according to their importance and then remove the least important features. This process will be repeated until a predetermined number of features is reached or a certain performance indicator is achieved.
[0128] In this embodiment, the purpose of feature selection is to identify the most critical features for the identification and classification of pesticide residue components. Through the recursive feature elimination method, the features that contribute most to the model performance can be screened out from the original feature set, such as peak area, peak height, peak width, curve symmetry coefficient and curve slope ratio. After these features are optimized, a more streamlined and efficient machine learning model can be constructed, thereby improving the recognition accuracy and classification efficiency of pesticide residue components.
[0129] In practical applications, such models can be used to quickly detect and monitor pesticide residues in food samples to ensure food safety. Through automated and intelligent analysis methods, the detection efficiency can be greatly improved, the time and cost required for manual detection can be reduced, and the accuracy and reliability of the test results can be ensured. This has important practical significance and application value for food production, processing and regulatory agencies.
[0130] In some embodiments of the present application, the pre-treatment includes washing, crushing, homogenization, extraction concentration and filtration.
[0131] The following are the pretreatment steps for food samples, involving washing, pulverization, homogenization and extraction, in order to provide clean, uniform and effective extracts for subsequent chromatography-mass spectrometry analysis:
[0132] 1. Washing
[0133] step:
[0134] Rinse the collected food samples (such as fruits, vegetables, grains, etc.) with pure water to remove dust, dirt and impurities on the surface.
[0135] If necessary, clean the sample with a detergent or surfactant, especially if pesticide residues are present on the sample surface.
[0136] Repeatedly change the water to ensure thorough washing and avoid introducing any other contaminants.
[0137] For some solid foods (such as nuts, meat, etc.), alcohol or other appropriate solvents can be used for cleaning.
[0138] Purpose: To remove visible pollutants or impurities on the surface and reduce background interference.
[0139] 2. Crushing
[0140] step:
[0141] The washed food samples are crushed (eg using a crusher, grinder, manual crushing, etc.).
[0142] Select appropriate pulverization equipment and methods based on the physical properties of the sample (such as hardness, texture, etc.).
[0143] For hard samples (such as dried fruits, seeds, etc.), low-temperature treatment (such as frozen grinding) can be selected to reduce the denaturation of the sample caused by heat.
[0144] Purpose: To process the sample into small particles or powder to increase the effective contact area for subsequent homogenization and extraction.
[0145] 3. Homogenization
[0146] step:
[0147] The pulverized sample is homogenized, usually using a homogenizer, ultrasonic treatment or high-speed shear mixer.
[0148] Some hard or difficult to homogenize samples can be processed at low temperatures to avoid component loss caused by heating.
[0149] During the homogenization process, an appropriate amount of solvent (such as water or buffer) may be added to help homogenize the sample.
[0150] Purpose: To mix the different components in the sample evenly and ensure that each part of the sample is similar in chemical composition to facilitate extraction.
[0151] 4. Extraction
[0152] step:
[0153] Mix the homogenized sample with an appropriate amount of solvent (such as methanol, ethanol, water, ethyl acetate, n-hexane, etc.). Common solvent combinations include ethanol / water (70 / 30) and ethyl acetate / n-hexane.
[0154] Liquid-liquid extraction or solid-liquid extraction methods are used, using rotary evaporation, ultrasonic extraction or other extraction methods to transfer the target pesticide components from the sample matrix into the solvent.
[0155] If liquid-liquid extraction is used, the solvent and aqueous phases can be separated by a separatory funnel, and the organic phase solution containing the pesticide can be collected.
[0156] During the extraction process, temperature, time and solvent selection will affect the extraction effect, so these parameters need to be optimized to obtain the best extraction effect.
[0157] Purpose: To extract pesticide components in food samples from the matrix and provide effective extracts for subsequent analysis.
[0158] 5. Concentration and filtration
[0159] step:
[0160] The extract can be concentrated by using a rotary evaporator or nitrogen blowing to remove the solvent and concentrate to an appropriate volume.
[0161] The concentrated extract is filtered using a filter membrane (such as a 0.45 μm filter membrane) to remove residual solid matter and obtain a clear sample.
[0162] Purpose: To increase the concentration of the extract and remove solid impurities that may affect the analysis.
[0163] 6. Preparation for Analysis
[0164] step:
[0165] Dissolve the processed extract in an appropriate solvent to ensure that its concentration is suitable for subsequent analysis.
[0166] If necessary, the sample can be further diluted or internal standard can be added according to the chromatographic requirements.
[0167] After the sample is prepared, it is placed in a chromatographic injection bottle and analyzed by the chromatography-mass spectrometry system.
[0168] Purpose: To ensure that samples have appropriate concentration and stability during chromatography-mass spectrometry analysis.
[0169] Summarize:
[0170] The order and specific operations of these steps can be appropriately adjusted according to the type of food sample, the expected type of pesticide to be detected, equipment availability, and laboratory conditions. The key purpose of pretreatment is to retain the pesticide components as much as possible, remove impurities and interfering substances that may affect the detection, and ensure that the subsequent chromatography-mass spectrometry analysis results are accurate and reliable.
[0171] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0172] The present application is described with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0173] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0174] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0175] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A food pesticide residue safety detection and analysis method based on machine learning, characterized in that: include: Collecting a number of food samples, pre-treating all food samples to obtain extracts for testing; Analyzing the extract using two-dimensional liquid chromatography-high resolution mass spectrometry to obtain a mass spectrum, and converting the spectrum data into mass spectrum numerical data; Correcting the mass spectrum numerical data to obtain corrected data; Establishing a machine learning model based on the corrected data, wherein the machine learning model is used to identify and classify pesticide residue components in the food sample to be tested; Extracting the pre-treatment extract of the food sample to be tested, and analyzing it using the same two-dimensional liquid chromatography-high resolution mass spectrometry technology to obtain the mass spectrum of the food sample to be tested; converting the spectrum data of the food sample to be tested into mass spectrum numerical data to be tested; Performing the same correction on the mass spectrum numerical data to be measured to obtain the corrected data to be measured; Input the corrected test data into the established machine learning model to identify and classify the pesticide residue components; perform quantitative analysis on the types and concentrations of the pesticide residues according to the results output by the model to obtain analysis results; The analysis results are compared with the food safety standards to determine whether the food sample to be tested meets the safety standards and generate a corresponding test report.
2. The food pesticide residue safety detection and analysis method according to claim 1, characterized in that: The mass spectrum numerical data includes ion intensity data, peak shape parameters, ion current curve shape characteristics and retention time.
3. The food pesticide residue safety detection and analysis method according to claim 2, characterized in that: The correction includes environmental factor correction and baseline drift correction; The environmental factor correction includes temperature correction and humidity correction, and the environmental correction response value is calculated according to the actual temperature and the actual humidity; Then, the final value of baseline correction is calculated based on the environmental correction response value; The ion intensity data and peak shape parameters are corrected using the baseline corrected final value.
4. The food pesticide residue safety detection and analysis method according to claim 3, characterized in that: The correction formula for the environmental factor correction is: Rt=Rm·(1+kT·(Ta-Tr)); Rh=Rt·(1+kH·(Ha-Hr)); Among them, kT and kH represent the temperature and humidity correction coefficients respectively; Ta and Ha represent the actual temperature and actual humidity respectively; Tr and Hr represent the standard temperature and standard humidity respectively; Rt and Rh represent the temperature correction value and the environmental correction response value respectively; The baseline drift correction formula is: Rbase=Rh-Bd; Where N is the size of the moving average window; Rh is the environmental correction response value; and Rbase is the final value of the baseline correction.
5. The food pesticide residue safety detection and analysis method according to claim 4, characterized in that: When the ion intensity data is corrected using the baseline correction final value, it includes: Ic(t)=Ir(t)-Rbase(t); Where Ic(t) represents the ion intensity after baseline correction; Ir(t) represents the original ion intensity data.
6. The food pesticide residue safety detection and analysis method according to claim 5, characterized in that: When the peak shape parameter is corrected using the final value of the baseline correction, it includes: The peak shape parameters include peak area, peak height and peak width; Hc=Hr-Rbase(tpeak); Wc=t(Hc / 2,left)-t(Hc / 2,right); tleft=t(Hc / 2,left); tright=t(Hc / 2,right); Wherein, Ac represents the peak area after baseline correction; Ic(t) represents the ion intensity after baseline correction; tpeak represents the time point when the peak height appears; Hc represents the peak height after baseline correction; Hr represents the maximum ion intensity value of the peak; tleft and tright represent the left and right time points when the peak height is half the height after baseline correction, respectively; Wc represents the peak width after baseline correction.
7. The food pesticide residue safety detection and analysis method according to claim 6, characterized in that: The shape characteristics of the ion current curve are extracted based on the corrected ion intensity, including the calculation of the curve symmetry coefficient and the curve slope ratio: Where S represents the curve symmetry coefficient; Rslope represents the curve slope ratio; slopea and slopeb represent the average slopes of the ascending segment and the descending segment, respectively.
8. The food pesticide residue safety detection and analysis method according to claim 1, characterized in that: The correction also includes a standardization process. The formula for the standardization process is: Among them, X represents the corrected data; μ and σ represent the mean and standard deviation of the corresponding data respectively; Xnor represents the data after standardization.
9. The food pesticide residue safety detection and analysis method according to claim 1, characterized in that: Establishing a machine learning model based on the corrected data, wherein the machine learning model, when used to identify and classify pesticide residue components in the food sample to be tested, also includes feature selection; The feature selection adopts a recursive feature elimination method to screen the feature that contributes most to the model performance from the peak area, peak height, peak width, curve symmetry coefficient and curve slope ratio.
10. The food pesticide residue safety detection and analysis method according to claim 1, characterized in that: The pre-treatment includes washing, crushing, homogenizing, extracting, concentrating and filtering.
Citation Information
Patent Citations
System and method for automatically identifying seven types of mass spectrograms of world common pesticides and chemical pollutants based on cloud platform
CN110110743A
Mass spectrum detection system and method with rapid extraction function for pesticide residue detection
CN112924523A
Crop pesticide residue detection method and system based on convolutional neural network
CN116884512A
Automatic pesticide residue detection system for food safety
CN118243827A
Cloud mass spectrum real-time early warning system and method based on remote online intelligent analysis
CN118408992A
Cited By
Mancozeb residue intelligent detection and analysis method and system
CN119804356A
Gas component detection method and device based on circulation analysis
CN120009443A
Method, system and terminal for detecting components of hair care product
CN120932766A