A method, device, equipment and medium for monitoring pesticide residues in agricultural products

By using surface-enhanced Raman spectroscopy to perform laser scanning and photoelectric conversion on agricultural products, combined with noise filtering and database matching identification, the complexity and noise interference problems of existing detection methods are solved, enabling rapid, non-destructive, and accurate detection and graded management of pesticide residues.

CN121215079BActive Publication Date: 2026-03-03SICHUAN NIANFENG BIOTECHNOLOGY CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511755731.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-03-03
Estimated Expiration
2045-11-27

AI Technical Summary

Technical Problem

Existing pesticide residue detection methods suffer from long detection cycles, complex operations, the need for professional technicians, and the destructive nature of samples, making it difficult to meet the needs of rapid on-site screening and large-scale monitoring. Furthermore, Raman spectroscopy detection methods are severely affected by spectral background drift and noise interference in complex matrices, which affects the accurate extraction of characteristic peaks.

Method used

Surface-enhanced Raman spectroscopy is used to scan the surface of agricultural product samples with laser irradiation to obtain Raman scattered light signals and perform photoelectric conversion. The baseline correction spectrum is obtained through noise filtering and background subtraction, characteristic spectral peaks are identified, and pesticide type identification and quantitative regression calculation are performed in combination with Raman spectral database to determine the residue level and trigger graded disposal decisions.

Benefits of technology

It enables rapid, non-destructive, and accurate pesticide residue detection, improves the accuracy of pesticide variety identification and concentration prediction, and supports the graded management of agricultural products.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121215079B_ABST
    Figure CN121215079B_ABST
Patent Text Reader

Abstract

This invention relates to a method, apparatus, equipment, and medium for monitoring pesticide residues in agricultural products, belonging to the field of pesticide residue monitoring technology for agricultural products. The method includes the following steps: laser scanning of the surface of an agricultural product sample to obtain Raman scattered light signals, which are then converted into spectral electrical signals via photoelectric conversion; noise filtering and background subtraction are performed on the signal to obtain a baseline-corrected spectrum, and labeled peaks are identified to form a set of characteristic peaks; based on matching this set with a Raman spectral database, pesticide type identifiers are determined, and quantitative regression calculations are performed to obtain a predicted concentration value; the predicted concentration value is compared with standard limits, and through dynamic threshold calculation, category correction, and risk calibration, a residue level label is generated, triggering a corresponding graded disposal decision mechanism. This invention solves the technical problems still faced by existing methods, such as the complex composition of agricultural product surfaces and severe matrix interference leading to significant spectral background drift and noise interference, affecting the accurate extraction of characteristic peaks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of pesticide residue detection technology for agricultural products, and in particular to a method, device, equipment and medium for monitoring pesticide residues in agricultural products. Background Technology

[0002] With the widespread use of pesticides in modern agricultural production, pesticide residues in agricultural products have increasingly become a focus of public concern, directly impacting food safety and human health. Traditional pesticide residue detection methods, such as gas chromatography-mass spectrometry (GC-MS) and liquid chromatography-mass spectrometry (LC-MS), while possessing high detection accuracy and reliability, generally suffer from limitations such as long detection cycles, complex operations, the need for specialized technical personnel, and destructive nature towards samples, making them unsuitable for meeting the practical needs of rapid on-site screening and large-scale monitoring. Therefore, developing a rapid, non-destructive, and efficient pesticide residue detection technology has become a key technological bottleneck that urgently needs to be overcome in the field of food safety supervision.

[0003] In recent years, surface-enhanced Raman spectroscopy (SERS) has been increasingly applied to the detection of pesticide residues in agricultural products due to its advantages such as high sensitivity, strong fingerprint recognition, simple sample pretreatment, and non-destructive testing capabilities. This technology achieves qualitative and quantitative identification of target analytes by analyzing the unique vibrational modes of molecules, and possesses a certain resolution capability in complex matrices. However, existing Raman spectroscopy-based detection methods still face many challenges in practical applications. For example, the complex surface composition of agricultural products and severe matrix interference lead to significant spectral background drift and noise interference, affecting the accurate extraction of characteristic peaks. Furthermore, the lack of standardized spectral databases and intelligent spectral analysis algorithms results in poor repeatability and comparability of detection results. Summary of the Invention

[0004] The purpose of this invention is to at least partially solve one of the technical problems existing in the prior art.

[0005] To achieve the above objectives, the present invention provides a method for monitoring pesticide residues in agricultural products, comprising the following steps:

[0006] The surface of an agricultural product sample is scanned by laser irradiation to obtain Raman scattered light signals, and the Raman scattered light signals are then processed by photoelectric conversion to obtain spectral electrical signals;

[0007] The spectral signal is subjected to noise filtering and background subtraction to obtain a baseline-corrected spectrum, and spectral peaks are identified and labeled based on the baseline-corrected spectrum to obtain a set of characteristic spectral peaks;

[0008] Based on the set of characteristic spectral peaks, the agricultural product samples are matched and identified using Raman spectroscopy database to obtain pesticide type identifiers. Quantitative regression calculations are then performed based on these pesticide type identifiers to obtain predicted concentration values.

[0009] Based on the concentration prediction value, the agricultural product sample is judged for residue compliance, a residue level label is obtained, and a preset graded disposal decision mechanism is triggered based on the residue level label.

[0010] Furthermore, the surface of the agricultural product sample is scanned by laser irradiation to obtain Raman scattered light signals, and the Raman scattered light signals are then processed by photoelectric conversion to obtain spectral electrical signals, including:

[0011] The surface of the agricultural product sample is divided into multiple regions to obtain several scanning sub-regions. Based on the scanning sub-regions, the agricultural product sample is sequentially irradiated with laser focusing by a Raman spectroscopy acquisition device to obtain the initial scattered light corresponding to each scanning sub-region.

[0012] The initial scattered light is wavelength-selected to obtain band-scattered light, and the band-scattered light is superimposed and integrated to obtain Raman scattered light signal;

[0013] The Raman scattered light signal is photoelectrically converted to obtain electrical signal data, and the electrical signal data is then converted from analog to digital to obtain a spectral electrical signal.

[0014] Furthermore, based on the baseline-corrected spectrum, peak identification and labeling are performed to obtain a set of characteristic peaks, including:

[0015] The first derivative of the baseline-corrected spectrum is calculated to obtain the spectral slope curve, and the zero point of the spectral slope curve is detected to obtain the wavenumber crossover set.

[0016] Peak shape screening is performed on the wavenumber crossover point set to obtain peak candidate points, and second derivative verification is performed based on the peak candidate points to obtain a peak and valley position table;

[0017] Based on the peak and valley position table, the baseline correction spectrum is divided into intervals to obtain peak shape interval groups, and the peak height of the peak shape interval groups is calculated to obtain the peak intensity sequence.

[0018] Based on the peak intensity sequence, the peak and valley position table is sorted by intensity to obtain the main peak location table, and the main peak location table is calibrated by wavenumber to obtain the characteristic spectral peak set.

[0019] Furthermore, based on the set of characteristic spectral peaks, the agricultural product samples are matched and identified using a Raman spectral database to obtain pesticide type identifiers, including:

[0020] Chemical bond vibrational attribution analysis is performed on the set of characteristic spectral peaks to obtain a molecular group mapping table, and structural combination correlation is performed on the molecular group mapping table to obtain functional group characteristic sequences;

[0021] Based on the functional group feature sequences, the Raman spectroscopy database of the agricultural product samples is searched to obtain a list of candidate molecules, and the spectral correlation of the candidate molecule list is calculated to obtain a matching degree distribution map.

[0022] Peak position deviation compensation is performed on the matching degree distribution map to obtain a corrected matching degree sequence, and similarity threshold screening is performed based on the corrected matching degree sequence to obtain the target molecular group;

[0023] Based on the target molecular group, the functional group feature sequence is verified to obtain a structure confirmation table. The structure confirmation table is then classified into pesticide categories to obtain pesticide type identifiers.

[0024] Furthermore, based on the target molecular set, the functional group feature sequences are verified using molecular skeleton verification to obtain a structure confirmation table, including:

[0025] The target molecular group is subjected to molecular topology analysis to obtain the bond connection matrix, and the bond connection matrix is ​​subjected to ring structure detection to obtain ring system characteristic parameters;

