A method and system for detecting drug residues in aquatic products based on Raman spectroscopy

By optimizing laser parameters and wavelet transform denoising, combined with the support vector regression model of radial basis kernel function, the problems of spectral signal instability and characteristic peak identification in the detection of drug residues in aquatic products are solved, and efficient and accurate drug residue detection is achieved.

CN120213891BActive Publication Date: 2025-09-16LIANYUNGANG ANIMAL PROD QUALITY SUPERVISION INSPECTION & TESTING CENT
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510379620.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-09-16
Estimated Expiration
2045-03-28

AI Technical Summary

Technical Problem

In the existing Raman spectroscopy method for detecting drug residues in aquatic products, differences in the physical properties of the samples lead to unstable spectral signals, interference factors affect the identification of characteristic peaks, and overfitting or underfitting occurs during model training, making it difficult to accurately identify low-concentration drug residues.

Method used

By optimizing laser parameters, using wavelet transform to remove noise, extracting and correcting characteristic peak data, and constructing a support vector regression model based on radial basis kernel function, quantitative detection is performed.

Benefits of technology

It achieves fast and accurate drug residue detection, improves detection efficiency and accuracy, and is suitable for food safety and environmental monitoring fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120213891B_ABST
    Figure CN120213891B_ABST
Patent Text Reader

Abstract

The present invention relates to a method and system for detecting drug residues in aquatic products based on Raman spectroscopy. The method comprises: obtaining Raman spectral data generated by laser irradiation of an aquatic product sample; preprocessing the Raman spectral data and extracting characteristic peak data; comparing the characteristic peak data with a pre-established library of drug residue standard spectra to obtain drug residue concentration values ​​corresponding to the characteristic peak data; constructing a quantitative detection model based on the characteristic peak data and the corresponding drug residue concentration values ​​using a machine learning algorithm; and predicting drug residue concentrations in aquatic products based on the quantitative detection model. The present invention can be widely applied in the field of food safety, providing an efficient and reliable solution for drug residue detection in aquatic products.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field, and in particular to a method and system for detecting drug residues in aquatic products based on Raman spectroscopy. Background Art

[0002] In the Raman spectroscopy-based method and system for detecting drug residues in aquatic products, spectral acquisition is a key step. In practice, laser power and wavelength adjustment have a direct impact on the quality of the spectral signal. However, different aquatic samples vary in physical properties, such as color, texture, and moisture content. These factors can cause varying degrees of scattering and absorption when the laser interacts with the sample, affecting the stability of the spectral signal. For example, darker samples may absorb more laser energy, resulting in a decrease in spectral signal intensity; while high-moisture samples may cause laser scattering, resulting in noise in the spectrum. Furthermore, the surface roughness of the sample can affect the focusing of the laser, further affecting the accuracy of spectral acquisition.

[0003] During spectral comparison, standard spectra of known drug residues are typically obtained under ideal conditions. However, spectra of actual samples can be affected by various interfering factors, such as impurities and background noise. These interferences can cause changes in the position, intensity, and shape of characteristic peaks, making comparison more difficult. Especially at low drug residue concentrations, characteristic peaks can be overwhelmed by noise, making accurate identification difficult.

[0004] During spectral comparison, standard spectra of known drug residues are typically obtained under ideal conditions. However, spectra of actual samples can be affected by various interfering factors, such as impurities and background noise. These interferences can cause changes in the position, intensity, and shape of characteristic peaks, making comparison more difficult. Especially at low drug residue concentrations, characteristic peaks can be overwhelmed by noise, making accurate identification difficult.

[0005] Furthermore, when building predictive models for quantitative testing, the accuracy of the models relies on a large amount of high-quality spectral data. However, the spectral data of actual samples often exhibit significant variability, such as differences between sample batches and variations in acquisition conditions. This variability can lead to overfitting or underfitting during model training, affecting the model's generalization ability. Furthermore, there are many types of drug residues, each with distinct spectral signatures. Effectively extracting and utilizing these signatures presents a technical challenge that must be addressed during model development. Summary of the Invention

[0006] The purpose of the present invention is to propose a method for detecting drug residues in aquatic products based on Raman spectroscopy to solve the problems existing in the above-mentioned prior art.

[0007] To achieve the above object, the present invention provides the following solutions:

