A method and system for detecting mycotoxins in feed based on spectral analysis

By constructing a qualified matrix space through spectral analysis, enhancing the characteristic band signals of mycotoxins, and combining residual entropy and range values ​​to correct the signal-to-noise ratio, a contamination index is constructed. This solves the problems of long detection cycles and cumbersome operations in existing technologies, and achieves rapid and accurate mycotoxin detection.

CN121762490BActive Publication Date: 2026-05-26SHAANXI HUA QIN AGRI & ANIMAL HUSBANDRY TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHAANXI HUA QIN AGRI & ANIMAL HUSBANDRY TECH CO LTD
Filing Date
2026-03-03
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

In existing technologies, chemical detection methods for detecting mycotoxins in feed have long detection cycles, are cumbersome to operate, and are difficult to achieve real-time on-site monitoring, thus failing to meet the needs of large-scale, high-throughput rapid screening.

Method used

A spectral analysis-based method is employed to construct a qualified matrix space, calculate the projection components, enhance the characteristic band signals of mycotoxins using sensitivity weights, and correct the signal-to-noise ratio by combining residual entropy and range values ​​to construct a pollution index, thereby achieving accurate detection of mycotoxins.

Benefits of technology

It improves the sensitivity and accuracy of mycotoxin detection, reduces operational difficulty, and enables rapid and convenient detection, making it suitable for large-scale feed testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121762490B_ABST
    Figure CN121762490B_ABST
Patent Text Reader

Abstract

This application relates to the field of intelligent detection technology, and in particular to a method and system for detecting mycotoxins in feed based on spectral analysis. The method includes: acquiring the near-infrared diffuse reflectance spectrum of the feed sample to be tested; constructing an original spectral vector based on the absorbance data of the near-infrared diffuse reflectance spectrum; determining the projection component of the original spectral vector on a pre-constructed qualified matrix space; subtracting the projection component from the original spectral vector to obtain a residual vector; calculating the first-order difference spectrum of the residual vector based on preset sensitivity weights; determining weighted eigenvalues ​​by local feature weighting of the first-order difference spectrum; determining the residual entropy value and the range value of the residual vector; and using the weighted eigenvalues, residual entropy value, and range value to determine the detection result of the feed sample to be tested. Through the above technical solution, more accurate detection results for mycotoxins in feed can be obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent detection technology, and in particular to a method and system for detecting mycotoxins in feed based on spectral analysis. Background Technology

[0002] Feed is the main substance that provides nutrition to animals in livestock and aquaculture. Its quality is directly related to the growth and development of animals, production performance, and the quality and safety of the final product. High-quality feed can provide animals with balanced energy, protein, minerals, vitamins and other nutrients, which helps to improve the animals' immunity and health, thereby improving breeding efficiency and economic benefits. With the development of large-scale and intensive breeding, feed plays an increasingly important role in the breeding industry chain, and higher requirements are placed on its quality control.

[0003] During the production, storage, and transportation of feed, feed raw materials and finished feed are prone to mold growth and the production of mycotoxins due to factors such as temperature, humidity, moisture content, and storage conditions. Common mycotoxins include aflatoxin, ochratoxin, zearalenone, and vomitoxin. These toxins are highly toxic, stable, and difficult to completely destroy by conventional processing methods. Animals that ingest feed containing mycotoxins may experience symptoms such as stunted growth, weakened immunity, and reproductive disorders, and in severe cases, even death. Mycotoxins may also remain in the animal's body or be metabolized and transformed, entering the human body through animal-derived foods such as meat, eggs, and milk, posing a potential threat to human health.

[0004] For the detection of mycotoxins in feed, relevant technologies mainly rely on high-performance liquid chromatography (HPLC) and enzyme-linked immunosorbent assay (ELISA). These methods can achieve quantitative analysis of specific toxins, mainly including sample crushing, organic solvent extraction, immunoaffinity column purification, and on-machine detection. However, chemical detection methods suffer from long detection cycles, cumbersome pretreatment operations, high reagent and consumable costs, and difficulty in achieving real-time on-site monitoring. In the actual scenario of feed production, raw materials are produced in many batches with rapid turnover, and traditional laboratory testing methods cannot meet the needs of large-scale and high-throughput rapid screening. Therefore, it is necessary to combine spectral analysis to achieve the detection of mycotoxins in feed, reduce the operational difficulty of detecting mycotoxins in feed, and improve detection efficiency. Summary of the Invention

