A method and system for detecting the quality of dairy products based on spectral analysis

By modulating the light source and the reference optical path to generate a corrected spectrum, and combining an integrating sphere and a ring multi-angle detector array, a scattering compensation factor is constructed, which solves the problems of scattering interference and light source drift in the spectral detection of dairy products, and realizes the accurate detection of the component content of dairy products.

CN121027015BActive Publication Date: 2026-02-27SCI & TECH SUPPORT CENT SICHUAN ACAD OF AGRI SCI

Patent Information

Application Number
CN202511537855.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-27
Publication Date
2026-02-27
Estimated Expiration
2045-10-27

AI Technical Summary

Technical Problem

Existing methods for spectral detection of dairy products suffer from problems such as scattering interference leading to distortion of absorption characteristics and insufficient stability due to light source drift and environmental conditions.

Method used

A calibrated spectrum is generated by using a modulated light source and a reference optical path. By combining an integrating sphere and a ring multi-angle detector array, a scattering compensation factor is constructed to eliminate light source intensity drift and environmental interference, obtain an effective absorption spectrum, and output the content of dairy product components using a component calculation model.

Benefits of technology

It improves the accuracy and batch-to-batch consistency of dairy product testing results, effectively separates scattering contributions, obtains spectra that are closer to the true absorption characteristics, and accurately outputs the content of components such as fat, protein, and lactose.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121027015B_ABST
    Figure CN121027015B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a kind of based on the method and system for detecting the quality of dairy product of spectral analysis, belong to optical detection technical field.The method comprises: the sample of the dairy product to be detected is introduced into thermostatic colorimetric cell, utilizes modulated light source to emit incident light, while collecting original spectrum signal in sample channel and reference channel;Based on original spectrum signal, generate correction spectrum, and input correction spectrum into integrating sphere to collect full direction transmission light, obtain total transmission spectrum;Based on the scattering distribution data of different angles obtained by arranging annular multi-angle detector array on the outer wall of thermostatic colorimetric cell;Based on scattering distribution data and total transmission spectrum, construct scattering compensation factor, and make scattering compensation factor act on total transmission spectrum to obtain effective absorption spectrum;Effective absorption spectrum is input into component decomposition model, and the content of each target component of the dairy product to be detected is output.The present application scheme realizes the rapid, nondestructive and high-precision detection of the content of key components of dairy product.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of optical detection, in particular to a dairy product quality detection method based on spectral analysis and a dairy product quality detection system based on spectral analysis. BACKGROUND

[0002] As a typical turbid liquid system, dairy products contain various components such as proteins, fats, and lactose, and are dispersed with a large number of colloidal particles and fat droplets. For the quality detection of such a complex system, spectral analysis methods are widely used for dairy product component detection and quality control due to their advantages of rapidity, non-destructiveness, and multi-parameter parallel measurement. However, there are still several technical bottlenecks in existing spectral detection in the dairy product field, which directly affect the accuracy and stability of the detection results.

[0003] The strong light scattering effect of dairy products can seriously interfere with the spectral signal. Due to the uneven size distribution of fat globules and protein particles in the turbid liquid, a large amount of scattering occurs inside the sample, resulting in baseline shift and distortion of the absorption characteristics of the transmitted spectrum. In the prior art, mathematical preprocessing methods such as multivariate scatter correction (MSC) or standard normal variable transformation (SNV) are usually used to weaken the scattering effect, but such methods rely on empirical modeling and are easily affected by sample batch differences, and in the case of large differences in dairy product formulations or unstable emulsification state, the correction effect is significantly reduced.

[0004] The stability of the light source and the change of the environmental conditions during the detection process can also introduce errors. Dairy product detection often needs to be carried out at a certain temperature, and if the temperature control of the cuvette is not stable, it will cause the crystallization of milk fat or phase change, further aggravating the scattering effect; at the same time, the drift of the light source intensity or the interference of the environmental light will directly affect the spectral reference, resulting in large deviation between the results of the same sample in different detection batches. The existing solutions rely on external standard samples for periodic calibration, and cannot realize real-time correction of the drift during the detection process, so it is difficult to ensure the reliability of long-term continuous detection.

[0005] In summary, the existing spectral detection scheme for dairy products generally has the problems of insufficient handling of scattering interference and excessive dependence on the stability of the light source and the environment, which leads to obvious deficiencies in the accuracy and batch consistency of the detection results. SUMMARY

[0006] The purpose of the embodiments of the present application is to provide a dairy product quality detection method and system based on spectral analysis to at least solve the problems of absorption characteristic distortion caused by scattering interference in the existing spectral detection of dairy products and insufficient stability caused by the influence of light source drift and environmental conditions during the detection process.

[0007] In order to achieve the above object, the present application provides a milk quality detection method based on spectral analysis, which comprises: introducing a milk sample to be detected into a constant-temperature cuvette, emitting incident light by using a modulated light source, and collecting original spectral signals in a sample channel and a reference channel simultaneously; generating a corrected spectrum based on the original spectral signals, and inputting the corrected spectrum into an integrating sphere to collect omnidirectional transmission light, thereby obtaining a total transmission spectrum; obtaining scattering distribution data at different angles based on an annular multi-angle detector array arranged on the outer wall of the constant-temperature cuvette; constructing a scattering compensation factor based on the scattering distribution data and the total transmission spectrum, and applying the scattering compensation factor to the total transmission spectrum to obtain an effective absorption spectrum; and inputting the effective absorption spectrum into a component decomposition model to output the content of each target component of the milk sample to be detected.

[0008] Optionally, the modulated light source is a multi-band LED array, and each band emits incident light according to a preset pulse frequency; the step of emitting incident light by using a modulated light source comprises: sequentially lighting each band light source in the multi-band LED array in each sampling period to obtain incident light covering a preset wavelength range; pulse-modulating the light-emitting timing of each band light source during the lighting process, so that the incident light presents a modulation feature corresponding to the preset pulse frequency in the time domain; and outputting an incident light sequence covering the preset wavelength range and having the pulse modulation feature when one sampling period is completed.