[0008] A method for detecting drug residues in aquatic products based on Raman spectroscopy, comprising:

[0009] Obtaining Raman spectrum data generated by aquatic product samples after being irradiated by laser;

[0010] Preprocessing the Raman spectrum data and extracting characteristic peak data;

[0011] Comparing the characteristic peak data with a pre-established drug residue standard spectral library to obtain a drug residue concentration value corresponding to the characteristic peak data;

[0012] Based on the characteristic peak data and the corresponding drug residue concentration values, a quantitative detection model is constructed using a machine learning algorithm;

[0013] Based on the quantitative detection model, the drug residue concentration in aquatic products is predicted.

[0014] Optionally, preprocessing the Raman spectrum data includes:

[0015] Wavelet transform is used to remove high-frequency noise in the Raman spectrum, retaining low-frequency characteristic peak information to obtain a denoised spectrum. If the residual noise is higher than a preset threshold, the wavelet transform parameters are adjusted and denoising is performed again.

[0016] Optionally, extracting characteristic peak data includes:

[0017] Using the preset value as the deviation judgment condition, the characteristic peak position value, characteristic peak and intensity value are extracted from the denoised spectrum;

[0018] According to the difference between the characteristic peak position value and the standard spectrum position value, it is judged whether the deviation value exceeds the preset value; if the deviation value exceeds the preset value, the characteristic peak position value is adjusted by using a correction algorithm to obtain a corrected characteristic peak position value;

[0019] Recalculate the characteristic peak intensity value according to the corrected characteristic peak position value to obtain the corrected characteristic peak intensity value;

[0020] The corrected characteristic peak position and intensity values ​​are used to update the characteristic peak information in the denoised spectrum.

[0021] Optionally, comparing the characteristic peak data with a pre-established drug residue standard spectral library to obtain a drug residue concentration value corresponding to the characteristic peak data includes:

[0022] Determine the matching degree between the characteristic peak data and the drug residue standard spectral library. If the matching degree is lower than the preset threshold, re-extract the characteristic peak data.

[0023] Based on the re-extracted characteristic peak information, a correction algorithm is used to adjust the characteristic peak position and intensity values ​​to obtain the corrected characteristic peak data. The corrected characteristic peak data is compared with the drug residue standard spectral library to determine whether the matching degree meets the preset threshold. If so, the final spectral comparison result is obtained;

[0024] Based on the final spectral comparison result, the drug residue concentration value corresponding to the characteristic peak data is obtained.

[0025] Optionally, a machine learning algorithm is used to construct a quantitative detection model including:

[0026] Constructing a regression model based on the characteristic peak data and the corresponding drug residue concentration value; wherein the regression model adopts a support vector regression model of a radial basis kernel function;

[0027] Determine whether the fit of the regression model meets the preset threshold. If the fit is lower than the preset threshold, adjust the regression model parameters; reconstruct the regression model based on the adjusted regression model parameters; determine whether the fit of the reconstructed regression model meets the preset threshold. If so, determine the quantitative detection model.

[0028] A drug residue detection system for aquatic products based on Raman spectroscopy, the system comprising: a data acquisition module, a feature extraction module, a comparison module, a model building module, and a prediction module;

[0029] The data acquisition module is used to obtain Raman spectrum data generated by the aquatic product sample after being irradiated by laser;

[0030] The comparison module is used to pre-process the Raman spectrum data and extract characteristic peak data;

[0031] The feature extraction module is used to compare the characteristic peak data with a pre-established drug residue standard spectrum library to obtain the drug residue concentration value corresponding to the characteristic peak data;

[0032] The model building module is used to build a quantitative detection model based on the characteristic peak data and the corresponding drug residue concentration value using a machine learning algorithm;

[0033] The prediction module is used to predict the drug residue concentration in aquatic products based on the quantitative detection model.

[0034] Optionally, the feature extraction module extracts characteristic peak data including:

[0035] Using the preset value as the deviation judgment condition, the characteristic peak position value, characteristic peak and intensity value are extracted from the denoised spectrum;

[0036] According to the difference between the characteristic peak position value and the standard spectrum position value, it is judged whether the deviation value exceeds the preset value; if the deviation value exceeds the preset value, the characteristic peak position value is adjusted by using a correction algorithm to obtain a corrected characteristic peak position value;