[0005] To obtain more accurate detection results for mycotoxins in feed, this application provides a method and system for detecting mycotoxins in feed based on spectral analysis.

[0006] According to a first aspect of the embodiments of this application, a method for detecting mycotoxins in feed based on spectral analysis is provided, comprising: acquiring the near-infrared diffuse reflectance spectrum of the feed sample to be tested; constructing an original spectral vector based on the absorbance data of the near-infrared diffuse reflectance spectrum; determining the projection component of the original spectral vector on a pre-constructed qualified matrix space; subtracting the projection component from the original spectral vector to obtain a residual vector; and calculating the first-order difference spectrum of the residual vector based on a preset sensitivity weight; wherein the sensitivity weight is assigned a greater weight coefficient in the mycotoxin absorption band than in the non-sensitive band; performing local feature weighting on the first-order difference spectrum to determine a weighted eigenvalue; determining the residual entropy value and the range value of the residual vector; using the weighted eigenvalue as a positive correlation factor and the residual entropy value as a negative correlation factor to construct a basic pollution index; and using the range value to perform signal-to-noise ratio amplitude correction on the basic pollution index to obtain a pollution index of the feed sample to be tested, so as to determine the detection result of the feed sample to be tested based on the pollution index.

[0007] This allows for more accurate detection results of mycotoxins in feed.

[0008] Optionally, the qualified matrix space is constructed as follows: a qualified sample set is constructed using the near-infrared diffuse reflectance spectra of multiple qualified feed samples; singular value decomposition or principal component analysis is performed on the qualified sample set; and pre-extraction is performed. The feature vectors will be the first The space spanned by the eigenvectors serves as a qualified matrix space; It is a positive integer.

[0009] In this way, by constructing a space using principal component feature vectors extracted from a large number of qualified samples, the spectral variation range of normal feed matrix can be covered to the maximum extent, ensuring that the projection operation can accurately filter out the matrix background.

[0010] Optionally, the qualified matrix space includes multiple unit orthogonal basis vectors; determining the projection components of the original spectral vector on the qualified matrix space includes: for each unit orthogonal basis vector in the qualified matrix space, calculating the projection coefficient of the original spectral vector on the unit orthogonal basis vector; multiplying each projection coefficient with the corresponding unit orthogonal basis vector, and summing all the product results to obtain the projection components.

[0011] In this way, the orthogonal projection algorithm can mathematically calculate the part of the spectrum to be tested that is highly correlated with the qualified matrix, providing a basis for obtaining the pure residual signal in the future.

[0012] Optionally, the sensitivity weights are determined as follows: the common overtone absorption bands of mycotoxins in the near-infrared spectral region are taken as sensitive bands, the weight coefficients corresponding to the wavelength indices within the sensitive bands are set as a first value, and the weight coefficients corresponding to the wavelength indices outside the sensitive bands are set as a second value; the first value is greater than the second value.

[0013] In this way, by assigning higher weights to the toxin-sensitive bands, the contribution of the target signal can be artificially amplified when calculating the differential spectrum, while suppressing interference from unrelated bands.

[0014] Optionally, the weighted eigenvalues ​​are determined using the following formula: ,in, For weighted eigenvalues, The total number of wavelength points. For wavelength indexing, Sensitivity weights in wavelength index The weighting coefficient at the location, For the residual vector at the wavelength index The intensity value at that location, For the residual vector at the wavelength index The first-order difference value at point ln is a logarithmic function with the natural constant as the base.

[0015] Optionally, determining the residual entropy value of the residual vector includes: calculating the sum of the absolute values ​​of the intensity of each wavelength point in the residual vector, and using the ratio of the absolute value of the intensity of each wavelength point to the sum as the normalized probability value corresponding to the wavelength point; determining the residual entropy value based on the normalized probability values ​​of all wavelength points and the principle of information entropy; the residual entropy value is used to characterize the degree of disorder in the spectral distribution of the residual vector.