[0026] Based on the ring system characteristic parameters, functional group occupancy matching is performed on the functional group characteristic sequence to obtain a group docking site set, and bond energy compatibility is verified on the group docking site set to obtain a bond stability coefficient table.

[0027] Based on the bonding stability coefficient table, the molecular skeleton assembly of the ring system characteristic parameters is verified to obtain the skeleton matching degree matrix, and the topological consistency of the skeleton matching degree matrix is ​​verified to obtain the structure confirmation table.

[0028] Furthermore, based on the pesticide type identifier, quantitative regression calculations are performed to obtain the concentration prediction value, including:

[0029] Based on the pesticide type identifier, the wavenumber range of the corresponding pesticide characteristic peak is retrieved from the preset pesticide Raman feature library, and the wavenumber range of the characteristic peak is matched and filtered with the characteristic spectrum peak set to obtain a quantitative feature peak subset;

[0030] The peak area of ​​the subset of quantitative characteristic peaks is integrated to obtain the integrated area value of each characteristic peak, and the integrated area value is corrected by the agricultural product matrix interference coefficient to obtain the corrected integrated area.

[0031] Linear regression analysis is performed based on the corrected integral area and the preset pesticide concentration gradient standard curve to obtain a preliminary concentration calculation value. Then, spectral response sensitivity compensation is performed on the preliminary concentration calculation value to obtain a compensated concentration value.

[0032] The compensated concentration value is subjected to multi-characteristic peak consistency verification to obtain the concentration verification deviation value. Based on the concentration verification deviation value, the compensated concentration value is weighted and averaged to obtain the concentration prediction value.

[0033] Furthermore, based on the predicted concentration values, the residue compliance of the agricultural product samples is determined to obtain residue level labels, including:

[0034] Based on the pesticide type identifier, a preset classification residue threshold table is retrieved, and the classification residue threshold table is matched with the type of agricultural product sample to obtain a matching threshold map.

[0035] The predicted concentration value is compared with the grading threshold in the adaptation threshold map to obtain a threshold comparison table. Based on the threshold comparison table, the agricultural product samples are graded to obtain the residue grade label.

[0036] The present invention also provides a pesticide residue monitoring device for agricultural products, comprising:

[0037] The scanning module is used to perform laser irradiation scanning on the surface of agricultural product samples to obtain Raman scattered light signals, and to perform photoelectric conversion processing on the Raman scattered light signals to obtain spectral electrical signals;

[0038] The subtraction module is used to perform noise filtering and background subtraction on the spectral electrical signal to obtain a baseline-corrected spectrum, and to perform peak identification and labeling based on the baseline-corrected spectrum to obtain a set of characteristic peaks;

[0039] The identification module is used to perform Raman spectral database matching and identification of the agricultural product sample based on the set of characteristic spectral peaks to obtain the pesticide type identifier, and to perform quantitative regression calculation based on the pesticide type identifier to obtain the concentration prediction value;

[0040] The determination module is used to determine the residue compliance of the agricultural product sample based on the concentration prediction value, obtain the residue level label, and trigger a preset graded disposal decision mechanism based on the residue level label.

[0041] This invention provides a method for monitoring pesticide residues in agricultural products, comprising the following steps: laser irradiation scanning of the surface of an agricultural product sample to obtain a Raman scattered light signal; photoelectric conversion processing of the Raman scattered light signal to obtain a spectral electrical signal; noise filtering and background subtraction of the spectral electrical signal to obtain a baseline-corrected spectrum; peak identification and labeling based on the baseline-corrected spectrum to obtain a set of characteristic peaks; Raman spectral database matching and identification of the agricultural product sample based on the set of characteristic peaks to obtain a pesticide type identifier; quantitative regression calculation based on the pesticide type identifier to obtain a concentration prediction value; and concentration prediction... The method assesses the residue compliance of agricultural product samples, obtains residue level labels, and triggers a preset graded disposal decision mechanism based on these labels. This addresses the challenges faced by existing methods, such as the complex surface composition of agricultural products, severe matrix interference leading to spectral background drift and significant noise interference, which affect the accurate extraction of characteristic peaks. The method achieves accurate pesticide type identification by matching characteristic peak sets with Raman spectral databases, and utilizes known category information for targeted quantitative regression calculations. This avoids errors caused by non-specific modeling and significantly improves the accuracy of pesticide variety identification and concentration prediction. Attached Figure Description

[0042] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0043] Figure 1 This is a schematic diagram of the steps of a method for monitoring pesticide residues in agricultural products according to an embodiment of the present invention;

[0044] Figure 2 This is a schematic diagram of the steps of a pesticide residue monitoring device for agricultural products in one embodiment of the present invention;

[0045] Figure 3 This is a schematic block diagram of the structure of a computer device according to an embodiment of the present invention.

[0046] The objectives, features, and advantages of this invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0047] The embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention. The step numbers in the following embodiments are set only for ease of explanation, and there is no limitation on the order between the steps. The execution order of each step in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.

[0048] The following describes in detail, with reference to the accompanying drawings, a method for monitoring pesticide residues in agricultural products according to an embodiment of the present invention. First, the method for monitoring pesticide residues in agricultural products according to an embodiment of the present invention will be described in detail with reference to the accompanying drawings.

[0049] Figure 1 This invention provides a method for monitoring pesticide residues in agricultural products, comprising the following steps:

[0050] Step S1: The surface of the agricultural product sample is scanned by laser irradiation to obtain Raman scattered light signal, and the Raman scattered light signal is processed by photoelectric conversion to obtain spectral electrical signal.

[0051] Specifically, laser irradiation scanning of agricultural product samples involves placing the agricultural product under test within the irradiation range of a laser source. The wavelength and power of the laser beam are adjusted to suit the optical characteristics of different agricultural product surfaces, allowing the laser beam to scan the sample surface point-by-point or in an array. This excites pesticide molecules present on the sample surface to produce Raman scattering, thereby obtaining Raman scattered light signals carrying molecular vibrational information. The generated Raman scattered light signals are then fed into a detector in a spectrometer via an optical collection system. The detector's internal photoelectric conversion element performs photoelectric conversion processing on the Raman scattered light signals, converting the light signal intensity into a corresponding current or voltage signal, thus forming a spectral electrical signal that can be recorded and processed by a data acquisition system. Throughout this process, the stability of the laser irradiation, the scanning... The uniformity of the scanning path and the linear response of the photoelectric conversion must be consistent to ensure that the acquired spectral electrical signal has good repeatability and signal-to-noise ratio. For example, when monitoring pesticide residues in a batch of freshly picked apples, the apples are fixed on the detection platform, and the laser scanning system is activated to scan the apple skin in a circular trajectory with a 785nm wavelength laser, collecting the Raman light signal scattered from the surface. The Raman light signal is then converted into a photoelectric signal by a CCD detector, and the corresponding spectral electrical signal is output for subsequent noise filtering and background subtraction. This process is not only applicable to apples, but can also be applied to the detection of the surface of common fruits and vegetables such as tomatoes and cucumbers, ensuring that the surface molecular information is effectively obtained without damaging the appearance of agricultural products, providing raw data support for subsequent baseline correction and characteristic peak identification.

[0052] Step S2: Perform noise filtering and background subtraction on the spectral electrical signal to obtain a baseline-corrected spectrum, and perform peak identification and labeling based on the baseline-corrected spectrum to obtain a set of characteristic peaks.

[0053] Specifically, noise filtering of the spectral electrical signal involves inputting the acquired spectral electrical signal into a digital signal processing module. A moving average filter or wavelet transform algorithm is used to smooth the random noise and high-frequency interference components in the signal point by point, making the signal curve more continuous and stable while preserving the morphological characteristics of the original spectral peaks. Subsequently, background subtraction is performed. A polynomial fitting or iterative adaptive background correction algorithm is used to model and subtract the slow drift caused by fluorescence background or substrate scattering in the noise-filtered spectral data. This eliminates the interference of pigments, wax layers, and other components of the agricultural product's surface on the Raman signal, resulting in a baseline-corrected spectrum that is flatter and truly reflects the vibrational information of pesticide molecules. Based on the baseline-corrected spectrum, peak identification and labeling are performed. By setting a signal-to-noise ratio threshold and a full width at half maximum (FWHM), and combining the second derivative method or Gaussian fitting algorithm, significant local maxima in the spectrum are detected. Peaks that meet the conditions and their corresponding wavenumber and intensity information are marked, and spurious peaks caused by residual noise or baseline fluctuations are eliminated. Finally, a set of characteristic peaks with clear physical meaning is formed. For example, when processing the spectral electrical signal obtained from apple surface detection, wavelet denoising is first used to eliminate random fluctuations introduced by the electronic detector. Then, fifth-order polynomial fitting is used to subtract the wide background caused by fruit wax and chlorophyll to obtain a clear baseline-corrected spectrum. Subsequently, three significant peaks located at 1003 cm⁻¹, 1077 cm⁻¹, and 1590 cm⁻¹ are identified in this spectrum and labeled as a set of characteristic peaks for subsequent matching and identification with standard peaks of common pesticides such as benomyl in the Raman spectroscopy database, ensuring the accuracy and repeatability of the analysis process.