[0037] Recalculate the characteristic peak intensity value according to the corrected characteristic peak position value to obtain the corrected characteristic peak intensity value;

[0038] The corrected characteristic peak position and intensity values ​​are used to update the characteristic peak information in the denoised spectrum.

[0039] Optionally, the model building module uses a machine learning algorithm to build a quantitative detection model including:

[0040] Constructing a regression model based on the characteristic peak data and the corresponding drug residue concentration value; wherein the regression model adopts a support vector regression model of a radial basis kernel function;

[0041] Determine whether the fit of the regression model meets the preset threshold. If the fit is lower than the preset threshold, adjust the regression model parameters; reconstruct the regression model based on the adjusted regression model parameters; determine whether the fit of the reconstructed regression model meets the preset threshold. If so, determine the quantitative detection model.

[0042] The beneficial effects of the present invention are:

[0043] The present invention discloses a method for detecting drug residues in aquatic products based on Raman spectroscopy. The method first optimizes laser parameters according to sample characteristics to obtain a stable spectral signal. Subsequently, noise is removed through wavelet transform, and characteristic peak data is extracted and corrected. The processed data is compared with a standard spectral library to construct a regression model for drug residue concentration and characteristic peak intensity. Finally, cross-validation is used to evaluate the generalization ability of the model, and concentration predictions are performed on actual samples. By optimizing laser parameters, signal processing, feature extraction, and model construction, the present invention achieves rapid and accurate detection of drug residues, thereby improving detection efficiency and precision. This method can be widely used in fields such as food safety and environmental monitoring, providing an efficient and reliable solution for drug residue detection. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0045] Figure 1The figure is a flow chart of a method for detecting drug residues in aquatic products based on Raman spectroscopy according to an embodiment of the present invention. DETAILED DESCRIPTION

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

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

[0048] like Figure 1 As shown, this embodiment proposes a method for detecting drug residues in aquatic products based on Raman spectroscopy, comprising:

[0049] Obtaining Raman spectrum data generated by aquatic product samples after being irradiated by laser;

[0050] Preprocess the Raman spectrum data and extract characteristic peak data;

[0051] Comparing the characteristic peak data with the pre-established drug residue standard spectral library to obtain the drug residue concentration value corresponding to the characteristic peak data includes:

[0052] Based on the characteristic peak data and the corresponding drug residue concentration values, a quantitative detection model is constructed using a machine learning algorithm;

[0053] Based on the quantitative detection model, the drug residue concentration in aquatic products is predicted.

[0054] Specifically, in this embodiment, obtaining Raman spectrum data generated by the aquatic product sample after being irradiated by laser includes:

[0055] Adjust the laser power and wavelength according to the sample color and texture. If the sample color is dark, reduce the laser power. If the sample texture is rough, increase the laser wavelength to obtain the optimized laser parameters.

[0056] The sample is irradiated with the optimized laser parameters to obtain the original spectral signal. If the signal intensity is lower than the preset threshold, the laser power and wavelength are readjusted until the signal intensity meets the requirements and a stable spectral signal is obtained.

[0057] Furthermore, preprocessing of the Raman spectral data includes:

[0058] Wavelet transform is used to remove high-frequency noise in the Raman spectrum and retain the low-frequency characteristic peak information to obtain the denoised spectrum. If the residual noise is higher than the preset threshold, the wavelet transform parameters are adjusted and denoising is performed again.

[0059] Specifically, the signal preprocessing process of this embodiment is as follows: a preset value is used as a noise judgment condition to obtain the noise amount in the denoised spectrum. Based on the comparison result of the noise amount and the preset value, it is determined whether the wavelet parameter needs to be adjusted. If the noise amount is higher than the preset value, the wavelet parameter is reset to separate the high-frequency band and the low-frequency band information. Using the adjusted wavelet parameter, the spectral signal is processed again to obtain a new denoised spectrum. Determine whether the noise amount in the new denoised spectrum meets the preset value requirement. If the noise amount is still higher than the preset value, repeat the process of adjusting the wavelet parameter and processing the spectral signal. Finally, a denoised spectrum with a noise amount lower than the preset value is obtained, and the characteristic peak information of the low-frequency band is retained.

[0060] Furthermore, extracting characteristic peak data includes:

[0061] Using the preset value as the deviation judgment condition, the characteristic peak position value, characteristic peak and intensity value are extracted from the denoised spectrum;