[0009] Optionally, the sample channel is arranged on the light-emitting side of the constant-temperature cuvette and is used for collecting the spectral signal of the milk sample after transmission under the action of the incident light; and the reference channel is arranged as a light path parallel to the constant-temperature cuvette and is used for collecting the spectral signal of the light not passing through the milk sample, so as to serve as a reference benchmark for generating the corrected spectrum.

[0010] Optionally, the step of collecting original spectral signals in the sample channel and the reference channel simultaneously comprises: detecting the spectral signal after transmission through the milk sample in the sample channel during the process that the incident light sequence irradiates the cuvette, and generating a sample channel original spectrum; detecting the spectral signal not passing through the milk sample in the reference channel during the process that the incident light sequence irradiates the reference path, and generating a reference channel original spectrum; and storing the sample channel original spectrum and the reference channel original spectrum respectively, and taking them as the original spectral signals.

[0011] Optionally, the step of generating a corrected spectrum based on the original spectral signals comprises: performing intensity normalization processing on the original spectral signal of the reference channel to obtain an emission benchmark of the light source in the current sampling period; performing ratio calculation on the original spectral signal of the sample channel and the emission benchmark band by band to obtain an intermediate spectrum which has eliminated the influence of light source intensity drift; and performing dark current deduction and baseline smoothing operation on the intermediate spectrum to output the corrected spectrum.

[0012] Optionally, the correction spectrum is input into an integrating sphere to collect omnidirectional transmission light to obtain a total transmission spectrum, comprising: introducing the correction spectrum into an entrance end of the integrating sphere through an exit of a colorimetric cell, and limiting the entrance diameter of the integrating sphere and the reflectivity of the inner wall to satisfy a preset proportional relationship, so as to ensure that light of different angles is collected; after multiple diffuse reflections occur on the inner surface of the integrating sphere, the light of different angles is integrated into a unified light field distribution by the light path equalization effect inside the sphere; and light flux integration is performed on the unified light field distribution to obtain the total transmission spectrum.

[0013] Optionally, the scattering distribution data of different angles is obtained based on the annular multi-angle detector array arranged on the outer wall of the constant-temperature colorimetric cell, comprising: a plurality of light collection windows are arranged on the outer wall of the constant-temperature colorimetric cell at a preset angle interval, so that the scattered light transmitted through the dairy product sample is emitted at different angles; the scattering intensity values of the corresponding angles are sequentially obtained at each light collection window, and the scattering intensity values are arranged in sequence according to the collection order to form an angular intensity sequence; and the angular intensity sequence is normalized to eliminate the influence of the path length difference of different angles, and the scattering distribution data is output.

[0014] Optionally, the scattering compensation factor is constructed based on the scattering distribution data and the total transmission spectrum, and the scattering compensation factor is applied to the total transmission spectrum to obtain an effective absorption spectrum, comprising: the scattering distribution data and the total transmission spectrum are input into the Mie scattering inversion operation of limited angle sampling according to the wave band corresponding relationship, and the equivalent particle size distribution parameters and the effective scattering coefficient under each wave band are calculated; the compensation matrix is generated based on the equivalent particle size distribution parameters and the effective scattering coefficient, and the compensation matrix is stored as the scattering compensation factor; and the scattering compensation factor is called to perform scattering subtraction operation on the total transmission spectrum wave by wave, and the effective absorption spectrum is output.

[0015] Optionally, the effective absorption spectrum is input into a component decomposition model to output the content of each target component of the dairy product to be detected, comprising: the effective absorption spectrum is divided into a plurality of characteristic intervals according to wave bands, and the absorption intensity of each characteristic interval is taken as an input variable; the regression equation corresponding to the target component is called in the component decomposition model to perform quantitative operation on each target component respectively; wherein, each target component is fat, protein and / or lactose; after the quantitative operation is completed, the content of each target component is output, and the content result and the corresponding effective absorption spectrum are stored together.

[0016] The second aspect of the present application provides a milk quality detection system based on spectral analysis, comprising: a first acquisition unit for introducing a sample of milk to be detected into a constant-temperature cuvette, emitting incident light by using a modulated light source, and collecting original spectral signals in a sample channel and a reference channel; a correction unit for generating a corrected spectrum based on the original spectral signals, and inputting the corrected spectrum into an integrating sphere to collect omnidirectional transmission light to obtain a total transmission spectrum; a second acquisition unit for obtaining scattering distribution data at different angles based on an annular multi-angle detector array arranged on the outer wall of the constant-temperature cuvette; a compensation unit for constructing a scattering compensation factor based on the scattering distribution data and the total transmission spectrum, and applying the scattering compensation factor to the total transmission spectrum to obtain an effective absorption spectrum; and an output unit for inputting the effective absorption spectrum into a component decomposition model to output the content of each target component of the milk to be detected.

[0017] Through the above technical solution, by stabilizing the detection environment in the constant-temperature cuvette, the corrected spectrum is generated by combining the modulated light source and the reference light path, which can effectively offset the light source intensity drift and environmental interference; then the omnidirectional transmission light is obtained by using the integrating sphere, which avoids the optical path deviation caused by single-angle measurement, and the scattering distribution is obtained by using the annular multi-angle detection array, thereby realizing comprehensive characterization of the strong scattering and turbid system. By joint analysis of the scattering distribution and the total transmission spectrum, the scattering compensation factor is constructed, which can separate the scattering contribution at the spectral level to obtain the effective absorption spectrum closer to the real absorption characteristics. Finally, the effective absorption spectrum is input into the component decomposition model, which can accurately output the content of the target components such as fat, protein and lactose in the milk, thereby improving the accuracy and batch consistency of the detection results.

[0018] Other features and advantages of the present application will be described in detail in the following detailed description. BRIEF DESCRIPTION OF DRAWINGS

[0019] The accompanying drawings are included to provide a further understanding of the present application and constitute a part of the specification, and are used together with the following detailed description to explain the present application, but do not constitute a limitation on the present application. In the drawings:

[0020] Figure 1 is a step flow chart of a milk quality detection method based on spectral analysis provided by an embodiment of the present application;

[0021] Figure 2 is a system structure diagram of a milk quality detection system based on spectral analysis provided by an embodiment of the present application. DETAILED DESCRIPTION

[0022] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the following will be combined with the accompanying drawings for the embodiments of the present application to make a clear and complete description of the technical solutions in the embodiments of the present application. It should be understood that the specific implementation manners described herein are only used for explaining and explaining the embodiments of the present application and should not be used to limit the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.