[0054] Step S3: Based on the set of characteristic spectral peaks, the agricultural product sample is matched and identified using a Raman spectral database to obtain a pesticide type identifier. Based on the pesticide type identifier, quantitative regression calculation is performed to obtain a concentration prediction value.

[0055] Specifically, the Raman spectral database matching and identification of the agricultural product sample based on the characteristic peak set involves comparing the peak position, relative intensity, and peak shape parameters obtained in the previous steps with the pre-stored standard spectral information of various pesticides in the Raman spectral database. Correlation coefficient matching, spectral library search algorithms, or Euclidean distance calculation methods are used to assess the similarity between the spectrum of the sample and the reference spectra of each pesticide in the database. When the matching degree exceeds a preset threshold, it is determined that the agricultural product sample contains the corresponding pesticide component, and the corresponding pesticide type identifier is output. Subsequently, quantitative regression calculation is performed based on the pesticide type identifier. A pre-established quantitative calibration model corresponding to the pesticide type identifier is called. This model consists of the functional relationship between the Raman characteristic peak intensity and concentration of the pesticide at different known concentrations, usually expressed by a linear or nonlinear regression equation. The intensity of the corresponding characteristic peak in the current sample is substituted into the regression equation to calculate the predicted concentration of the pesticide in the sample. For example, in the detection process of apple surface, 1003 cm⁻¹, 1077 cm⁻¹, and 1590 cm⁻¹ are identified. After collecting the characteristic spectral peaks at 1003 cm⁻¹, they were matched with the standard Raman spectrum of benomyl in the database. It was found that the peak position deviation of the three was less than ±2 cm⁻¹ and the correlation coefficient was greater than 0.98, thus confirming that the pesticide type was benomyl. Then, the quantitative regression model of benomyl was called, and the peak intensity at 1003 cm⁻¹ was substituted into its corresponding linear regression equation y = 0.45x + 12 (where y is the peak intensity and x is the concentration). The predicted concentration value was 8.6 mg / kg, completing the continuous analysis process from qualitative identification to quantitative prediction.

[0056] Step S4: Based on the concentration prediction value, the agricultural product sample is judged for residue compliance to obtain a residue level label, and a preset graded disposal decision mechanism is triggered based on the residue level label to achieve graded management of agricultural product samples.

[0057] Specifically, the residue compliance of the agricultural product samples is determined based on the predicted concentration values ​​to obtain residue level labels. A preset graded disposal decision mechanism is then triggered based on these residue level labels to achieve graded management of the agricultural product samples. First, the predicted concentration values ​​are matched to a threshold. Then, based on the currently identified pesticide type, the maximum residue limit (MRL) for that pesticide in the corresponding agricultural product is obtained from the national standard limit database. For example, the MRL for benomyl in apples is 5. mg / kg; then the predicted concentration value is directly compared with the limit value. If the predicted concentration value is less than or equal to the limit value, the sample is determined to meet safety requirements and a "qualified" residue level label is generated. If the predicted concentration value is greater than the limit value, it is determined to exceed the legal limit and a "unqualified" residue level label is generated. Next, a preset graded disposal decision mechanism is triggered based on the residue level label. When the residue level label is "qualified," the system automatically generates a test pass report and allows the batch of apples to enter the circulation process. When the residue level label is "unqualified," the system immediately activates an early warning response, sends an alarm message to the regulatory platform, identifies the source batch and sales path of the sample, prompts a suspension of sales, and automatically pushes the data to the re-inspection process or enforcement stage. For example, when testing a batch of commercially available apples, the predicted concentration of benomyl on its surface was measured to be 8.7 mg / kg, higher than 5 mg / kg. The system determines the batch of products to be "unqualified" based on the national standard limit of mg / kg, generates a corresponding residue level mark, and triggers a preset disposal mechanism to automatically notify market supervision personnel to remove the batch of products from shelves and seal them, thus achieving rapid, accurate, and closed-loop quality and safety management of agricultural products with qualified and unqualified as the core.

[0058] In a specific embodiment, the surface of an agricultural product sample is scanned by laser irradiation to obtain a Raman scattered light signal, and the Raman scattered light signal is then subjected to photoelectric conversion processing to obtain a spectral electrical signal, including:

[0059] The surface of the agricultural product sample is divided into multiple regions to obtain several scanning sub-regions. Based on the scanning sub-regions, the agricultural product sample is sequentially irradiated with laser focusing by a Raman spectroscopy acquisition device to obtain the initial scattered light corresponding to each scanning sub-region.

[0060] The initial scattered light is wavelength-selected to obtain band-scattered light, and the band-scattered light is superimposed and integrated to obtain Raman scattered light signal;

[0061] The Raman scattered light signal is photoelectrically converted to obtain electrical signal data, and the electrical signal data is then converted from analog to digital to obtain a spectral electrical signal.

[0062] Specifically, the surface of an agricultural product sample is scanned by laser irradiation to obtain Raman scattered light signals. These Raman scattered light signals are then photoelectrically converted to obtain spectral electrical signals. First, the surface of the agricultural product sample is divided into multiple regions. The entire epidermal area of ​​the product to be tested is geometrically divided into several scanning sub-regions with clear spatial coordinates to ensure that the laser can cover the entire surface area where pesticide residues may remain, avoiding missed detections due to localized areas. For example, when testing an apple, it is approximated as a sphere and divided into nine equal-area scanning sub-regions (3×3) along the equator and meridians. Each sub-region corresponds to a detection point. Subsequently, based on these scanning sub-regions, the agricultural product sample is sequentially irradiated by laser focusing using a Raman spectroscopy acquisition device. This Raman spectroscopy acquisition device includes a tunable laser, an automatic displacement platform, or a galvanometer scanning system. The system controls the laser beam to focus sequentially on the center position of each scanning sub-region according to a preset scanning sequence, allowing the laser to remain in each sub-region for a certain period of time (e.g., 0.5 seconds).(5 seconds) to excite the molecules in the local region to produce Raman scattering, thereby obtaining the initial scattered light corresponding to each scanning sub-region. This initial scattered light includes Rayleigh scattering light from the laser source, Raman scattering light from the target pesticide molecules, and ambient stray light and sample autofluorescence background. Then, the initial scattered light is wavelength-selected using optical filtering components, such as edge filters, notch filters, or grating beam splitting systems, to filter out strong Rayleigh scattering components that are the same as or similar to the laser wavelength (e.g., light within ±100 cm⁻¹ corresponding to a 785 nm laser), retaining only the light signal that deviates from the laser wavelength by a certain Raman shift range, for example, retaining 100–1800 nm. The scattered light in the band corresponding to cm⁻¹ mainly contains the characteristic vibrational information of pesticide molecules, with significantly reduced interference components. Subsequently, the scattered light in this band is superimposed and integrated. The scattered light from nine scanning sub-regions of the same agricultural product sample is physically converged using an optical fiber bundle or optical combiner, or the spectral data of each region are weighted and averaged or accumulated in the digital domain to improve the overall signal intensity and signal-to-noise ratio, thereby obtaining a more stable and representative Raman scattered light signal. After obtaining the Raman scattered light signal, it is photoelectrically converted using a photodetector (such as a silicon-based CCD or photodiode array) to convert the light signal. To obtain a continuous analog electrical signal proportional to the light intensity, electrical signal data is obtained, reflecting the relationship between the intensity distribution of Raman scattered light and the wavenumber. Finally, the electrical signal data undergoes analog-to-digital conversion. A high-speed analog-to-digital converter (ADC) discretizes the analog electrical signal into a digital signal at a fixed sampling frequency (e.g., 1 million times per second), forming a sequence of discrete data points composed of wavenumber and corresponding intensity values. This yields a spectral electrical signal that can be used for subsequent processing. For example, when testing a batch of commercially available apples, the system automatically divides the skin into nine scanning sub-regions. A laser is sequentially focused on each region to collect initial scattered light. After removing the Rayleigh peak using a 785 nm notch filter, the scattered light is extracted. The signals from the nine regions are then weighted and superimposed to enhance weak pesticide signals. Subsequently, a CCD detector completes photoelectric conversion to output analog electrical signal data, which is then sampled by a 16-bit ADC and converted into a digital spectral electrical signal, ensuring signal integrity and repeatability. This provides high-quality raw data support for subsequent noise filtering and background subtraction.

