A method for detecting antibiotic residues in milk

By collecting hyperspectral fluorescence images of milk casein and combining them with PCA and BP neural network algorithms, a fast and accurate milk antibiotic residue detection model was established, which solved the problems of long detection cycle and expensive equipment in existing technologies and achieved fast and accurate antibiotic detection.

CN120232859BActive Publication Date: 2025-10-03SHANDONG BIHAI MASCH TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing methods for detecting antibiotic residues in milk have the problems of long detection cycles, cumbersome operations, susceptibility to interference from environmental factors, and expensive instruments and equipment, making it difficult to achieve rapid screening of large quantities of samples.

Method used

By collecting casein fluorescence hyperspectral images in milk, a detection model is established using PCA data dimensionality reduction and BP neural network algorithm to quickly determine the type and concentration of antibiotics in milk.

Benefits of technology

It achieves rapid and accurate detection of antibiotic residues in milk, with fast and accurate detection speed, and is suitable for rapid screening of large batches of samples.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120232859B_ABST
    Figure CN120232859B_ABST
Patent Text Reader

Abstract

The present invention provides a method for detecting antibiotic residues in milk, comprising the following steps: preparing milk antibiotic residue samples of different concentrations; extracting casein from the milk antibiotic residue samples and collecting fluorescence hyperspectral images of the casein antibiotic residue samples and pure milk casein samples; performing image correction and calculating average spectral curve data; performing PCA data dimensionality reduction processing on a spectral curve data set of the casein antibiotic residue samples, inputting the data into a BP neural network algorithm and training the data to obtain an antibiotic residue detection model; extracting casein from milk to be tested as a casein antibiotic residue sample, collecting spectral curve data to be tested of the casein antibiotic residue sample, inputting the spectral curve data to be tested into the antibiotic residue detection model and obtaining a prediction result, wherein the presence and type of antibiotic residues can be determined by only obtaining the casein in the milk and the corresponding spectral curve data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of food safety, and in particular to a method for detecting antibiotic residues in milk. Background Art

[0002] As an important daily consumer product, milk's safety is directly related to public health. The widespread use of antibiotics in livestock and poultry farming can lead to the presence of low-concentration antibiotic residues in milk. Long-term consumption can lead to health risks such as imbalanced intestinal flora and the development of drug-resistant bacterial infections. It can also affect the fermentation process and quality of dairy products. Therefore, establishing an efficient and sensitive method for detecting antibiotic residues in milk is of great practical significance.

[0003] Currently, the detection of antibiotic residues in milk mainly relies on microbiological detection and high-performance liquid chromatography (HPLC). Although the microbiological detection method is low-cost, the detection cycle is long (usually 18-24 hours), the operation is cumbersome, and it is easily interfered with by environmental factors, resulting in insufficient stability of the results. Although high-performance liquid chromatography has high sensitivity and accuracy, it requires complex sample pre-treatment processes (such as extraction and purification), and the instrumentation is expensive, and it is difficult to achieve rapid screening of large quantities of samples. Summary of the Invention

[0004] The purpose of the present invention is to provide a method for detecting antibiotic residues in milk, which collects fluorescence hyperspectral images of milk to obtain fluorescence intensity and band, thereby quickly detecting the type of residual antibiotics in milk.

[0005] To solve the above problems, the present invention provides a method for detecting antibiotic residues in milk, comprising the following steps:

[0006] Step S1000: preparing milk antibiotic residue samples of different concentrations;

[0007] Step S2000: extracting casein from the milk antibiotic residue sample as a casein antibiotic residue sample;

[0008] Step S3000: collecting fluorescence hyperspectral images of the casein antibiotic residue sample and the pure cow casein sample, as well as collecting all-white calibration images and all-black calibration images;

[0009] Step S4000: performing black and white correction on the fluorescence hyperspectral images of the casein antibiotic residue sample and the pure cow casein sample respectively;

[0010] Step S5000: extracting a number of pixel points in the central area of ​​the fluorescence hyperspectral image as a region of interest, calculating average spectral curve data, setting a preset spectral range, and retaining the data within the preset spectral range as a spectral curve data set;