[0016] Optionally, the residual entropy value is determined as follows: for each wavelength point, calculate the product of the normalized probability value of the wavelength point and the logarithm of the normalized probability value; sum the products corresponding to all wavelength points, and take the negative of the summation result as the residual entropy value.

[0017] Optionally, the signal-to-noise ratio amplitude is corrected for the baseline contamination index using the range value to obtain the contamination index of the feed sample to be tested, including: ,in, The pollution index, For weighted eigenvalues, The residual entropy value. and The preset energy index and entropy index are, in order. The preset noise constant, Based on basic pollution indicators, The maximum value in the residual vector. It is the minimum value in the residual vector.

[0018] In this way, by combining characteristic intensity, distribution entropy value, and signal amplitude range, the sensitivity is adjusted by exponential adjustment, and the signal-to-noise ratio is corrected by the range term, so that the final pollution index can robustly reflect the degree of mycotoxin pollution.

[0019] Optionally, the test results of the feed sample to be tested are determined based on the contamination index, including: if the contamination index is less than or equal to a preset judgment threshold, the mycotoxin test result of the feed sample to be tested is determined to be qualified; if the contamination index is greater than the preset judgment threshold, the mycotoxin test result of the feed sample to be tested is determined to be contaminated with mycotoxins.

[0020] Optionally, the method further includes: obtaining the measurement temperature of the feed sample to be tested during spectral acquisition, and the reference temperature corresponding to the qualified matrix space, so as to determine the temperature difference between the measurement temperature and the reference temperature; using the temperature difference, a preset thermodynamic coefficient, and the first derivative of the original spectral vector, performing temperature correction on the original spectral vector to obtain the corrected original spectral vector, so as to use the corrected original spectral vector to determine the projection component.

[0021] According to a second aspect of the embodiments of this application, a feed mycotoxin detection system based on spectral analysis is provided, comprising: a processor and a memory, wherein the memory stores computer program instructions, and the computer program instructions, when executed by the processor, implement the steps of the feed mycotoxin detection method based on spectral analysis provided in the first aspect of this application.

[0022] The technical solutions provided by the embodiments of this application can include the following beneficial effects: by constructing a qualified matrix space and calculating the projection components, the background signal belonging to the normal feed matrix in the spectrum to be measured can be stripped, so that the residual vector mainly retains the abnormal signal that cannot be explained by the qualified matrix, namely the potential toxin signal. The introduction of sensitivity weights can specifically enhance the weak signal of the mycotoxin characteristic band. The residual entropy value is used to measure the degree of disorder of the spectral distribution to distinguish between random noise and structured abnormal signals. The finally constructed pollution index combines the signal strength, the degree of disorder of distribution and the signal-to-noise ratio characteristics, which improves the sensitivity and accuracy of detecting mycotoxins that may exist in feed. Compared with chemical detection methods, it can obtain the detection results of mycotoxins in feed more quickly and conveniently, reduce the operational difficulty of detecting mycotoxins in feed, and improve the efficiency of detecting mycotoxins in feed.

[0023] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0024] Figure 1 This is a flowchart illustrating a method for detecting mycotoxins in feed based on spectral analysis, according to an exemplary embodiment.

[0025] Figure 2 This is a scatter distribution diagram for detection using the squared prediction error statistics;

[0026] Figure 3 This is a scatter plot diagram showing the distribution of feed samples tested using the pollution index.

[0027] Figure 4 This is a schematic diagram of a feed mycotoxin detection system based on spectral analysis, according to an exemplary embodiment. Detailed Implementation

[0028] The application scenarios of this application can be the raw material quality inspection of feed processing enterprises, the feed warehousing and acceptance of large-scale farms, and the rapid screening of third-party testing institutions.

[0029] To obtain more accurate detection results for mycotoxins in feed, this application provides a method and system for detecting mycotoxins in feed based on spectral analysis. Figure 1 This is a flowchart illustrating a method for detecting mycotoxins in feed based on spectral analysis, according to an exemplary embodiment. Figure 1 As shown, the method includes the following steps.

[0030] In step S101, the near-infrared diffuse reflectance spectrum of the feed sample to be tested is obtained, an original spectral vector is constructed based on the absorbance data of the near-infrared diffuse reflectance spectrum, and the projection component of the original spectral vector on the pre-constructed qualified matrix space is determined.