[0063] In a specific embodiment, peak identification and labeling are performed based on the baseline-corrected spectrum to obtain a set of characteristic peaks, including:

[0064] The first derivative of the baseline-corrected spectrum is calculated to obtain the spectral slope curve, and the zero point of the spectral slope curve is detected to obtain the wavenumber crossover set.

[0065] Peak shape screening is performed on the wavenumber crossover point set to obtain peak candidate points, and second derivative verification is performed based on the peak candidate points to obtain a peak and valley position table;

[0066] Based on the peak and valley position table, the baseline correction spectrum is divided into intervals to obtain peak shape interval groups, and the peak height of the peak shape interval groups is calculated to obtain the peak intensity sequence.

[0067] Based on the peak intensity sequence, the peak and valley position table is sorted by intensity to obtain the main peak location table, and the main peak location table is calibrated by wavenumber to obtain the characteristic spectral peak set.

[0068] Specifically, based on the baseline-corrected spectrum, spectral peaks are identified and labeled to obtain a set of characteristic peaks. First, the first derivative of the baseline-corrected spectrum is calculated. A numerical differential algorithm is used to determine the rate of change of the wavenumber-intensity relationship between spectral data points, resulting in a spectral slope curve reflecting the local slope change trend of the spectral curve. This spectral slope curve exhibits a positive value in the rising segment of the original spectrum, a negative value in the falling segment, and a zero slope at the peak apex. Subsequently, zero-crossing points are detected on the spectral slope curve by traversing the data points on the curve to identify the positions where the value changes from positive to negative or vice versa. These zero-crossing points correspond to potential maxima or minima in the original baseline-corrected spectrum, thus yielding a set of candidate wavenumber crossover points. Next, peak shape screening is performed on this set of wavenumber crossover points. Using preset half-width at half-maximum (FWHM), minimum peak height thresholds, and adjacent peak spacing constraints, spurious peaks caused by noise fluctuations or baseline residual undulations are eliminated, retaining only points that conform to typical Raman peak morphology characteristics, resulting in more reliable peak candidate points. Then, second derivative verification is performed based on these peak candidate points. By calculating the second derivative on the baseline-corrected spectrum, a second derivative curve reflecting curvature changes is obtained, where the negative... The peak corresponds to the apex of the original spectrum, and the positive peak corresponds to the trough. On the second derivative curve, significant negative peaks adjacent to the candidate peaks and the positive peaks on either side are located, forming a peak-trough position table containing the coordinates of the apex and the surrounding peaks and valleys, to confirm the complete contour structure of each candidate peak. Subsequently, based on the peak-trough position table, the baseline correction spectrum is divided into intervals. Using each peak-trough position as a boundary, the entire spectrum is divided into several independent peak-shaped interval groups, each interval corresponding to a potential Raman characteristic peak and its adjacent background region. Then, the peak height of each peak-shaped interval group is calculated by subtracting the maximum intensity value within the interval from the peak height of the two peaks and valleys. The average intensity of the valley values ​​is used to obtain the net peak height intensity of each peak, forming a peak intensity sequence arranged in wavenumber order. Based on this, the peak-valley location table is sorted by intensity according to the peak intensity sequence. All confirmed peaks are arranged from largest to smallest according to their peak height intensity. Several peaks with the highest intensity ranking and meeting the minimum signal-to-noise ratio requirement are selected as the main signal peaks to generate a main peak location table. This table includes the center wavenumber, peak height, half-width at half-maximum, and peak-valley coordinates of each main peak. Finally, the main peak location table is calibrated by wavenumber, and the center wavenumber of each main peak is compared with the wavelength standard spectrum pre-calibrated by the instrument (such as neon lamp or silicon peak 959).The wavenumber is compared and corrected using a method involving 8 cm⁻¹ to eliminate wavenumber deviation caused by system drift, ensuring that the wavenumber accuracy is controlled within ±1 cm⁻¹. The final output is a set of characteristic spectral peaks with precisely labeled center wavenumber, intensity, and morphological parameters. For example, when processing the baseline-corrected spectrum obtained from apple surface detection, the first derivative is first calculated, and 15 wavenumber crossover points are detected. After peak shape screening, 8 candidate peak points are retained. Then, the second derivative is used to verify and confirm that 6 of them have clear peak-valley structures, forming a peak-valley position table. Based on this, the spectrum is divided into 6 peak shape interval groups, and the net peak height intensity of each peak is calculated to obtain the peak intensity sequence. After sorting by intensity, the top 4 strongest peaks are selected into the main peak positioning table, which are 1003 cm⁻¹, 1077 cm⁻¹, 1590 cm⁻¹, and 1620 cm⁻¹. The wavenumber axis was then calibrated using the silicon standard peak to correct instrument drift, resulting in a precise set of characteristic peaks. These peaks were then used for matching and identification with standard peaks of pesticides such as benomyl in the Raman spectroscopy database, ensuring the accuracy and repeatability of the qualitative analysis.

[0069] In a specific embodiment, the agricultural product sample is matched and identified using a Raman spectral database based on the set of characteristic spectral peaks to obtain a pesticide type identifier, including:

[0070] Chemical bond vibrational attribution analysis is performed on the set of characteristic spectral peaks to obtain a molecular group mapping table, and structural combination correlation is performed on the molecular group mapping table to obtain functional group characteristic sequences;

[0071] Based on the functional group feature sequences, the Raman spectroscopy database of the agricultural product samples is searched to obtain a list of candidate molecules, and the spectral correlation of the candidate molecule list is calculated to obtain a matching degree distribution map.

[0072] Peak position deviation compensation is performed on the matching degree distribution map to obtain a corrected matching degree sequence, and similarity threshold screening is performed based on the corrected matching degree sequence to obtain the target molecular group;

[0073] Based on the target molecular group, the functional group feature sequence is verified to obtain a structure confirmation table. The structure confirmation table is then classified into pesticide categories to obtain pesticide type identifiers.