[0011] Step S6000: Perform PCA data dimensionality reduction processing on the spectral curve datasets of the casein antibiotic residue sample and the pure cow casein sample, input them into the BP neural network algorithm and perform training to obtain an antibiotic residue detection model;

[0012] Step S7000: extract casein from the milk to be tested as a casein antibiotic residue sample, collect a fluorescence hyperspectral image of the casein antibiotic residue sample, input the spectral dimension reduction data into the antibiotic residue detection model and obtain a prediction result.

[0013] Furthermore, step S1000 in the above-mentioned method for detecting antibiotic residues in milk specifically includes:

[0014] Step S1100: preparing aqueous solutions of antibiotics with different concentrations;

[0015] Step S1200: adding the antibiotic aqueous solution into milk without antibiotic residue to form milk antibiotic residue samples with different concentrations.

[0016] Furthermore, step S2000 in the above-mentioned method for detecting antibiotic residues in milk specifically includes:

[0017] Step S2100: heating the milk antibiotic residue sample to 40-50° C. and adjusting the pH value to 4.6, so that casein in the milk antibiotic residue sample is aggregated and precipitated;

[0018] Step S2200: filtering and separating the milk antibiotic residue sample to obtain a casein antibiotic residue sample.

[0019] Furthermore, step S6000 in the above-mentioned method for detecting antibiotic residues in milk specifically includes:

[0020] Step S6100: Perform PCA (Principal Component Analysis) data dimensionality reduction processing on the average spectrum curve data to obtain reduced dimensionality data.

[0021] Step S6200: Use the BP neural network algorithm to read the spectral dimension reduction data, mark the antibiotic labels according to the antibiotic types, and divide the spectral dimension reduction data into 10 non-overlapping subsets. Select 9 subsets as training sets each time, and the remaining subset as a test set;

[0022] Step S6300: normalize the spectral dimension reduction data of the training set to the interval [0, 1], create a BP neural network algorithm model, where the hidden layer contains 4 neurons, and set the training parameters;

[0023] Step S6400: Use the train function to train the BP neural network algorithm model, the input data is the spectral dimension reduction data after normalization of the training set, and the output data is the antibiotic category;

[0024] Step S6500: Use the trained BP neural network algorithm model to simulate and predict the normalized spectral dimension reduction data of the training set and test set, compare the predicted results with the actual results, and calculate the prediction accuracy of the training set and test set. If the accuracy is above 90%, it will be used as the antibiotic residue detection model.

[0025] Furthermore, step S6100 in the above-mentioned method for detecting antibiotic residues in milk includes:

[0026] Step S6110: performing data standardization processing on the average spectrum curve data to obtain average spectrum curve standardized data;

[0027] Step S6120: Calculate the covariance matrix of the average spectrum curve normalized data;

[0028] Step S6130: Calculate the eigenvalues ​​and corresponding eigenvectors of the covariance matrix of the average spectrum curve normalized data;

[0029] Step S6140: Sort the eigenvalues ​​by size, select the eigenvectors corresponding to the first three largest eigenvalues ​​as the first principal component, the second principal component, and the third principal component, and construct an eigenvector matrix;

[0030] Step S6150: Projecting the average spectral curve normalized data onto the selected principal component to obtain spectral dimension reduction data of each casein antibiotic residue sample and pure cow casein spectral data.

[0031] Furthermore, the image correction calculation formula in step S4000 of the above-mentioned milk antibiotic residue detection method is:

[0032]

[0033] Among them, R is the fluorescence hyperspectral image after black and white correction, I R is the original fluorescence hyperspectral image collected, I W is the all-white calibration image, I D It is a completely black calibration image.

[0034] Furthermore, the calculation formula for the data standardization process in the above-mentioned method for detecting antibiotic residues in milk is:

[0035]

[0036] Among them, X stdis the standardized data of the average spectral curve, X is the original data matrix of the average spectral curve data, μ is the mean of the features of each column of the original data matrix, and σ is the standard deviation of each column of the original data matrix.