[0023] It should be noted that if the embodiments of the present application involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are only used to explain the relative positional relationship, movement condition, etc. between components in a certain specific posture (as shown in the drawings), and if the specific posture changes, the directional indications also change accordingly.

[0024] In addition, if the embodiments of the present application involve descriptions such as “first”, “second”, etc., the descriptions of “first”, “second”, etc. are only for description purposes and should not be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features limited by “first” and “second” can explicitly or implicitly include at least one of the features. In addition, the technical solutions of each embodiment can be combined with each other, but it must be based on the fact that a person of ordinary skill in the art can realize it, and when the combination of technical solutions contradicts each other or cannot be realized, it should be considered that the combination of technical solutions does not exist and is not within the protection scope claimed by the present application.

[0025] Figure 1 is a step flow chart of a milk product quality detection method based on spectral analysis provided by an embodiment of the present application. As shown in Figure 1 , the present application provides a milk product quality detection method based on spectral analysis, which comprises:

[0026] Step S1: introducing a sample of a milk product to be detected into a constant-temperature colorimetric cell, emitting incident light by using a modulated light source, and collecting original spectral signals in a sample channel and a reference channel.

[0027] Specifically, the modulated light source is a multi-band LED array, each band emits incident light according to a preset pulse frequency; the method of emitting incident light by using the modulated light source comprises: sequentially lighting each band light source in the multi-band LED array in each sampling period to obtain incident light covering a preset wavelength range; pulse modulating the light-emitting timing of each band light source during the lighting process, so that the incident light presents a modulation characteristic corresponding to the preset pulse frequency in the time domain; when one sampling period is completed, an incident light sequence covering the preset wavelength range and having the pulse modulation characteristic is output.

[0028] Further, the sample channel is arranged on the light-out side of the constant-temperature cuvette for collecting the spectrum signal of the dairy product sample after transmission under the incident light; and the reference channel is arranged in parallel with the constant-temperature cuvette for collecting the spectrum signal without passing through the dairy product sample as a reference for generating the corrected spectrum.

[0029] In the embodiment of the present application, the original spectrum signals are collected in the sample channel and the reference channel simultaneously, including: detecting the spectrum signal of the dairy product sample after transmission in the sample channel during the process of the incident light sequence irradiating the cuvette, and generating the sample channel original spectrum; detecting the spectrum signal without passing through the dairy product sample in the reference channel during the process of the incident light sequence irradiating the reference path, and generating the reference channel original spectrum; and storing the sample channel original spectrum and the reference channel original spectrum respectively as the original spectrum signals.

[0030] In the embodiment of the present application, the dairy product sample to be detected needs to be introduced into the constant-temperature cuvette. The constant-temperature cuvette is a liquid sample container for spectrum detection, which has a regular optical transmission path inside. It is made of quartz or high-transmittance glass, which has strong optical transparency to avoid excessive absorption or scattering of the material itself to the multi-band incident light. A constant-temperature jacket is arranged around the outer wall of the cuvette, and temperature regulating liquid can be introduced into the jacket or temperature control can be performed by a semiconductor refrigeration sheet to keep the temperature inside the cuvette in a stable range. The reason for this design is that dairy products are a kind of opaque liquids, which contain a large number of fat globules and protein particles. If the temperature is not stable, the fat part will change phase or aggregate, directly changing the scattering state, and then causing a large deviation of the spectrum curve. Therefore, the constant-temperature cuvette is not only a sample container, but more importantly, it provides a detection cavity with a uniform thermal environment and a stable optical path.

[0031] After the dairy product sample is injected into the constant-temperature cuvette, the next step is to use the modulated light source to emit incident light to irradiate the sample. The modulated light source referred to here is a multi-band LED array. The wavelengths of each LED in the array can cover the key interval from visible light to near-infrared, such as 450nm, 620nm, 850nm and 1300nm, etc. These wave bands correspond to the characteristic absorption intervals of fat, protein and lactose in dairy products respectively. In order to ensure signal quality, each LED band is not continuously constant, but is driven according to a preset pulse frequency. The purpose of this is to: through time domain modulation, the incident light has a specific frequency label, which can be separated from environmental light interference and electrical noise through phase-locked demodulation in subsequent signal processing.

[0032] More specifically, the use of modulated light sources to emit incident light comprises the following steps: in each sampling period, the light sources in the LED array are sequentially lit up, each waveband emitting light for a set time slice. For example, a sampling period is set to several milliseconds, then the 450 nm waveband LED can be lit up in the first time slice, the 620 nm waveband LED in the second time slice, and so on until all the preset wavebands are sequentially lit up and a cycle is completed. During the lighting process, the driving current of each LED is modulated according to a preset pulse frequency, such as 1 kHz or higher. In this way, the output light exhibits obvious pulse characteristics in the time domain. Those skilled in the art can understand that the light of different wavebands each carries a modulation frequency label. When a sampling period ends, an incident light sequence covering the preset wavelength range and having pulse modulation characteristics is obtained, which enters the constant-temperature cuvette to perform waveband-by-waveband excitation and transmission measurement on the sample.

[0033] In the light path design of the cuvette, two acquisition channels are provided, one being a sample channel and the other being a reference channel. The sample channel is arranged at the light exit side of the cuvette, that is, the incident light directly irradiates the detection light path corresponding to the channel after passing through the dairy product sample. Through this arrangement, the signal acquired by the sample channel fully reflects the transmission spectral characteristics of the dairy product under the action of the incident light. Correspondingly, the reference channel is arranged as a parallel light path of the cuvette, which does not pass through the dairy product sample but directly irradiates the detector from the light source. The main role of the reference channel is to provide the output reference of the light source itself, so as to subsequently correct the data of the sample channel. In this way, the reference channel and the sample channel form a pair of complementary relationship: the former reflects the original characteristics of the light source, and the latter reflects the transmission characteristics of the sample. Through comparison of the two, the influence of non-sample factors such as light source intensity drift and environmental interference can be eliminated.