[0062] According to the difference between the characteristic peak position value and the standard spectrum position value, it is judged whether the deviation value exceeds the preset value; if the deviation value exceeds the preset value, the characteristic peak position value is adjusted by using a correction algorithm to obtain a corrected characteristic peak position value;

[0063] Recalculate the characteristic peak intensity value according to the corrected characteristic peak position value to obtain the corrected characteristic peak intensity value;

[0064] The corrected characteristic peak position and intensity values ​​are used to update the characteristic peak information in the denoised spectrum.

[0065] Specifically, in this embodiment, a preset value is used as a deviation judgment condition to extract the characteristic peak position value and intensity value from the denoised spectrum. According to the difference between the characteristic peak position value and the standard spectrum position value, it is judged whether the deviation value exceeds the preset value. If the deviation value exceeds the preset value, a correction algorithm is used to adjust the characteristic peak position value to obtain a corrected characteristic peak position value. According to the corrected characteristic peak position value, the characteristic peak intensity value is recalculated to obtain a corrected characteristic peak intensity value. The corrected characteristic peak position value and intensity value are used to update the characteristic peak information in the denoised spectrum. According to the updated characteristic peak information, the separation effect of the high frequency band and the low frequency band in the spectrum is judged. If the separation effect of the high frequency band and the low frequency band does not meet the preset requirements, the denoising algorithm parameters are adjusted and the spectrum signal is reprocessed.

[0066] Furthermore, the characteristic peak data is compared with a pre-established drug residue standard spectral library to obtain the drug residue concentration value corresponding to the characteristic peak data, including:

[0067] Determine the matching degree between the characteristic peak data and the drug residue standard spectral library. If the matching degree is lower than the preset threshold, re-extract the characteristic peak data.

[0068] Based on the re-extracted characteristic peak information, a correction algorithm is used to adjust the characteristic peak position and intensity values ​​to obtain the corrected characteristic peak data. The corrected characteristic peak data is compared with the drug residue standard spectral library to determine whether the matching degree meets the preset threshold. If so, the final spectral comparison result is obtained;

[0069] Based on the final spectral comparison results, the drug residue concentration value corresponding to the characteristic peak data is obtained.

[0070] Specifically, in this embodiment, a preset threshold is used to determine the degree of match between the corrected characteristic peak data and the drug residue standard spectral library. If the degree of match is lower than the preset threshold, the characteristic peak information is re-extracted. Based on the re-extracted characteristic peak information, a correction algorithm is used to adjust the characteristic peak position value and intensity value to obtain the corrected characteristic peak data. The corrected characteristic peak data is compared with the drug residue standard spectral library to determine whether the degree of match meets the preset threshold. If so, the final spectrum comparison result is obtained. If the degree of match still does not meet the preset threshold, the spectrum signal processing parameters are adjusted, and the characteristic peak extraction and correction are performed again. The characteristic peak information is extracted again using the adjusted parameters, and the characteristic peak position value and intensity value are adjusted using the correction algorithm to obtain new corrected characteristic peak data. The new corrected characteristic peak data is compared with the drug residue standard spectral library to determine whether the degree of match meets the preset threshold. If so, the final spectrum comparison result is obtained. If the degree of match still does not meet the preset threshold, a machine learning algorithm is used to classify the spectral data to determine the best matching result.