[0037] Furthermore, in the above method for detecting antibiotic residues in milk, step S6120: calculating the covariance matrix of the average spectral curve standardized data, the calculation formula is:

[0038]

[0039] in, is the covariance matrix of the standardized data of the average spectral curve, m is the number of rows of the original data matrix X, that is, the number of samples, Normalize the transpose of the data for the average spectral curve.

[0040] The above technical solution of the present invention has the following beneficial technical effects: by extracting casein from milk and collecting fluorescence hyperspectral images, casein and antibiotics undergo electrostatic interaction or hydrogen bonding to form non-covalent complexes. By observing the impact of the non-covalent complexes on the average spectral curve data of the fluorescence hyperspectral, it is possible to judge whether there are antibiotic residues in the milk and the type of antibiotics, and the detection speed is fast and accurate. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 is a flow chart of an embodiment of the present invention;

[0042] Figure 2 This is a schematic diagram of the average spectral curve data of casein antibiotic residue samples of different categories and concentrations. DETAILED DESCRIPTION

[0043] To make the objectives, technical solutions, and advantages of the present invention more clearly understood, the present invention will be further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings. It should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present invention. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present invention.

[0044] refer to Figure 1 The following is an embodiment of the present invention, wherein a method for detecting antibiotic residues in milk specifically comprises the following steps:

[0045] Step S1000: preparing milk antibiotic residue samples of different concentrations, the specific steps include:

[0046] Step S1100: preparing aqueous antibiotic solutions of different concentrations.

[0047] In this embodiment, 0 g / L, 0.08 g / L, 0.16 g / L, 0.24 g / L, 0.32 g / L, 0.40 g / L, 0.56 g / L, 0.72 g / L, 0.88 g / L, 1.04 g / L, and 1.20 g / L ciprofloxacin aqueous solutions were prepared. Similarly, chloramphenicol aqueous solutions of corresponding concentrations can also be prepared.

[0048] Step S1200: adding the antibiotic aqueous solution into milk without antibiotic residue to form milk antibiotic residue samples with different concentrations.

[0049] In this example, 0.01 ml of an antibiotic aqueous solution of different concentrations was pipetted into 40 ml of milk to prepare milk antibiotic residue samples of 0 mg / L, 0.02 mg / L, 0.04 mg / L, 0.06 mg / L, 0.08 mg / L, 0.10 mg / L, 0.14 mg / L, 0.18 mg / L, 0.22 mg / L, 0.26 mg / L, and 0.3 mg / L, and 15 samples were prepared for each concentration.

[0050] Due to the wide variety of antibiotics, including ciprofloxacin and chloramphenicol, residual antibiotics in milk can be prepared separately for these two antibiotics. It should be noted that other antibiotic residue samples can also be prepared as needed. When aqueous solutions of antibiotics such as ciprofloxacin, ofloxacin, and chloramphenicol are added to milk, they undergo electrostatic interactions or hydrogen bonding with the casein in the milk, forming non-covalent complexes.

[0051] Step S2000: extracting casein from the milk antibiotic residue sample as a casein antibiotic residue sample, and extracting casein from the pure milk sample as a pure milk casein sample, specifically comprising the following steps:

[0052] Step S2100: The sample is heated to 40-50°C and the pH value is adjusted to 4.6. At this time, the casein in the sample gradually coagulates and precipitates.

[0053] Step S2200: filtering and separating the milk antibiotic residue sample and the pure milk sample to obtain the casein antibiotic residue sample and the pure milk casein sample.

[0054] Step S3000: collecting fluorescence hyperspectral images of the casein antibiotic residue sample and the pure cow casein sample, as well as collecting all-white calibration images and all-black calibration images.

[0055] Step S4000: Perform black and white correction on the fluorescence hyperspectral images of the casein antibiotic residue sample and the pure cow casein sample, respectively. The correction image calculation formula is as follows:

[0056]

[0057] Among them, R is the fluorescence hyperspectral image after black and white correction, I R is the original fluorescence hyperspectral image collected, I W is the all-white calibration image, I D It is a completely black calibration image.

