A method and apparatus for dairy product quality analysis

CN117074328BActive Publication Date: 2026-09-25INNER MONGOLIA MENGNIU DAIRY IND (GROUP) CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210494951.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-07
Publication Date
2026-09-25
Estimated Expiration
2042-05-07

AI Technical Summary

Technical Problem

[0005]为此,本发明提供一种乳制品质量分析方法,以解决现有技术中存在的乳制品质量分析方案局限性较高,质量检测效率和准确度较差,导致乳业质量管理动作滞后的问题

Benefits of technology

[0034]本发明提供的所述乳制品质量分析方法,通过获取乳制品的反射光谱信号和透射光谱信号,对反射光谱信号进行相关性分析及信号分解处理得到散射特征变量,并基于透射光谱信号得到吸收光谱特征变量;基于散射特征变量和吸收光谱特征变量得到特征融合矩阵,并将特征融合矩阵输入到基于散射特征和吸收光谱特征融合的质量分析判别模型,得到质量分析判别模型输出的乳制品质量预测结果,该过程检测成本低、速度快,能够从光谱信号中提取有效的特征信息进行质量检测,提高了乳制品质量的检测效率和准确度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117074328B_ABST
    Figure CN117074328B_ABST
Patent Text Reader

Abstract

The application provides a dairy product quality analysis method and device. The method comprises the following steps: acquiring a reflection spectrum signal and a transmission spectrum signal of a dairy product, performing correlation analysis and signal decomposition processing on the reflection spectrum signal to obtain a scattering characteristic variable, and obtaining an absorption spectrum characteristic variable based on the transmission spectrum signal; obtaining a characteristic fusion matrix based on the scattering characteristic variable and the absorption spectrum characteristic variable; inputting the characteristic fusion matrix into a quality analysis discrimination model based on scattering characteristic and absorption spectrum characteristic fusion to obtain a dairy product quality prediction result output by the quality analysis discrimination model; and the quality analysis discrimination model is trained based on a sample characteristic fusion matrix and an actual dairy product quality prediction result corresponding to the sample characteristic fusion matrix. The disclosed dairy product quality analysis method has low detection cost and high speed, can quickly extract effective characteristic information from the spectrum signal for quality detection, and improves the detection efficiency and accuracy of the dairy product quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, specifically to a method and apparatus for analyzing the quality of dairy products. It also relates to an electronic device and a processor-readable storage medium. Background Technology

[0002] Milk plays an increasingly important role in our daily diet due to its rich nutritional value. Milk contains essential nutrients such as protein, fat, lactose, various vitamins, and minerals. With the increasing consumption of milk and its derivatives, consumers are demanding higher quality products. Dairy production processes are moving towards higher speed, continuous operation, and automation, which places new demands on online quality monitoring of dairy products. The fat and protein content of dairy products is a core indicator of their quality and a key factor determining product quality. In the milk purchasing and production stages, incidents of illegal additives occur frequently. Some illegal additives, such as melamine, protein concentrate, and hydrolyzed leather, seriously endanger consumer health. The quality and safety of raw milk and dairy products directly affect consumer health. At every stage of dairy production and consumption, it is necessary not only to test key quality assurance parameters such as protein and fat, but also to have stricter requirements for detecting various illegal additives, thereby ensuring the quality and safety of dairy products.

[0003] In the detection of illegal additives in dairy products, different analytical methods are often selected based on the indicators to be detected. For example, for the determination of true protein in dairy products, commonly used methods include potentiometric titration, trichloroacetic acid-biuret colorimetry, gel column chromatography-Coomassie brilliant blue staining, and capillary electrophoresis. However, the detection of illegal additives often requires pretreatment and analytical methods designed according to different additive types. For example, common methods for melamine determination include high-performance liquid chromatography-diode array and GC-MS. Traditional detection methods require sample pretreatment, which is time-consuming and has poor timeliness. Especially in the detection of illegal additives, because there are many types of illegal additives to be detected, traditional analytical methods often can only detect one illegal additive at a time, limiting detection efficiency and accuracy. With the expansion of dairy product demand and production scale, there is an urgent need for methods that can rapidly detect dairy product quality and multiple illegal additives.

[0004] Currently, spectroscopic analysis methods can simultaneously acquire information on multiple molecular bonds and functional groups in the analyte. Utilizing peak positions and intensities, these methods can be used not only for qualitative identification of substance composition but also in conjunction with chemometric methods to analyze substance content. Commonly used spectroscopic methods include fluorescence spectroscopy, ultraviolet-visible spectroscopy, and infrared spectroscopy. Fluorescence analysis, based on the direct proportionality between molecular fluorescence intensity and analyte concentration, is used for qualitative determination of the analyte. Research results show that the fluorescence peak wavelength of dairy products is approximately 349 nm, with a full width at half maximum (FWHM) of approximately 66 nm, and an optimal excitation wavelength of approximately 291 nm. The fluorescence peak wavelength of casein solution in dairy products is 344 nm, with a FWHM of 66 nm, and an optimal excitation wavelength of 295 nm. From a component analysis perspective, the fluorescence intensity of whole-fat dairy products is significantly lower than that of skim-fat dairy products. Ultraviolet-visible absorption spectroscopy, which utilizes the absorption of light at specific wavelengths by certain chemical groups in the ultraviolet region, is a commonly used analytical method. It determines the content of certain components by utilizing the absorption of light at specific wavelengths by certain chemical groups in the ultraviolet region, and is mainly used for determining the protein content in dairy products. However, existing spectral analysis methods have limitations in spectral signal feature extraction, resulting in poor efficiency and stability in quality analysis. How to extract effective feature information from complex spectral signals to further improve the efficiency and accuracy of dairy product quality analysis has become an important issue that urgently needs to be addressed by those skilled in the art. Summary of the Invention