[0031] To obtain the near-infrared diffuse reflectance spectrum of the feed sample to be tested, a portable or desktop Fourier transform near-infrared spectrometer can be used, for example.

[0032] The spectral scanning range covers, for example, the long-wave near-infrared region from 900 nm to 2500 nm, which contains the overtone and combination frequency absorption information of CH, OH and NH chemical bonds in mycotoxin molecules. During the acquisition process, in order to eliminate the light scattering effect caused by the uneven particle size of the sample, the feed sample to be tested is scanned at multiple points and the average spectrum is taken.

[0033] For example, five different locations are selected at the center and edge of the sample cup for scanning. The five spectra are then arithmetically averaged to obtain an average spectrum. The absorbance data of the average spectrum are arranged in wavelength order to construct a high-dimensional column vector, i.e., the original spectral vector. The dimension of the original spectral vector is equal to the number of wavelength points collected by the spectrometer. For example, if the spectral resolution is 2 nm and the scanning range is 900 nm-1700 nm, the original spectral vector contains 401 data points.

[0034] In one embodiment, the qualified matrix space is constructed by: constructing a qualified sample set using the near-infrared diffuse reflectance spectra of multiple qualified feed samples; performing singular value decomposition or principal component analysis on the qualified sample set; and extracting the pre-extractable matrix space. The feature vectors will be the first The space spanned by the eigenvectors serves as a qualified matrix space; It is a positive integer.

[0035] A qualified feed sample refers to a sample that has been confirmed by standard chemical methods, such as liquid chromatography-mass spectrometry, to be free of mycotoxins or to have mycotoxin content far below the national limit. A qualified sample set could be, for example, 200 corn samples from different origins, years, or varieties, to cover the natural spectral variation range of normal feed matrix.

[0036] Singular value decomposition is performed on the spectral matrix composed of these 200 spectra. The decomposition yields a series of orthogonal eigenvectors (i.e., basis vectors) and their corresponding singular values. The magnitude of the singular values ​​represents the contribution of the corresponding eigenvector to the explanation of the data variance.

[0037] Before selection eigenvectors, such that The cumulative variance contribution rate of each feature vector reaches a preset threshold, such as 90%. The subspace spanned by eigenvectors is the qualified matrix space.

[0038] The spectral characteristics of the main components of normal feed, such as starch, protein, or fat, are dominant, and these normal feeds account for the vast majority of the spectral energy. This is achieved through extraction before... Each principal component can define the feature space of a normal feed.

[0039] Spectral signals falling within the normal range of matrix variation can be detected through this. The linear combination of basis vectors is used to approximate the reconstruction. Conversely, if mycotoxins are present in the sample, the chemical structure of the toxins is different from that of the matrix, and the spectral signal they produce cannot be fully interpreted by the space, thus remaining in the subsequent projection residuals.

[0040] In one embodiment, the qualified matrix space includes multiple orthogonal unitary basis vectors; determining the projection component of the original spectral vector on the qualified matrix space includes: for each orthogonal unitary basis vector in the qualified matrix space, calculating the projection coefficient of the original spectral vector on the orthogonal unitary basis vector; multiplying each projection coefficient by the corresponding orthogonal unitary basis vector, and summing all the product results to obtain the projection component.

[0041] Specifically, for example, a qualified matrix space consists of multiple orthogonal basis vectors. Zhang Cheng, the original spectral vector is Projection coefficient It is obtained by calculating the vector dot product, i.e. The projection coefficient represents the original spectrum in the th... The magnitude of the components in each basis vector direction.

[0042] Calculate the weighted sum , to obtain the projection components , It represents the part of the spectrum to be measured that can be interpreted by the normal matrix. The orthogonal projection algorithm has high computational efficiency and clear mathematical meaning, and can decompose the original high-dimensional signal into matrix-related and matrix-independent parts.

[0043] In step S102, the original spectral vector is subtracted from the projection component to obtain the residual vector, and the first-order difference spectrum of the residual vector is calculated based on the preset sensitivity weight.