[0034] In the implementation process, the original spectral signals are simultaneously acquired in the sample channel and the reference channel. Specifically, when the incident light sequence irradiates the cuvette, part of the transmitted light energy reaches the outlet of the cuvette after being absorbed and scattered in the dairy product sample. The sample channel detects the transmitted light at this time and records the curve of intensity change with wavelength, which is the original spectrum of the sample channel. At the same time, the reference channel synchronously receives the light signal from the light source branch and records the corresponding wavelength-intensity curve to obtain the original spectrum of the reference channel. Since the acquisition of the two is performed synchronously and the same incident light sequence is used, each waveband has corresponding original spectral data in the sample channel and the reference channel.

[0035] Further, the sample channel raw spectrum and the reference channel raw spectrum are stored respectively and used as input data for generating the corrected spectrum. The sample channel raw spectrum contains the real interaction between the dairy product sample and the light, including absorption characteristics and scattering effects. The reference channel raw spectrum is used as a reference to eliminate the fluctuations of the light source intensity and environmental factors. By combining the two, a more stable and accurate corrected spectrum can be obtained. This step is crucial in the entire spectral analysis process, because if the reference data is missing, the sample data will be directly affected by the light source drift, thus reducing the detection accuracy; if only the reference data is available without the sample data, the information of the dairy product composition cannot be obtained. Therefore, the sample channel and the reference channel must exist in pairs and be synchronized at each collection time to ensure the reliability of the subsequent analysis.

[0036] It is worth emphasizing that the structure of the constant-temperature cuvette is crucial to ensure the stability of the collected signal. In dairy product detection, temperature fluctuations can cause partial solidification of milk fat or aggregation of proteins, which can cause drastic changes in the scattering behavior of light in the sample, resulting in large differences in the spectral curve between different detection periods. By setting a constant-temperature jacket, the sample inside the cuvette can always be kept at a stable temperature, greatly reducing the impact of such physical changes. In addition, the optical path length of the constant-temperature cuvette is usually between 5 mm and 20 mm, which can be adjusted according to the turbidity of the dairy product. Too short an optical path length will result in unobvious signal characteristics, and too long an optical path length may completely lose the transmission signal. The operating personnel can flexibly select the optical path length according to the variety of the dairy product (such as whole milk, low-fat milk, or yogurt).

[0037] Step S2: generating a corrected spectrum based on the raw spectrum signal and inputting the corrected spectrum into an integrating sphere to collect omnidirectional transmission light to obtain a total transmission spectrum.

[0038] Specifically, generating a corrected spectrum based on the raw spectrum signal includes: performing intensity normalization processing on the raw spectrum signal of the reference channel to obtain an emission reference of the light source in the current sampling period; performing ratio calculation on the raw spectrum signal of the sample channel and the emission reference wave by wave to obtain an intermediate spectrum that has eliminated the influence of light source intensity drift; performing dark current subtraction and baseline smoothing operations on the intermediate spectrum to output the corrected spectrum.

[0039] Further, the corrected spectrum is input into an integrating sphere to collect the full-directional transmission light to obtain the total transmission spectrum, comprising: introducing the corrected spectrum into an inlet end of the integrating sphere through an outlet of the colorimetric cell, and limiting the inlet diameter of the integrating sphere and the internal wall reflectivity to satisfy a preset proportional relationship, so as to ensure that the light of different angles is collected; after multiple diffuse reflections on the inner surface of the integrating sphere, the light of different angles is integrated into a unified light field distribution by the light path homogenization effect inside the sphere; and the total transmission spectrum is obtained by performing light flux integration on the unified light field distribution.

[0040] In the embodiment of the present application, after obtaining the original spectrum signals of the sample channel and the reference channel, the original data needs to be further processed to generate a corrected spectrum, and on this basis, the full-directional transmission light is collected by the integrating sphere to obtain the total transmission spectrum. The reason for going through such a two-step processing chain is that the original spectrum data often contains fluctuations in the output of the light source itself, noise caused by changes in environmental conditions, and interference such as the inherent dark current of the detector. If directly used for subsequent analysis, it will cause the curve of the real absorption characteristics in the dairy product to be covered or even distorted. Therefore, it is necessary to eliminate these non-sample factors through reference correction, ratio operation and signal smoothing, and then collect comprehensive transmission light signals in the integrating sphere to ensure that the final total transmission spectrum is accurate and comparable.

[0041] Further, generating the corrected spectrum based on the original spectrum signal comprises the following steps. First, performing intensity normalization processing on the original spectrum signal of the reference channel. The purpose of this step is to obtain the emission reference of the light source in the current sampling period. Since continuous sampling is often required for dairy product detection, fluctuations in the output of the light source are inevitable, and the reference channel can reflect the real output state of the light source in real time. By normalizing the reference signal, the influence of inconsistent light intensity between different sampling periods can be eliminated, so that it can be used as a unified standard for subsequent comparison.

[0042] Further, the original spectrum signal of the sample channel is calculated by wave band ratio with the emission reference. The so-called wave band ratio is that at each preset wavelength point, the intensity value of the sample channel is divided by the normalized intensity value of the reference channel. The effect of this is to eliminate common factors such as light source drift and environmental light intensity changes, and only the absorption and scattering of the sample itself to the light are retained, so that a purer intermediate spectrum is obtained. It can be understood that the intermediate spectrum is equivalent to the sample transmission curve recalibrated under the reference condition of the light source, which is no longer disturbed by external unstable factors.

[0043] After obtaining the intermediate spectrum, dark current subtraction and baseline smoothing operations are also needed. Dark current is the output signal of the detector in the absence of light input, which will introduce a background offset in the entire spectral range if not subtracted; while baseline drift may be due to the non-uniformity of the detector response or the accumulation of electronic noise. By recording the dark current curve before spectrum acquisition and then subtracting it point by point in the processing, this background offset can be eliminated; at the same time, using polynomial fitting or moving average for baseline smoothing can further suppress high-frequency noise, making the spectrum curve smoother and more continuous. After the above processing, the final corrected spectrum is obtained. Compared with the original spectrum, the corrected spectrum has removed the interference of light source fluctuations, dark current and baseline noise, etc., and is closer to the real optical characteristics of the sample itself.