[0005] Therefore, this invention provides a dairy product quality analysis method to solve the problems of high limitations, poor efficiency and accuracy of quality testing in existing dairy product quality analysis schemes, which leads to lag in dairy industry quality management.

[0006] In a first aspect, the present invention provides a method for quality analysis of dairy products, comprising:

[0007] The reflectance and transmission spectra of dairy products are acquired. Correlation analysis and signal decomposition are performed on the reflectance spectra to obtain the corresponding scattering characteristic variables. Based on the transmission spectra, the corresponding absorption spectra characteristic variables are obtained.

[0008] Based on the scattering feature variables and the absorption spectrum feature variables, a corresponding feature fusion matrix is ​​obtained; the feature fusion matrix is ​​input into a quality analysis and discrimination model based on the fusion of scattering features and absorption spectrum features to obtain the dairy product quality prediction result output by the quality analysis and discrimination model; the quality analysis and discrimination model is trained based on the sample feature fusion matrix and the actual dairy product quality prediction result corresponding to the sample feature fusion matrix.

[0009] Furthermore, the acquisition of the reflectance and transmission spectral signals of the dairy product specifically includes:

[0010] The reflectance and transmission spectra of dairy products are acquired using a pre-designed integrated transmission and reflection spectral measurement device. The integrated transmission and reflection spectral measurement device includes: a broadband light source, a spectrometer, a sample cell, a first-angle reflectance spectral measurement probe, a transmission spectral measurement probe, and a second-angle reflectance spectral measurement probe.

[0011] The broadband light source emits light through an incident optical fiber into the sample cell. Dairy products are fed into the sample cell through the sample inlet tube and flow out through the sample outlet tube. Simultaneously, the first and second angle reflectance spectral measurement probes collect scattering spectral signals of the dairy products at different angles in the sample cell, and the transmission spectral measurement probe acquires the corresponding transmission spectral signals. The spectrometer records the spectral signals collected by the first, second, and transmission spectral measurement probes.

[0012] Furthermore, correlation analysis and signal decomposition processing are performed on the reflected spectral signal to obtain the corresponding scattering characteristic variables, specifically including:

[0013] The first angle reflection spectrum signal and the second angle reflection spectrum signal included in the reflection spectrum signal are obtained. Based on the relationship between the scattered light distribution and the particle size at different angles, the diffuse reflection light at the two angles is subjected to correlation analysis and signal decomposition processing to obtain scattering characteristic variables.

[0014] Furthermore, based on the transmission spectral signal, corresponding absorption spectral characteristic variables are obtained, specifically including:

[0015] Based on the transmission spectral signal, the absorption spectrum is calculated using the second derivative to obtain the second derivative spectrum. The absorbance at each wavelength in the second derivative spectrum is input into a preset regression analysis model. The wavelengths in the subset with the smallest root mean square error in the cross-validation of the regression analysis model are selected as characteristic wavelengths to obtain the corresponding absorption spectral characteristic variables.

[0016] Furthermore, the quality analysis and discrimination model is a dairy product quality analysis and discrimination model constructed based on the training process of the backpropagation neural network optimized by the genetic algorithm. The training process is used to establish the mapping relationship between the fusion feature matrix and the dairy product quality discrimination results.

[0017] Furthermore, based on the scattering characteristic variables and the absorption spectrum characteristic variables, a corresponding feature fusion matrix is ​​obtained, specifically including: normalizing the scattering characteristic variables and the absorption spectrum characteristic variables respectively, and synthesizing the corresponding feature fusion matrix based on the normalization results.

[0018] Furthermore, the first angle reflectance spectral measurement probe is a 90° reflectance spectral measurement probe; the first angle reflectance spectral measurement probe is a 180° reflectance spectral measurement probe.

[0019] Secondly, the present invention also provides a dairy product quality analysis device, comprising:

[0020] The spectral feature extraction unit is used to acquire the reflectance spectral signal and the transmission spectral signal of the dairy product, perform correlation analysis and signal decomposition processing on the reflectance spectral signal to obtain the corresponding scattering feature variables, and obtain the corresponding absorption spectral feature variables based on the transmission spectral signal.

[0021] The dairy product quality analysis unit is used to obtain a corresponding feature fusion matrix based on the scattering feature variables and the absorption spectrum feature variables; input the feature fusion matrix into a quality analysis discrimination model based on the fusion of scattering features and absorption spectrum features to obtain the dairy product quality prediction result output by the quality analysis discrimination model; the quality analysis discrimination model is trained based on the sample feature fusion matrix and the actual dairy product quality prediction result corresponding to the sample feature fusion matrix.