[0058] Step S5000: extract several pixel points in the central area of ​​all sample fluorescence hyperspectral images as the region of interest, calculate the average spectral curve data, set a preset spectral range, and retain the data within the preset spectral range as the spectral curve data set.

[0059] In this embodiment, 1000 pixels in the central area of ​​the fluorescence hyperspectral image are extracted as the region of interest, and the band range corresponding to the average spectral curve data is calculated to be: 397.66nm-1003.81nm. Since the two ends of the band contain a lot of noise, after removing the noise at both ends, only 421.24nm-699.09nm is retained as the preset spectral range. Finally, 105 spectral bands are retained with a band interval of 2.7nm. The average spectral curve data of casein with different concentrations of ciprofloxacin residues and chloramphenicol residues are shown as follows: Figure 2 shown.

[0060] from Figure 2 It can be seen that the overall trends of the average spectral curves of casein in samples with different types of antibiotic residues and pure milk samples are similar, but the peak sizes are different and there is a slight drift in the peak positions. Therefore, it is possible to judge whether casein interacts with antibiotics based on the peak values, that is, whether there are antibiotic residues in the milk.

[0061] Step S6000: The spectral curve data sets of the casein antibiotic residue sample and the pure cow casein sample are subjected to PCA data dimensionality reduction processing, input into the BP neural network algorithm and trained to obtain an antibiotic residue detection model.

[0062] To improve detection accuracy, step S6000 further includes the following steps:

[0063] Step S6100: Performing PCA (Principal Component Analysis) data dimensionality reduction processing on the average spectral curve data to obtain spectral dimensionality reduction data, specifically including the following steps:

[0064] Step S6110: performing data standardization processing on the average spectrum curve data to obtain average spectrum curve standardized data. The calculation formula for data standardization processing is:

[0065]

[0066] Among them, Xstd is the standardized data of the average spectral curve, X is the original data matrix of the average spectral curve data, μ is the mean of the features of each column of the original data matrix, and σ is the standard deviation of each column of the original data matrix.

[0067] Step S6120: Calculate the covariance matrix of the average spectrum curve normalized data. The calculation formula is:

[0068]

[0069] in, is the covariance matrix of the standardized data of the average spectral curve, m is the number of rows of the original data matrix X, that is, the number of samples, Normalize the transpose of the data for the average spectral curve.

[0070] Step S6130: Calculate the eigenvalues ​​and corresponding eigenvectors of the covariance matrix of the standardized data of the average spectrum curve. The calculation formula is:

[0071]

[0072] Wherein, ν is the eigenvector of the covariance matrix of the average spectral curve normalized data, and λ is the eigenvalue of the covariance matrix of the average spectral curve normalized data.

[0073] Step S6140: Sort the eigenvalues ​​by size, select the eigenvectors corresponding to the first three largest eigenvalues ​​as the first principal component, the second principal component, and the third principal component, and construct an eigenvector matrix.

[0074] Step S6150: Project the average spectral curve normalized data onto the selected principal component to obtain the spectral dimension reduction data of each casein antibiotic residue sample and pure milk casein spectral data. The calculation formula for the score of the average spectral curve normalized data on the first principal component, the second principal component, and the third principal component is:

[0075] Y=X std V (5)

[0076] Among them, Y is the score of each casein antibiotic residue sample on the first principal component, the second principal component, and the third principal component, that is, the spectral dimension reduction data, and V is the eigenvector matrix.

[0077] Step S6200: Use the BP neural network algorithm to read the spectral dimension reduction data, mark the antibiotic labels according to the antibiotic types, and divide the spectral dimension reduction data into 10 non-overlapping subsets, select 9 subsets as training sets each time, and the remaining subset as the test set.

[0078] Step S6300: Normalize the spectral dimension reduction data of the training set to the interval [0, 1], and create a BP neural network algorithm model, in which the hidden layer contains 4 neurons, and set the training parameters (maximum iteration 1000 rounds, target error 1e-6, learning rate 0.01).

[0079] Step S6400: Use the train function to train the BP neural network algorithm model, the input data is the spectral dimension reduction data after normalization of the training set, and the output data is the antibiotic category.