[0044] The sensitivity weight is assigned a greater weight coefficient in the mycotoxin absorption band than in the non-sensitive band; residual vector The calculation formula can be residual vector The above contains all the spectral information that cannot be interpreted by a qualified matrix space, mainly including measurement noise and potential mycotoxin signals. Since the mycotoxin content is extremely low, the signals are often submerged in noise. Therefore, directly analyzing the original strength of the residual vector may not be robust enough.

[0045] First-order difference spectroscopy is obtained by calculating the difference in absorbance at adjacent wavelengths. Using first-order difference can effectively eliminate baseline shift and linear background drift in the spectrum, while highlighting the inflection point and subtle absorption peak characteristics of the spectral curve. For the detection of trace substances, the sharpness of the peak shape is often more discriminative than the absolute intensity.

[0046] In one embodiment, the sensitivity weight is determined as follows: the common overtone absorption band of mycotoxins in the near-infrared spectral region is taken as the sensitive band, the weight coefficient corresponding to the wavelength index within the sensitive band is set to a first value, and the weight coefficient corresponding to the wavelength index outside the sensitive band is set to a second value; the first value is greater than the second value.

[0047] Different mycotoxins contain specific chemical bonds in their molecular structures. For example, aflatoxin B1 contains a terminal furan ring and a coumarin structure, and exhibits characteristic absorption at specific wavelengths in the near-infrared region, such as 1400 nm, 1900 nm, or the 2200 nm-2300 nm range.

[0048] By consulting literature or conducting experimental calibration, these characteristic wavelength ranges can be pre-determined as sensitive bands. For example, the sensitive band can be set to 2250nm-2280nm, and a weighting coefficient of the first value can be assigned to each wavelength point within the sensitive band. In other bands, the weighting coefficient is assigned a second value, for example... .

[0049] In addition to the toxin signal, the residual vector may also contain high-frequency random noise. If features are extracted on an average basis across the entire band, the cumulative effect of noise may mask the weak toxin signal. By amplifying the weight of the sensitive band, prior knowledge can be introduced at the algorithm level, focusing more on the areas where toxins may exist. When calculating feature values ​​in the subsequent process, the contribution of the signal from the toxin band is amplified, improving the signal-to-noise ratio and specificity of the detection.

[0050] In step S103, the first-order difference spectrum is locally feature-weighted to determine the weighted eigenvalue, the residual entropy value of the residual vector and the range value of the residual vector are determined, the weighted eigenvalue is used as a positive correlation factor and the residual entropy value is used as a negative correlation factor to construct the basic pollution index.

[0051] In one embodiment, the weighted eigenvalues ​​are determined by the following formula: ,in, For weighted eigenvalues, The total number of wavelength points. For wavelength indexing, Sensitivity weights in wavelength index The weighting coefficient at the location, For the residual vector at the wavelength index The intensity value at that location, For the residual vector at the wavelength index The first-order difference value at point ln is a logarithmic function with the natural constant as the base.

[0052] In the formula for calculating weighted eigenvalues The term utilizes the nonlinear amplification property of the natural logarithm function, when When the signal is very small, the logarithmic transformation can stretch the difference in values, making minute signal changes more easily distinguishable numerically.

[0053] In the formula for calculating weighted eigenvalues This represents the rate of change or slope modulus of the spectrum at that point, reflecting the steepness of the spectral waveform. The absorption peaks of mycotoxins are usually quite sharp, which can lead to an increase in this value.

[0054] The weighted eigenvalue calculation formula integrates the signal's absolute strength, waveform rate of change, and prior band importance. Only when a signal with a certain strength and a steep waveform appears in a specific band is a signal considered suitable for this calculation. Only then will the value increase significantly, making the weighted eigenvalue a factor that is highly positively correlated with the mycotoxin content.

[0055] In one embodiment, determining the residual entropy value of the residual vector includes: calculating the sum of the absolute values ​​of the intensities at each wavelength point in the residual vector, and using the ratio of the absolute value of the intensity at each wavelength point to the sum as the normalized probability value corresponding to that wavelength point; determining the residual entropy value based on the normalized probability values ​​of all wavelength points and the principle of information entropy; the residual entropy value is used to characterize the degree of disorder in the spectral distribution of the residual vector. The residual entropy value is determined as follows: for each wavelength point, calculating the product of the normalized probability value of that wavelength point and the logarithm of the normalized probability value; summing the products corresponding to all wavelength points, and using the negative of the summation result as the residual entropy value.