[0022] Furthermore, the spectral feature extraction unit is specifically used for:

[0023] The reflectance and transmission spectra of dairy products are acquired using a pre-designed integrated transmission and reflection spectral measurement device. The integrated transmission and reflection spectral measurement device includes: a broadband light source, a spectrometer, a sample cell, a first-angle reflectance spectral measurement probe, a transmission spectral measurement probe, and a second-angle reflectance spectral measurement probe.

[0024] The broadband light source emits light through an incident optical fiber into the sample cell. Dairy products are fed into the sample cell through the sample inlet tube and flow out through the sample outlet tube. Simultaneously, the first and second angle reflectance spectral measurement probes collect scattering spectral signals of the dairy products at different angles in the sample cell, and the transmission spectral measurement probe acquires the corresponding transmission spectral signals. The spectrometer records the spectral signals collected by the first, second, and transmission spectral measurement probes.

[0025] Furthermore, the spectral feature extraction unit is specifically used for:

[0026] The first angle reflection spectrum signal and the second angle reflection spectrum signal included in the reflection spectrum signal are obtained. Based on the relationship between the scattered light distribution and the particle size at different angles, the diffuse reflection light at the two angles is subjected to correlation analysis and signal decomposition processing to obtain scattering characteristic variables.

[0027] Furthermore, the spectral feature extraction unit is specifically used for:

[0028] Based on the transmission spectral signal, the absorption spectrum is calculated using the second derivative to obtain the second derivative spectrum. The absorbance at each wavelength in the second derivative spectrum is input into a preset regression analysis model. The wavelengths in the subset with the smallest root mean square error in the cross-validation of the regression analysis model are selected as characteristic wavelengths to obtain the corresponding absorption spectral characteristic variables.

[0029] Furthermore, the quality analysis and discrimination model is a dairy product quality analysis and discrimination model constructed based on the training process of the backpropagation neural network optimized by the genetic algorithm. The training process is used to establish the mapping relationship between the fusion feature matrix and the dairy product quality discrimination results.

[0030] Furthermore, the dairy product quality analysis unit is specifically used to: normalize the scattering characteristic variables and the absorption spectrum characteristic variables respectively, and synthesize the corresponding feature fusion matrix based on the normalization results.

[0031] Furthermore, the first angle reflectance spectral measurement probe is a 90° reflectance spectral measurement probe; the first angle reflectance spectral measurement probe is a 180° reflectance spectral measurement probe.

[0032] Thirdly, the present invention also provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the dairy product quality analysis method as described in any of the above.

[0033] Fourthly, the present invention also provides a processor-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the dairy product quality analysis method described in any of the above-mentioned methods.

[0034] The dairy product quality analysis method provided by this invention acquires the reflectance and transmission spectral signals of dairy products, performs correlation analysis and signal decomposition on the reflectance spectral signals to obtain scattering characteristic variables, and obtains absorption spectral characteristic variables based on the transmission spectral signals; a feature fusion matrix is ​​obtained based on the scattering and absorption spectral characteristic variables, and the feature fusion matrix is ​​input into a quality analysis and discrimination model based on the fusion of scattering and absorption spectral characteristics to obtain the dairy product quality prediction results output by the quality analysis and discrimination model. This process has low detection cost and high speed, and can extract effective feature information from spectral signals for quality detection, thus improving the detection efficiency and accuracy of dairy product quality. Attached Figure Description

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

[0036] Figure 1 A schematic flowchart of the dairy product quality analysis method provided in an embodiment of the present invention;

[0037] Figure 2 This is a schematic diagram of the integrated transmission and reflection spectral measurement device in the dairy product quality analysis method provided in this embodiment of the invention;

[0038] Figure 3 This is a schematic diagram of the complete process of the dairy product quality analysis method provided in the embodiments of the present invention;

[0039] Figure 4 This is a schematic diagram of the structure of the dairy product quality analysis device provided in an embodiment of the present invention;

[0040] Figure 5 This is a schematic diagram of the physical structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0041] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0042] The following is a detailed description of embodiments based on the dairy product quality analysis method described in this invention. Figure 1 The diagram shown is a flowchart of the dairy product quality analysis method provided in an embodiment of the present invention. The specific implementation process includes the following steps:

[0043] Step 101: Obtain the reflectance spectrum and transmission spectrum of the dairy product, perform correlation analysis and signal decomposition processing on the reflectance spectrum to obtain the corresponding scattering characteristic variables, and obtain the corresponding absorption spectrum characteristic variables based on the transmission spectrum.