[0074] Specifically, based on the set of characteristic peaks, Raman spectroscopy database matching and identification are performed on the agricultural product samples to obtain pesticide type identifiers. First, chemical bond vibrational attribution analysis is performed on the set of characteristic peaks. Using a known Raman spectral fingerprint region database and molecular vibrational mode comparison table, the central wavenumber of each characteristic peak is compared with the vibrational frequency of typical chemical bonds or functional groups. For example, the peak at 1003 cm⁻¹ is assigned to the symmetric breathing vibration of the benzene ring, the peak at 1077 cm⁻¹ is assigned to the CN stretching vibration, and the peak at 1590 cm⁻¹ is assigned to the CN stretching vibration. The peaks at cm⁻¹ are attributed to skeletal vibrations of the benzene ring, thus determining the intramolecular chemical bond vibration modes corresponding to each characteristic peak, forming a molecular group mapping table containing wavenumber, vibration type, and associated group information. Next, the molecular group mapping table is structurally correlated. Based on common structural connection rules in organic chemistry and common skeletal features of pesticide molecules, the spatial relationships and chemical connection possibilities between each associated group are analyzed. For example, it is determined whether there is a conjugated structure between the benzene ring and the imidazole ring, whether there are carbamate groups or thioether bonds, etc. Through logical reasoning and structural template matching, possible combinations of molecular fragments are constructed, resulting in a set of chemically plausible functional group characteristic sequences. This sequence describes the possible multi-group cooperative existence mode of the analyte. Subsequently, based on the functional group characteristic sequences, the Raman spectroscopy database is used to search the molecular structure of the agricultural product sample. This Raman spectroscopy database stores hundreds of common agricultural products. During the retrieval process, the system prioritizes screening known pesticide molecules containing the same or similar functional group combinations. For example, when detecting signals on the surface of apples, if the functional group feature sequence contains benzene rings, imidazole rings, and carbamate groups, the system retrieves compounds with similar structures, such as benomyl and carbendazim, from the database as preliminary candidates, generating a candidate molecule list. Next, spectral correlation calculations are performed on the candidate molecule list. The peak positions and relative intensities in the feature spectral peak set are compared point-by-point with the standard Raman spectrum of each candidate molecule. The similarity between the two is calculated using the Pearson correlation coefficient or the cosine of the spectral angle, generating a set of values ​​reflecting the degree of matching between each candidate molecule and the measured spectrum, forming a matching degree distribution map. Subsequently, peak position deviation compensation is performed on the matching degree distribution map. Considering that slight peak position shifts may occur due to matrix effects or instrument drift in actual detection, the system introduces ±2 in the calculation. A tolerance window of cm⁻¹ is used to fine-tune the alignment of the standard peak positions for each candidate molecule, and the correlation is recalculated to obtain a corrected matching degree sequence, thereby eliminating misjudgments caused by systematic errors; then, a similarity threshold is used for screening based on the corrected matching degree sequence, and the matching degree threshold is set to 0.95. Only molecules with a calibration match higher than the threshold are retained to form a target molecule group. Based on this, the functional group feature sequences are verified using molecular skeleton verification. The known chemical structures of the target molecules are reverse-checked against the previously derived functional group feature sequences to confirm whether their core skeleton, substituent positions, and bonding methods are completely consistent. For example, it is confirmed whether the target molecule indeed contains a benzimidazole structure and that the substitution positions match, generating a structure confirmation table. Finally, the structure confirmation table is classified into pesticide categories. According to pesticide chemical classification standards, the confirmed molecular structures are mapped to the corresponding pesticide types, such as fungicides, insecticides, or herbicides, and the specific chemical names are output. For example, in processing apple surface detection data, the above process ultimately confirms the target molecule as benzimidazole. Its structure confirmation table shows that it contains a benzimidazole ring and a methyl carbamate group, which completely matches the functional group feature sequence. Therefore, it is classified as a benzimidazole fungicide, resulting in a pesticide type identifier of "benzyl," which is used for subsequent quantitative regression and compliance determination.

[0075] In a specific embodiment, molecular skeleton verification is performed on the functional group feature sequences based on the target molecular group to obtain a structure confirmation table, including:

[0076] The target molecular group is subjected to molecular topology analysis to obtain the bond connection matrix, and the bond connection matrix is ​​subjected to ring structure detection to obtain ring system characteristic parameters;

[0077] Based on the ring system characteristic parameters, functional group occupancy matching is performed on the functional group characteristic sequence to obtain a group docking site set, and bond energy compatibility is verified on the group docking site set to obtain a bond stability coefficient table.

[0078] Based on the bonding stability coefficient table, the molecular skeleton assembly of the ring system characteristic parameters is verified to obtain the skeleton matching degree matrix, and the topological consistency of the skeleton matching degree matrix is ​​verified to obtain the structure confirmation table.

[0079] Specifically, based on the target molecular group, the functional group feature sequence is verified to obtain a structure confirmation table. First, the molecular topology of the target molecular group is analyzed. Cheminformatics algorithms are used to read the SMILES or MOL format structure data of each target molecule, converting it into a graph structure representation composed of atomic nodes and chemical bond edges. This generates a bond connection matrix describing the connections between atoms. Each row and column of this matrix corresponds to one atom, and the matrix elements record the bond order (single, double, or triple bond) and bond type between atoms. Subsequently, the bond connection matrix is ​​looped. Structure detection employs ring search algorithms such as SSSR (Minimum Ring Set) or ring enumeration methods to identify all independent ring structures present in the molecule, including aromatic rings, saturated rings, or heterocycles. Information such as ring size, atom types within the ring, heteroatom positions, and conjugation characteristics is extracted to form a set of ring system characteristic parameters for characterizing the molecular core framework. For example, when processing target molecular groups obtained from apple surface detection, if a candidate contains benomyl, its bond connection matrix will show a six-membered benzene ring and a five-membered imidazole ring forming a fused ring structure by sharing two carbon atoms. The ring system characteristic parameters are recorded as "6-5 fused ring, containing N heteroatom". The system first identifies the functional group as having aromatic properties. Then, based on the ring system characteristic parameters, functional group occupancy matching is performed on the functional group characteristic sequence. The spatial positions of each group (such as benzene ring vibration, CN stretching, C=O stretching, etc.) in the functional group characteristic sequence derived from Raman peak assignment in the previous steps are compared with the ring system structure of the target molecule to determine whether each functional group exists at a known substitution site in the molecule. For example, in the standard structure of benomyl, the methyl carbamate group is attached to the N1 position of the imidazole ring. If the functional group characteristic sequence contains a –NH–COOCH3 related vibration peak, the system locates that it should be attached to that nitrogen atom. The sub-positions are used to generate a set of possible group docking sites; then the bond energy compatibility of the group docking site set is checked, and a molecular force field database (such as MMFF94 or UFF) is called to calculate the bond energy, angle strain and steric hindrance under each potential connection mode, and evaluate the thermodynamic stability of the functional group connected to a specific atom. For example, the energy difference between the –COOCH3 group connected to the N1 position and the C2 position of the imidazole ring is calculated. If the former has a low bonding energy and no significant steric hindrance, it is assigned a high stability coefficient, otherwise it is marked as unstable. Finally, a table of bond stability coefficients reflecting the stability of each docking configuration is output.Based on this, the molecular skeleton assembly verification of the ring system characteristic parameters is performed using the bonding stability coefficient table. Each functional group in the functional group characteristic sequence is virtually assembled according to docking sites with high stability coefficients to reconstruct a complete molecular skeleton that matches the measured spectral response. This skeleton is then geometrically and topologically compared with the standard skeleton of the target molecule. Consistency scores in ring structure, branch distribution, and functional group positions are calculated to form a skeleton matching degree matrix. Each row represents a target molecule, each column represents a structural matching index, and the matrix elements are numerical values ​​quantifying the degree of matching. Finally, the topological consistency of the skeleton matching degree matrix is ​​verified. The system employs a graph isomorphism algorithm to determine whether the reconstructed skeleton is completely consistent with the topological structure of the standard molecule, including atomic connection sequence, ring system arrangement, and stereochemical features. If the matching degree exceeds a preset threshold and the topological structure is completely consistent, the molecule is confirmed as a real residual component, and a structure confirmation table is generated. This table includes the molecule name, ring system composition, functional group positions, bond stability coefficient, and final verification results. For example, in the detection of a batch of apple samples, the system obtained target molecular groups containing benomyl and carbendazim through the aforementioned process. By performing topological analysis on both, it was found that only the bond connection matrix of benomyl matched the detected functional group feature sequence (1003). The 1077 cm⁻¹ benzene ring respiration, 1077 cm⁻¹ CN stretching, and 1590 cm⁻¹ skeletal vibration parameters (cm⁻¹ benzene ring respiration, 1077 cm⁻¹ CN stretching, and 1590 cm⁻¹ skeletal vibration) parameters were perfectly matched in terms of ring system characteristic parameters and group docking sites. Furthermore, the –NHCOOCH3 group exhibited the highest bonding stability coefficient at the N1 position. The skeletal matching matrix showed a total score of 0.98. Topological consistency verification confirmed a unique structural correspondence, leading to the generation of a structure confirmation table that clearly stated, "This sample contains benomyl molecules; structure verification passed." This provides a reliable basis for subsequent pesticide classification.

[0080] In a specific embodiment, functional group occupancy matching is performed on the functional group feature sequence based on the ring system feature parameters to obtain a set of group docking sites, including:

[0081] Structural pairing analysis is performed on the ring system characteristic parameters and the functional group characteristic sequence to obtain a functional group spatial requirement table, and bond accessibility is calculated on the functional group spatial requirement table to obtain the substituent position group.

[0082] Based on the substituent position set, the functional group feature sequence is expanded spatially to obtain a functional group conformation matrix, and the functional group conformation matrix is ​​projected onto the bond vector to obtain a group spatial orientation table.