[0056] In the specific calculation process, the total energy can be calculated first. , No. The probability value of each wavelength point , Residual entropy value .

[0057] If the residual vector is entirely composed of random noise, and the intensity values ​​at each wavelength are random and relatively uniformly distributed, the residual entropy value represents the highest degree of disorder. It tends towards the maximum value.

[0058] Conversely, if the residual vector contains the characteristic signal of mycotoxins, there will be obvious absorption peaks in specific sensitive bands, resulting in sharp peaks in the energy distribution and energy concentration at a few wavelength points. This local orderliness will lead to a decrease in the disorder represented by the residual entropy value.

[0059] Introducing residual entropy as a negative correlation factor into the evaluation system can further verify the authenticity of the signal from the perspective of statistical distribution, and prevent misjudgment caused by accidental noise spikes at a certain wave point.

[0060] In step S104, the signal-to-noise ratio amplitude of the basic pollution index is corrected using the range value to obtain the pollution index of the feed sample to be tested, so as to determine the test result of the feed sample to be tested based on the pollution index.

[0061] In one embodiment, the signal-to-noise ratio amplitude is corrected for the basic contamination index using the range value to obtain the contamination index of the feed sample to be tested, including: ,in, The pollution index, For weighted eigenvalues, The residual entropy value. and The preset energy index and entropy index are, in order. The preset noise constant, Based on basic pollution indicators, The maximum value in the residual vector. It is the minimum value in the residual vector.

[0062] In the expression for the contamination index of the feed sample to be tested, and These are hyperparameters used to adjust the weights, and they typically take values ​​greater than 1, for example... The purpose of the energy index and entropy index is to amplify, respectively. and Changes The impact.

[0063] Basic pollution indicators took advantage of positive correlation and Negative correlation: when toxins are present, Increase and The decrease caused the score to increase dramatically.

[0064] The contamination index of the feed sample to be tested It is a correction factor. This is the range value, which reflects the overall fluctuation amplitude of the residual signal; It is a preset empirical constant representing the instrument's floor noise level when unloaded or scanning a whiteboard, for example... .

[0065] even though Value and The value shows a certain trend through calculation. If the fluctuation range of the overall signal is very small, such as close to the detection limit of the instrument, the calculated characteristic value may be unreliable. By introducing the ratio of the range to the noise constant, if the range is much greater than the noise constant, it indicates that the signal is significant, the correction factor is greater than 1, and the pollution index is further amplified; if the range is very small, it indicates that the signal is weak, the correction factor is close to 1, and the basic index remains unchanged.

[0066] By obtaining the contamination index of the feed sample to be tested, it is possible to evaluate the degree of mycotoxin contamination in the feed, so as to effectively distinguish between the weak signals of toxins and the pure background without toxins.

[0067] In one embodiment, determining the test result of the feed sample to be tested based on the contamination index includes: determining that the mycotoxin test result of the feed sample to be tested is qualified when the contamination index is less than or equal to a preset judgment threshold; and determining that the mycotoxin test result of the feed sample to be tested is contaminated with mycotoxins when the contamination index is greater than the preset judgment threshold.

[0068] The determination threshold can be obtained through experiments. For example, a gradient of samples with known toxin content can be selected for testing, the contamination index of each sample can be calculated, the receiver operating characteristic curve can be plotted, and the contamination index corresponding to the maximum Youden index can be selected as the determination threshold.

[0069] For example, if the obtained judgment threshold is 5.8, and the pollution index of a sample to be tested is 12.4, then it is judged that there is pollution; if the pollution index of a sample to be tested is 3.2, then it is judged that the feed is not contaminated by mycotoxins, which can quickly screen qualified and unqualified products.

[0070] Figure 2 This is a scatter plot diagram illustrating the detection using squared prediction error statistics, such as... Figure 2 As shown, Figure 2 The horizontal axis represents the sample sequence and the vertical axis represents the SPE (Squared Prediction Error) value of different feed samples. The SPE value only reflects the energy of the residual vector after subtracting the projection component from the original spectral vector.