[0044] In this embodiment of the invention, the reflectance and transmission spectral signals of dairy products can be acquired based on a preset integrated transmission and reflectance spectral measurement device. For example... Figure 2As shown, the integrated transmission and reflection spectral measurement device includes: a broadband light source 201, a spectrometer 202, a sample cell 203, a sample inlet tube 204, a sample outlet tube 205, an incident optical fiber 209, a first angle reflection spectral measurement probe 206, a transmission spectral measurement probe 207, and a second angle reflection spectral measurement probe 208. Specifically, the emitted light from the broadband light source is incident into the sample cell via the incident optical fiber. Dairy products (such as milk samples) are input into the sample cell through the sample inlet tube and flow out from the sample outlet tube. Simultaneously, the first angle reflection spectral measurement probe (e.g., a 90° reflection spectral measurement probe) and the second angle reflection spectral measurement probe (e.g., a 180° reflection spectral measurement probe) collect scattering spectral signals of the dairy products at different angles in the sample cell, respectively, and the corresponding transmission spectral signal is obtained based on the transmission spectral measurement probe. The three spectral measurement probes are connected to the spectrometer, which records the spectral signals collected by the first angle reflection spectral measurement probe, the second angle reflection spectral measurement probe, and the transmission spectral measurement probe.

[0045] The process involves performing correlation analysis and signal decomposition on the reflected spectral signals to obtain corresponding scattering characteristic variables. This includes acquiring a first-angle reflected spectral signal (e.g., a 90° reflected spectral signal) and a second-angle reflected spectral signal (e.g., a 180° reflected spectral signal) contained within the reflected spectral signal. Based on the relationship between the scattered light distribution and particle size at different angles, correlation analysis and signal decomposition are performed on the diffuse reflected light at the two angles to obtain scattering characteristic variables. It should be noted that since proteins and fats in dairy products are scattering particles with a scale similar to the measured light, the distribution of scattered light at different angles is related to the particle size. Therefore, based on the Mie scattering principle, correlation analysis and signal decomposition of the 180° and 90° reflected spectral signals can be performed to obtain the corresponding scattering characteristic variables. In specific implementation, the statistical analysis method Rcovariance matrix can be used. c Based on the distribution of the covariance matrix, it is decomposed into different eigenvectors and corresponding eigenvalues. The eigenvectors reflect different particle size distributions, and the eigenvalues ​​reflect the particle size distribution parameters. These two directional scattering characteristic variables are statistical indicators used as quality indicators to measure the protein and fat content in dairy products.

[0046] Specifically, for the detection of dairy product quality and illegal additives, based on the integrated transmission and reflection spectral measurement device, after acquiring the 180° reflection spectrum, 90° reflection spectrum, and transmission spectrum of dairy products, the scattering characteristic variables and absorption spectrum feature variables are analyzed according to the Mie scattering principle. In the scattering characteristic analysis, based on the relationship between the distribution of scattered light at different angles and particle size, correlation analysis and signal decomposition processing are performed on the diffuse reflection light from the two directions to obtain the corresponding scattering characteristic variables. The specific steps are as follows:

[0047] Using statistical analysis of the covariance matrix method R c We can calculate the statistical indicators of two directional scattering correlation variables, which can be used as indicators to measure milk quality. The specific calculation process is as follows:

[0048]

[0049] In the formula, For R 180 The conjugate transpose of (λ); R 90 (λ), R 180 (λ) represents the spectral reflectance signals at different 90° and 180° angles, reflecting the scattered light distribution of fat particles of different sizes in dairy products; where λ is the wavelength and H represents the self-conjugate matrix of the covariance matrix. According to statistical theory, the covariance matrix mainly reflects the random similarity between two variables. Measuring the scattering intensity at different wavelengths reflects the distribution of fat particles of different sizes in dairy products, which conforms to a multivariate normal distribution. Therefore, its probability density is mainly reflected in the covariance matrix as eigenvectors and their corresponding eigenvalues. Different eigenvectors reflect the particle size distribution range, while the eigenvalues ​​reflect the distribution intensity. For the covariance matrix R... c By performing principal component decomposition, we can obtain the variance eigenvector matrix U for different distributions, which is expressed as:

[0050]

[0051] Λ=diag(λ1,…,λ j ,...,λ M )

[0052] In the formula, and λ j R respectively c The j-th eigenvector and its corresponding eigenvalue are used as the scattering characteristic variable of the spectrum, which can characterize the protein and fat concentration and particle size distribution in dairy products; where Λ is the eigenvector obtained after matrix decomposition; M is the number of eigenvectors, and diag(.) represents the diagonal matrix form.

[0053] Furthermore, based on the transmission spectral signal, corresponding absorption spectral characteristic variables are obtained. The specific implementation process includes: performing second-order derivative estimation on the absorption spectrum based on the transmission spectral signal to obtain the second-order derivative spectrum; inputting the absorbance at each wavelength in the second-order derivative spectrum into a preset regression analysis model; selecting the wavelengths in the subset with the smallest root mean square error in the cross-validation of the regression analysis model as characteristic wavelengths to obtain the corresponding absorption spectral characteristic variables. It should be noted that during the absorption spectrum extraction process, due to the complexity of various components in dairy products, the absorption spectral characteristics of different components overlap, and instrument drift, photoelectric detection noise, environmental interference, etc., will also affect the spectral measurement results. In order to obtain spectral characteristics more accurately and improve the accuracy of qualitative and quantitative analysis of illegally added substances, this invention proposes a competitive adaptive non-information variable elimination strategy based on the second-order derivative spectrum of transmission spectroscopy. The main purpose is to eliminate these variables that are less important than random variables in the model, select absorption spectral characteristic variables, and lay the foundation for the next step of establishing a quality analysis discrimination model (Abnormal Sample Screening Module, ASM) based on the fusion of scattering and absorption characteristics. The specific implementation process is as follows: Second-derivative estimation is performed on the absorption spectrum signal to obtain the second-derivative spectrum. This eliminates the influence of instrument drift and other factors, and also separates overlapping absorption peaks in the original absorption spectrum, providing a basis for eliminating non-informative variables. The absorbance at each wavelength in the second-derivative spectrum is used as the input to the Partial Least-Squares regression (PLS) model. Using the Monte Carlo sampling principle, variables are randomly selected, and an equal number of randomly generated variables are added to the model input. Based on the regression results, points with larger absolute values ​​of regression coefficients are retained as a new subset, while points with smaller weights are removed. Then, a PLS regression model is established based on this new subset. The weight calculation method is as follows:

[0054]

[0055] Among them, b i The data are fitted for the i-th wavelength variable. After multiple calculations, the wavelengths in the subset with the smallest root mean square error (RMSECV) in the cross-validation of the PLS regression model are selected as the characteristic wavelengths, and a set of characteristic variables for absorption spectra is established.

[0056] Step 102: Based on the scattering feature variables and the absorption spectrum feature variables, obtain the corresponding feature fusion matrix; input the feature fusion matrix into the quality analysis discriminant model (ASM) based on the fusion of scattering features and absorption spectrum features to obtain the dairy product quality prediction result output by the quality analysis discriminant model (ASM); the quality analysis discriminant model (ASM) is trained based on the sample feature fusion matrix and the actual dairy product quality prediction result corresponding to the sample feature fusion matrix.

[0057] In this embodiment of the invention, the scattering feature variables and the absorption spectral feature variables can be normalized respectively, and a corresponding feature fusion matrix can be synthesized based on the normalization results. Then, the feature fusion matrix is ​​input into the quality analysis discriminant model (ASM) based on the fusion of scattering and absorption spectral features for prediction processing, to obtain the dairy product quality prediction result output by the quality analysis discriminant model (ASM). The quality analysis discriminant model (ASM) is a dairy product quality analysis discriminant model (ASM) constructed based on the training process of a genetic algorithm-optimized backpropagation neural network. The training process is used to establish the mapping relationship between the fusion feature matrix and the dairy product quality discrimination result. It should be noted that the scattering feature variables extracted from the reflectance spectral signal measurement mainly reflect the particle size distribution and concentration of protein and fat in dairy products, while the absorption spectral feature variables mainly reflect the absorption peak characteristics of various components in dairy products. Especially in the case of illegally added substances, the position and intensity of the absorption peaks are more sensitive to the type and concentration of the illegally added substances. In order to comprehensively realize the quality analysis and discrimination of dairy products, in the specific implementation process of this invention, the scattering characteristic variables and the absorption spectrum characteristic variables are normalized respectively, and then the two are combined into a feature fusion matrix, which is used as the input variable of the quality analysis discrimination model (ASM).

[0058] The Quality Analysis and Discrimination Model (ASM) described in this invention employs a genetic algorithm and a backpropagation neural network (GA-BPNN) method, utilizing the GA algorithm to optimize the training process of the backpropagation neural network. The training set input matrix is ​​a pre-configured feature fusion matrix (i.e., absorption-scattering feature fusion matrix) of high-quality, non-illegally added dairy products and low-quality, illegally added dairy products. The training set outputs dairy product classification results. The GA-BPNN network is trained using this dataset to establish a mapping relationship between the feature fusion matrix and the dairy product quality discrimination results, thus constructing the corresponding Quality Analysis and Discrimination Model (ASM). The BP network parameters are set as follows: 10 input layers, 21 hidden layer nodes, and 2 output layers; a learning rate of 0.009 and 10000 iterations; a model error of 0.01 based on actual prediction requirements; 82 weights and 10 thresholds; therefore, the individual encoding length of the genetic algorithm is 92, where each encoding is defined as a chromosome.

[0059] Among them, such as Figure 3 As shown, the specific optimization steps are as follows: (1) Population initialization encoding: mainly includes the weights, thresholds and encoding methods that need to be adjusted and optimized. Real numbers are used for encoding in order to facilitate calculation. The population size is 20; the number of evolutions is 40; the crossover probability is 0.2; and the mutation probability is 0.4. (2) Selection operation: using the proportional selection method, chromosomes are extracted from the encoding, and the fitness is calculated using the formula F = kE, where k is a fixed coefficient, the selection is 0.5, and E is the model prediction error. The better the fitness of an individual, the greater the probability of being selected. Finally, individuals with better fitness form a new population. (3) Crossover operation: cross the k-th chromosome and the l-th chromosome at position j to obtain a new individual encoding. Then, the encoding is used in the selection operation as an evolutionary process. (4) Repeat the evolutionary process and use the best individual generated by the evolution as the initial parameter value (optimal initial weight) in the neural network model. (5) The absorption-scattering feature fusion matrix is ​​used as input to train the BPNN network initialized by GA. When the training reaches the preset calculation error requirement, the training stops, the weights are updated, the training ends, the network parameters are stored, and the quality analysis and discrimination model (ASM) is obtained. (6) In the model prediction stage, the absorption-scattering feature fusion matrix (unknown sample parameters) of the dairy product to be tested is input into the quality analysis and discrimination model (ASM) (i.e. the established network) to obtain the corresponding dairy product quality prediction results.