[0083] The spatial orientation table of the groups is subjected to stereoconfiguration matching to obtain spatial coordination sequences, and bond energy complementarity calculations are performed on the spatial coordination sequences to obtain the group docking site set.

[0084] Specifically, based on the ring system characteristic parameters, functional group occupancy matching is performed on the functional group characteristic sequence to obtain a group docking site set. First, structural pairing analysis is performed on the ring system characteristic parameters and the functional group characteristic sequence. By analyzing the molecular core structure described by the ring system characteristic parameters obtained in the previous steps, such as the 6-5 fused ring system and its atomic numbering order in benzimidazole compounds, and combining the functional group types listed in the functional group characteristic sequence (such as –NHCOOCH3, –CH3, –Cl, etc.) and their corresponding vibrational modes, the volume, charge distribution, and connecting atom type of each functional group in three-dimensional space are analyzed to generate an anti-ring system. A functional group space requirement table reflecting its space occupancy characteristics is generated. This table records the minimum space required for each functional group to connect, the allowable bond angle range, and the minimum distance requirement from neighboring groups. Then, bond accessibility calculations are performed on the functional group space requirement table. Using molecular geometry modeling algorithms, all substituted hydrogen atom positions or empty valence bond sites are traversed on the ring structure of the target molecule to determine whether each functional group can be inserted into the position without causing excessive steric hindrance or bond angle distortion. For example, in benomyl, the N1 position of the imidazole ring is a nitrogen atom with a lone pair of electrons connected to a hydrogen atom, making it a substituted site. While the C2 position has hydrogen, it is surrounded by a benzene ring and side groups, making it an empty valence bond site. The space between the substituents was too crowded and did not meet the spatial requirements of the –NHCOOCH3 group, so they were excluded. Finally, a set of substituent positions that met the criteria was determined, including several candidate sites such as N1, C4, and C6. Next, based on the substituent position sets, the spatial configuration of the functional group characteristic sequence was expanded. A three-dimensional conformational simulation was performed on each functional group at each candidate substitution site, constructing a functional group conformational matrix containing atomic coordinates, bond lengths, bond angles, and dihedral angles. This matrix describes all possible spatial arrangements of the functional group at different connection positions. Subsequently, bond vector projection was performed on the functional group conformational matrix to calculate the direction vectors of the bonds connecting the functional groups and their surrounding environment. The relative spatial orientation of atoms is used to determine whether hydrogen bonds, π-π stacking, or spatial conflicts exist, generating a group spatial orientation table. This table records the extension direction of functional groups in each conformation, the angle with neighboring atoms, and whether they are oriented towards the solvent-accessible region. Then, stereoconfiguration matching is performed on the group spatial orientation table. The spatial orientation of each conformation is compared with the preferred orientations in known active conformations or standard molecule databases to screen out the configurations that conform to the common spatial arrangement rules of drug molecules, forming spatial coordination sequences. For example, when the –NHCOOCH3 group is connected at the N1 position, if it is oriented away from the benzene ring plane and consistent with the C=O stretching vibration direction, it is preferentially retained.Finally, bond energy complementarity calculations were performed on the spatial coordination sequences. A quantum chemical force field parameter library was used to calculate the total molecular energy for each candidate connection method, including bond stretching energy, angular bending energy, torsional energy, and van der Waals interactions, to assess its thermodynamic stability. If a connection method has the lowest energy and no significant strain, it is determined to be the optimal docking site. Finally, all connection schemes that meet the energy and spatial matching conditions are summarized to obtain the group docking site set. For example, when analyzing the characteristic spectral peak set obtained from apple surface detection, 1003 cm⁻¹ (benzene ring respiration), 1077 cm⁻¹ (CN stretching), and 1590 cm⁻¹ were identified. The functional group characteristic sequence composed of cm⁻¹ (C=O stretching) corresponds to the presence of the –NHCOOCH3 group. Combined with ring system characteristic parameters, it is confirmed to be a benzimidazole skeleton. The system generates a spatial requirement table for this group through structural pairing analysis. Bond accessibility calculations determine that the N1 position is the only feasible substitution site. Then, spatial configuration expansion is performed to obtain the functional group conformation matrix. After projection, it is confirmed that its C=O bond vector faces outward, consistent with the standard benomyl structure. Stereoconfiguration matching and bond energy complementarity calculations verify that it has the lowest connection energy. Finally, the output group docking site set is “N1 position connected to –NHCOOCH3”, providing precise structural constraints for subsequent molecular skeleton assembly.

[0085] In a specific embodiment, quantitative regression calculation is performed based on the pesticide type identifier to obtain the concentration prediction value, including:

[0086] Based on the pesticide type identifier, the wavenumber range of the corresponding pesticide characteristic peak is retrieved from the preset pesticide Raman feature library, and the wavenumber range of the characteristic peak is matched and filtered with the characteristic spectrum peak set to obtain a quantitative feature peak subset;

[0087] The peak area of ​​the subset of quantitative characteristic peaks is integrated to obtain the integrated area value of each characteristic peak, and the integrated area value is corrected by the agricultural product matrix interference coefficient to obtain the corrected integrated area.

[0088] Linear regression analysis is performed based on the corrected integral area and the preset pesticide concentration gradient standard curve to obtain a preliminary concentration calculation value. Then, spectral response sensitivity compensation is performed on the preliminary concentration calculation value to obtain a compensated concentration value.

[0089] The compensated concentration value is subjected to multi-characteristic peak consistency verification to obtain the concentration verification deviation value. Based on the concentration verification deviation value, the compensated concentration value is weighted and averaged to obtain the concentration prediction value.

[0090] Specifically, based on the pesticide type identifier, quantitative regression calculation is performed to obtain the concentration prediction value. First, based on the pesticide type identifier, the characteristic peak wavenumber range of the corresponding pesticide is retrieved from a preset pesticide Raman feature library. This pesticide Raman feature library stores the Raman spectra of various pesticides measured under standard conditions and the wavenumber range of their key characteristic peaks. For example, benomyl has strong and stable characteristic peaks in the ranges of 980–1020 cm⁻¹, 1060–1090 cm⁻¹, and 1570–1610 cm⁻¹. Based on the currently obtained pesticide type identifier "benomyl", the system automatically retrieves and extracts its corresponding characteristic peak wavenumber range. Then, the characteristic peak wavenumber range is matched and filtered with the characteristic spectral peak set obtained in the previous step. Each peak position in the characteristic spectral peak set is traversed to determine whether its center wavenumber falls within any characteristic peak wavenumber range. If the deviation is within ±3... If the peak is within the tolerance range of cm⁻¹, it is considered an effective peak for quantitative analysis. This allows for the selection of a subset of quantitative characteristic peaks highly correlated with the target pesticide. For example, when detecting the surface of an apple, if the characteristic spectral peak set contains 1003 cm⁻¹, 1077 cm⁻¹, and 1590 cm⁻¹, then the peak is considered valid for quantitative analysis. The three peaks at cm⁻¹ were found to fall within the wavenumber ranges of the three characteristic peaks of benomyl, and were therefore included in the quantitative characteristic peak subset. Next, peak area integration was performed on this subset using the trapezoidal integral method or Gaussian fitting. The region under the intensity curve of each characteristic peak within its wavenumber range was numerically integrated to obtain the integrated area value of each characteristic peak. This integrated area value reflects the molecular number density of the vibrational mode and is a fundamental parameter for quantitative analysis. Subsequently, the integrated area value was corrected for matrix interference coefficients. Considering that the wax layer, pigment components, and moisture of the apple peel can cause scattering enhancement or fluorescence interference to the Raman signal, the system invoked a pre-established matrix interference model. This model is based on statistical analysis of background signals from a large number of apple samples without pesticide addition. Corresponding correction coefficients were set for the degree of signal attenuation or enhancement in different wavenumber ranges. For example, the signal near 1000 cm⁻¹ is suppressed by causal wax fluorescence, and the correction coefficient was set to 1.15, while at 1600 cm⁻¹... At cm⁻¹, due to enhanced pigment resonance, the correction coefficient is 0.92. The integrated area of ​​each characteristic peak is multiplied by the matrix interference coefficient of the corresponding wavenumber interval to obtain the corrected integrated area, thereby eliminating the non-specific influence of the agricultural product's own components on the target peak intensity. Based on this, linear regression analysis is performed based on the corrected integrated area and the preset pesticide concentration gradient standard curve. This standard curve is plotted from the corrected integrated areas measured on a series of samples with known concentrations (e.g., 0.5, 1, 2, 5, 10 mg / kg) of benomyl prepared on a simulated apple surface matrix, showing a good linear relationship. The system substitutes the corrected integrated area of ​​each quantitative characteristic peak in the current sample into its corresponding standard curve equation (e.g., y1 = 0.45x1 + 12, where y1 is the area of ​​the correction integral and x1 is the concentration), to deduce the corresponding preliminary concentration calculation value; then, spectral response sensitivity compensation is performed on the preliminary concentration calculation value. Since different characteristic peaks have different sensitivities to concentration changes, for example, the 1003 cm⁻¹ peak has a large slope and high sensitivity, while the 1590 cm⁻¹ peak... The cm⁻¹ peak response is weak. The system assigns different weights to each peak based on the slope of the standard curve, weighting the initial concentration calculation to obtain a compensated concentration value, thus improving detection accuracy at low concentrations. Next, the compensated concentration value undergoes multi-peak consistency verification. The relative deviation between the compensated concentration values ​​derived from each characteristic peak is calculated. If the concentration value of a certain peak deviates from other peaks by more than 15%, it is marked as an abnormal response, possibly affected by local contamination or signal interference, generating a concentration verification deviation value. Finally, based on the concentration verification deviation value, a weighted average is calculated for the compensated concentration values. Characteristic peaks with high consistency are assigned higher weights, while peaks with large deviations are weighted less or eliminated. The results of all valid peaks are combined to obtain the final predicted concentration value. For example, in the detection of an apple sample, the above process calculates the compensated concentration corresponding to the 1003 cm⁻¹ peak as 8.6 mg / kg, the 1077 cm⁻¹ peak as 8.4 mg / kg, and the 1590 cm⁻¹ peak as 9.1 mg / kg. With a small deviation among the three values ​​(mg / kg), and the concentration verification deviation value below the threshold, the system calculates the average value using an equal-weighted or intensity-weighted method. The final output concentration prediction value is 8.7 mg / kg, ensuring the robustness and reliability of the quantitative results.