[0071] The degree of characteristic peak matching is a key metric for assessing the reliability of spectral analysis results. In drug residue testing, characteristic peaks in a standard spectral library are typically used as a benchmark, with a preset threshold of 95%. If the degree of match between the characteristic peaks of the test sample and the standard library falls below this threshold, re-extraction of the characteristic peaks is necessary. For example, in a pesticide residue test, the main characteristic peaks in the standard spectrum are located at 1,500 and 1,800 wavenumbers. If the deviation exceeds plus or minus five wavenumbers in the actual test, the matching is considered insufficient. The choice of correction algorithm directly impacts the effectiveness of characteristic peak adjustment. Common correction methods include peak shape fitting and peak position calibration. For example, in a veterinary drug residue test, Gaussian fitting is used to optimize the characteristic peak shape, effectively eliminating interference from background noise. When characteristic peaks are distorted, polynomial fitting is used to correct the peak shape and improve peak position accuracy. Adjusting spectral signal processing parameters is a key means of improving matching. For example, in an antibiotic residue test, adjusting baseline correction parameters and smoothing window size can effectively improve characteristic peak extraction. When signal noise is high, increasing the number of smoothing cycles can improve spectral quality, but be aware that over-smoothing may cause peak distortion. Machine learning algorithms play a key role in spectral matching. For example, support vector machines (SVMs) can automatically classify spectra by creating multidimensional feature vectors based on the positions and intensities of characteristic peaks. In practical applications, principal component analysis (PCA) can significantly improve classification accuracy by reducing dimensionality and extracting the most representative features. For example, in the detection of hormone drug residues, a random forest algorithm was used to classify characteristic peak data, achieving an accuracy of 98% in the training set and maintaining accuracy above 95% in the test set. The quality of characteristic peak data directly impacts the final matching results. For example, in the detection of antimicrobial drug residues, setting peak intensity thresholds and peak width limits can effectively eliminate interference from false peaks. When the signal-to-noise ratio of a characteristic peak is below 10, increasing the sampling cycle or adjusting instrument parameters is necessary to improve data quality. Establishing a comprehensive data quality control system ensures the reliability and accuracy of spectral analysis results.

[0072] Furthermore, a machine learning algorithm is used to construct a quantitative detection model including:

[0073] A regression model is constructed based on the characteristic peak data and the corresponding drug residue concentration values; wherein the regression model adopts a support vector regression model of a radial basis kernel function;

[0074] Determine whether the fit of the regression model meets the preset threshold. If the fit is lower than the preset threshold, adjust the regression model parameters; reconstruct the regression model based on the adjusted regression model parameters; determine whether the fit of the reconstructed regression model meets the preset threshold. If so, determine the quantitative detection model.

[0075] Specifically, in this embodiment, the spectral comparison results are used to obtain the characteristic peak intensity value and the drug residual concentration value. A regression model is constructed based on the characteristic peak intensity value and the drug residual concentration value. It is determined whether the regression model fit meets the preset threshold. If the fit is lower than the preset threshold, the regression model parameters are adjusted. The regression model is reconstructed using the adjusted regression model parameters. It is determined whether the fit of the reconstructed regression model meets the preset threshold. If so, a quantitative detection model is determined. Based on the quantitative detection model, the drug residual concentration detection result is obtained. A machine learning algorithm is used to optimize the regression model parameters and improve the accuracy of the quantitative detection model.

[0076] The relationship between the characteristic peak intensity values ​​in the spectral comparison results and the drug residue concentration values ​​forms the basis of quantitative detection. The characteristic peak intensity in Raman spectroscopy exhibits a nonlinear variation with concentration. This nonlinear relationship requires fitting with an appropriate regression model. For cefixime, for example, when the concentration is less than 0.1 mg / L, the characteristic peak intensity shows a nearly linear relationship with concentration. However, when the concentration is greater than 1 mg / L, the characteristic peak intensity growth slows, exhibiting significant nonlinear characteristics. In this case, a cubic polynomial regression model can be used for fitting, with a coefficient of determination of 0.98 or higher required for goodness of fit. If the goodness of fit does not meet the requirements, the regression model parameters need to be adjusted. For cefixime detection, for example, the model's fit is improved by introducing cross terms and higher-order terms. When the cubic polynomial model's fit is insufficient, quartic terms can be added, along with a cross term between concentration and the characteristic peak wavenumber, to enhance the model's ability to describe nonlinear changes. The establishment of a quantitative detection model requires verification of its stability and reliability. Taking the detection of sulfonamide residues as an example, a holdout method was used to divide the dataset into a training set and a validation set. The training set was used to build the regression model, and the validation set was used to evaluate model performance. The model's prediction error on the validation set should be kept within ±5%. The application of machine learning algorithms can significantly improve the accuracy of quantitative detection models. Taking support vector regression as an example, kernel functions are used to map data into a high-dimensional space, better describing nonlinear relationships. For the detection of cephalosporin residues, a support vector regression model using a radial basis kernel function can keep the prediction error within ±3%. The actual application scenario should be considered during model optimization. Taking the detection of penicillin residues in dairy products as an example, a matrix correction term was introduced into the regression model to account for matrix effects. By adding standards of known concentrations, a matrix effect correction curve was established to improve the accuracy of the model in real samples. This method can keep the relative standard deviation of the test results within 5%.