[0071] like Figure 2 As shown, there is an overlap in the distribution of SPE values ​​between normal and abnormal samples. Some abnormal samples have SPE values ​​below the control limit, resulting in missed detections, while some normal samples have SPE values ​​close to or exceeding the control limit, resulting in false detections. Relying solely on traditional residual statistics is insufficient to effectively extract trace amounts of mycotoxin signals, leading to high false alarm and missed detection rates.

[0072] Figure 3This is a scatter plot diagram illustrating the distribution of feed samples tested using a contamination index. Figure 3 The horizontal axis represents the sample sequence, and the vertical axis represents the contamination index of the feed sample obtained by the method in this application embodiment, such as... Figure 3 As shown, the contamination index of normal samples is mainly concentrated in the low range of 0 to 0.2 and the distribution is relatively convergent, indicating that this application effectively reduces the background response of normal samples by projecting to filter out the matrix background and introducing entropy to suppress noise.

[0073] like Figure 3 As shown, the contamination index of abnormal samples is mainly distributed in the high value range of 0.3 to 1.0, with obvious gaps between them and normal samples. This indicates that by introducing sensitivity weights to amplify the characteristic band signals and using the range for signal-to-noise ratio correction, the characteristic signals of mycotoxins were successfully highlighted.

[0074] The contamination index obtained through the embodiments of this application can effectively solve the problem of strong background interference or weak toxin signals in normal feed substrates, improve the sensitivity and accuracy of mycotoxin detection, and achieve effective separation of qualified samples from contaminated samples.

[0075] In one embodiment, the measurement temperature of the feed sample to be tested during spectral acquisition and the reference temperature corresponding to the qualified matrix space can also be obtained to determine the temperature difference between the measurement temperature and the reference temperature. The temperature difference, the preset thermosensitive coefficient and the first derivative of the original spectral vector are used to perform temperature correction on the original spectral vector to obtain the corrected original spectral vector, so as to determine the projection component using the corrected original spectral vector.

[0076] Temperature correction is performed on the original spectral vector, including: for each wavelength point in the original spectral vector, calculating the product of the temperature difference, the thermodynamic coefficient, and the spectral slope of the original spectral vector at the wavelength point to obtain the temperature correction amount; subtracting the temperature correction amount from the original intensity value of the original spectral vector at the wavelength point to obtain the corrected intensity value at the wavelength point; and using the corrected intensity values ​​at all wavelength points to form the corrected original spectral vector.

[0077] For example, if the measured temperature is 15 degrees Celsius, and the reference temperature (the temperature at which the model was built) is 25 degrees Celsius, then the temperature difference is... Degree, thermal sensitivity coefficient Thermosensitive coefficient is a wavelength-dependent physical quantity that reflects the sensitivity of absorbance to temperature changes; typically, the thermosensitive coefficient is larger in the wavelength range near the water peak. Spectral slope It reflects the changing trend of the waveform.

[0078] The formula for calculating the temperature correction amount can be expressed as follows: The corrected absorbance can be equal to the difference between the original absorbance and the temperature correction.

[0079] Temperature changes mainly cause changes in the hydrogen bond association state of water molecules, leading to a shift in the spectral absorption peak. By using a slope-based correction method, the spectra collected at different temperatures can be normalized to the modeling temperature, thereby avoiding projection deviations caused by temperature differences and avoiding false positives in the results of mycotoxin contamination of feed caused by environmental factors.

[0080] Figure 4 This is a schematic diagram illustrating the structure of a feed mycotoxin detection system 1000 based on spectral analysis, according to an exemplary embodiment. (Refer to...) Figure 4 The feed mycotoxin detection system 1000 based on spectral analysis includes a processor 1100 and a memory 1200. The memory 1200 stores computer program instructions, which, when executed by the processor 1100, implement all or part of the steps of the feed mycotoxin detection method based on spectral analysis in this application.

[0081] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only.

[0082] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.

Claims