[0091] In a specific embodiment, the residue compliance of the agricultural product sample is determined based on the concentration prediction value to obtain a residue level label, including:

[0092] Based on the pesticide type identifier, a preset classification residue threshold table is retrieved, and the classification residue threshold table is matched with the type of agricultural product sample to obtain a matching threshold map.

[0093] The predicted concentration value is compared with the grading threshold in the adaptation threshold map to obtain a threshold comparison table. Based on the threshold comparison table, the agricultural product samples are graded to obtain the residue grade label.

[0094] Specifically, based on the predicted concentration values, the residue compliance of the agricultural product samples is determined to obtain residue level labels. First, a preset categorized residue threshold table is retrieved based on the pesticide type identifier. This categorized residue threshold table is a structured data table pre-established in the system, which stores the legal maximum residue limits for various pesticides in different agricultural products. It is organized in a two-dimensional table format, with rows corresponding to different pesticide varieties and columns corresponding to different agricultural product categories. Each cell records the residue limit standard value for the corresponding combination. For example, at the intersection of the "benzyl" row and the "apple" column, it is recorded as 5 mg / L. kg; Subsequently, the system performs threshold adaptation between the categorized residue threshold table and the type of agricultural product sample. Based on the type information of the agricultural product sample recorded in the current detection task (e.g., "apple"), the system locates the corresponding column in the categorized residue threshold table, extracts the limit values ​​of all pesticides under that agricultural product category, and then, combined with the currently identified pesticide type identifier (e.g., "benzyl"), locates the corresponding row. Finally, the system determines the specific limit value of the pesticide on that agricultural product, forming an adaptation threshold map containing only the information needed for the current detection scenario. This adaptation threshold map is stored in key-value pair format, for example, {"pesticide type": The system ensures the accuracy and uniqueness of the judgment criteria by comparing the predicted concentration value (e.g., 8.7 mg / kg) obtained through quantitative regression calculation in the previous step with the limit value (5 mg / kg) extracted from the limit value map. If the predicted concentration value is less than or equal to the limit value, it is determined that the limit is not exceeded; if the predicted concentration value is greater than the limit value, it is determined that the limit is exceeded. The system records the comparison result in a structured form, generating a threshold comparison table. This table includes fields such as pesticide type, agricultural product type, limit value, predicted concentration value, and comparison result ("≤" or ">"). For example, the generated record is {"Pesticide type": "Benomyl", "Agricultural product type": "Apple", "Limit value": 5, "Predicted concentration value": 8.7, "Comparison result":}. ">"}; Subsequently, the agricultural product samples are graded based on the threshold comparison table. The system reads the comparison result field in the threshold comparison table. If it is "≤", the residue level is marked as "qualified"; if it is ">", the residue level is marked as "unqualified". This marking process is automated and does not rely on manual intervention, ensuring the consistency and traceability of the judgment. For example, when testing pesticide residues in a batch of commercially available apples, the system identifies the pesticide type as benomyl through Raman spectroscopy analysis and calculates the predicted concentration value as 8.7 mg / kg. Then, based on this identifier, the system retrieves the limit standard of benomyl in various agricultural products from the residue threshold table, and then performs threshold adaptation in combination with the current sample type "apple", determining its limit value to be 5 mg / kg, forming an adaptation threshold map, and then 8.A comparison was made between 7 mg / kg and 5 mg / kg, indicating that the residue exceeded the limit. A threshold comparison table was generated, and the agricultural product sample was ultimately labeled with a residue level of "unqualified" based on the comparison result ">". This residue level serves as the basis for triggering subsequent disposal mechanisms, achieving a seamless transition from quantitative results to compliance determination.

[0095] The method for monitoring pesticide residues in agricultural products according to embodiments of the present invention has been described above. The following describes the device for monitoring pesticide residues in agricultural products according to embodiments of the present invention. Please refer to [link / reference]. Figure 2 One embodiment of the pesticide residue monitoring device for agricultural products in this invention includes:

[0096] The scanning module 21 is used to perform laser irradiation scanning on the surface of agricultural product samples to obtain Raman scattered light signals, and to perform photoelectric conversion processing on the Raman scattered light signals to obtain spectral electrical signals;

[0097] The subtraction module 22 is used to perform noise filtering and background subtraction on the spectral electrical signal to obtain a baseline-corrected spectrum, and to perform peak identification and labeling based on the baseline-corrected spectrum to obtain a set of characteristic peaks;

[0098] The identification module 23 is used to perform Raman spectral database matching and identification on the agricultural product sample based on the set of characteristic spectral peaks to obtain the pesticide type identifier, and to perform quantitative regression calculation based on the pesticide type identifier to obtain the concentration prediction value.

[0099] The determination module 24 is used to determine the residue compliance of the agricultural product sample based on the concentration prediction value, obtain the residue level label, and trigger a preset graded disposal decision mechanism based on the residue level label.

[0100] In this embodiment, the specific implementation of each unit in the above device embodiment is described in the above method embodiment, and will not be repeated here.

[0101] Reference Figure 3 This invention also provides a computer device whose internal structure can be as follows: Figure 3As shown, the computer device includes a processor, memory, display screen, input device, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores the data corresponding to this embodiment. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements the above-described method.

[0102] Those skilled in the art will understand that Figure 3 The structures shown are merely block diagrams of some structures related to the present invention and do not constitute a limitation on the computer devices on which the present invention is applied.

[0103] An embodiment of the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method. It is understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.

[0104] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the present invention and embodiments can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual-rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM, etc.

[0105] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.