[0077] Specifically, this embodiment also uses a cross-validation method to evaluate the generalization ability of the quantitative detection model. If the model error is higher than a preset threshold, the regression model is rebuilt to obtain a generalized model with an error that meets the requirements.

[0078] Using spectral data, characteristic peak intensity values ​​and residual drug concentration values ​​are obtained. An initial regression model is constructed based on these values. A cross-validation method is used to determine the error value of the initial regression model. If the error value exceeds a preset threshold, the regression model parameters are adjusted. Based on the adjusted regression model parameters, the regression model is reconstructed. A cross-validation method is used to determine the error value of the reconstructed regression model. If the error value is below a preset threshold, a generalized model is determined.

[0079] The drug residue concentration of actual samples is predicted using the generalized model. If the deviation between the predicted result and the standard value exceeds the preset range, the model parameters are readjusted to obtain a prediction result that meets the accuracy requirements.

[0080] This embodiment also proposes a drug residue detection system for aquatic products based on Raman spectroscopy, the system comprising: a data acquisition module, a feature extraction module, a comparison module, a model building module, and a prediction module;

[0081] A data acquisition module is used to obtain Raman spectrum data generated by aquatic product samples after being irradiated by laser;

[0082] The comparison module is used to pre-process the Raman spectrum data and extract the characteristic peak data;

[0083] The feature extraction module is used to compare the characteristic peak data with the pre-established drug residue standard spectral library to obtain the drug residue concentration value corresponding to the characteristic peak data;

[0084] The model building module is used to build a quantitative detection model based on the characteristic peak data and the corresponding drug residue concentration values ​​using a machine learning algorithm;

[0085] The prediction module is used to predict the drug residue concentration in aquatic products based on the quantitative detection model.

[0086] Furthermore, the feature extraction module extracts characteristic peak data including:

[0087] Using the preset value as the deviation judgment condition, the characteristic peak position value, characteristic peak and intensity value are extracted from the denoised spectrum;

[0088] According to the difference between the characteristic peak position value and the standard spectrum position value, it is judged whether the deviation value exceeds the preset value; if the deviation value exceeds the preset value, the characteristic peak position value is adjusted by using a correction algorithm to obtain a corrected characteristic peak position value;

[0089] Recalculate the characteristic peak intensity value according to the corrected characteristic peak position value to obtain the corrected characteristic peak intensity value;

[0090] The corrected characteristic peak position and intensity values ​​are used to update the characteristic peak information in the denoised spectrum.

[0091] Furthermore, the model building module uses machine learning algorithms to build a quantitative detection model including:

[0092] A regression model is constructed based on the characteristic peak data and the corresponding drug residue concentration values; wherein the regression model adopts a support vector regression model of a radial basis kernel function;

[0093] Determine whether the fit of the regression model meets the preset threshold. If the fit is lower than the preset threshold, adjust the regression model parameters; reconstruct the regression model based on the adjusted regression model parameters; determine whether the fit of the reconstructed regression model meets the preset threshold. If so, determine the quantitative detection model.

[0094] The embodiments described above are merely descriptions of preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by persons skilled in the art should fall within the scope of protection defined by the claims of the present invention.

Claims

1. A method for detecting drug residues in aquatic products based on Raman spectroscopy, characterized in that: include: Obtaining Raman spectrum data generated by aquatic product samples after being irradiated by laser; Preprocessing the Raman spectrum data and extracting characteristic peak data; Extracting characteristic peak data includes: Using the preset value as the deviation judgment condition, the characteristic peak position value, characteristic peak and intensity value are extracted from the denoised spectrum; According to the difference between the characteristic peak position value and the standard spectrum position value, it is judged whether the deviation value exceeds the preset value; if the deviation value exceeds the preset value, the characteristic peak position value is adjusted by using a correction algorithm to obtain a corrected characteristic peak position value; Recalculate the characteristic peak intensity value according to the corrected characteristic peak position value to obtain the corrected characteristic peak intensity value; The corrected characteristic peak position and intensity values ​​are used to update the characteristic peak information in the denoised spectrum; Comparing the characteristic peak data with a pre-established drug residue standard spectral library to obtain the drug residue concentration value corresponding to the characteristic peak data; comprising: Determine the matching degree between the characteristic peak data and the drug residue standard spectral library. If the matching degree is lower than the preset threshold, re-extract the characteristic peak data. Based on the re-extracted characteristic peak information, a correction algorithm is used to adjust the characteristic peak position value and intensity value to obtain corrected characteristic peak data; the corrected characteristic peak data is compared with the drug residue standard spectrum library to determine whether the matching degree meets the preset threshold. If so, the final spectrum comparison result is obtained; Based on the final spectral comparison result, obtaining the drug residue concentration value corresponding to the characteristic peak data; Based on the characteristic peak data and the corresponding drug residue concentration values, a quantitative detection model is constructed using a machine learning algorithm; Based on the quantitative detection model, the drug residue concentration in aquatic products is predicted.