[0060] Near-infrared spectroscopy (NIRS) is widely used in online dairy product testing due to its advantages such as low hardware cost and fast detection speed. NIRS can simultaneously measure multiple components, such as fat, protein, and lactose. Another advantage of NIRS is that the wavelength of near-infrared light is similar to the size of fat globules in dairy products. These fat globules are extremely small and highly dispersed in a milky state, allowing for the extraction of scattering characteristics from the spectral data. This enables simultaneous detection and analysis of dairy product quality and illegal additives. However, in NIRS dairy product analysis, the near-infrared spectral region suffers from weak overtone and combination absorption, complex band structures, and significant overlap. In this invention, based on the quality requirements of raw milk, the scattering characteristics and absorption spectral features are analyzed separately as key spectral features for identifying fat and protein content and illegal additives. These features are then input into the Analysis for Quality (ASM) model to improve the accuracy of raw milk quality discrimination analysis.

[0061] The dairy product quality analysis method provided by this invention acquires the reflectance and transmission spectral signals of dairy products, performs correlation analysis and signal decomposition processing on the reflectance spectral signals to obtain scattering characteristic variables, and obtains absorption spectral characteristic variables based on the transmission spectral signals; obtains a feature fusion matrix based on the scattering and absorption spectral characteristic variables, and inputs the feature fusion matrix into a quality analysis discriminant model (ASM) based on the fusion of scattering and absorption spectral characteristics to obtain the dairy product quality prediction result output by the quality analysis discriminant model (ASM). This process has low detection cost and high speed, and can extract effective feature information from spectral signals for quality detection, thus improving the detection efficiency and accuracy of dairy product quality.

[0062] Corresponding to the above-described method for analyzing dairy product quality, this invention also provides a dairy product quality analysis apparatus. Since the embodiments of this apparatus are similar to the method embodiments described above, the description is relatively simple. For relevant details, please refer to the description in the method embodiment section above. The embodiments of the dairy product quality analysis apparatus described below are merely illustrative. Please refer to... Figure 4 As shown, it is a schematic diagram of the structure of a dairy product quality analysis device provided in an embodiment of the present invention.

[0063] The dairy product quality analysis device of the present invention specifically includes the following parts:

[0064] The spectral feature extraction unit 401 is used to acquire the reflectance spectral signal and the transmission spectral signal of the dairy product, perform correlation analysis and signal decomposition processing on the reflectance spectral signal to obtain the corresponding scattering feature variables, and obtain the corresponding absorption spectral feature variables based on the transmission spectral signal.

[0065] The dairy product quality analysis unit 402 is used to obtain a corresponding feature fusion matrix based on the scattering feature variables and the absorption spectrum feature variables; input the feature fusion matrix into the quality analysis discriminant model (ASM) based on the fusion of scattering features and absorption spectrum features to obtain the dairy product quality prediction result output by the quality analysis discriminant model (ASM); the quality analysis discriminant model (ASM) is trained based on the sample feature fusion matrix and the actual dairy product quality prediction result corresponding to the sample feature fusion matrix.

[0066] Furthermore, the spectral feature extraction unit is specifically used for:

[0067] The reflectance and transmission spectra of dairy products are acquired using a pre-designed integrated transmission and reflection spectral measurement device. The integrated transmission and reflection spectral measurement device includes: a broadband light source, a spectrometer, a sample cell, a first-angle reflectance spectral measurement probe, a transmission spectral measurement probe, and a second-angle reflectance spectral measurement probe.

[0068] The broadband light source emits light through an incident optical fiber into the sample cell. Dairy products are fed into the sample cell through the sample inlet tube and flow out through the sample outlet tube. Simultaneously, the first and second angle reflectance spectral measurement probes collect scattering spectral signals of the dairy products at different angles in the sample cell, and the transmission spectral measurement probe acquires the corresponding transmission spectral signals. The spectrometer records the spectral signals collected by the first, second, and transmission spectral measurement probes.

[0069] Furthermore, the spectral feature extraction unit is specifically used for:

[0070] The first angle reflection spectrum signal and the second angle reflection spectrum signal included in the reflection spectrum signal are obtained. Based on the relationship between the scattered light distribution and the particle size at different angles, the diffuse reflection light at the two angles is subjected to correlation analysis and signal decomposition processing to obtain scattering characteristic variables.

[0071] Furthermore, the spectral feature extraction unit is specifically used for:

[0072] Based on the transmission spectral signal, the absorption spectrum is calculated using the second derivative to obtain the second derivative spectrum. The absorbance at each wavelength in the second derivative spectrum is input into a preset regression analysis model. The wavelengths in the subset with the smallest root mean square error in the cross-validation of the regression analysis model are selected as characteristic wavelengths to obtain the corresponding absorption spectral characteristic variables.

[0073] Furthermore, the quality analysis and discrimination model (ASM) is a dairy product quality analysis and discrimination model (ASM) constructed based on the training process of optimizing the backpropagation neural network using a genetic algorithm. The training process is used to establish the mapping relationship between the fusion feature matrix and the dairy product quality discrimination results.