[0106] The above description is only a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A method for monitoring pesticide residues in agricultural products, characterized in that, Includes the following steps: The surface of an agricultural product sample is scanned by laser irradiation to obtain Raman scattered light signals, and the Raman scattered light signals are then processed by photoelectric conversion to obtain spectral electrical signals; The spectral signal is subjected to noise filtering and background subtraction to obtain a baseline-corrected spectrum, and spectral peaks are identified and labeled based on the baseline-corrected spectrum to obtain a set of characteristic spectral peaks; Based on the set of characteristic spectral peaks, the agricultural product samples are matched and identified using Raman spectroscopy database to obtain pesticide type identifiers. Quantitative regression calculations are then performed based on these pesticide type identifiers to obtain predicted concentration values. The residue compliance of the agricultural product samples is determined based on the concentration prediction value, a residue level label is obtained, and a preset graded disposal decision mechanism is triggered based on the residue level label. Based on the set of characteristic spectral peaks, the agricultural product samples are matched and identified using Raman spectroscopy databases to obtain pesticide type identifiers, including: Chemical bond vibrational attribution analysis is performed on the set of characteristic spectral peaks to obtain a molecular group mapping table, and structural combination correlation is performed on the molecular group mapping table to obtain functional group characteristic sequences; Based on the functional group feature sequences, the Raman spectroscopy database of the agricultural product samples is searched to obtain a list of candidate molecules, and the spectral correlation of the candidate molecule list is calculated to obtain a matching degree distribution map. Peak position deviation compensation is performed on the matching degree distribution map to obtain a corrected matching degree sequence, and similarity threshold screening is performed based on the corrected matching degree sequence to obtain the target molecular group; Based on the target molecular group, the functional group feature sequence is verified to obtain a structure confirmation table, and the structure confirmation table is classified into pesticide categories to obtain pesticide type identifiers. Based on the target molecular group, the functional group feature sequence is verified to obtain a structure confirmation table, including: The target molecular group is subjected to molecular topology analysis to obtain the bond connection matrix, and the bond connection matrix is ​​subjected to ring structure detection to obtain ring system characteristic parameters; Based on the ring system characteristic parameters, functional group occupancy matching is performed on the functional group characteristic sequence to obtain a group docking site set, and bond energy compatibility is verified on the group docking site set to obtain a bond stability coefficient table. Based on the bonding stability coefficient table, the molecular skeleton assembly of the ring system characteristic parameters is verified to obtain the skeleton matching degree matrix, and the topological consistency of the skeleton matching degree matrix is ​​verified to obtain the structure confirmation table.

2. The method for monitoring pesticide residues in agricultural products according to claim 1, characterized in that, The surface of an agricultural product sample is scanned by laser irradiation to obtain Raman scattered light signals. These Raman scattered light signals are then subjected to photoelectric conversion processing to obtain spectral electrical signals, including: The surface of the agricultural product sample is divided into multiple regions to obtain several scanning sub-regions. Based on the scanning sub-regions, the agricultural product sample is sequentially irradiated with laser focusing by a Raman spectroscopy acquisition device to obtain the initial scattered light corresponding to each scanning sub-region. The initial scattered light is wavelength-selected to obtain band-scattered light, and the band-scattered light is superimposed and integrated to obtain Raman scattered light signal; The Raman scattered light signal is photoelectrically converted to obtain electrical signal data, and the electrical signal data is then converted from analog to digital to obtain a spectral electrical signal.

3. The method for monitoring pesticide residues in agricultural products according to claim 1, characterized in that, Based on the baseline-corrected spectrum, peak identification and annotation are performed to obtain a set of characteristic peaks, including: The first derivative of the baseline-corrected spectrum is calculated to obtain the spectral slope curve, and the zero point of the spectral slope curve is detected to obtain the wavenumber crossover set. Peak shape screening is performed on the wavenumber crossover point set to obtain peak candidate points, and second derivative verification is performed based on the peak candidate points to obtain a peak and valley position table; Based on the peak and valley position table, the baseline correction spectrum is divided into intervals to obtain peak shape interval groups, and the peak height of the peak shape interval groups is calculated to obtain the peak intensity sequence. Based on the peak intensity sequence, the peak and valley position table is sorted by intensity to obtain the main peak location table, and the main peak location table is calibrated by wavenumber to obtain the characteristic spectral peak set.

4. The method for monitoring pesticide residues in agricultural products according to claim 1, characterized in that, Based on the pesticide type identifier, quantitative regression calculations are performed to obtain the concentration prediction value, including: Based on the pesticide type identifier, the wavenumber range of the corresponding pesticide characteristic peak is retrieved from the preset pesticide Raman feature library, and the wavenumber range of the characteristic peak is matched and filtered with the characteristic spectrum peak set to obtain a quantitative feature peak subset; The peak area of ​​the subset of quantitative characteristic peaks is integrated to obtain the integrated area value of each characteristic peak, and the integrated area value is corrected by the agricultural product matrix interference coefficient to obtain the corrected integrated area. Linear regression analysis is performed based on the corrected integral area and the preset pesticide concentration gradient standard curve to obtain a preliminary concentration calculation value. Then, spectral response sensitivity compensation is performed on the preliminary concentration calculation value to obtain a compensated concentration value. The compensated concentration value is subjected to multi-characteristic peak consistency verification to obtain the concentration verification deviation value. Based on the concentration verification deviation value, the compensated concentration value is weighted and averaged to obtain the concentration prediction value.

5. The method for monitoring pesticide residues in agricultural products according to claim 1, characterized in that, Based on the predicted concentration values, the agricultural product samples are assessed for residue compliance to obtain residue level labels, including: Based on the pesticide type identifier, a preset classification residue threshold table is retrieved, and the classification residue threshold table is matched with the type of agricultural product sample to obtain a matching threshold map. The predicted concentration value is compared with the grading threshold in the adaptation threshold map to obtain a threshold comparison table. Based on the threshold comparison table, the agricultural product samples are graded to obtain the residue grade label.

6. A pesticide residue monitoring device for agricultural products, characterized in that, The method for monitoring pesticide residues in agricultural products according to any one of claims 1 to 5 includes: The scanning module is used to perform laser irradiation scanning on the surface of agricultural product samples to obtain Raman scattered light signals, and to perform photoelectric conversion processing on the Raman scattered light signals to obtain spectral electrical signals; The subtraction module is used to perform noise filtering and background subtraction on the spectral electrical signal to obtain a baseline-corrected spectrum, and to perform peak identification and labeling based on the baseline-corrected spectrum to obtain a set of characteristic peaks; The identification module is used to perform Raman spectral database matching and identification of the agricultural product sample based on the set of characteristic spectral peaks to obtain the pesticide type identifier, and to perform quantitative regression calculation based on the pesticide type identifier to obtain the concentration prediction value; The determination module is used to determine the residue compliance of the agricultural product sample based on the concentration prediction value, obtain the residue level label, and trigger a preset graded disposal decision mechanism based on the residue level label. Based on the set of characteristic spectral peaks, the agricultural product samples are matched and identified using Raman spectroscopy databases to obtain pesticide type identifiers, including: Chemical bond vibrational attribution analysis is performed on the set of characteristic spectral peaks to obtain a molecular group mapping table, and structural combination correlation is performed on the molecular group mapping table to obtain functional group characteristic sequences; Based on the functional group feature sequences, the Raman spectroscopy database of the agricultural product samples is searched to obtain a list of candidate molecules, and the spectral correlation of the candidate molecule list is calculated to obtain a matching degree distribution map. Peak position deviation compensation is performed on the matching degree distribution map to obtain a corrected matching degree sequence, and similarity threshold screening is performed based on the corrected matching degree sequence to obtain the target molecular group; Based on the target molecular group, the functional group feature sequence is verified to obtain a structure confirmation table, and the structure confirmation table is classified into pesticide categories to obtain pesticide type identifiers. Based on the target molecular group, the functional group feature sequence is verified to obtain a structure confirmation table, including: The target molecular group is subjected to molecular topology analysis to obtain the bond connection matrix, and the bond connection matrix is ​​subjected to ring structure detection to obtain ring system characteristic parameters; Based on the ring system characteristic parameters, functional group occupancy matching is performed on the functional group characteristic sequence to obtain a group docking site set, and bond energy compatibility is verified on the group docking site set to obtain a bond stability coefficient table. Based on the bonding stability coefficient table, the molecular skeleton assembly of the ring system characteristic parameters is verified to obtain the skeleton matching degree matrix, and the topological consistency of the skeleton matching degree matrix is ​​verified to obtain the structure confirmation table.

7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Fast detection method for surface enhanced Raman scattering of trace pesticide residues in oranges

    CN104101591A

  • Pesticide residue detection method

    CN104749159A

  • Method for quantitatively analyzing metabolites in biological cells based on Raman spectrum technology

    CN120870088A