[0080] Step S6500: Use the trained BP neural network algorithm model to simulate and predict the normalized spectral dimension reduction data of the training set and test set, compare the predicted results with the actual results, and calculate the prediction accuracy of the training set and test set. If the accuracy is above 90%, it will be used as the antibiotic residue detection model.

[0081] Step S7000: extract casein from the milk to be tested as a casein antibiotic residue sample, collect a fluorescence hyperspectral image of the casein antibiotic residue sample, input the spectral dimension reduction data into the antibiotic residue detection model and obtain a prediction result.

[0082] In step S1000, milk antibiotic residue samples containing different antibiotics, such as ciprofloxacin, ofloxacin, chloramphenicol, etc., can be prepared. When the corresponding casein is used as the casein antibiotic residue sample and the spectral dimension reduction data of the pure milk casein sample are obtained, during the BP neural network algorithm training process, labels are marked according to different types of antibiotics. Then, in step S7000, the type of antibiotic can be determined based on the label.

[0083] If there are residual antibiotics such as ciprofloxacin, ofloxacin, and chloramphenicol in milk, the casein in the milk will undergo electrostatic interactions or hydrogen bonds with the residual antibiotics such as ciprofloxacin, ofloxacin, and chloramphenicol to form non-covalent complexes. This non-covalent complex will affect the average spectral curve data of the fluorescence hyperspectral image of the milk, that is, the average spectral curve data of the fluorescence hyperspectral image of milk with antibiotic residues and the average spectral curve data of the fluorescence hyperspectral image of milk without antibiotic residues have similar overall trends, but different peak sizes and slight drifts in the peak positions. Therefore, by collecting the fluorescence hyperspectrum of the milk sample to be tested and comparing it with antibiotic residue samples of different antibiotic types and concentrations, it is possible to determine whether there are antibiotic residues in the milk sample to be tested. However, other components in milk, such as fat, will absorb or scatter fluorescence signals, which may lead to fluorescence quenching and reduce the fluorescence intensity, thereby affecting the detection sensitivity of antibiotic residues. Therefore, in this embodiment, by extracting casein from milk, the milk components that produce fluorescence are enriched, and the fluorescence hyperspectral average spectral curve data of casein is obtained, it can be determined whether the milk sample to be tested contains non-covalent complexes, and then the type of antibiotics can be inferred. Compared with directly using the fluorescence hyperspectral average spectral curve data of the milk to be tested, it has higher accuracy.

[0084] It should be understood that the above-described specific embodiments of the present invention are merely illustrative or illustrative of the principles of the present invention and do not constitute limitations of the present invention. Therefore, any modifications, equivalent substitutions, improvements, etc. made without departing from the spirit and scope of the present invention should be included within the scope of protection of the present invention. In addition, the appended claims are intended to cover all variations and modifications that fall within the scope and metes and bounds of the appended claims, or equivalents thereof.

Claims

1. A method for detecting antibiotic residues in milk, characterized in that: The steps include: Step S1000: preparing milk antibiotic residue samples of different concentrations; The milk antibiotic residue samples include: ciprofloxacin, ofloxacin, chloramphenicol; Step S2000: extracting casein from the milk antibiotic residue sample as a casein antibiotic residue sample; The step S2000 specifically includes: Step S2100: heating the milk antibiotic residue sample to 40-50° C. and adjusting the pH value to 4.6, so that casein in the milk antibiotic residue sample is aggregated and precipitated; Step S2200: filtering and separating the milk antibiotic residue sample and the pure milk sample to obtain the casein antibiotic residue sample and the pure milk casein sample; Step S3000: collecting fluorescence hyperspectral images of the casein antibiotic residue sample and the pure milk sample, as well as collecting a full-white calibration image and a full-black calibration image; Step S4000: performing black and white correction on the fluorescence hyperspectral images of the casein antibiotic residue sample and the pure cow casein sample respectively; Step S5000: extracting a plurality of pixel points in the central area of ​​the fluorescence hyperspectral image as a region of interest, calculating average spectral curve data, setting a preset spectral range, and retaining the average spectral curve data within the preset spectral range as a spectral curve data set; Step S6000: performing PCA data dimensionality reduction processing on the spectral curve datasets of the casein antibiotic residue sample and the pure cow casein sample, inputting the data into a BP neural network algorithm model and training the model to obtain an antibiotic residue detection model; Step S7000: extracting casein from the milk to be tested as the casein antibiotic residue sample, collecting the fluorescence hyperspectral image of the casein antibiotic residue sample, inputting the spectral dimension reduction data into the antibiotic residue detection model and obtaining a prediction result.