[0074] Furthermore, the dairy product quality analysis unit is specifically used to: normalize the scattering characteristic variables and the absorption spectrum characteristic variables respectively, and synthesize the corresponding feature fusion matrix based on the normalization results.

[0075] Furthermore, the first angle reflectance spectral measurement probe is a 90° reflectance spectral measurement probe; the first angle reflectance spectral measurement probe is a 180° reflectance spectral measurement probe.

[0076] The dairy product quality analysis device provided by this invention acquires the reflectance and transmission spectral signals of dairy products, performs correlation analysis and signal decomposition processing on the reflectance spectral signals to obtain scattering characteristic variables, and obtains absorption spectral characteristic variables based on the transmission spectral signals; it obtains a feature fusion matrix based on the scattering and absorption spectral characteristic variables, and inputs the feature fusion matrix into the quality analysis discriminant model (ASM) based on the fusion of scattering and absorption spectral characteristics to obtain the dairy product quality prediction result output by the quality analysis discriminant model (ASM). This process has low detection cost and high speed, and can extract effective feature information from spectral signals for quality detection, thus improving the detection efficiency and accuracy of dairy product quality.

[0077] Corresponding to the above-described method for analyzing the quality of dairy products, this invention also provides an electronic device. Since the embodiments of this electronic device are similar to those of the methods described above, the description is relatively simple. For relevant details, please refer to the description in the above-described method embodiment section. The electronic device described below is merely illustrative. Figure 5 The diagram shows a physical structure of an electronic device disclosed in an embodiment of the present invention. The electronic device may include a processor 501, a memory 502, and a communication bus 503. The processor 501 and the memory 502 communicate with each other via the communication bus 503 and communicate with external systems via a communication interface 504. The processor 501 can call logical instructions in the memory 502 to execute a dairy product quality analysis method. This method includes: acquiring the reflectance and transmission spectra of dairy products; performing correlation analysis and signal decomposition on the reflectance spectra to obtain corresponding scattering feature variables; obtaining corresponding absorption spectra feature variables based on the transmission spectra; obtaining a corresponding feature fusion matrix based on the scattering and absorption spectra feature variables; inputting the feature fusion matrix into an ASM (Adaptive Analysis Model) based on the fusion of scattering and absorption spectra features to obtain a dairy product quality prediction result output by the ASM; the ASM is trained based on the sample feature fusion matrix and the actual dairy product quality prediction result corresponding to the sample feature fusion matrix.

[0078] Furthermore, the logical instructions in the aforementioned memory 502 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as memory chips, USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0079] On the other hand, embodiments of the present invention also provide a computer program product, the computer program product including a computer program stored on a processor-readable storage medium, the computer program including program instructions, when the program instructions are executed by a computer, the computer is able to execute the dairy product quality analysis method provided in the above-described method embodiments, the method including: acquiring the reflectance spectrum signal and transmission spectrum signal of dairy products, performing correlation analysis and signal decomposition processing on the reflectance spectrum signal to obtain corresponding scattering feature variables, and obtaining corresponding absorption spectrum feature variables based on the transmission spectrum signal; obtaining a corresponding feature fusion matrix based on the scattering feature variables and the absorption spectrum feature variables; inputting the feature fusion matrix into a quality analysis discriminant model (ASM) based on the fusion of scattering features and absorption spectrum features to obtain the dairy product quality prediction result output by the quality analysis discriminant model (ASM); the quality analysis discriminant model (ASM) is trained based on the sample feature fusion matrix and the actual dairy product quality prediction result corresponding to the sample feature fusion matrix.

[0080] In another aspect, embodiments of the present invention also provide a processor-readable storage medium storing a computer program. When executed by a processor, the computer program implements the dairy product quality analysis method provided in the above embodiments. The method includes: acquiring reflectance spectral signals and transmission spectral signals of dairy products; performing correlation analysis and signal decomposition processing on the reflectance spectral signals to obtain corresponding scattering feature variables; and obtaining corresponding absorption spectral feature variables based on the transmission spectral signals; obtaining a corresponding feature fusion matrix based on the scattering feature variables and the absorption spectral feature variables; inputting the feature fusion matrix into an analysis and discrimination model (ASM) based on the fusion of scattering and absorption spectral features to obtain a dairy product quality prediction result output by the analysis and discrimination model (ASM); wherein the analysis and discrimination model (ASM) is trained based on the sample feature fusion matrix and the actual dairy product quality prediction result corresponding to the sample feature fusion matrix.

[0081] The processor-readable storage medium can be any available medium or data storage device that the processor can access, including but not limited to magnetic memory (e.g., floppy disk, hard disk, magnetic tape, magneto-optical disk (MO)), optical memory (e.g., CD, DVD, BD, HVD), and semiconductor memory (e.g., ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drive (SSD)).