2. The method for detecting drug residues in aquatic products based on Raman spectroscopy according to claim 1, characterized in that: Preprocessing the Raman spectrum data includes: Wavelet transform is used to remove high-frequency noise in the Raman spectrum, retaining low-frequency characteristic peak information to obtain a denoised spectrum. If the residual noise is higher than a preset threshold, the wavelet transform parameters are adjusted and denoising is performed again.

3. The method for detecting drug residues in aquatic products based on Raman spectroscopy according to claim 1, characterized in that: Using machine learning algorithms to build quantitative detection models includes: Constructing a regression model based on the characteristic peak data and the corresponding drug residue concentration value; wherein the regression model adopts a support vector regression model of a radial basis kernel function; Determine whether the fit of the regression model meets the preset threshold. If the fit is lower than the preset threshold, adjust the regression model parameters; reconstruct the regression model based on the adjusted regression model parameters; determine whether the fit of the reconstructed regression model meets the preset threshold. If so, determine the quantitative detection model.

4. A drug residue detection system for aquatic products based on Raman spectroscopy, characterized in that: Used to implement the method for detecting drug residues in aquatic products based on Raman spectroscopy as described in any one of claims 1 to 3, the system comprises: a data acquisition module, a feature extraction module, a comparison module, a model building module, and a prediction module; The data acquisition module is used to obtain Raman spectrum data generated by the aquatic product sample after being irradiated by laser; The comparison module is used to pre-process the Raman spectrum data and extract characteristic peak data; The feature extraction module is used to compare the characteristic peak data with a pre-established drug residue standard spectrum library to obtain the drug residue concentration value corresponding to the characteristic peak data; The model building module is used to build a quantitative detection model based on the characteristic peak data and the corresponding drug residue concentration value using a machine learning algorithm; The prediction module is used to predict the drug residue concentration in aquatic products based on the quantitative detection model.

5. The aquatic product drug residue detection system based on Raman spectroscopy according to claim 4 is characterized in that: Extracting the characteristic peak data includes: Using the preset value as the deviation judgment condition, the characteristic peak position value, characteristic peak and intensity value are extracted from the denoised spectrum; According to the difference between the characteristic peak position value and the standard spectrum position value, it is judged whether the deviation value exceeds the preset value; if the deviation value exceeds the preset value, the characteristic peak position value is adjusted by using a correction algorithm to obtain a corrected characteristic peak position value; Recalculate the characteristic peak intensity value according to the corrected characteristic peak position value to obtain the corrected characteristic peak intensity value; The corrected characteristic peak position and intensity values ​​are used to update the characteristic peak information in the denoised spectrum.

6. The aquatic product drug residue detection system based on Raman spectroscopy according to claim 4 is characterized in that: The model building module is used to build a quantitative detection model based on the characteristic peak data and the corresponding drug residue concentration value using a machine learning algorithm, including: Constructing a regression model based on the characteristic peak data and the corresponding drug residue concentration value; wherein the regression model adopts a support vector regression model of a radial basis kernel function; Determine whether the fit of the regression model meets the preset threshold. If the fit is lower than the preset threshold, adjust the regression model parameters; reconstruct the regression model based on the adjusted regression model parameters; determine whether the fit of the reconstructed regression model meets the preset threshold. If so, determine the quantitative detection model.

Citation Information

Patent Citations

  • Food quality detection method, device and system based on optical analysis

    CN118671048A

  • Method for removing background from spectrogram, method of identifying substances through raman spectrogram, and electronic apparatus

    US20190339205A1