[0044] Further, the corrected spectrum needs to be input into the integrating sphere to collect the omnidirectional transmitted light and obtain the total transmittance spectrum. The details of this process also deserve explanation. The so-called "input corrected spectrum" does not mean directly inputting the numerical value, but means irradiating the corrected incident light sequence to the outlet of the cuvette and then into the entrance end of the integrating sphere. The integrating sphere is a spherical cavity, the inner wall of which is coated with a high-reflectivity diffuse material, such as barium sulfate or polytetrafluoroethylene. Here it is required that the entrance diameter of the integrating sphere and the reflectivity of the inner wall satisfy a predetermined proportional relationship, usually the entrance diameter should be much smaller than the diameter of the sphere to reduce direct light leakage, and the reflectivity of the inner wall should be greater than 90% to ensure that the incident light is not absorbed too much after multiple reflections. Through such structural constraints, it can be ensured that the light transmitted at different angles can be effectively collected.

[0045] When the corrected spectrum passes through the outlet of the cuvette and enters the integrating sphere, the light undergoes multiple diffuse reflections on the inner wall surface. Each reflection will randomize the direction of the light, gradually forming a uniform light field distribution inside the integrating sphere. It can be understood that the light beam originally emitted from the outlet of the cuvette may be concentrated at certain angles, but after multiple scattering and homogenization in the integrating sphere, a uniform light field distribution is finally formed inside the spherical cavity, which is independent of the incident direction. This homogenization greatly eliminates the influence of angle difference on the measurement results.

[0046] Finally, the total transmittance spectrum is obtained by performing luminous flux integration on the uniform light field distribution. The process of luminous flux integration is essentially to collect and accumulate the uniformly distributed light intensity inside the spherical cavity point by point according to the spectral wavelength, to obtain a total value containing the contributions of all angle transmissions. The total transmittance spectrum generated in this way, compared with the single-angle transmission measurement, can more comprehensively reflect the absorption of the dairy product sample to light.

[0047] Step S3: Obtain scattering distribution data at different angles based on arranging a ring-shaped multi-angle detector array on the outer wall of the constant-temperature cuvette.

[0048] Specifically, a plurality of light collection windows are arranged on the outer wall of the constant-temperature cuvette at preset angle intervals, so that the scattered light transmitted through the dairy product sample is emitted at different angles; the scattered intensity values at the corresponding angles are sequentially obtained at the light collection windows, and the scattered intensity values are arranged in the order of acquisition to form an angular intensity sequence; and the angular intensity sequence is normalized to eliminate the influence of the path length difference at different angles and output scattered distribution data.

[0049] In the embodiment of the present application, in order to accurately obtain the scattering characteristics of the dairy product sample to light, a plurality of light collection windows are arranged on the outer wall of the constant-temperature cuvette, and the light collection windows are arranged at preset angle intervals. The "preset angle interval" is not randomly selected, but is planned in combination with the sensitive angle of the particle size distribution according to the Mie scattering theory, for example, a plurality of sampling angles are uniformly divided between 0° and 180°, such as 15°, 30°, 45°, etc., to ensure that the small-angle, medium-angle and large-angle scattering regions can be covered. The purpose of such arrangement is to obtain a complete description of the scattering distribution curve with as few acquisition points as possible, so as to balance the measurement efficiency and signal resolution.

[0050] When the incident light passes through the dairy product sample, part of the photons will be elastically scattered due to the presence of fat globules and protein particles, and the scattered light is emitted at different angles from the wall of the cuvette. Each light collection window receives scattered light in different directions. By sequentially obtaining the scattered intensity values at each light collection window, a set of intensity data corresponding to the angles can be obtained. In order to ensure the reliability of the data, the area, light-transmitting material and optical lens parameters of each light collection window need to be uniform, so that the scattering intensities measured at different angles are comparable. During acquisition, angle-by-angle scanning or parallel acquisition is usually set, and persons skilled in the art can select according to experimental conditions.

[0051] After obtaining the scattered intensity values at different angles, the data needs to be arranged in the order of acquisition to form an angular intensity sequence. The significance of this sequence is that it can directly represent the scattering distribution of the sample to light, that is, the intensity distribution of the photons in the spatial angle domain. Since the optical path of different angles may be different, for example, the small-angle scattered light usually has a shorter propagation path, and the large-angle scattered light may undergo more internal reflections, so directly comparing the intensities at different angles will introduce the influence of the path difference. In order to solve this problem, the angular intensity sequence needs to be normalized. The normalization method can be to divide the intensity values at each angle by the corresponding path correction factor, or to scale all the angle intensity values to a unified reference scale by the constraint of overall energy conservation.

[0052] After normalization, the scattering distribution data can be output. The scattering distribution data contains the normalized scattering intensity at each preset angle, which truly reflects the scattering effect of the internal particle structure of the dairy product sample on light. This data will be directly input into the subsequent scattering compensation factor construction process for inverting the equivalent particle size distribution and scattering coefficient of the sample. Through this angle distribution acquisition and normalization process, the present application can obtain stable and repeatable scattering distribution results in complex milk suspension systems, thereby effectively supporting subsequent spectral compensation and component calculation.

[0053] Step S4: constructing a scattering compensation factor based on the scattering distribution data and the total transmittance spectrum, and applying the scattering compensation factor to the total transmittance spectrum to obtain an effective absorption spectrum.

[0054] Specifically, the scattering distribution data and the total transmittance spectrum are input into the limited-angle sampling Mie scattering inversion operation according to the waveband correspondence relationship, and the equivalent particle size distribution parameters and effective scattering coefficients at each waveband are calculated; a compensation matrix is generated based on the equivalent particle size distribution parameters and effective scattering coefficients, and the compensation matrix is stored as a scattering compensation factor; the scattering compensation factor is called to perform scattering subtraction operation on the total transmittance spectrum wave by wave, and an effective absorption spectrum is output.

[0055] In the embodiments of the present application, in order to eliminate the interference of particle scattering in the dairy product sample on the spectral curve, a scattering compensation factor needs to be constructed by mathematical modeling after obtaining the scattering distribution data and the total transmittance spectrum, and applied to the total transmittance spectrum, so as to restore the effective absorption spectrum containing only the absorption effect. Since there are fat globules and protein particles with wide size distribution in dairy products, the refractive index of these particles is different from that of the surrounding medium, so strong Mie scattering occurs under light irradiation. The characteristic of Mie scattering is that the angle distribution depends on the particle size and the refractive index difference, so the scattering distribution data at different angles and the intensity change of each waveband in the spectrum have a corresponding relationship.