1. A method for detecting mycotoxins in feed based on spectral analysis, characterized in that, include: Obtain the near-infrared diffuse reflectance spectrum of the feed sample to be tested, construct the original spectral vector based on the absorbance data of the near-infrared diffuse reflectance spectrum, and determine the projection component of the original spectral vector on the pre-constructed qualified matrix space. Qualified matrix space: A qualified sample set is constructed using the near-infrared diffuse reflectance spectra of multiple qualified feed samples. Singular value decomposition or principal component analysis is performed on the qualified sample set before extraction. The feature vectors will be the first The space spanned by the eigenvectors serves as a qualified matrix space; It is a positive integer; The residual vector is obtained by subtracting the projection component from the original spectral vector, and the first-order difference spectrum of the residual vector is calculated based on the preset sensitivity weights. The sensitivity weight is assigned a greater weight coefficient in the mycotoxin absorption band than in the non-sensitive band. Sensitivity weighting: The common overtone absorption band of mycotoxins in the near-infrared spectral region is taken as the sensitive band. The weighting coefficient corresponding to the wavelength index within the sensitive band is set as the first value, and the weighting coefficient corresponding to the wavelength index outside the sensitive band is set as the second value; the first value is greater than the second value. Local feature weighting is performed on the first-order difference spectrum to determine the weighted eigenvalues, the residual entropy value and the range value of the residual vector are determined, and the weighted eigenvalues ​​are used as positive correlation factors and the residual entropy value is used as negative correlation factors to construct basic pollution indicators. By using the range values ​​to correct the signal-to-noise ratio amplitude of the basic pollution indicators, the pollution index of the feed sample to be tested is obtained, including: ,in, The pollution index, For weighted eigenvalues, The residual entropy value. and The preset energy index and entropy index are, in order. The preset noise constant, Based on basic pollution indicators, The maximum value in the residual vector. The minimum value in the residual vector is used to determine the test result of the feed sample to be tested based on the contamination index.

2. The method for detecting mycotoxins in feed based on spectral analysis according to claim 1, characterized in that, The qualified matrix space includes multiple unit orthogonal basis vectors; the projection components of the original spectral vector onto the qualified matrix space are determined, including: For each unit orthogonal basis vector in the qualified matrix space, calculate the projection coefficient of the original spectral vector onto the unit orthogonal basis vector; multiply each projection coefficient by the corresponding unit orthogonal basis vector, and sum all the product results to obtain the projection component.

3. The method for detecting mycotoxins in feed based on spectral analysis according to claim 1, characterized in that, The weighted eigenvalues ​​are determined by the following formula: ,in, For weighted eigenvalues, The total number of wavelength points. For wavelength indexing, Sensitivity weights in wavelength index The weighting coefficient at the location, For the residual vector at the wavelength index The intensity value at that location, For the residual vector at the wavelength index The first-order difference value at point ln is a logarithmic function with the natural constant as the base.

4. The method for detecting mycotoxins in feed based on spectral analysis according to claim 1, characterized in that, Determining the residual entropy value of the residual vector includes: Calculate the sum of the absolute values ​​of the intensity at each wavelength point in the residual vector, and use the ratio of the absolute value of the intensity at each wavelength point to the sum as the normalized probability value corresponding to the wavelength point. The residual entropy value is determined based on the normalized probability values ​​of all wavelength points and the principle of information entropy; the residual entropy value is used to characterize the degree of disorder in the spectral distribution of the residual vector.

5. The method for detecting mycotoxins in feed based on spectral analysis according to claim 4, characterized in that, The residual entropy value is determined in the following way: For each wavelength point, calculate the product of the normalized probability value and the logarithm of the normalized probability value; sum the products corresponding to all wavelength points, and take the negative of the summation result as the residual entropy value.

6. The method for detecting mycotoxins in feed based on spectral analysis according to claim 1, characterized in that, The method further includes: The measurement temperature of the feed sample to be tested during spectral acquisition, and the reference temperature corresponding to the qualified matrix space are obtained to determine the temperature difference between the measurement temperature and the reference temperature. The original spectral vector is temperature-corrected using the temperature difference, a preset thermistor coefficient, and the first derivative of the original spectral vector to obtain the corrected original spectral vector, which is then used to determine the projection components.

7. A feed mycotoxin detection system based on spectral analysis, characterized in that, include: The processor and memory, wherein the memory stores computer program instructions that, when executed by the processor, implement the feed mycotoxin detection method based on spectral analysis according to any one of claims 1-6.