[0082] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0083] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0084] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for quality analysis of dairy products, characterized in that, include: The reflectance and transmission spectra of dairy products are acquired. Correlation analysis and signal decomposition are performed on the reflectance spectra to obtain the corresponding scattering characteristic variables. Based on the transmission spectra, the corresponding absorption spectra characteristic variables are obtained. Based on the scattering feature variables and the absorption spectrum feature variables, a corresponding feature fusion matrix is ​​obtained; the feature fusion matrix is ​​input into a quality analysis and discrimination model based on the fusion of scattering features and absorption spectrum features to obtain the dairy product quality prediction result output by the quality analysis and discrimination model; the quality analysis and discrimination model is trained based on the sample feature fusion matrix and the actual dairy product quality prediction result corresponding to the sample feature fusion matrix. Correlation analysis and signal decomposition of the reflected spectral signal are performed to obtain the corresponding scattering characteristic variables, specifically including: The first angle reflection spectrum signal and the second angle reflection spectrum signal are obtained from the reflection spectrum signal. Based on the relationship between the scattered light distribution and the particle size at different angles, the diffuse reflection light at the two angles is subjected to correlation analysis and signal decomposition processing to obtain scattering characteristic variables. The first angle and the second angle are different. The correlation analysis and signal decomposition processing includes using the statistical analysis covariance matrix method to decompose the covariance matrix into variables.

2. The method for quality analysis of dairy products according to claim 1, characterized in that, The acquisition of the reflectance and transmission spectral signals of dairy products specifically includes: The reflectance and transmission spectra of dairy products are acquired using a pre-designed integrated transmission and reflection spectral measurement device. The integrated transmission and reflection spectral measurement device includes: a broadband light source, a spectrometer, a sample cell, a first-angle reflectance spectral measurement probe, a transmission spectral measurement probe, and a second-angle reflectance spectral measurement probe. The broadband light source emits light through an incident optical fiber into the sample cell. Dairy products are fed into the sample cell through the sample inlet tube and flow out through the sample outlet tube. Simultaneously, the first and second angle reflectance spectral measurement probes collect scattering spectral signals of the dairy products at different angles in the sample cell, and the transmission spectral measurement probe acquires the corresponding transmission spectral signals. The spectrometer records the spectral signals collected by the first, second, and transmission spectral measurement probes.

3. The method for quality analysis of dairy products according to claim 1, characterized in that, Based on the transmission spectral signal, the corresponding absorption spectral characteristic variables are obtained, specifically including: Based on the transmission spectral signal, the absorption spectrum is calculated using the second derivative to obtain the second derivative spectrum. The absorbance at each wavelength in the second derivative spectrum is input into a preset regression analysis model. The wavelengths in the subset with the smallest root mean square error in the cross-validation of the regression analysis model are selected as characteristic wavelengths to obtain the corresponding absorption spectral characteristic variables.

4. The method for quality analysis of dairy products according to claim 1, characterized in that, The quality analysis and discrimination model is a dairy product quality analysis and discrimination model constructed based on the training process of the backpropagation neural network optimized by the genetic algorithm. The training process is used to establish the mapping relationship between the fusion feature matrix and the dairy product quality discrimination results.

5. The method for quality analysis of dairy products according to claim 1, characterized in that, Based on the scattering characteristic variables and the absorption spectrum characteristic variables, a corresponding feature fusion matrix is ​​obtained, specifically including: normalizing the scattering characteristic variables and the absorption spectrum characteristic variables respectively, and synthesizing the corresponding feature fusion matrix based on the normalization results.

6. The method for quality analysis of dairy products according to claim 2, characterized in that, The first angle reflectance spectroscopy measurement probe is a 90° reflectance spectroscopy measurement probe; the first angle reflectance spectroscopy measurement probe is a 180° reflectance spectroscopy measurement probe.

7. A dairy product quality analysis device, characterized in that, include: The spectral feature extraction unit is used to acquire the reflectance spectral signal and the transmission spectral signal of the dairy product, perform correlation analysis and signal decomposition processing on the reflectance spectral signal to obtain the corresponding scattering feature variables, and obtain the corresponding absorption spectral feature variables based on the transmission spectral signal. The dairy product quality analysis unit is used to obtain a corresponding feature fusion matrix based on the scattering feature variables and the absorption spectrum feature variables; input the feature fusion matrix into a quality analysis discrimination model based on the fusion of scattering features and absorption spectrum features to obtain the dairy product quality prediction result output by the quality analysis discrimination model; the quality analysis discrimination model is trained based on the sample feature fusion matrix and the actual dairy product quality prediction result corresponding to the sample feature fusion matrix; Correlation analysis and signal decomposition of the reflected spectral signal are performed to obtain the corresponding scattering characteristic variables, specifically including: The first angle reflection spectrum signal and the second angle reflection spectrum signal are obtained from the reflection spectrum signal. Based on the relationship between the scattered light distribution and the particle size at different angles, the diffuse reflection light at the two angles is subjected to correlation analysis and signal decomposition processing to obtain scattering characteristic variables. The first angle and the second angle are different. The correlation analysis and signal decomposition processing includes using the statistical analysis covariance matrix method to decompose the covariance matrix into variables.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the dairy product quality analysis method as described in any one of claims 1 to 6.

9. A processor-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the dairy product quality analysis method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Measurement systems and methods for determining component particle concentrations in a liquid

    US20030007150A1