[0056] Specifically, the scattering distribution data and the total transmittance spectrum are input into the limited-angle sampling Mie scattering inversion operation according to the waveband correspondence relationship. In mathematical processing, first, the angle function of the scattering intensity is established according to the Mie theory:

[0057]

[0058] wherein, I(λ,θ) represents the scattering intensity at wavelength λ and angle θ; is the incident light intensity; k is the wave number; S1 and S2 are scattering amplitude functions related to particle size and refractive index, respectively. By substituting the discrete values of the sampling angle, the experimental scattering intensity curve under each waveband can be obtained. Then, by using the least squares inversion method, the experimental scattering distribution is fitted with the theoretical scattering distribution to obtain the equivalent particle size distribution parameters under each waveband and the effective scattering coefficient . The formula is expressed as:

[0059]

[0060] where I exp is the measured scattering intensity; I theo is the scattering intensity calculated based on Mie theory; D is the equivalent particle size distribution parameter at wavelength λ; is the effective scattering coefficient. Through this optimization calculation, the equivalent particle size distribution and the scattering coefficient under each waveband can be obtained.

[0061] Based on the equivalent particle size distribution parameter and the effective scattering coefficient, a compensation matrix M(λ) is further generated, and each element of the matrix represents the contribution of scattering to the transmission spectrum under a specific waveband. Formally, it can be expressed as:

[0062]

[0063] where, is a function relationship that maps particle size and scattering coefficient to a scattering correction factor. The compensation matrix is the scattering compensation factor and is stored as the basis for subsequent calculations.

[0064] In the compensation stage, the scattering compensation factor is called to perform scattering subtraction operation on the total transmission spectrum wave by wave. The operation process can be expressed as:

[0065]

[0066] where, is the effective absorption spectrum; is the total transmission spectrum; is the scattering compensation factor. In this step, the original total transmission spectrum is modified wave by wave, and the scattering effect is subtracted, leaving only the absorption characteristics, thereby obtaining the effective absorption spectrum corresponding directly to the sample component content.

[0067] Based on this embodiment, the present application can separate the scattering and absorption effects in a complex emulsion system, improving the authenticity and stability of the spectral data. The effective absorption spectrum avoids the baseline drift and peak distortion caused by scattering, so that the subsequent component calculation model based on absorption characteristics can output more accurate fat, protein and lactose content results.

[0068] Step S5: inputting the effective absorption spectrum into a component resolution model to output the content of each target component of the dairy product to be detected.

[0069] Specifically, the effective absorption spectrum is divided into multiple characteristic intervals according to wave bands, and the absorption intensity of each characteristic interval is taken as an input variable; a regression equation corresponding to the target component is called in the component resolution model, and quantitative operation is performed on each target component respectively; wherein each target component is fat, protein and / or lactose; after the quantitative operation is completed, the content of each target component is output, and the content result is stored together with the corresponding effective absorption spectrum.

[0070] In the embodiment of the present application, after the effective absorption spectrum compensated by scattering is obtained, the spectrum is further used for component resolution, so as to realize quantitative detection of key target components in the dairy product. Since the dairy product is a typical multi-component complex system, its main components include fat, protein and lactose, and these three types of substances have characteristic absorption peaks in the spectrum of different wave bands. By constructing a component resolution model, the effective absorption spectrum can be converted into a numerical component content result, so as to achieve the purpose of quality detection.

[0071] The specific operation rule is that first, the effective absorption spectrum is divided according to the wavelength range, and is divided into several characteristic intervals. The determination of the characteristic interval is not arbitrary, but is based on the optical absorption characteristics of each target component in the dairy product. For example, fat has strong C-H stretching vibration absorption peaks near 1200 nm and 1720 nm; protein shows N-H and C=O group absorption characteristics at about 1500 nm and 2050 nm; lactose has O-H stretching related absorption peaks near 1400 nm and 1900 nm. Therefore, the effective absorption spectrum can be cut according to these known characteristic wave bands, and the absorption intensity in each characteristic interval will be taken as an input variable. The advantage of this processing is to avoid noise interference of irrelevant wave bands, so that the input data is more concentrated on the information related to the target component.

[0072] Then, a regression equation corresponding to the target component is called in the component resolution model. The regression equation is a mathematical relationship established by a large number of dairy product samples with known component content in the modeling stage. Taking partial least squares regression (PLS) as an example, its basic form can be expressed as:

[0073]

[0074] Wherein, C j represents the content of the jth target component (such as fat, protein or lactose); A i represents the absorption intensity at the ith characteristic wave band, w ji is the regression coefficient of the component and the wave band, and bj is a constant term bias; n is the number of characteristic wavebands. Through such an equation, the spectral signal can be linked to the actual ingredient content. To improve accuracy, cross-validation is usually introduced during modeling to ensure that the established regression coefficients are applicable not only to training samples but also to unknown test samples.

[0075] When performing quantitative operations, the ingredient decomposition model will call the regression equations corresponding to fat, protein, and lactose respectively. Each equation uses the spectral characteristics of a certain component in different wavebands to weight and superimpose to obtain the predicted content of that component. For example, for the fat component, it may need to focus on the absorption intensity near 1720 nm and 2300 nm; while for lactose, it relies more on the characteristic peaks in the 1400 nm to 1900 nm interval. Through such multi-waveband weighted calculation, the prediction accuracy can be significantly improved, avoiding the influence of noise or instrument drift on a single waveband.

[0076] After completing the quantitative operation, the output result is the content value of each target component. These contents can be expressed in percentage or grams per 100 mL, etc., depending on the application scenario required for detection. It is worth mentioning that in order to ensure the traceability and reusability of data, the present embodiment also requires storing the content results together with the corresponding effective absorption spectrum. The significance of this is that if a batch of sample results need to be reviewed later, the effective absorption spectrum and the calculation results at that time can be directly called for comparison, thereby improving the transparency and credibility of quality management.