2. The method for detecting milk antibiotic residues according to claim 1, wherein: The step S1000 specifically includes: Step S1100: preparing aqueous solutions of antibiotics with different concentrations; Step S1200: adding the antibiotic aqueous solution into milk without antibiotic residue to form milk antibiotic residue samples with different concentrations.

3. The method for detecting milk antibiotic residues according to claim 1, wherein: The step S6000 specifically includes: Step S6100: performing PCA data dimensionality reduction processing on the average spectrum curve data to obtain the spectrum dimensionality reduction data; Step S6200: using the BP neural network algorithm model to read the spectral dimension reduction data, labeling antibiotic labels according to antibiotic types, and dividing the spectral dimension reduction data into 10 non-overlapping subsets, selecting 9 subsets as training sets each time, and the remaining subset as a test set; Step S6300: normalizing the spectral dimension reduction data of the training set to the interval [0, 1], creating a BP neural network algorithm model, wherein the hidden layer includes 4 neurons, and setting training parameters; Step S6400: using the train function to train the BP neural network algorithm model, the input data is the spectral dimension reduction data after normalization of the training set, and the output data is the antibiotic category; Step S6500: Use the trained BP neural network algorithm model to simulate and predict the normalized spectral dimension reduction data of the training set and the test set, compare the predicted results with the actual results, and calculate the prediction accuracy of the training set and the test set. If the accuracy is above 90%, it will be used as the antibiotic residue detection model.

4. The method for detecting milk antibiotic residues according to claim 3, wherein: The step S6100 includes: Step S6110: performing data standardization processing on the average spectrum curve data to obtain average spectrum curve standardized data; Step S6120: Calculating the covariance matrix of the average spectrum curve normalized data; Step S6130: Calculating the eigenvalues ​​and corresponding eigenvectors of the covariance matrix of the average spectrum curve normalized data; Step S6140: Sort the eigenvalues ​​by size, select the eigenvectors corresponding to the first three largest eigenvalues ​​as the first principal component, the second principal component, and the third principal component, and construct an eigenvector matrix; Step S6150: Projecting the average spectral curve standardized data onto the selected principal component to obtain the spectral dimension reduction data of the average spectral curve data of each of the casein antibiotic residue samples and the pure milk casein sample.

5. The method for detecting milk antibiotic residues according to claim 1, wherein: The image correction calculation formula in step S4000 is: (1) in, is the fluorescence hyperspectral image after black and white correction, is the original fluorescence hyperspectral image collected, is the all-white calibration image, is the all-black calibration image.

6. The method for detecting milk antibiotic residues according to claim 5, wherein: The calculation formula for the data standardization process is: (2) in, Normalize the data for the average spectral curve, is the original data matrix of the average spectrum curve data, is the mean of each column feature of the original data matrix, is the standard deviation of each column of the original data matrix.

7. The method for detecting milk antibiotic residues according to claim 5, wherein: (3) in, is the covariance matrix of the normalized data for the mean spectral curve, is the original data matrix The number of rows, that is, the number of samples, Normalize the transpose of the data for the average spectral curve.

Citation Information

Patent Citations

  • Method for detecting tetracycline antibiotics based on fluorescence spectrometry

    CN112304914A

  • IMMUNOCHROMATOGRAPHIC TEST STRIP FOR THE RAPID METHOD OF DETERMINING FOUR GROUPS OF ANTIBIOTICS IN MILK WITH THE EXCLUSION OF POSSIBLE FALSIFICATION OF THE SAMPLE

    RU191660U1