CN115236024A - Training method, determination method and device for model for determining content of total acids and total esters in wine - Google Patents
Training method, determination method and device for model for determining content of total acids and total esters in wine Download PDFInfo
- Publication number
- CN115236024A CN115236024A CN202210769887.5A CN202210769887A CN115236024A CN 115236024 A CN115236024 A CN 115236024A CN 202210769887 A CN202210769887 A CN 202210769887A CN 115236024 A CN115236024 A CN 115236024A
- Authority
- CN
- China
- Prior art keywords
- wine
- wine sample
- total
- model
- content
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/17—Systems in which incident light is modified in accordance with the properties of the material investigated
- G01N21/25—Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
- G01N21/31—Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry
- G01N21/35—Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light
- G01N21/3577—Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light for analysing liquids, e.g. polluted water
Landscapes
- Physics & Mathematics (AREA)
- Spectroscopy & Molecular Physics (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Chemical & Material Sciences (AREA)
- Analytical Chemistry (AREA)
- Biochemistry (AREA)
- General Health & Medical Sciences (AREA)
- General Physics & Mathematics (AREA)
- Immunology (AREA)
- Pathology (AREA)
- Investigating Or Analysing Materials By Optical Means (AREA)
Abstract
Description
技术领域technical field
本申请涉及酒总酸和总酯含量检测的技术领域,特别是涉及一种测定酒总酸和总酯含量模型的训练方法、测定方法及装置。The present application relates to the technical field of detection of total acid and total ester content in wine, in particular to a training method, a measuring method and a device for measuring a model for total acid and total ester content in wine.
背景技术Background technique
总酸和总酯作为酒的关键理化指标,在酒体呈香及风味协调方面发挥着重要作用。一般的,采用化学滴定法对酒中总酸和总酯进行标定。该标定方法检测过程复杂费时、消耗化学试剂量大,对操作人员技术依赖度高,难以满足对酒中总酸和总酯进行快速检测标定的迫切需求。As the key physical and chemical indicators of wine, total acid and total ester play an important role in the aroma and flavor coordination of wine. Generally, the chemical titration method is used to calibrate the total acid and total ester in the wine. The detection process of this calibration method is complicated and time-consuming, consumes a large amount of chemical reagents, and is highly dependent on the operator's technology, so it is difficult to meet the urgent need for rapid detection and calibration of total acid and total ester in wine.
因此,亟需一种对酒进行快速地、高效地测定的方法。Therefore, there is an urgent need for a method for rapid and efficient determination of wine.
发明内容SUMMARY OF THE INVENTION
本申请提供了一种测定酒总酸和总酯含量模型的训练方法、测定方法及装置。The present application provides a training method, a measuring method and a device for measuring a model of the total acid and total ester content of wine.
本申请第一方面提供一种测定酒总酸和总酯含量模型的训练方法,训练方法包括:A first aspect of the present application provides a training method for a model for measuring the total acid and total ester content of wine, and the training method includes:
获取训练数据,训练数据包括第一酒样品集中各酒样品的中红外光谱信息、第一酒样品集中各酒样品总酸的化学测定含量、第二酒样品集中各酒样品的中红外光谱信息以及第二酒样品集中各酒样品总酯的化学测定含量;Acquiring training data, the training data includes mid-infrared spectral information of each wine sample in the first wine sample set, chemically determined content of the total acid of each wine sample in the first wine sample set, mid-infrared spectral information of each wine sample in the second wine sample set, and Chemical determination of total esters of each wine sample in the second wine sample set;
将第一酒样品集中各酒样品的中红外光谱信息和第二酒样品集中各酒样品的中红外光谱信息作为第一偏最小二乘法回归模型的输入,将第一酒样品集中各酒样品总酸的化学测定含量和第二酒样品集中各酒样品总酯的化学测定含量作为第一偏最小二乘法回归模型的输出,训练第一偏最小二乘法回归模型,得到测定酒总酸和总酯含量模型,测定酒总酸和总酯含量模型包括中红外测定酒总酸含量模型和中红外测定酒总酯含量模型,The mid-infrared spectral information of each wine sample in the first wine sample set and the mid-infrared spectral information of each wine sample in the second wine sample set are used as the input of the first partial least squares regression model, and the total amount of each wine sample in the first wine sample set is calculated. The chemically determined content of the acid and the chemically determined content of the total esters of each wine sample in the second wine sample set are used as the output of the first partial least squares regression model, and the first partial least squares regression model is trained to obtain the total acid and total esters of the wine. Content model, the model for determining the content of total acid and total ester in wine includes a model for determining the content of total acid in wine by mid-infrared and a model for determining total ester content in wine by mid-infrared.
其中,第一酒样品集和第二酒样品集均来自同一原始酒样品集,第一酒样品集经由原始酒样品集筛除总酸异常的酒样品得到,第二酒样品集经由原始酒样品集筛除总酯异常的酒样品得到。The first wine sample set and the second wine sample set are both from the same original wine sample set, the first wine sample set is obtained by screening out the wine samples with abnormal total acid from the original wine sample set, and the second wine sample set is obtained from the original wine sample set Collect and screen out the wine samples with abnormal total esters.
本申请第一方面提供的测定酒总酸和总酯含量模型的训练方法,可以得到准确且快速用于检测酒中总酸和总酯含量的测定酒总酸和总酯含量模型,实现了对酒尤其是新酒中总酸和总酯含量快速且高效地测定,提升了检测效率同时保证了检测的准确性。The training method of the model for measuring the content of total acid and total ester in wine provided by the first aspect of the present application can obtain an accurate and rapid model for measuring the content of total acid and total ester in wine for detecting the content of total acid and total ester in wine. The content of total acid and total ester in wine, especially new wine, can be determined quickly and efficiently, which improves the detection efficiency and ensures the detection accuracy.
在本申请第一方面一些可选的实施方式中,训练方法中原始酒样品集筛除总酸异常的酒样品的步骤包括:In some optional embodiments of the first aspect of the present application, the step of screening out the wine samples with abnormal total acid from the original wine sample set in the training method includes:
获取第一预训练数据,预训练数据包括原始酒样品集中各酒样品的中红外光谱信息以及原始酒样品集中各酒样品总酸的化学测定含量;Obtaining first pre-training data, the pre-training data includes mid-infrared spectral information of each wine sample in the original wine sample set and the chemically determined content of the total acid of each wine sample in the original wine sample set;
将原始酒样品集中各酒样品的中红外光谱信息作为第二偏最小二乘法回归模型的输入,将原始酒样品集中各酒样品总酸的化学测定含量作为第二偏最小二乘法回归模型的输出,训练第二偏最小二乘法回归模型,得到测定酒总酸含量预训练模型;The mid-infrared spectral information of each wine sample in the original wine sample set is used as the input of the second partial least squares regression model, and the chemically determined content of the total acid of each wine sample in the original wine sample set is used as the output of the second partial least squares regression model , train the second partial least squares regression model, and obtain the pre-training model for measuring the total acid content of wine;
基于测定酒总酸含量预训练模型中的离群点,从原始酒样品集中筛除总酸异常的酒样品,得到第一酒样品集。Based on the outliers in the pre-training model for measuring the total acid content of wine, the wine samples with abnormal total acid content were screened out from the original wine sample set to obtain the first wine sample set.
在本申请第一方面一些可选的实施方式中,训练方法中原始酒样品集筛除总酯异常的酒样品的步骤包括:In some optional embodiments of the first aspect of the present application, the step of screening out the wine samples with abnormal total esters from the original wine sample set in the training method includes:
获取第二预训练数据,预训练数据包括原始酒样品集中各酒样品的中红外光谱信息以及原始酒样品集中各酒样品总酯的化学测定含量;acquiring second pre-training data, where the pre-training data includes mid-infrared spectral information of each wine sample in the original wine sample set and the chemically determined content of total esters of each wine sample in the original wine sample set;
将原始酒样品集中各酒样品的中红外光谱信息作为第三偏最小二乘法回归模型的输入,将原始酒样品集中各酒样品总酯的化学测定含量作为第三偏最小二乘法回归模型的输出,训练第三偏最小二乘法回归模型,得到测定酒总酯含量预训练模型;The mid-infrared spectral information of each wine sample in the original wine sample set was used as the input of the third partial least squares regression model, and the chemically determined content of total esters of each wine sample in the original wine sample set was used as the output of the third partial least squares regression model. , train the third partial least squares regression model, and obtain the pre-training model for measuring the total ester content of wine;
基于测定酒总酯含量预训练模型中的离群点,从原始酒样品集中筛除总酯异常的酒样品,得到第二酒样品集。Based on the outliers in the pre-trained model for determining the total ester content of wine, the wine samples with abnormal total esters were screened out from the original wine sample set to obtain a second wine sample set.
在本申请第一方面一些可选的实施方式中,训练第一偏最小二乘法回归模型的步骤还包括:In some optional embodiments of the first aspect of the present application, the step of training the first partial least squares regression model further includes:
采用主成分分析将第一酒样品集划分为第一校正集、第一验证集及第一外部验证集,并基于第一校正集和第一验证集对第一偏最小二乘法回归模型进行初步训练,得到多个测定酒总酸训练子模型;The first wine sample set is divided into the first calibration set, the first validation set and the first external validation set by principal component analysis, and the first partial least squares regression model is preliminarily carried out based on the first calibration set and the first validation set training to obtain multiple training sub-models for measuring the total acidity of wine;
将第一外部验证集中各酒样品的中红外光谱信息作为各测定酒总酸训练子模型的输入,获得各测定酒总酸训练子模型输出的第一外部验证集中各酒样品的训练子模型预测总酸含量;The mid-infrared spectral information of each wine sample in the first external verification set is used as the input of each training sub-model for measuring the total acid of wine, and the training sub-model prediction of each wine sample in the first external verification set output by each training sub-model for measuring the total acid of wine is obtained. total acid content;
采用主成分分析将第二酒样品集划分为第二校正集、第二验证集及第二外部验证集,并基于第二校正集和第二验证集对第一偏最小二乘法回归模型进行初步训练,得到多个测定酒总酯训练子模型;The second wine sample set is divided into the second calibration set, the second validation set and the second external validation set by principal component analysis, and the first partial least squares regression model is preliminarily carried out based on the second calibration set and the second validation set training to obtain multiple training sub-models for measuring total alcohol esters;
将第二外部验证集中酒样品的中红外光谱信息作为各测定酒总酯训练子模型的输入,获得各测定酒总酯训练子模型输出的第二外部验证集中各酒样品的训练子模型预测总酯含量;The mid-infrared spectral information of the wine samples in the second external validation set is used as the input of each training sub-model for measuring total wine esters, and the training sub-model of each wine sample in the second external validation set output by each training sub-model for measuring total wine esters is obtained. ester content;
根据各测定酒总酸训练子模型输出的第一外部验证集中各酒样品的训练子模型预测总酸含量、各测定酒总酯训练子模型输出的第二外部验证集中各酒样品的训练子模型预测总酯含量、第一外部验证集中各酒样品总酸的化学测定含量以及第二外部验证集中各酒样品总酯的化学测定含量,以预设的误差范围为确定依据,确定主成分数,得到包括中红外测定酒总酸含量模型和中红外测定酒总酯含量模型的测定酒总酸和总酯含量模型。According to the training sub-model of each wine sample in the first external validation set output by each training sub-model for measuring total acid of wine, the total acid content is predicted by the training sub-model, and the training sub-model of each wine sample in the second external validation set output by each training sub-model for measuring total wine esters Predict the total ester content, the chemically determined content of the total acid of each wine sample in the first external verification set, and the chemically determined content of the total ester of each wine sample in the second external verification set, and determine the number of principal components based on a preset error range, A model for the determination of total acid and total ester content in wine was obtained, including a mid-infrared model for measuring the total acid content of wine and a model for measuring the total ester content in wine by mid-infrared.
在本申请第一方面一些可选的实施方式中,原始酒样品集中各酒样品的中红外光谱信息中光谱为连续光谱,波段范围在400cm-1~4000cm-1。In some optional embodiments of the first aspect of the present application, the spectrum in the mid-infrared spectral information of each wine sample in the original wine sample set is a continuous spectrum, and the wavelength band ranges from 400 cm -1 to 4000 cm -1 .
在本申请第一方面一些可选的实施方式中,第一酒样品集中各酒样品的中红外光谱信息中的第一光谱为间断光谱,第二酒样品集中各酒样品的中红外光谱信息中的第二光谱也为间断光谱。In some optional embodiments of the first aspect of the present application, the first spectrum in the mid-infrared spectral information of each wine sample in the first wine sample set is a discontinuous spectrum, and the mid-infrared spectral information of each wine sample in the second wine sample set The second spectrum of is also a discontinuous spectrum.
在本申请第一方面一些可选的实施方式中,第一光谱包括间隔的两个波段,分别为4000cm-1~3791cm-1及2943cm-1~1670cm-1。In some optional embodiments of the first aspect of the present application, the first spectrum includes two wavelength bands at intervals of 4000 cm -1 to 3791 cm -1 and 2943 cm -1 to 1670 cm -1 , respectively.
在本申请第一方面一些可选的实施方式中,第二光谱包括间隔的三个波段,分别为4000cm-1~3791cm-1,2727cm-1~2518cm-1及2090cm-1~1670cm-1。In some optional embodiments of the first aspect of the present application, the second spectrum includes three wavelength bands at intervals, which are 4000cm -1 to 3791cm -1 , 2727cm -1 to 2518cm -1 and 2090cm -1 to 1670cm -1 respectively.
在本申请第一方面一些可选的实施方式中,第一光谱和第二光谱中的波段均根据原始酒样品集中各酒样品的中红外光谱信息、原始酒样品集中各酒样品总酸的化学测定含量以及原始酒样品集中各酒样品总酯的化学测定含量进行组合间隔偏最小二乘法运算,比较交互验证均方差得到,其中,将原始酒样品集中各酒样品的中红外光谱信息中连续光谱的波段均分为N个子波段,N大于1;In some optional embodiments of the first aspect of the present application, the wavelength bands in the first spectrum and the second spectrum are based on the mid-infrared spectral information of each wine sample in the original wine sample set, and the chemistry of the total acid of each wine sample in the original wine sample set. The measured content and the chemically determined content of the total esters of each wine sample in the original wine sample set were calculated by the combined interval partial least squares method, and the mean square error of the cross-validation was compared. The band is divided into N sub-bands, N is greater than 1;
优选地,N取值为17、55或85。Preferably, the value of N is 17, 55 or 85.
本申请第二方面提供一种酒总酸和总酯含量的测定方法,方法包括:A second aspect of the present application provides a method for measuring total acid and total ester content of wine, the method comprising:
获取待测酒样品的中红外光谱信息;Obtain the mid-infrared spectral information of the wine sample to be tested;
将待测酒样品的中红外光谱信息输入测定酒总酸和总酯含量模型,获取测定酒总酸和总酯含量模型输出的酒样品总酸和总酯的含量,Input the mid-infrared spectral information of the wine sample to be tested into the model for determining the total acid and total ester content of wine, and obtain the total acid and total ester content of the wine sample output by the model for determining the total acid and total ester content of wine,
其中,测定酒总酸和总酯含量模型是本申请第一方面中的训练方法预先训练得到的。Wherein, the model for determining the content of total acid and total ester in wine is pre-trained by the training method in the first aspect of the present application.
本申请第三方面提供一种训练测定酒总酸和总酯含量模型的装置,该装置包括:A third aspect of the present application provides a device for training a model for measuring the total acid and total ester content of wine, the device comprising:
第一获取单元,用于获取训练数据,训练数据包括第一酒样品集中各酒样品的中红外光谱信息、第一酒样品集中各酒样品总酸的化学测定含量、第二酒样品集中各酒样品的中红外光谱信息以及第二酒样品集中各酒样品总酯的化学测定含量;The first acquisition unit is used to acquire training data, the training data includes mid-infrared spectral information of each wine sample in the first wine sample set, chemically determined content of the total acid of each wine sample in the first wine sample set, and each wine in the second wine sample set. The mid-infrared spectral information of the sample and the chemically determined content of the total esters of each wine sample in the second wine sample set;
模型训练单元,用于将第一酒样品集中各酒样品的中红外光谱信息和第二酒样品集中各酒样品的中红外光谱信息作为第一偏最小二乘法回归模型的输入,将第一酒样品集中各酒样品总酸的化学测定含量和第二酒样品集中各酒样品总酯的化学测定含量作为第一偏最小二乘法回归模型的输出,训练第一偏最小二乘法回归模型,得到测定酒总酸和总酯含量模型,测定酒总酸和总酯含量模型包括中红外测定酒总酸含量模型和中红外测定酒总酯含量模型,其中,第一酒样品集和第二酒样品集均来自同一原始酒样品集,第一酒样品集经由原始酒样品集筛除总酸异常的酒样品得到,第二酒样品集经由原始酒样品集筛除总酯异常的酒样品得到。The model training unit is used to use the mid-infrared spectral information of each wine sample in the first wine sample set and the mid-infrared spectral information of each wine sample in the second wine sample set as the input of the first partial least squares regression model, and the first wine The chemically determined content of the total acid of each wine sample in the sample set and the chemically determined content of the total ester of each wine sample in the second wine sample set are used as the output of the first partial least squares regression model, and the first partial least squares regression model is trained to obtain the measured The total acid and total ester content model of wine, the model for determining the total acid and total ester content of wine includes a mid-infrared model for determining the total acid content of wine and a mid-infrared model for determining the total ester content in wine. Among them, the first wine sample set and the second wine sample set All come from the same original wine sample set. The first wine sample set was obtained by screening out the wine samples with abnormal total acid from the original wine sample set, and the second wine sample set was obtained by screening out the wine samples with abnormal total esters in the original wine sample set.
本申请第四方面提供一种测定酒总酸和总酯含量的装置,该装置包括:A fourth aspect of the present application provides a device for measuring the total acid and total ester content of wine, the device comprising:
第二获取单元,用于获得待测酒样品的中红外光谱信息;The second acquisition unit is used to obtain mid-infrared spectral information of the wine sample to be tested;
酒样品总酸和总酯测定单元,用于将待测酒样品的中红外光谱信息输入测定酒总酸和总酯含量模型,获取测定酒总酸和总酯含量模型输出的酒样品总酸和总酯的含量,其中,测定酒总酸和总酯含量模型是本申请第三方面中的装置预先训练得到的。The wine sample total acid and total ester determination unit is used to input the mid-infrared spectral information of the wine sample to be tested into the model for measuring the total acid and total ester content of wine, and obtain the total acid and total ester content of the wine sample output by the model for measuring the total acid and total ester content of wine. The content of total esters, wherein the model for determining the content of total acid and total esters in wine is pre-trained by the device in the third aspect of the present application.
附图说明Description of drawings
图1为本申请第一方面一实施例中测定酒总酸和总酯含量模型的训练方法的流程示意图;Fig. 1 is the schematic flow sheet of the training method of measuring wine total acid and total ester content model in the first aspect one embodiment of the application;
图2为一酒样品的中红外光谱图。;Figure 2 is the mid-infrared spectrum of a wine sample. ;
图3为本申请第一方面中一具体实施例的中红外测定酒总酸含量模型;Fig. 3 is the mid-infrared determination wine total acid content model of a specific embodiment in the first aspect of the application;
图4为图3的中红外测定酒总酸含量模型中经由第一验证集得到的中红外测定酒总酸含量子模型;Fig. 4 is the mid-infrared measurement wine total acid content sub-model obtained through the first verification set in the mid-infrared measurement wine total acid content model of Fig. 3;
图5为图3的中红外测定酒总酸含量模型中经由第一校正集得到的中红外测定酒总酸含量子模型;Fig. 5 is the mid-infrared measurement wine total acid content sub-model obtained through the first calibration set in the mid-infrared measurement wine total acid content model of Fig. 3;
图6为本申请第一方面中一具体实施例的中红外测定酒总酯含量模型;Fig. 6 is the mid-infrared determination model of total ester content of wine of a specific embodiment in the first aspect of the application;
图7为图6的中红外测定酒总酯含量模型中经由第二验证集得到的中红外测定酒总酯含量子模型;Fig. 7 is the mid-infrared measurement wine total ester content sub-model obtained through the second verification set in the mid-infrared measurement wine total ester content model of Fig. 6;
图8为图6的中红外测定酒总酯含量模型中经由第二校正集得到的中红外测定酒总酯含量子模型;Fig. 8 is the mid-infrared measurement wine total ester content sub-model obtained through the second calibration set in the mid-infrared measurement wine total ester content model of Fig. 6;
图9为本申请第二方面中一实施例的酒总酸和总酯含量的测定方法的流程示意图。9 is a schematic flowchart of a method for measuring the total acid and total ester content of wine according to an embodiment of the second aspect of the application.
具体实施方式Detailed ways
以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。The present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application.
发明人在对酒检测领域方面研究发现,总酸和总酯是作为酒尤其是酱香型新白酒十分关键的理化指标,在酒体呈香及风味协调方面发挥着重要作用。目前传统国标对这两项指标所规定的方法是化学滴定法,存在着检测过程复杂费时、消耗化学试剂等缺点,且对操作人员的技术水平有一定要求,每天需配备大量的专业技术人员耗费时间做重复性的分析工作,无法满足对酱香新酒快速检测的迫切需求。The inventor's research in the field of wine detection found that total acid and total ester are key physical and chemical indicators for wine, especially Maotai-flavored new liquor, and play an important role in the aroma and flavor coordination of the wine. At present, the method specified by the traditional national standard for these two indicators is chemical titration, which has the disadvantages of complicated and time-consuming detection process, consumption of chemical reagents, etc., and has certain requirements on the technical level of operators, requiring a large number of professional and technical personnel to spend every day. Time to do repetitive analysis work, unable to meet the urgent need for rapid detection of Maoxiang new wine.
有鉴于此,本申请旨在提供一种新的测定酒总酸和总酯含量模型的训练方法、测定方法及装置。下面结合实施例对本申请提供的技术内容进行描述。In view of this, the present application aims to provide a new model training method, measuring method and device for measuring the total acid and total ester content of wine. The technical content provided by the present application will be described below with reference to the embodiments.
如图1所示,本申请第一方面提供一种测定酒总酸和总酯含量模型的训练方法,该训练方法包括:As shown in Figure 1, a first aspect of the present application provides a training method for a model for measuring the total acid and total ester content of wine, the training method comprising:
S10:获取训练数据,训练数据包括第一酒样品集中各酒样品的中红外光谱信息、第一酒样品集中各酒样品总酸的化学测定含量、第二酒样品集中各酒样品的中红外光谱信息以及第二酒样品集中各酒样品总酯的化学测定含量;S10: Acquire training data, the training data includes mid-infrared spectral information of each wine sample in the first wine sample set, chemically determined content of total acid in each wine sample in the first wine sample set, and mid-infrared spectrum of each wine sample in the second wine sample set Information and chemically determined content of total esters in each wine sample in the second wine sample set;
S20:将第一酒样品集中各酒样品的中红外光谱信息和第二酒样品集中各酒样品的中红外光谱信息作为第一偏最小二乘法回归模型的输入,将第一酒样品集中各酒样品总酸的化学测定含量和第二酒样品集中各酒样品总酯的化学测定含量作为第一偏最小二乘法回归模型的输出,训练第一偏最小二乘法回归模型,得到测定酒总酸和总酯含量模型,测定酒总酸和总酯含量模型包括中红外测定酒总酸含量模型和中红外测定酒总酯含量模型,S20: The mid-infrared spectral information of each wine sample in the first wine sample set and the mid-infrared spectral information of each wine sample in the second wine sample set are used as the input of the first partial least squares regression model, and the first wine sample set of each wine The chemically determined content of the total acid of the sample and the chemically determined content of the total esters of each wine sample in the second wine sample set are used as the output of the first partial least squares regression model, and the first partial least squares regression model is trained to obtain the total acidity and total acidity of the wine. The total ester content model, the model for determining the total acid and total ester content of wine, includes a mid-infrared model for determining the total acid content of wine and a mid-infrared model for determining the total ester content in wine.
其中,所述第一酒样品集和所述第二酒样品集均来自同一原始酒样品集,所述第一酒样品集经由所述原始酒样品集筛除总酸异常的酒样品得到,所述第二酒样品集经由所述原始酒样品集筛除总酯异常的酒样品得到。Wherein, the first wine sample set and the second wine sample set are both from the same original wine sample set, and the first wine sample set is obtained by screening out the wine samples with abnormal total acid from the original wine sample set, so The second wine sample set is obtained by screening out the wine samples with abnormal total esters from the original wine sample set.
本申请第一方面提供的测定酒总酸和总酯含量模型的训练方法,可以得到准确且快速用于检测酒中总酸和总酯含量的测定酒总酸和总酯含量模型,实现了对酒尤其是新酒中总酸和总酯含量快速且高效地测定,提升了检测效率同时保证了检测的准确性,还提供了酱香新酒入库验收效率,减少人力成本,保证生产经济效益。The training method of the model for measuring the content of total acid and total ester in wine provided by the first aspect of the present application can obtain an accurate and rapid model for measuring the content of total acid and total ester in wine for detecting the content of total acid and total ester in wine. The total acid and total ester content in wine, especially new wine, can be quickly and efficiently determined, which improves the detection efficiency and ensures the accuracy of the detection. It also provides the efficiency of acceptance and acceptance of new Maotai-flavored wine, reduces labor costs, and ensures production economic benefits.
本申请第一方面中提到的第一偏最小二乘法回归模型属于PLS(Partial LeastSquares Regression)回归模型。The first partial least squares regression model mentioned in the first aspect of the present application belongs to a PLS (Partial LeastSquares Regression) regression model.
在本申请第一方面一些可选的实施例中,获取已筛除异常样品的酒样品集中各酒样品总酸和总酯的化学测定含量步骤中,采用GB12456-2021食品安全国家标准食品中总酸的测定方法对已筛除异常样品的酒样品集中各酒样品总酸进行测定。采用GB/T10345-2007白酒分析方法对已筛除异常样品的酒样品集中各酒样品总酯进行测定。In some optional embodiments of the first aspect of the present application, in the step of obtaining the chemical determination content of the total acid and total ester of each wine sample in the collection of wine samples that have been screened out of abnormal samples, GB12456-2021 National Food Safety Standard for Total Food in Food is adopted. Determination method of acid The total acid of each wine sample in the wine sample set from which abnormal samples have been screened is determined. GB/T10345-2007 liquor analysis method was used to determine the total esters of each liquor sample in the liquor sample collection whose abnormal samples had been screened out.
具体的测定原理为:白酒中的有机酸,以酚酞为指示剂,采用氢氧化钠溶液进行中和滴定,以消耗氢氧化钠标准滴定溶液的量计算总酸的含量。总酯的测定用碱中和样品中的游离酸,再准确加入一定量的碱,加热回流使酯类皂化。通过消耗碱的量计算出总酯含量。The specific determination principle is as follows: the organic acid in the liquor is neutralized and titrated with sodium hydroxide solution with phenolphthalein as the indicator, and the total acid content is calculated by the consumption of the standard sodium hydroxide titration solution. For the determination of total esters, the free acid in the sample is neutralized with alkali, and then a certain amount of alkali is accurately added, and the esters are saponified by heating and refluxing. The total ester content was calculated from the amount of alkali consumed.
在本申请第一方面一些可选的实施例中,酒样品的中红外光谱信息采用红外光谱仪对样品扫描得到中红外光谱,再通过Unscrambler X 10.3光谱分析软件将扫描得到的中红外光谱转化为反应中红外光谱的多个光谱数据点。每个光谱数据点由(波数,吸光度)两者构成。具体的中红外光谱采集过程为,对红外光谱仪进行开机预热,对设备进行清洗和调零,将酒样品倒入测试杯中,泵自动抽取样品,对管路进行清洗,然后进行样品光谱采集,扫描的波数范围在400cm-1~4000cm-1以内,每个酒样品自动抽取进样三次并扫描得到酒样品的光谱。In some optional embodiments of the first aspect of the present application, the mid-infrared spectrum information of the wine sample is obtained by scanning the sample with an infrared spectrometer to obtain a mid-infrared spectrum, and then the mid-infrared spectrum obtained by scanning is converted into a reaction by Unscrambler X 10.3 spectral analysis software. Multiple spectral data points for mid-infrared spectroscopy. Each spectral data point consists of both (wavenumber, absorbance). The specific mid-infrared spectrum collection process is as follows: start the infrared spectrometer and preheat, clean and zero the equipment, pour the wine sample into the test cup, automatically extract the sample by the pump, clean the pipeline, and then collect the sample spectrum. , the scanning wavenumber range is within 400cm -1 to 4000cm -1 , and each wine sample is automatically extracted and injected three times and scanned to obtain the spectrum of the wine sample.
在本申请第一方面一些可选的实施例中,训练方法中原始酒样品集筛除总酸异常的酒样品的步骤包括:In some optional embodiments of the first aspect of the present application, the step of screening out the wine samples with abnormal total acid from the original wine sample set in the training method includes:
获取第一预训练数据,预训练数据包括原始酒样品集中各酒样品的中红外光谱信息以及原始酒样品集中各酒样品总酸的化学测定含量;Obtaining first pre-training data, the pre-training data includes mid-infrared spectral information of each wine sample in the original wine sample set and the chemically determined content of the total acid of each wine sample in the original wine sample set;
将原始酒样品集中各酒样品的中红外光谱信息作为第二偏最小二乘法回归模型的输入,将原始酒样品集中各酒样品总酸的化学测定含量作为第二偏最小二乘法回归模型的输出,训练第二偏最小二乘法回归模型,得到测定酒总酸含量预训练模型;The mid-infrared spectral information of each wine sample in the original wine sample set is used as the input of the second partial least squares regression model, and the chemically determined content of the total acid of each wine sample in the original wine sample set is used as the output of the second partial least squares regression model , train the second partial least squares regression model, and obtain the pre-training model for measuring the total acid content of wine;
基于测定酒总酸含量预训练模型中的离群点,从原始酒样品集中筛除总酸异常的酒样品,得到第一酒样品集。Based on the outliers in the pre-training model for measuring the total acid content of wine, the wine samples with abnormal total acid content were screened out from the original wine sample set to obtain the first wine sample set.
在这些实施例的一些示例中,第二偏最小二乘法回归模型属于PLS(PartialLeast Squares Regression)回归模型。In some examples of these embodiments, the second partial least squares regression model is a PLS (Partial Least Squares Regression) regression model.
在这些实施例的一些示例中,获得测定酒总酸含量预训练模型后,发现模型预测总酸含量效果不佳的酒样品,即总酸异常的酒样品,该酒样品对应的样品点通常具有很大的或正或负的残差,则该样品点定义为测定酒总酸含量预训练模型中的离群点,将在该模型预测总酸含量效果不佳的酒样品(即总酸异常的酒样品)从原始酒样品集中筛除,得到第一酒样品集。In some examples of these embodiments, after obtaining the pre-training model for measuring the total acid content of wine, it is found that the wine sample whose model predicts the total acid content poorly, that is, the wine sample with abnormal total acid content, the corresponding sample point of the wine sample usually has If the residual error is large or positive or negative, the sample point is defined as an outlier in the pre-training model for determining the total acid content of wine, and will be used in the wine samples that the model predicts the total acid content ineffectively (that is, abnormal total acid content). The wine samples) were screened out from the original wine sample set to obtain the first wine sample set.
在本申请第一方面一些可选的实施例中,训练方法中原始酒样品集筛除总酯异常的酒样品的步骤包括:In some optional embodiments of the first aspect of the present application, the step of screening out the wine samples with abnormal total esters from the original wine sample set in the training method includes:
获取第二预训练数据,预训练数据包括原始酒样品集中各酒样品的中红外光谱信息以及原始酒样品集中各酒样品总酯的化学测定含量;acquiring second pre-training data, where the pre-training data includes mid-infrared spectral information of each wine sample in the original wine sample set and the chemically determined content of total esters of each wine sample in the original wine sample set;
将原始酒样品集中各酒样品的中红外光谱信息作为第三偏最小二乘法回归模型的输入,将原始酒样品集中各酒样品总酯的化学测定含量作为第三偏最小二乘法回归模型的输出,训练第三偏最小二乘法回归模型,得到测定酒总酯含量预训练模型;The mid-infrared spectral information of each wine sample in the original wine sample set was used as the input of the third partial least squares regression model, and the chemically determined content of total esters of each wine sample in the original wine sample set was used as the output of the third partial least squares regression model. , train the third partial least squares regression model, and obtain the pre-training model for measuring the total ester content of wine;
基于测定酒总酯含量预训练模型中的离群点,从原始酒样品集中筛除总酯异常的酒样品,得到第二酒样品集。Based on the outliers in the pre-trained model for determining the total ester content of wine, the wine samples with abnormal total esters were screened out from the original wine sample set to obtain a second wine sample set.
在这些实施例的一些示例中,第三偏最小二乘法回归模型属于PLS(PartialLeast Squares Regression)回归模型。In some examples of these embodiments, the third partial least squares regression model is a PLS (Partial Least Squares Regression) regression model.
在这些实施例的一些示例中,获得测定酒总酯含量预训练模型后,发现模型预测总酯含量效果不佳的酒样品,即总酯异常的酒样品,该酒样品对应的样品点通常具有很大的或正或负的残差,则该样品点定义为测定酒总酯含量预训练模型中的离群点,将在该模型预测总酯含量效果不佳的酒样品(即总酯异常的酒样品)从原始酒样品集中筛除,得到第二酒样品集。In some examples of these embodiments, after obtaining the pre-trained model for measuring the total ester content of wine, it is found that the wine sample whose model predicts the total ester content is not effective, that is, the wine sample with abnormal total ester content, the sample point corresponding to the wine sample usually has If the residual error is large or positive or negative, the sample point is defined as an outlier in the pre-trained model for determining the total ester content of wine, and will be used in the wine sample that the model predicts the total ester content ineffectively (that is, abnormal total ester content). wine samples) were screened out from the original wine sample set to obtain a second wine sample set.
在本申请第一方面一些可选的实施例中,训练第一偏最小二乘法回归模型的步骤S20还包括:In some optional embodiments of the first aspect of the present application, the step S20 of training the first partial least squares regression model further includes:
S21:采用主成分分析将第一酒样品集划分为第一校正集、第一验证集及第一外部验证集,并基于第一校正集和第一验证集对第一偏最小二乘法回归模型进行初步训练,得到多个测定酒总酸训练子模型;S21: Use principal component analysis to divide the first wine sample set into a first calibration set, a first validation set and a first external validation set, and perform a first partial least squares regression model based on the first calibration set and the first validation set Carry out preliminary training to obtain multiple training sub-models for measuring total acid in wine;
S22:将第一外部验证集中各酒样品的中红外光谱信息作为各测定酒总酸训练子模型的输入,获得各测定酒总酸训练子模型输出的第一外部验证集中各酒样品的训练子模型预测总酸含量;S22: Use the mid-infrared spectral information of each wine sample in the first external verification set as the input of each training sub-model for measuring total acid in wine, and obtain the training sub-model of each wine sample in the first external verification set output by each training sub-model for measuring total acid in wine Model predicts total acid content;
S23:采用主成分分析将第二酒样品集划分为第二校正集、第二验证集及第二外部验证集,并基于第二校正集和第二验证集对第一偏最小二乘法回归模型进行初步训练,得到多个测定酒总酯训练子模型;S23: Use principal component analysis to divide the second wine sample set into a second calibration set, a second validation set, and a second external validation set, and perform the first partial least squares regression model based on the second calibration set and the second validation set Carry out preliminary training to obtain multiple training sub-models for measuring total alcohol esters;
S24:将第二外部验证集中酒样品的中红外光谱信息作为各测定酒总酯训练子模型的输入,获得各测定酒总酯训练子模型输出的第二外部验证集中各酒样品的训练子模型预测总酯含量;S24: Use the mid-infrared spectral information of the wine samples in the second external validation set as the input of each training sub-model for measuring total wine esters, and obtain the training sub-models for each wine sample in the second external validation set output by each training sub-model for measuring total wine esters predict total ester content;
S25:根据各测定酒总酸训练子模型输出的第一外部验证集中各酒样品的训练子模型预测总酸含量、各测定酒总酯训练子模型输出的第二外部验证集中各酒样品的训练子模型预测总酯含量、第一外部验证集中各酒样品总酸的化学测定含量以及第二外部验证集中各酒样品总酯的化学测定含量,以预设的误差范围为确定依据,确定主成分数,得到包括中红外测定酒总酸含量模型和中红外测定酒总酯含量模型的测定酒总酸和总酯含量模型。S25: Predict the total acid content according to the training sub-model of each wine sample in the first external validation set output by each training sub-model for measuring total wine acid, and the training of each wine sample in the second external validation set output by each training sub-model for measuring total wine esters The sub-model predicts the total ester content, the chemically determined content of the total acid of each wine sample in the first external validation set, and the chemically determined content of the total ester of each wine sample in the second external validation set, and the main component is determined based on the preset error range. Then, a model for the determination of total acid and total ester content in wine was obtained, including a model for measuring the total acid content of wine by mid-infrared and a model for measuring total ester content in wine by mid-infrared.
在本申请第一方面一些可选的实施例中,原始酒样品集中各酒样品的中红外光谱信息中光谱为连续光谱,波段范围在400cm-1~4000cm-1。In some optional embodiments of the first aspect of the present application, the spectrum in the mid-infrared spectrum information of each wine sample in the original wine sample set is a continuous spectrum, and the wavelength band ranges from 400 cm -1 to 4000 cm -1 .
在这些实施例的一些示例中,原始酒样品集中各酒样品的中红外光谱信息采用红外光谱仪对样品扫描得到中红外光谱,再通过Unscrambler X 10.3光谱分析软件将扫描得到的中红外光谱转化为反应中红外光谱的多个光谱数据点。每个光谱数据点由(波数,吸光度)两者构成。具体的中红外光谱采集过程为,对红外光谱仪进行开机预热,对设备进行清洗和调零,将酒样品倒入测试杯中,泵自动抽取样品,对管路进行清洗,然后进行样品光谱采集,扫描的波数范围在400cm-1~4000cm-1以内,每个酒样品自动抽取进样三次并扫描得到酒样品的光谱。In some examples of these embodiments, the mid-infrared spectrum information of each wine sample in the original wine sample set is scanned by an infrared spectrometer to obtain a mid-infrared spectrum, and then the scanned mid-infrared spectrum is converted into a reaction by Unscrambler X 10.3 spectral analysis software Multiple spectral data points for mid-infrared spectroscopy. Each spectral data point consists of both (wavenumber, absorbance). The specific mid-infrared spectrum collection process is as follows: start the infrared spectrometer and preheat, clean and zero the equipment, pour the wine sample into the test cup, automatically extract the sample by the pump, clean the pipeline, and then collect the sample spectrum. , the scanning wavenumber range is within 400cm -1 to 4000cm -1 , and each wine sample is automatically extracted and injected three times and scanned to obtain the spectrum of the wine sample.
在该些实施例中,在得到测定酒总酸和总酯含量模型前并不清楚酒样品的中红外光谱信息中哪些波段范围对应酒样品的总酸含量灵敏,也并不清楚酒样品的中红外光谱中哪些波段范围对应酒样品的总酯含量灵敏。因此,原始酒样品集中各酒样品的中红外光谱信息为光谱是连续且波段范围在400cm-1~4000cm-1(即全中红外光谱波段)的红外光谱信息。In these embodiments, it is not clear which wavelength ranges in the mid-infrared spectral information of wine samples are sensitive to the total acid content of wine samples, and it is not clear that the middle Which bands in the infrared spectrum are sensitive to the total ester content of wine samples. Therefore, the mid-infrared spectral information of each wine sample in the original wine sample set is infrared spectral information whose spectrum is continuous and the wavelength band is in the range of 400cm -1 to 4000cm -1 (that is, the full mid-infrared spectral band).
在本申请第一方面一些可选的实施例中,第一酒样品集中各酒样品的中红外光谱信息中的第一光谱为间断光谱,第二酒样品集中各酒样品的中红外光谱信息中的第二光谱也为间断光谱。In some optional embodiments of the first aspect of the present application, the first spectrum in the mid-infrared spectral information of each wine sample in the first wine sample set is a discontinuous spectrum, and in the mid-infrared spectral information of each wine sample in the second wine sample set The second spectrum of is also a discontinuous spectrum.
在本申请第一方面一些可选的实施例中,第一光谱包括间隔的两个波段,分别为4000cm-1~3791cm-1及2943cm-1~1670cm-1。在这些实施例中,4000cm-1~3791cm-1及2943cm-1~1670cm-1为中红外光谱对酒样品总酸含量灵敏的波段范围。挑选对酒样品总酸含量灵敏的波段范围大大提高了模型训练的效率以及准确性,得到更优的中红外测定酒总酸含量模型。In some optional embodiments of the first aspect of the present application, the first spectrum includes two wavelength bands at intervals, which are respectively 4000 cm -1 to 3791 cm -1 and 2943 cm -1 to 1670 cm -1 . In these examples, 4000cm -1 to 3791cm -1 and 2943cm -1 to 1670cm -1 are the wavelength ranges where the mid-infrared spectrum is sensitive to the total acid content of wine samples. The selection of the wavelength range sensitive to the total acid content of wine samples greatly improves the efficiency and accuracy of model training, and a better mid-infrared model for the determination of total acid content in wine is obtained.
在本申请第一方面一些可选的实施例中,第二光谱包括间隔的三个波段,分别为4000cm-1~3791cm-1,2727cm-1~2518cm-1及2090cm-1~1670cm-1。在这些实施例中,4000cm-1~3791cm-1,2727cm-1~2518cm-1及2090cm-1~1670cm-1为中红外光谱对酒样品总酸含量灵敏的波段范围。挑选对酒样品总酯含量灵敏的波段范围大大提高了模型训练的效率以及准确性,得到更优的中红外测定酒总酯含量模型。In some optional embodiments of the first aspect of the present application, the second spectrum includes three wavelength bands at intervals, which are 4000cm -1 to 3791cm -1 , 2727cm -1 to 2518cm -1 and 2090cm -1 to 1670cm -1 respectively. In these examples, 4000cm -1 to 3791cm -1 , 2727cm -1 to 2518cm -1 and 2090cm -1 to 1670cm -1 are the wavelength ranges in which the mid-infrared spectrum is sensitive to the total acid content of wine samples. The selection of the wavelength range that is sensitive to the total ester content of wine samples greatly improves the efficiency and accuracy of model training, and a better mid-infrared model for the determination of wine total ester content is obtained.
在本申请第一方面一些可选的实施例中,第一光谱和第二光谱中的波段均根据原始酒样品集中各酒样品的中红外光谱信息、原始酒样品集中各酒样品总酸的化学测定含量以及原始酒样品集中各酒样品总酯的化学测定含量进行组合间隔偏最小二乘法运算,比较交互验证均方差得到,其中,将原始酒样品集中各酒样品的中红外光谱信息中连续光谱的波段均分为N个子波段,N大于1。In some optional embodiments of the first aspect of the present application, the bands in the first spectrum and the second spectrum are based on the mid-infrared spectral information of each wine sample in the original wine sample set, and the chemistry of the total acid of each wine sample in the original wine sample set. The measured content and the chemically determined content of the total esters of each wine sample in the original wine sample set were calculated by the combined interval partial least squares method, and the mean square error of the cross-validation was compared. The band is divided into N sub-bands, and N is greater than 1.
在这些实施例的一些示例中,N取值为17、55或85。In some examples of these embodiments, N takes a value of 17, 55, or 85.
【本申请第一方面的具体实施例】[Specific embodiments of the first aspect of the present application]
取718个酱香型白酒原始酒样品,形成原始酒样品集。718 original liquor samples of Maotai-flavor liquor were taken to form the original liquor sample set.
获取第一预训练数据,预训练数据包括原始酒样品集中各酒样品的中红外光谱信息以及原始酒样品集中各酒样品总酸的化学测定含量,原始酒样品集中各酒样品的中红外光谱信息采用红外光谱仪对样品扫描得到中红外光谱,再通过Unscrambler X 10.3光谱分析软件将扫描得到的中红外光谱转化为反应中红外光谱的多个光谱数据点。每个光谱数据点由(波数,吸光度)两者构成。具体的中红外光谱采集过程为,对红外光谱仪进行开机预热,对设备进行清洗和调零,将酒样品倒入测试杯中,泵自动抽取样品,对管路进行清洗,然后进行样品光谱采集,扫描的波段为400cm-1~4000cm-1以内,每个酒样品自动抽取进样三次并扫描得到原始酒样品集中酒样品的光谱。图2示出了一酒样品的中红外光谱图。Obtain first pre-training data, the pre-training data includes mid-infrared spectral information of each wine sample in the original wine sample set, the chemically determined content of the total acid of each wine sample in the original wine sample set, and the mid-infrared spectral information of each wine sample in the original wine sample set The mid-infrared spectrum was obtained by scanning the sample with an infrared spectrometer, and then the scanned mid-infrared spectrum was converted into multiple spectral data points of the reaction mid-infrared spectrum by Unscrambler X 10.3 spectral analysis software. Each spectral data point consists of both (wavenumber, absorbance). The specific mid-infrared spectrum collection process is as follows: start the infrared spectrometer and preheat, clean and zero the equipment, pour the wine sample into the test cup, automatically extract the sample by the pump, clean the pipeline, and then collect the sample spectrum. , the scanning band is within 400cm -1 to 4000cm -1 , each wine sample is automatically sampled and injected three times and scanned to obtain the spectrum of the original wine sample set. Figure 2 shows the mid-infrared spectrum of a wine sample.
将原始酒样品集中各酒样品的中红外光谱信息作为第二偏最小二乘法回归模型的输入,将原始酒样品集中各酒样品总酸的化学测定含量作为第二偏最小二乘法回归模型的输出,训练第二偏最小二乘法回归模型,得到测定酒总酸含量预训练模型;The mid-infrared spectral information of each wine sample in the original wine sample set is used as the input of the second partial least squares regression model, and the chemically determined content of the total acid of each wine sample in the original wine sample set is used as the output of the second partial least squares regression model , train the second partial least squares regression model, and obtain the pre-training model for measuring the total acid content of wine;
基于测定酒总酸含量预训练模型中的离群点,从原始酒样品集中筛除总酸异常的酒样品26个,得到第一酒样品集,第一酒样品集包括了692个酒样品。Based on the outliers in the pre-training model for determining the total acid content of wine, 26 wine samples with abnormal total acid content were screened out from the original wine sample set to obtain the first wine sample set, which included 692 wine samples.
在本申请第一方面一些可选的实施例中,训练方法中原始酒样品集筛除总酯异常的酒样品的步骤包括:In some optional embodiments of the first aspect of the present application, the step of screening out the wine samples with abnormal total esters from the original wine sample set in the training method includes:
获取第二预训练数据,预训练数据包括原始酒样品集中各酒样品的中红外光谱信息以及原始酒样品集中各酒样品总酯的化学测定含量;acquiring second pre-training data, where the pre-training data includes mid-infrared spectral information of each wine sample in the original wine sample set and the chemically determined content of total esters of each wine sample in the original wine sample set;
将原始酒样品集中各酒样品的中红外光谱信息作为第三偏最小二乘法回归模型的输入,将原始酒样品集中各酒样品总酯的化学测定含量作为第三偏最小二乘法回归模型的输出,训练第三偏最小二乘法回归模型,得到测定酒总酯含量预训练模型;The mid-infrared spectral information of each wine sample in the original wine sample set was used as the input of the third partial least squares regression model, and the chemically determined content of total esters of each wine sample in the original wine sample set was used as the output of the third partial least squares regression model. , train the third partial least squares regression model, and obtain the pre-training model for measuring the total ester content of wine;
基于测定酒总酯含量预训练模型中的离群点,从原始酒样品集中筛除总酯异常的酒样品30个,得到第二酒样品集,第二酒样品集包括了688个酒样品。Based on the outliers in the pre-training model for determining the total ester content of wine, 30 wine samples with abnormal total esters were screened out from the original wine sample set, and a second wine sample set was obtained. The second wine sample set included 688 wine samples.
对第一酒样品集中各酒样品的中红外光谱信息中的第一光谱进行波段选择,同时也对第二酒样品集中各酒样品的中红外光谱信息中的第二光谱进行波段选择。Band selection is performed on the first spectrum in the mid-infrared spectral information of each wine sample in the first wine sample set, and band selection is also performed on the second spectrum in the mid-infrared spectral information of each wine sample in the second wine sample set.
第一光谱和第二光谱中的波段均根据原始酒样品集中各酒样品的中红外光谱信息、原始酒样品集中各酒样品总酸的化学测定含量以及原始酒样品集中各酒样品总酯的化学测定含量进行组合间隔偏最小二乘法运算,比较交互验证均方差得到,其中,将原始酒样品集中各酒样品的中红外光谱信息中连续光谱的波段均分为N个子波段,N取值为17、55或85。The bands in the first spectrum and the second spectrum are based on the mid-infrared spectral information of each wine sample in the original wine sample set, the chemically determined content of total acid in each wine sample in the original wine sample set, and the chemical determination of total esters in each wine sample in the original wine sample set. Determination of the content is carried out by the combined interval partial least squares method, and the mean square error of the cross-validation is compared. Among them, the continuous spectrum bands in the mid-infrared spectral information of each wine sample in the original wine sample set are equally divided into N sub-bands, and the value of N is 17. , 55 or 85.
第一光谱包括间隔的两个波段,分别为4000cm-1~3791cm-1及2943cm-1~1670cm-1。The first spectrum includes two spaced bands, 4000 cm -1 to 3791 cm -1 and 2943 cm -1 to 1670 cm -1 , respectively.
第二光谱包括间隔的三个波段,分别为4000cm-1~3791cm-1,2727cm-1~2518cm-1及2090cm-1~1670cm-1。The second spectrum includes three spaced bands, 4000cm -1 to 3791cm -1 , 2727cm -1 to 2518cm -1 and 2090cm -1 to 1670cm -1 , respectively.
采用主成分分析将第一酒样品集划分为第一校正集、第一验证集及第一外部验证集,并基于第一校正集和第一验证集对第一偏最小二乘法回归模型进行初步训练,得到多个测定酒总酸训练子模型,其中,第一校正集的样本数与第一验证集的第一校正集的样本数之比为2:1,第一校正集与第一验证集的样本数之和为600,第一外部验证集的样本数为92个。The first wine sample set is divided into the first calibration set, the first validation set and the first external validation set by principal component analysis, and the first partial least squares regression model is preliminarily carried out based on the first calibration set and the first validation set training to obtain a plurality of training sub-models for measuring the total acidity of wine, wherein the ratio of the number of samples of the first calibration set to the number of samples of the first calibration set of the first validation set is 2:1, and the ratio of the number of samples of the first calibration set to the number of samples of the first calibration set of the first validation set is 2:1 The sum of the number of samples in the set is 600, and the number of samples in the first external validation set is 92.
将第一外部验证集中各酒样品的中红外光谱信息作为各测定酒总酸训练子模型的输入,获得各测定酒总酸训练子模型输出的第一外部验证集中各酒样品的训练子模型预测总酸含量。The mid-infrared spectral information of each wine sample in the first external verification set is used as the input of each training sub-model for measuring the total acid of wine, and the training sub-model prediction of each wine sample in the first external verification set output by each training sub-model for measuring the total acid of wine is obtained. total acid content.
采用主成分分析将第二酒样品集划分为第二校正集、第二验证集及第二外部验证集,并基于第二校正集和第二验证集对第一偏最小二乘法回归模型进行初步训练,得到多个测定酒总酯训练子模型,其中,第二校正集的样本数与第二验证集的第一校正集的样本数之比为2:1,第二校正集与第二验证集的样本数之和为600,第一外部验证集的样本数为88个。The second wine sample set is divided into the second calibration set, the second validation set and the second external validation set by principal component analysis, and the first partial least squares regression model is preliminarily carried out based on the second calibration set and the second validation set training to obtain multiple training sub-models for measuring total alcohol esters, wherein the ratio of the number of samples in the second calibration set to the number of samples in the first calibration set of the second verification set is 2:1, and the ratio of the number of samples in the second calibration set to the number of samples in the second calibration set is 2:1 The sum of the number of samples in the set is 600, and the number of samples in the first external validation set is 88.
将第二外部验证集中酒样品的中红外光谱信息作为各测定酒总酯训练子模型的输入,获得各测定酒总酯训练子模型输出的第二外部验证集中各酒样品的训练子模型预测总酯含量。The mid-infrared spectral information of the wine samples in the second external validation set is used as the input of each training sub-model for measuring total wine esters, and the training sub-model of each wine sample in the second external validation set output by each training sub-model for measuring total wine esters is obtained. ester content.
根据各测定酒总酸训练子模型输出的第一外部验证集中各酒样品的训练子模型预测总酸含量、各测定酒总酯训练子模型输出的第二外部验证集中各酒样品的训练子模型预测总酯含量、第一外部验证集中各酒样品总酸的化学测定含量以及第二外部验证集中各酒样品总酯的化学测定含量,以预设的误差范围为确定依据,确定主成分数,得到包括中红外测定酒总酸含量模型和中红外测定酒总酯含量模型的测定酒总酸和总酯含量模型。According to the training sub-model of each wine sample in the first external validation set output by each training sub-model for measuring total acid of wine, the total acid content is predicted by the training sub-model, and the training sub-model of each wine sample in the second external validation set output by each training sub-model for measuring total wine esters Predict the total ester content, the chemically determined content of the total acid of each wine sample in the first external verification set, and the chemically determined content of the total ester of each wine sample in the second external verification set, and determine the number of principal components based on a preset error range, A model for the determination of total acid and total ester content in wine was obtained, including a mid-infrared model for measuring the total acid content of wine and a model for measuring the total ester content in wine by mid-infrared.
图3示出了本具体实施例的中红外测定酒总酸含量模型。图4示出了中红外测定酒总酸含量模型中经由第一验证集得到的中红外测定酒总酸含量子模型。图5示出了中红外测定酒总酸含量模型中经由第一校正集得到的中红外测定酒总酸含量子模型。FIG. 3 shows a model for determining the total acid content of wine by mid-infrared in this specific embodiment. FIG. 4 shows a mid-infrared quantum model for measuring the total acid content of wine obtained through the first validation set in the mid-infrared model for measuring the total acid content of wine. FIG. 5 shows the mid-infrared determination of wine total acid content quantum model obtained through the first calibration set in the mid-infrared determination of wine total acid content model.
图6示出了本具体实施例的中红外测定酒总酯含量模型。图7示出了中红外测定酒总酯含量模型中经由第二验证集得到的中红外测定酒总酯含量子模型。图8示出了中红外测定酒总酯含量模型中经由第二校正集得到的中红外测定酒总酯含量子模型。FIG. 6 shows the mid-infrared determination model of the total ester content of wine in this specific embodiment. FIG. 7 shows the mid-infrared determination of total alcohol ester content quantum model obtained through the second validation set in the mid-infrared determination of wine total ester content model. FIG. 8 shows the mid-infrared determination of wine total ester content quantum model obtained through the second calibration set in the mid-infrared determination of wine total ester content model.
图3所示的中红外测定酒总酸含量模型和图6所示的中红外测定酒总酯含量模型共同构成了测定酒总酸和总酯含量模型。The mid-infrared determination model of wine total acid content shown in Figure 3 and the mid-infrared determination of wine total ester content model shown in Figure 6 together constitute a model for determination of wine total acid and total ester content.
本具体实施例中,预设的总酸含量的测定误差范围在-3.52%至5.32%之间,确定的主成分数为15,表1示出了第一外部验证集对得到的中红外测定酒总酸含量模型的验证结果。In this specific embodiment, the preset measurement error range of the total acid content is between -3.52% and 5.32%, and the determined number of principal components is 15. Table 1 shows the mid-infrared measurement obtained by the first external validation set. Validation results of the wine total acid content model.
表1Table 1
本具体实施例中,预设的总酯含量的测定误差范围在-9.50%至4.05%之间,确定的主成分数为16,表2示出了第二外部验证集对得到的中红外测定酒总酸含量模型的验证结果。In this specific embodiment, the preset measurement error range of total ester content is between -9.50% and 4.05%, and the determined number of principal components is 16. Table 2 shows the mid-infrared measurement obtained by the second external validation set. Validation results of the wine total acid content model.
表2Table 2
表3示出了本具体实施例测定酒总酸和总酯含量模型的具体参数,其中,RMSE为均方根误差,R-Square为相关系数R2,R2越接近1,RMSE越接近0,表示模型效果越好。Table 3 shows the specific parameters of the model for measuring the total acid and total ester content of wine in this specific example, wherein RMSE is the root mean square error, R-Square is the correlation coefficient R 2 , the closer R 2 is to 1, the closer RMSE is to 0 , indicating that the model performs better.
表3table 3
从表3可以看出,本申请第一方面提供的测定酒总酸和总酯含量模型的训练方法所训练得到的测定酒总酸和总酯含量模型能对酒中总酸和总酯的含量进行快速且准确的检测标定。As can be seen from Table 3, the model for measuring the total acid and total ester content of wine obtained by the training method of the model for measuring the total acid and total ester content of wine provided by the first aspect of the application can be used to measure the content of total acid and total ester in the wine. Perform fast and accurate assay calibration.
如图9所示,本申请第二方面提供一种酒总酸和总酯含量的测定方法,方法包括:As shown in Figure 9, the second aspect of the present application provides a kind of assay method of wine total acid and total ester content, the method comprises:
获取待测酒样品的中红外光谱信息;Obtain the mid-infrared spectral information of the wine sample to be tested;
将待测酒样品的中红外光谱信息输入测定酒总酸和总酯含量模型,获取测定酒总酸和总酯含量模型输出的酒样品总酸和总酯的含量,Input the mid-infrared spectral information of the wine sample to be tested into the model for determining the total acid and total ester content of wine, and obtain the total acid and total ester content of the wine sample output by the model for determining the total acid and total ester content of wine,
其中,测定酒总酸和总酯含量模型是本申请第一方面提供的训练方法预先训练得到的。Wherein, the model for measuring the total acid and total ester content of wine is obtained by pre-training by the training method provided in the first aspect of the present application.
本申请第三方面提供一种训练测定酒总酸和总酯含量模型的装置,该装置包括:A third aspect of the present application provides a device for training a model for measuring the total acid and total ester content of wine, the device comprising:
第一获取单元,用于获取训练数据,训练数据包括第一酒样品集中各酒样品的中红外光谱信息、第一酒样品集中各酒样品总酸的化学测定含量、第二酒样品集中各酒样品的中红外光谱信息以及第二酒样品集中各酒样品总酯的化学测定含量;The first acquisition unit is used to acquire training data, the training data includes mid-infrared spectral information of each wine sample in the first wine sample set, chemically determined content of the total acid of each wine sample in the first wine sample set, and each wine in the second wine sample set. The mid-infrared spectral information of the sample and the chemically determined content of the total esters of each wine sample in the second wine sample set;
模型训练单元,用于将第一酒样品集中各酒样品的中红外光谱信息和第二酒样品集中各酒样品的中红外光谱信息作为第一偏最小二乘法回归模型的输入,将第一酒样品集中各酒样品总酸的化学测定含量和第二酒样品集中各酒样品总酯的化学测定含量作为第一偏最小二乘法回归模型的输出,训练第一偏最小二乘法回归模型,得到测定酒总酸和总酯含量模型,测定酒总酸和总酯含量模型包括中红外测定酒总酸含量模型和中红外测定酒总酯含量模型,其中,第一酒样品集和第二酒样品集均来自同一原始酒样品集,第一酒样品集经由原始酒样品集筛除总酸异常的酒样品得到,第二酒样品集经由原始酒样品集筛除总酯异常的酒样品得到。The model training unit is used to use the mid-infrared spectral information of each wine sample in the first wine sample set and the mid-infrared spectral information of each wine sample in the second wine sample set as the input of the first partial least squares regression model, and the first wine The chemically determined content of the total acid of each wine sample in the sample set and the chemically determined content of the total ester of each wine sample in the second wine sample set are used as the output of the first partial least squares regression model, and the first partial least squares regression model is trained to obtain the measured The total acid and total ester content model of wine, the model for determining the total acid and total ester content of wine includes a mid-infrared model for determining the total acid content of wine and a mid-infrared model for determining the total ester content in wine. Among them, the first wine sample set and the second wine sample set All come from the same original wine sample set. The first wine sample set was obtained by screening out the wine samples with abnormal total acid from the original wine sample set, and the second wine sample set was obtained by screening out the wine samples with abnormal total esters in the original wine sample set.
本申请第四方面提供一种测定酒总酸和总酯含量的装置,该装置包括:A fourth aspect of the present application provides a device for measuring the total acid and total ester content of wine, the device comprising:
第二获取单元,用于获得待测酒样品的中红外光谱信息;The second acquisition unit is used to obtain mid-infrared spectral information of the wine sample to be tested;
酒样品总酸和总酯测定单元,用于将待测酒样品的中红外光谱信息输入测定酒总酸和总酯含量模型,获取测定酒总酸和总酯含量模型输出的酒样品总酸和总酯的含量,其中,测定酒总酸和总酯含量模型是如本申请第三方面提供的训练测定酒总酸和总酯含量模型的装置预先训练得到的。The wine sample total acid and total ester determination unit is used to input the mid-infrared spectral information of the wine sample to be tested into the model for measuring the total acid and total ester content of wine, and obtain the total acid and total ester content of the wine sample output by the model for measuring the total acid and total ester content of wine. The content of total esters, wherein the model for measuring the content of total acid and total ester in wine is obtained by pre-training the device for training the model for measuring the content of total acid and total ester in wine as provided in the third aspect of the present application.
本申请第二方面提供一种酒总酸和总酯含量的测定方法,方法包括:A second aspect of the present application provides a method for measuring total acid and total ester content of wine, the method comprising:
获取待测酒样品的中红外光谱信息;Obtain the mid-infrared spectral information of the wine sample to be tested;
将待测酒样品的中红外光谱信息输入测定酒总酸和总酯含量模型,获取测定酒总酸和总酯含量模型输出的酒样品总酸和总酯的含量,Input the mid-infrared spectral information of the wine sample to be tested into the model for determining the total acid and total ester content of wine, and obtain the total acid and total ester content of the wine sample output by the model for determining the total acid and total ester content of wine,
其中,测定酒总酸和总酯含量模型是如本申请第一方面提供的测定酒总酸和总酯含量模型的训练方法预先训练得到的。Wherein, the model for measuring the total acid and total ester content of wine is obtained by pre-training according to the training method for the model for measuring the total acid and total ester content of wine provided in the first aspect of the present application.
在本申请第三方面提供一种训练测定酒总酸和总酯含量模型的装置,该装置包括:A third aspect of the present application provides a device for training a model for measuring the total acid and total ester content of wine, the device comprising:
第一获取单元,用于获取训练数据,所述训练数据包括已筛除异常样品的酒样品集中各酒样品的中红外光谱信息以及已筛除异常样品的酒样品集中各酒样品总酸和总酯的化学测定含量;The first acquisition unit is used to acquire training data, the training data includes mid-infrared spectral information of each wine sample in the wine sample set from which abnormal samples have been screened out, and the total acid and total acidity of each wine sample in the wine sample set from which abnormal samples have been screened out. Chemically determined content of esters;
模型训练单元,用于将所述已筛除异常样品的酒样品集中各酒样品的中红外光谱信息作为第一偏最小二乘法回归模型的输入,将所述已筛除异常样品的酒样品集中各酒样品总酸和总酯的化学测定含量作为所述第一偏最小二乘法回归模型的输出,训练所述第一偏最小二乘法回归模型,得到测定酒总酸和总酯含量模型。The model training unit is used to use the mid-infrared spectral information of each wine sample in the wine sample set from which abnormal samples have been screened out as the input of the first partial least squares regression model, and set the wine sample set from which abnormal samples have been screened out. The chemically determined content of the total acid and total ester of each wine sample is used as the output of the first partial least squares regression model, and the first partial least squares regression model is trained to obtain a model for measuring the total acid and total ester content of wine.
在本申请第四方面提供的测定酒总酸和总酯含量的装置,该装置包括:The device for measuring the total acid and total ester content of wine provided in the fourth aspect of the application, the device includes:
第二获取单元,用于获得待测酒样品的中红外光谱信息;The second acquisition unit is used to obtain mid-infrared spectral information of the wine sample to be tested;
酒样品总酸和总酯测定单元,用于将待测酒样品的中红外光谱信息输入测定酒总酸和总酯含量模型,获取测定酒总酸和总酯含量模型输出的酒样品总酸和总酯的含量,其中,测定酒总酸和总酯含量模型是如权利要求9的装置预先训练得到的。The wine sample total acid and total ester determination unit is used to input the mid-infrared spectral information of the wine sample to be tested into the model for measuring the total acid and total ester content of wine, and obtain the total acid and total ester content of the wine sample output by the model for measuring the total acid and total ester content of wine. The content of total esters, wherein, the model for determining the content of total acid and total esters in wine is pre-trained by the device according to
应该理解的是,图1、图9中所示的方法流程图中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that at least a part of the steps in the method flowcharts shown in FIG. 1 and FIG. 9 may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed and completed at the same time, but may be Executed at different times, the execution order of these sub-steps or stages is not necessarily sequential, but may be executed in turn or alternately with other steps or at least a part of sub-steps or stages of other steps.
上述具体实施方式,并不构成对本申请保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本申请的精神和原则之内所作的修改、等同替换和改进等,均应包含在本申请保护范围之内。The above-mentioned specific embodiments do not constitute a limitation on the protection scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principles of this application shall be included within the protection scope of this application.
Claims (12)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210769887.5A CN115236024A (en) | 2022-06-30 | 2022-06-30 | Training method, determination method and device for model for determining content of total acids and total esters in wine |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210769887.5A CN115236024A (en) | 2022-06-30 | 2022-06-30 | Training method, determination method and device for model for determining content of total acids and total esters in wine |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115236024A true CN115236024A (en) | 2022-10-25 |
Family
ID=83671311
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210769887.5A Pending CN115236024A (en) | 2022-06-30 | 2022-06-30 | Training method, determination method and device for model for determining content of total acids and total esters in wine |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115236024A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116735811A (en) * | 2023-08-14 | 2023-09-12 | 山东百脉泉酒业股份有限公司 | Method and system for measuring total acid and total ester content of wine |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111426636A (en) * | 2020-04-09 | 2020-07-17 | 米诺杰科技(江苏)有限公司 | Instrument for quickly analyzing chemical component content of wine |
-
2022
- 2022-06-30 CN CN202210769887.5A patent/CN115236024A/en active Pending
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111426636A (en) * | 2020-04-09 | 2020-07-17 | 米诺杰科技(江苏)有限公司 | Instrument for quickly analyzing chemical component content of wine |
Non-Patent Citations (5)
Title |
---|
周军 等: "中红外光谱技术在浓香型白酒原酒关键指标分析中的应用", 《光谱学与光谱分析》, vol. 42, no. 3, 31 March 2022 (2022-03-31), pages 764 - 768 * |
王伟: "智能检测技术", 31 December 2021, 机械工业出版社, pages: 45 - 49 * |
谷宇: "人工智能基础", 30 November 2021, 机械工业出版社, pages: 33 - 34 * |
邹胜琼 等: "中红外模型快速检测白酒基础酒中总酯的含量", 《酿酒》, vol. 48, no. 3, 31 May 2021 (2021-05-31), pages 74 - 77 * |
颜虹 等: "中华医学百科全书·卫生统计学", 30 April 2020, 中国协和医科大学出版社, pages: 215 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116735811A (en) * | 2023-08-14 | 2023-09-12 | 山东百脉泉酒业股份有限公司 | Method and system for measuring total acid and total ester content of wine |
CN116735811B (en) * | 2023-08-14 | 2023-10-10 | 山东百脉泉酒业股份有限公司 | Method and system for measuring total acid and total ester content of wine |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101929951B (en) | Method for distinguishing milk doped with ewe's milk by near infrared spectrum | |
CN103674864B (en) | A kind of fish water content distribution detection method based on high light spectrum image-forming technology | |
CN101975788B (en) | Method for identifying quality of edible oil with low-field NMR (Nuclear Magnetic Resonance) | |
CN101504363A (en) | Edible fatty acid value detection method based on near-infrared spectrum analysis | |
CN107748146A (en) | A kind of crude oil attribute method for quick predicting based near infrared spectrum detection | |
CN103234922A (en) | Rapid soil organic matter detection method based on large sample soil visible-near infrared spectrum classification | |
CN103630499A (en) | Detection method for distribution of fish protein content based on hyper-spectral imaging technology | |
CN101216419A (en) | Method for quickly detecting yellow wine quality index | |
CN102636454A (en) | Method for quickly measuring content of low carbon number fatty acid in edible oil by near infrared spectrum | |
CN107703097A (en) | Utilize the method and its application of decay total reflection probe and the model of near infrared spectrometer structure fast prediction oil property | |
CN112179871A (en) | Method for nondestructive detection of caprolactam content in sauce food | |
CN104132720B (en) | Near infrared spectroscopy quickly detects the tablet weight of medicinal tablet | |
CN104849232A (en) | Method for rapid detection of contents of water and protein in royal jelly | |
CN103175805A (en) | Method for determining indexes of COD and BOD5 in sewage through near infrared spectrometry | |
Xia et al. | Simultaneous, rapid and nondestructive determination of moisture, fat content and storage time in leisure dried tofu using LF-NMR | |
CN111896497B (en) | Spectral data correction method based on predicted value | |
CN115236024A (en) | Training method, determination method and device for model for determining content of total acids and total esters in wine | |
CN108072627A (en) | It is a kind of that the method for amino-acid nitrogen and total acid content in soy sauce is quickly detected with middle infrared spectrum | |
CN103308507B (en) | A kind of analysis method of free-NCO in quick mensuration polyurethane | |
CN105092526A (en) | Rapid determination method for content of binary adulterated sesame oil based on near-infrared spectroscopy | |
CN106645020A (en) | Method for quickly determining oxidation stability of gasoline | |
CN103592256A (en) | Mid-infrared spectroscopic method for distinguishing normal edible vegetable oil from refined hogwash oil based on Fourier transform | |
CN105866065B (en) | Methenamine content analysis method in a kind of methenamine-acetum | |
CN112651173B (en) | A non-destructive testing method and generalizable system for agricultural product quality based on cross-domain spectral information | |
CN105954228A (en) | Method for measuring content of sodium metal in oil sand based on near infrared spectrum |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information |
Address after: 564622 Xijiu Town, Xishui County, Zunyi City, Guizhou Province Applicant after: Guizhou Xijiu Co.,Ltd. Address before: 564622 Xijiu Town, Xishui County, Zunyi City, Guizhou Province Applicant before: GUIZHOU MOUTAI WINERY (Group) XIJIU Co.,Ltd. |
|
CB02 | Change of applicant information |