[0077] By dividing the effective absorption spectrum into multiple characteristic intervals and performing regression operations based on the ingredient decomposition model, the present application not only can accurately distinguish and quantitatively output key components such as fat, protein, and lactose, but also effectively avoids calculation errors caused by scattering interference, baseline drift, or noise interference. Compared with existing schemes that rely on empirical formulas or single-waveband ratio methods, the present scheme has higher stability and applicability, and is particularly suitable for use in scenarios where dairy product ingredients differ greatly or batch detection is required.

[0078] In a specific embodiment, three types of dairy product samples are selected as detection objects, namely whole milk, low-fat milk, and pure milk powder reconstituted solution. In order to ensure the consistency of detection, all samples are equilibrated at 25°C for 2 hours before testing, and are injected into a thermostatic cuvette with a 10 mm optical path. A thermostatic water jacket is provided on the outer wall of the cuvette, and thermostatic water is circulated in the jacket, with a temperature control accuracy of ±0.2°C, to avoid scattering fluctuations caused by changes in sample temperature.

[0079] The light source part adopts a multi-band LED array, covering a wavelength range of 400 nm to 2200 nm, and 10 characteristic bands are selected, corresponding to 450 nm, 620 nm, 760 nm, 980 nm, 1200 nm, 1450 nm, 1720 nm, 1940 nm, 2100 nm and 2300 nm respectively. Each band LED is driven at a pulse frequency of 1 kHz, and is sequentially lit in a sampling period to obtain a sequence of incident light covering the entire band.

[0080] In the acquisition stage, the sample channel and the reference channel work simultaneously. Taking a full-fat milk sample as an example, the transmission light intensity detection value of the sample channel at the 1720 nm band is 0.243, and the intensity of the reference channel at the same band is 0.315. Through ratio calculation and normalization processing, the intermediate spectrum value at this band is 0.772. After further performing dark current deduction and baseline smoothing processing, the corrected spectrum value at this band is 0.765. Repeat the above processing for all bands to obtain the complete corrected spectrum curve.

[0081] After importing the corrected spectrum into the integrating sphere, the inner wall of the integrating sphere is coated with PTFE with a reflectivity of 97%, the inlet diameter is set to 20 mm, and the sphere diameter is 200 mm, which satisfies the ratio of the inlet to the sphere diameter not more than 1 / 10. After multiple diffuse reflection of the incident light inside the integrating sphere, a uniform light field distribution is formed. The total transmission spectrum is obtained by integrating the luminous flux. For example, at the 1450 nm band, the total transmission spectrum intensity of full-fat milk is 0.621, that of low-fat milk is 0.732, and that of reconstituted milk powder is 0.689.

[0082] In order to eliminate the scattering effect, a ring-shaped multi-angle light window data of the outer wall of the cuvette is further introduced. In this experiment, the window is set at five angles of 30°, 60°, 90°, 120° and 150°. Taking the scattering intensity of full-fat milk at 90° as an example, the measured value is 0.158, and after normalization processing, it is 0.162. All angle data and the corresponding band of the total transmission spectrum are input into the finite angle sampling Mie scattering inversion to calculate the main peak value of the equivalent particle size distribution at the 1720 nm band, which is 3.2 μm, and the effective scattering coefficient μs is 1.47 cm -1 Based on these parameters, a compensation matrix is constructed, and the effective absorption spectrum is obtained after deducting the scattering contribution. At the 1720 nm band, the effective absorption spectrum value of full-fat milk is corrected to 0.812.

[0083] The effective absorption spectrum is input into a component decomposition model, the wave band interval is divided, and a regression operation is performed. The regression equation called by the model is trained by 50 known component samples in the modeling stage. Taking whole milk as an example, the output fat content is 3.7%, the protein content is 3.2%, and the lactose content is 4.8%. Compared with the measured results (fat 3.6%, protein 3.1%, and lactose 4.9%) of the standard method (Soxhlet extraction method and Kjeldahl nitrogen determination method), the deviation is controlled within ±0.2%. For low-fat milk and reconstituted milk powder, the output fat contents are 1.1% and 0.5% respectively, the protein contents are 3.0% and 3.3% respectively, and the lactose contents are 4.7% and 5.0% respectively, which are good consistent with the control experimental values.

[0084] Figure 2 is a system structure diagram of a milk product quality detection system based on spectrum analysis provided by an embodiment of the present application. As shown in Figure 2 , the embodiment of the present application provides a milk product quality detection system based on spectrum analysis, which comprises: a first acquisition unit for introducing a sample of a milk product to be detected into a constant-temperature colorimetric cell, emitting incident light by using a modulated light source, and collecting original spectrum signals in a sample channel and a reference channel; a correction unit for generating a corrected spectrum based on the original spectrum signals, and inputting the corrected spectrum into an integrating sphere to collect omnidirectional transmission light to obtain a total transmission spectrum; a second acquisition unit for obtaining scattering distribution data at different angles based on an annular multi-angle detector array arranged on the outer wall of the constant-temperature colorimetric cell; a compensation unit for constructing a scattering compensation factor based on the scattering distribution data and the total transmission spectrum, and applying the scattering compensation factor to the total transmission spectrum to obtain an effective absorption spectrum; and an output unit for inputting the effective absorption spectrum into a component decomposition model to output the content of each target component of the milk product to be detected.

[0085] Those skilled in the art can understand that all or part of the steps in the method for implementing the above-mentioned embodiments can be completed by a program instructing related hardware, the program is stored in a storage medium, and includes a plurality of instructions for making a single-chip microcomputer, a chip or a processor execute all or part of the steps of the method described in each embodiment of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various storage medium capable of storing program codes.

[0086] The optional embodiments of the present application are described in detail above with reference to the drawings, but the embodiments of the present application are not limited to the specific details in the above-described embodiments. Within the technical concept of the embodiments of the present application, various simple modifications can be made to the technical solutions of the embodiments of the present application, and these simple modifications all belong to the protection scope of the embodiments of the present application. In addition, it should be noted that, in the above-described specific embodiments, various specific technical features can be combined in any appropriate manner without contradiction. In order to avoid unnecessary repetition, various possible combinations are not described again in the embodiments of the present application.

[0087] In addition, any combination of various different embodiments of the present application can also be made, as long as it does not deviate from the idea of the embodiments of the present application, and it should also be considered as disclosed by the embodiments of the present application.

Claims

1. A method for quality detection of dairy products based on spectral analysis, characterized in that, The method includes: The dairy product sample to be tested is introduced into a constant temperature colorimetric cell, and incident light is emitted using a modulated light source. At the same time, the original spectral signals are collected in the sample channel and the reference channel. A corrected spectrum is generated based on the original spectral signal, and the incident light sequence corrected based on the corrected spectrum is irradiated onto the colorimetric cell outlet to collect omnidirectional transmitted light, obtaining the total transmission spectrum; including: The corrected spectrum is introduced into the inlet of the integrating sphere through the outlet of the colorimetric cell, and the inlet diameter and the reflectivity of the inner wall of the integrating sphere are limited to meet a preset ratio to ensure that incident light from different angles is collected. After multiple diffuse reflections occur on the inner surface of the integrating sphere, the transmitted light from each angle is combined into a uniform light field distribution by utilizing the optical path equalization effect inside the sphere. The luminous flux is integrated on the uniform light field distribution to obtain the total transmitted spectrum. This is based on acquiring scattering distribution data at different angles by deploying a ring-shaped multi-angle detector array on the outer wall of a constant-temperature colorimetric cell; including: Multiple light-collecting windows are set at preset angle intervals on the outer wall of the constant temperature colorimetric cell, so that the scattered light passing through the dairy product sample can be emitted at different angles. The scattered intensity values ​​at corresponding angles are acquired sequentially at each light-collecting window, and the scattered intensity values ​​are arranged in the acquisition order to form an angular intensity sequence. The angular intensity sequence is normalized to eliminate the influence of the difference in path length at different angles, and the scattered distribution data is output. A scattering compensation factor is constructed based on the scattering distribution data and the total transmission spectrum, and the scattering compensation factor is applied to the total transmission spectrum to obtain an effective absorption spectrum; including: The scattering distribution data and the total transmission spectrum are input into a Mie scattering inversion operation with finite angle sampling according to their band correspondence to calculate the equivalent particle size distribution parameters and effective scattering coefficients for each band. A compensation matrix is ​​generated based on the equivalent particle size distribution parameters and effective scattering coefficients, and the compensation matrix is ​​stored as a scattering compensation factor. The scattering compensation factor is then used to perform scattering subtraction operations on the total transmission spectrum band by band to output the effective absorption spectrum. The effective absorption spectrum is input into the component calculation model, and the content of each target component in the dairy product to be tested is output.

2. The method according to claim 1, characterized in that, The modulated light source is a multi-band LED array, with each band emitting incident light according to a preset pulse frequency; Emitting incident light using a modulated light source includes: In each sampling period, the light sources of each band in the multi-band LED array are lit sequentially to obtain incident light covering a preset wavelength range. During the lighting process, the emission timing of each band of light source is pulse-modulated so that the incident light exhibits modulation characteristics corresponding to the preset pulse frequency in the time domain. When a sampling cycle is completed, the output is an incident light sequence that covers a preset wavelength range and has pulse modulation characteristics.

3. The method according to claim 2, characterized in that, The sample channel is located on the light-emitting side of the constant temperature colorimetric cell and is used to collect the spectral signal of the dairy product sample after transmission under the action of incident light. The reference channel is configured as an optical path parallel to the constant-temperature colorimetric cell, used to acquire the spectral signal of the sample that has not passed through the dairy product, as a reference for generating the calibration spectrum.

4. The method according to claim 3, characterized in that, Simultaneously, raw spectral signals are acquired in both the sample and reference channels, including: During the process of incident light sequence irradiating the colorimetric cell, the spectral signal after passing through the dairy product sample is detected in the sample channel, and the original spectrum of the sample channel is generated; During the process of incident light sequence irradiating the reference path, the spectral signal of the sample that does not pass through the dairy product sample is detected in the reference channel, and the original spectrum of the reference channel is generated. The original spectra of the sample channel and the original spectra of the reference channel are stored separately and used as the original spectral signals.

5. The method according to claim 4, characterized in that, Generating a corrected spectrum based on the original spectral signal includes: Intensity normalization is performed on the raw spectral signal of the reference channel to obtain the emission reference of the light source in the current sampling period; The ratio of the original spectral signal of the sample channel to the emission reference is calculated band by band to obtain the intermediate spectrum after the influence of light source intensity drift has been eliminated. Dark current subtraction and baseline smoothing are performed on the intermediate spectrum to output the corrected spectrum.

6. The method according to claim 1, characterized in that, The effective absorption spectrum is input into the component calculation model, which outputs the content of each target component in the dairy product under test, including: The effective absorption spectrum is divided into multiple characteristic intervals according to the waveband, and the absorption intensity of each characteristic interval is used as the input variable; The component solution model calls the regression equation corresponding to the target component, and performs quantitative calculations on each target component; among which... The target components are fat, protein, and / or lactose; After completing the quantitative calculation, the content of each target component is output, and the content results are stored together with the corresponding effective absorption spectrum.

7. A dairy product quality detection system based on spectral analysis, characterized in that, The system is used to execute the dairy product quality testing method based on spectral analysis as described in any one of claims 1-6, and the system comprises: The first acquisition unit is used to introduce the dairy product sample to be tested into the constant temperature colorimetric cell, emit incident light using a modulated light source, and simultaneously acquire the original spectral signal in the sample channel and the reference channel. The correction unit is used to generate a correction spectrum based on the original spectral signal, and to irradiate the incident light sequence corrected based on the correction spectrum onto the colorimetric cell outlet, collect omnidirectional transmitted light, and obtain the total transmission spectrum. The second acquisition unit is used to acquire scattering distribution data at different angles based on a ring-shaped multi-angle detector array deployed on the outer wall of the constant temperature colorimetric cell. A compensation unit is used to construct a scattering compensation factor based on the scattering distribution data and the total transmission spectrum, and to apply the scattering compensation factor to the total transmission spectrum to obtain an effective absorption spectrum. The output unit is used to input the effective absorption spectrum into the component calculation model and output the content of each target component of the dairy product to be tested.

Citation Information

Patent Citations

  • Milk product quality analysis method and device

    CN117074328A

  • Crop information acquisition and three-dimensional image presentation method, device and system

    CN117635839A

Cited By

  • Sensing assay method for dairy microconstituents

    CN122306636A