A quantitative method for catechins in fermented black tea based on data augmentation and label generation
The DCGAN-L model generates false spectral data and label values, which solves the time-consuming and labor-intensive problem of catechin quantification in black tea fermentation, achieves fast and accurate catechin quantification, reduces costs, and avoids disordered data distribution. It has broad application prospects.
Patent Information
- Application Number
- CN202410885233.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-03
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-07-03
AI Technical Summary
In the existing technology, catechin quantification during the fermentation process of black tea is time-consuming, laborious and costly, and the generation of a single label in the regression analysis based on the DCGAN data enhancement method is time-consuming and laborious. The generation of multiple labels will lead to disordered distribution of the original spectral data and lack of Practical application feasibility.
Using the data enhancement and label generation method based on the DCGAN-L model, high-quality fake spectrum data and its corresponding multiple label values are generated through the DCGAN-L network composed of a generator and a discriminator, combined with spectral similarity indicators and saliency Analyze and evaluate data quality for augmenting training sets and evaluating data augmentation effects.
It achieves fast and non-destructive catechin quantification, saves cost and time, and generates data that is closer to real data and avoids abnormal distribution. It has broad application potential in the fields of tea fermentation and machine learning.
Smart Images

Figure CN118429816B
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of black tea fermentation, and in particular relates to a fermented black tea catechin quantitative method based on data enhancement and label generation. Background Art
[0002] As one of the most popular flavor and functional beverages in the world, the nutritional value of black tea mainly comes from tea polyphenols, caffeine and other catechin polymers. These key chemical components have a wide range of biological activities and can improve the effects of diseases such as diabetes, hyperlipidemia and obesity on human health. Therefore, accurate quantification of catechins in fermented black tea is crucial for black tea processing and production.
[0003] In recent years, hyperspectral imaging technology combined with chemometrics has been widely used in the quantitative analysis of chemical components in the fermentation process of black tea. By combining hyperspectral data with traditional machine learning algorithms, researchers have constructed quantitative analysis models for key compounds such as catechins, tea polyphenols, theaflavins and thearubigins, and realized the visualization study of these key chemical components. However, in the analysis of hyperspectral data, studies have shown that an increase in the amount of data can improve the performance of machine learning models. However, since the catechin quantification process is time-consuming and labor-intensive, the data sets in existing studies are usually limited in size, which limits the improvement of the performance of catechin quantification models.
[0004] At present, data augmentation has become an effective strategy to solve the problem of insufficient sample size in model training. Recent studies have explored the potential of generative adversarial networks (GANs) in the field of spectral data augmentation. GANs are mainly composed of generators and discriminators: the generator is responsible for generating realistic data in an attempt to deceive the discriminator; the discriminator attempts to distinguish between generated data and real training data. Among these technologies, the deep convolutional generative adversarial network (DCGAN) is particularly important because it uses convolution technology in the generator and deconvolution technology in the discriminator, which enables it to generate high-quality synthetic data. At present, some scholars have used conditional generative adversarial networks (cDCGAN) to generate fake spectral data to solve the problem of data augmentation in regression models.
[0005] Although it is common to use generative adversarial networks (GANs) to generate fake spectral data in classification problems, it is still rare to apply this technology in regression problems. In regression problems, there have been studies that generate fake spectral data and their corresponding chemical values through DCGAN, and apply this method to quantify the oil content of corn seeds. In this study, the researchers trained the DCGAN network by concatenating the average spectral data with the oil content value, thereby generating the average spectral data of corn seeds with oil content. This method has a certain effect when generating a single label value, but it is time-consuming and laborious to generate multiple label values, and there is a situation where the original spectral distribution is disturbed. Therefore, the hyperspectral data enhancement technology for multi-label in regression models still needs further research and optimization.
[0006] In summary, the problems existing in the prior art are:
[0007] (1) The method of quantifying the content of catechins in fermented black tea based on hyperspectral imaging technology combined with chemometrics is very time-consuming and labor-intensive to collect a large number of samples, and is costly and lacks feasibility for practical application. There is currently no research on quantifying the content of catechins in fermented black tea based on the DCGAN data enhancement method.
[0008] (2) Based on DCGAN data enhancement applied to regression analysis, it is time-consuming and laborious to generate a single label multiple times. Generating multiple labels together will cause the distribution of the original spectral data to be disordered, which lacks feasibility for practical application. Summary of the invention
[0009] The present invention aims to provide a fermented black tea catechin quantification method based on data enhancement and label generation to solve the above technical problems.
[0010] In order to solve the above technical problems, the specific technical solution of the fermented black tea catechin quantitative method based on data enhancement and label generation of the present invention is as follows:
[0011] A method for quantifying catechins in fermented black tea based on data enhancement and label generation, comprising the following steps:
[0012] S1. Experimental platform construction: Build the experimental platform and complete the equipment debugging;
[0013] S2. Fermented black tea image data acquisition and catechin determination: Data acquisition of hyperspectral images of experimental samples, preprocessing of the acquired image data, selection of regions of interest and extraction of average spectra, and determination of chemical values of experimental samples by ultra-high performance liquid chromatography after image acquisition;
[0014] S3. Generation of spectrum and label data of fermented black tea: Design a DCGAN-L model to generate fake spectrum data and fake label data based on the fermented black tea training set data;
[0015] S4. Generated label data quality assessment: Use spectral similarity indicators to evaluate the quality of the fake spectral data generated in step S3, and use significance analysis to compare the similarity between the fake label data generated in step S3 and the real label data distribution to evaluate the quality of the generated label data;
[0016] S5. Evaluation of data augmentation effect: The fake spectral data generated in step S3 were used to augment the fermented black tea training set. The model performance of the random forest RF and width learning BLS regression models before and after data augmentation were compared to evaluate the effectiveness of data augmentation for the quantitative analysis of catechins in fermented black tea.
[0017] Furthermore, the experimental platform described in S1 includes fermentation equipment and a hyperspectral image acquisition device, wherein the hyperspectral image acquisition device includes a hyperspectral camera, a ring-shaped halogen tungsten lamp light source, image acquisition software and an image acquisition platform; the fermentation equipment is used to prepare experimental samples, and the end of rolling is set as fermentation time 0, 25 sampling points are set during the fermentation process, and multiple fermented black tea samples are collected at each time point; the sensor of the hyperspectral camera moves inside the camera, so that the fermented black tea sample and the hyperspectral camera are relatively still.
[0018] Furthermore, the debugging of the equipment described in S1 includes debugging the exposure time of the hyperspectral camera and the height of the hyperspectral lens.
[0019] Furthermore, in S2, after the tea leaves are rolled, the tea leaves are transported to a fermentation room to extend the fermentation time so that the black tea sample covers the over-fermentation stage;
[0020] The hyperspectral image is corrected using white reference and black reference images and the reflectance is calculated. During the correction process, a white plate is placed behind the fermented black tea. The correction formula is as follows (1):
[0021] , (1)
[0022] in R is the rectified image, R 0 is the original hyperspectral image, R d and R w They are black reference image and white reference image;
[0023] The spatial resolution of the collected hyperspectral images is 2000*2000, and the spectral band is 470nm~900nm, with a total of 140 bands;
[0024] The image data preprocessing is aimed at hyperspectral images, including background removal and noise removal. The collected hyperspectral images are processed by Python software. After background removal, the average spectrum of each sample is extracted, and all average spectra are smoothed.
[0025] Further, the reagents used for the determination of the chemical value in S2 include: acetonitrile, methanol, formazan, ultrapure water, and caffeine;
[0026] The experimental steps for determining the chemical value are as follows: grind the freeze-dried black tea sample into powder by a sample grinder, pass through a sieve, accurately weigh the crushed tea sample, place the sample powder in a centrifuge tube, add preheated 70% methanol aqueous solution, stir well with a glass rod, and immediately transfer to a 70°C water bath for extraction, then take the supernatant and transfer it to a volumetric flask, extract the residue once again with 70% methanol aqueous solution, repeat the above operation, and finally combine the extracts and make up to volume;
[0027] The chromatographic conditions of the chromatographic column used in S2 are: column temperature: 25°C; detection wavelength: 280nm; injection volume: 2 μL; mobile phase A: ultrapure water with 0.1% formic acid added; mobile phase B: acetonitrile solution with 0.1% formic acid added.
[0028] Furthermore, S3 uses the DCGAN-L model to simultaneously generate fake spectral data and its corresponding multiple label values to expand the training set data samples. The DCGAN-L model contains two generators, namely generator G-Ⅰ and generator G-Ⅱ, and a discriminator D. Generator G-Ⅰ and discriminator D are used to generate fake spectral data, and generator G-Ⅱ generates label values for fake spectral data.
[0029] Furthermore, the DCGAN network structure in the DCGAN-L model in S3 consists of a generator G-Ⅰ and a discriminator D. The generator G-Ⅰ consists of four consecutive deconvolution layers. The DCGAN network first receives a 100×1 Gaussian noise vector Z. Each deconvolution operation of the first three deconvolution layers is batch normalized and processed by the LeakyReLU activation function to generate feature vectors of 128×17, 32×35 and 16×70 in turn. The last deconvolution layer is followed by a tanh activation function to finally generate an output spectrum with 140 channels. The discriminator D consists of four convolution layers, and its structure is opposite to that of the generator G-Ⅰ in order. The input layer of the discriminator G-Ⅰ accepts 1×140 spectral data. The LeakyReLU nonlinear activation function is applied after the first three convolution layers. The last convolution layer is followed by a sigmoid function to generate a single scalar to calculate the probability that the input spectrum is classified as real data.
[0030] Furthermore, the Label network structure in the DCGAN-L model in S3 is composed of an artificial label generator G-Ⅱ, which is used to assign label data to the spectral data generated from G-Ⅰ. G-Ⅱ uses the nearest neighbor regression algorithm KNN to label the fake spectra, maps the generated fake spectra and the real black tea fermentation spectra into a multidimensional space, and uses the KNN algorithm to find the five samples closest to the fake spectral data;
[0031] The formula for finding the real spectrum sample closest to the false spectrum data is as follows (2):
[0032] , (2)
[0033] in D ij Indicates i The false spectral data and j The distance between the real data, F ik Indicates i The pseudo-spectrum k bands, and F jk Indicates j The real spectrum k bands, M represents the number of spectral bands;
[0034] For each pseudo-spectrum, calculate all D ij Finally, the real spectrum data point closest to the fake spectrum is selected, and their distance is expressed as D iz , first calculate the distance weights of the five true spectra closest to the false spectra according to formula (3) W iz , the formula is as follows (3):
[0035] , (3)
[0036] in D iz Representation and generation i The distance between the five closest real spectra to a false spectrum;
[0037] Then use the following weight formula to generate the i Assign label values to the fake spectra:
[0038] , (4)
[0039] in L ih Indicates i The false spectrum data hChemical value, C zh Indicates the closest i Pseudo-spectrum z The real spectrum corresponds to h Chemical value, W iz Indicates the closest i Pseudo-spectrum z The weight corresponding to the real spectrum;
[0040] The generator G-1 and discriminator D in the DCGAN-L model are trained by back propagation based on the Adam optimizer. After the training is completed, the parameters of the generator G-Ⅰ are fixed, and multiple 100*1 Gaussian noises are input to finally generate multiple fake spectral data. Subsequently, the multiple fake spectral data are input into the generator G-Ⅱ, and the chemical value labels are annotated for the batch of fake spectral data. During the training process, the hyperparameters of the proposed DCGAN-L network are set to: batch = 4, learning rate = 0.0001, training cycle = 5000, and the slope of the LeakyReLU function = 0.2.
[0041] Furthermore, the fake spectral data generated in S4 are evaluated using spectral similarity indicators, and the generated fake labels and real label data are evaluated using significance analysis and bar graphs to evaluate the data generation quality;
[0042] The similarity evaluation adopts the proposed generated spectrum quality index IGDQ, and the IGDQ formula is as follows (5):
[0043] , (5)
[0044] in M represents the number of spectral bands, Expressed as the average value of all real spectral data, is represented by the average value of all generated pseudo-spectral data, F fake Represented as the generated fake spectral data, It is expressed as the spectrum data after generating pseudo spectrum smoothing, k Represented as spectral bands, n Indicates the number of pseudo spectra generated;
[0045] The smaller the IGDQ calculation value is, the smaller the difference of the spectral lines is. On the contrary, the larger the IGDQ calculation value is, the larger the difference of the spectral lines is.
[0046] The larger the P value obtained by the significance analysis, the smaller the difference between the real data and the false data, and the smaller the P value, the greater the difference between the real data and the false data. When the P value is less than 0.05, it indicates that there is a significant difference between the two data.
[0047] Furthermore, the evaluation indicators of the regression model in S5 are the root mean square error RMSE, the determination coefficient R 2 , correlation coefficient r, the calculation formula of correlation coefficient r is as follows (6)(7)(8):
[0048] , (6)
[0049] in n is the total number of samples, Expressed as a Prediction values, y a Expressed as a True value;
[0050] , (7)
[0051] in n is the total number of samples, Expressed as a Prediction values, y a Expressed as a True value, Expressed as the mean of the true values;
[0052] , (8)
[0053] in n is the total number of samples, y a Expressed as a True value, Expressed as a Prediction values, is expressed as the mean of the true values, Expressed as the mean of the predicted values;
[0054] RMSE measures the difference between the model prediction value and the actual observation value. The lower the RMSE value, the smaller the difference between the model prediction value and the actual value, that is, the higher the prediction accuracy of the model. 2 An indicator that reflects the degree to which the model explanatory variables explain the fluctuations of the dependent variable. r is an indicator that measures the strength of the linear relationship between two variables. 2 The closer and r are to 1, the better the prediction effect of the model.
[0055] The fermented black tea catechin quantitative method based on data enhancement and label generation of the present invention has the following advantages:
[0056] (1) The present invention aims to solve the problem that catechins are difficult to quantify quickly, non-destructively and accurately during the fermentation of black tea, and proposes a method for quantifying catechins in fermented black tea based on data enhancement and label generation;
[0057] (2) Compared with direct chemometric quantification of catechins, the method proposed in the present invention uses spectroscopy and machine learning to achieve rapid and non-destructive detection, which saves cost and time;
[0058] (3) Compared with directly using DCGAN to simultaneously generate spectra and labels, the DCGAN-L model proposed in this invention generates data that is closer to real data and does not have abnormal distribution;
[0059] (4) The DCGAN-L model proposed in the present invention can be widely applied to various tea fermentation fields and machine learning data enhancement fields, and has great potential in accurately quantifying the chemical value content of tea substances during fermentation. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 This is a flow chart of the method for quantifying the catechin content in fermented black tea based on the DCGAN-L model;
[0061] Figure 2 Flow chart for determination of catechins in fermented black tea;
[0062] Figure 3 Data enhancement flow chart for fermented black tea spectra and their corresponding labels;
[0063] Figure 4a Comparison of the original spectrum and the pseudo-fermented black tea spectrum generated by DCGAN-L;
[0064] Figure 4b Comparison of the chemical values of the pseudo-fermented black tea spectrum generated by DCGAN-L and the original chemical values;
[0065] Figure 5 This is a comparison chart of the model performance of the regression models RF and BLS before and after data enhancement. DETAILED DESCRIPTION
[0066] In order to better understand the purpose, structure and function of the present invention, the following is a further detailed description of a fermented black tea catechin quantification method based on data enhancement and label generation of the present invention in conjunction with the accompanying drawings.
[0067] A fermented black tea catechin quantitative method based on data enhancement and label generation of the present invention comprises the following steps:
[0068] S1. Experimental platform construction: Build the experimental platform and complete the equipment debugging;
[0069] The experimental platform mainly includes fermentation equipment and a hyperspectral image acquisition device, wherein the hyperspectral image acquisition device mainly includes a SNAP-SCAN VNIR hyperspectral camera (17mm lens), a 250W annular halogen tungsten light source, image acquisition software HSImager, an image acquisition platform, etc.
[0070] The fermentation equipment in the experimental platform is mainly used for the preparation of experimental samples, and the end of rolling is set as the fermentation time 0, 25 sampling points are set during the fermentation process, and multiple fermented black tea samples are collected at each time point;
[0071] The SNAP-SCAN VNIR hyperspectral camera in the experimental platform is different from the traditional linear scanning camera. Its sensor moves inside the camera, so it can ensure the relative stillness between the fermented black tea sample and the hyperspectral camera, which greatly facilitates the hyperspectral image acquisition.
[0072] The 250W annular halogen tungsten lamp light source in the experimental platform is mainly used for the hyperspectral camera;
[0073] The debugging of the equipment includes debugging the exposure time of the hyperspectral camera and the height of the hyperspectral lens. The exposure time of the hyperspectral camera is set to 26.5ms, and the vertical distance between the lens and the fermented black tea sample is 32.5cm. The above equipment debugging is performed to ensure the clear collection of the spectral information of the fermented black tea.
[0074] S2. Fermented black tea image data acquisition and catechin determination: Data acquisition of hyperspectral images of experimental samples, and preprocessing of the acquired image data such as background removal, selection of regions of interest and extraction of average spectra. After image acquisition, chemical value determination experiments of experimental samples were performed by ultra-high performance liquid chromatography;
[0075] Preferably, the experimental sample is fresh tea leaves, the variety is Jiukeng, and the tenderness is one bud and one leaf. After the tea leaves are rolled, the tea leaves are transported to the fermentation room, and the fermentation time is extended to 8 hours, so that the black tea samples cover the over-fermentation stage.
[0076] The hyperspectral image was calibrated using white reference and black reference images and the reflectance was calculated. During the calibration process, a white plate was placed behind the fermented black tea. The calibration formula is as follows (1):
[0077] % (1)
[0078] in R is the rectified image, R 0 is the original hyperspectral image, R d and R wThey are black reference image and white reference image;
[0079] The spatial resolution of the collected hyperspectral images is 2000*2000, and the spectral band is 470nm~900nm, with a total of 140 bands.
[0080] The preprocessing of image data is mainly aimed at hyperspectral images, including background removal, noise removal, etc. The collected hyperspectral images are processed by Python software. After removing the background, the average spectrum of each sample is extracted, and all average spectra are smoothed by SavitZky-Golay (SG).
[0081] As a preferred method, the reagents used in the chemical value determination experiment are: acetonitrile, methanol, methanol, ultrapure water, caffeine. The chromatographic column used in the laboratory is: ACQUITY UPLC T3 column (2.1 × 100 mm, 1.8 μm, Waters, USA)
[0082] The experimental steps for chemical value determination are as follows: Grind the freeze-dried black tea sample into powder through a sample grinder and pass it through a 0.45mm sieve. Accurately weigh 0.2g of the crushed tea sample, place the sample powder in a 10mL centrifuge tube, add 5mL of 70% methanol aqueous solution preheated at 70℃, stir it thoroughly with a glass rod, and immediately move it into a 70℃ water bath, extract it for 10min, then take the supernatant and transfer it to a 10mL volumetric flask, extract the residue once with 5mL of 70% methanol aqueous solution, and repeat the above operation. Finally, combine the extracts and make up to 10mL.
[0083] Preferably, the chromatographic conditions of the chromatographic column used in step S2 are: column temperature: 25°C; detection wavelength: 280nm; injection volume: 2 μL; mobile phase A: ultrapure water (with 0.1% formic acid); mobile phase B: acetonitrile solution (with 0.1% formic acid).
[0084] S3. Generation of spectrum and label data of fermented black tea: Design a DCGAN-L model to generate fake spectrum data and fake label data based on the fermented black tea training set data;
[0085] The DCGAN-L model is used to generate the spectrum and label data of fermented black tea. The DCGAN-L model is used to simultaneously generate fake spectral data and its corresponding multiple label values to expand the training set data samples. DCGAN-L contains two generators (G-Ⅰ and G-Ⅱ) and a discriminator D. The generator G-Ⅰ and the discriminator D are used to generate high-quality fake spectral data, and the generator G-Ⅱ generates label values for high-quality fake spectral data.
[0086] The DCGAN network structure in the DCGAN-L model consists of a generator G-I and a discriminator D. The generator G-I consists of four consecutive deconvolution layers. The network first receives a 100×1 Gaussian noise vector Z. Among the four layers, the kernel size of the first deconvolution layer is 17, while the kernel size of the remaining layers is 4. Each deconvolution operation of the first three deconvolution layers is followed by batch normalization and processed by the LeakyReLU activation function to generate feature vectors of 128×17, 32×35 and 16×70 in turn. The last deconvolution layer is followed by a tanh activation function to finally generate an output spectrum with 140 channels. In contrast, the discriminator D consists of four convolution layers, and its structure is opposite to that of the generator in order. The input layer of the discriminator receives 1×140 spectral data, the kernel size of the first three convolution layers is 4, and the kernel size of the last convolution layer is 17. The LeakyReLU nonlinear activation function is applied after the first three convolution layers. The last convolutional layer is followed by a sigmoid function, producing a single scalar that computes the probability of the input spectrum being classified as real data.
[0087] The Label network structure in the DCGAN-L model is composed of an artificial label generator G-Ⅱ, which is used to assign label data to the spectral data generated from G-Ⅰ. Since the generated fake spectral data and the real fermented black tea spectral data have the same dimension, G-Ⅱ uses the nearest neighbor regression algorithm (KNN) to label the fake spectra. The generated fake spectra and the real fermented black tea spectra are mapped into a multidimensional space, and the KNN algorithm is used to find the five samples closest to the fake spectral data.
[0088] Preferably, the formula for finding the real spectrum sample closest to the false spectrum data in step S3 is as follows (2):
[0089] , (2)
[0090] in D ij Indicates i The false spectral data and j The distance between the real data. F ik Indicates i The pseudo-spectrum k bands, and F jk Indicates j The real spectrum k bands, and M represents the number of spectral bands.
[0091] Preferably, for each pseudo-spectrum, after calculating all D ijFinally, the five real spectrum data points closest to the fake spectrum are selected, and their distances are expressed as d i First, the distance weights of the five true spectra closest to the false spectra are calculated according to formula (3): W i , the formula is as follows (3):
[0092] , (3)
[0093] in D iz Representation and generation i The distances between the five closest real spectra to a false spectrum.
[0094] The generated fake spectra are then assigned label values using the following weight formula:
[0095] , (4)
[0096] in L ih Indicates i The false spectrum data h Chemical value, C zh Indicates the closest i Pseudo-spectrum z The real spectrum corresponds to h Chemical value, W iz Indicates the closest i Pseudo-spectrum z The weight corresponding to the real spectrum.
[0097] As a preference, the generator G-1 and discriminator D in the DCGAN-L model need to be trained. Based on the Adam optimizer, the generator G-I and the discriminator D are trained by back propagation. After the training is completed, the parameters of the generator G-I are fixed, and multiple 100*1 Gaussian noises are input to finally generate multiple fake spectral data. Subsequently, multiple fake spectra are input into the generator G-II to label the chemical value labels for this batch of spectral data. The hyperparameters of the proposed DCGAN-L network during the training process are set to: batch = 4, learning rate = 0.0001, training cycle = 5000, and the slope of the LeakyReLU function = 0.2.
[0098] S4. Generated label data quality assessment: Use spectral similarity indicators to evaluate the quality of the fake spectral data generated in step S3, and use significance analysis to compare the similarity between the fake label data generated in step S3 and the real label data distribution to evaluate the quality of the generated label data;
[0099] Preferably, the generated fake spectral data is evaluated using a spectral similarity index, and the generated fake labels and real label data are evaluated for data generation quality using significance analysis and a bar graph.
[0100] The similarity evaluation adopts the proposed generated line quality index (IGDQ), and the IGDQ formula is as follows (5):
[0101] , (5)
[0102] in M represents the number of spectral bands, Expressed as the average value of all real spectral data, is represented by the average value of all generated pseudo-spectral data, F fake Represented as the generated fake spectral data, It is expressed as the spectrum data after generating pseudo spectrum smoothing, k Represented as spectral bands, n Indicates the number of fake spectra generated.
[0103] The smaller the IGDQ calculation value, the smaller the spectral line difference. Conversely, the larger the IGDQ calculation value, the larger the spectral line difference.
[0104] Significance analysis is a method used to detect whether there is a difference between real label data and fake label data and whether the difference is significant. The larger the P value obtained by significance analysis, the smaller the difference between real data and fake data, and the smaller the P value, the greater the difference between real data and fake data. When the P value is less than 0.05, it indicates that there is a significant difference between the two data.
[0105] S5. Evaluation of data augmentation effect: The fake spectral data generated in step S3 were used to augment the fermented black tea training set. The model performance of the random forest (RF) and breadth learning (BLS) regression models before and after data augmentation were compared to evaluate the effectiveness of data augmentation for the quantitative analysis of catechins in fermented black tea.
[0106] As the preferred regression models, random forest (RF) and breadth learning (BLS). RF is a nonlinear model that can capture the nonlinear relationship between X and Y. The method is to make predictions by building multiple decision trees and improve the prediction accuracy by averaging or majority voting the results of these trees. The key parameters of RF include the number of trees (n_estimators), the maximum depth of the tree (max_depth), and the minimum number of samples required to split a node (min_samples_split). When training the RF regressor using the training set data, the algorithm randomly selects a subset of features during the training process of each decision tree and looks for the best split.
[0107] BLS is a learning framework based on a single-layer feedforward neural network, which aims to improve learning efficiency and performance by expanding the width of the network rather than its depth. It builds a large number of feature nodes and enhancement nodes, and then quickly obtains the output by solving a linear system. Starting from the original data features, BLS first generates a large number of feature nodes, which helps to improve the learning ability of the model. Secondly, based on the feature nodes, enhancement nodes are generated through random mapping and nonlinear activation functions. The introduction of enhancement nodes can further improve the model's ability to fit the data. Finally, the generated feature nodes and enhancement nodes are connected to form the structure of BLS, and the connection weights are determined by solving the linear system (for example, using ridge regression or least squares method).
[0108] As the preferred evaluation indicators of the regression model, the root mean square error (RMSE), the coefficient of determination (R 2 ), correlation coefficient (Pearson correlation coefficient, r) is the most commonly used evaluation index in regression analysis. Its calculation formula is as follows (6)(7)(8):
[0109] , (6)
[0110] in n is the total number of samples, Expressed as a Prediction values, y a Expressed as a A true value.
[0111] , (7)
[0112] in n is the total number of samples, Expressed as a Prediction values, y a Expressed as a True value, Expressed as the mean of the true values.
[0113] , (8)
[0114] in n is the total number of samples, y a Expressed as a True value, Expressed as aPrediction values, is expressed as the mean of the true values, Expressed as the mean of the predicted values.
[0115] RMSE is a commonly used statistical indicator to measure the difference between the model prediction value and the actual observation value. It is widely used in regression analysis and is calculated by the square root of the average of the square of the prediction error. The lower the RMSE value, the smaller the difference between the model's prediction value and the actual value, that is, the higher the prediction accuracy of the model. 2 An indicator that reflects the degree to which the model explanatory variables explain the fluctuations of the dependent variable. r is an indicator that measures the strength of the linear relationship between two variables. 2 The closer and r are to 1, the better the prediction effect of the model.
[0116] The RMSE of the model described in step S5, R 2 The results of r show that after data augmentation by DCGAN-L model, the performance of RF and BLS models are improved, which proves the effectiveness of a quantitative method for fermented black tea catechins based on data augmentation and label generation.
[0117] The fermented black tea catechin quantification method provided by the present invention is helpful to accurately quantify the catechin content of fermented black tea at each moment to reveal the different states of black tea fermentation, and has high quantitative accuracy, good adaptability and high robustness, and has great promotion value in the field of black tea fermentation.
[0118] like Figure 1 As shown in FIG. 1 , one embodiment of a fermented black tea catechin quantitative method based on data enhancement and label generation of the present invention is shown, which specifically includes the following steps:
[0119] S1. Experimental platform construction: Build the experimental platform and complete the debugging of the equipment. The specific method is: fix the SNAPSCANVNIR hyperspectral camera at a distance of 32.5cm from the fermented black tea sample. Set the camera exposure time to 26.5ms. Press the test sample flat on the platform and collect two fermented black tea samples at each time point. Hang the annular halogen tungsten light source on the hyperspectral lens. The annular halogen tungsten light source in the experimental platform is mainly used for the hyperspectral camera.
[0120] The power of the annular halogen tungsten lamp light source is 250W;
[0121] The hyperspectral lens model is 17mm;
[0122] The fresh tea leaf raw material variety selected for the fermented black tea sample is Jiukeng, and the tenderness is one bud and one leaf. After the fresh tea leaves are picked, they are evenly spread inside the withering bamboo basket and placed on the withering rack. The tea leaves are then pushed into the withering room for withering, where the withering equipment and corresponding processing parameters are (room temperature = 27.5°C, room humidity = 44.1%, ambient temperature = 23.2°C, ambient humidity = 60.5%), and the total withering time is 13.5 hours. After withering, the moisture content of the tea leaves is about 60%. Subsequently, the withered tea leaves are transported to the rolling machine, and the rolling time is 75 minutes. After rolling, the tea leaves are transported to the fermentation room, the temperature is set at 28°C, the relative humidity of the air is above 90%, and the fermentation time is extended to 8 hours, so that the black tea samples cover the over-fermentation stage. A total of 3 black tea fermentation tests were carried out, and the black tea fermentation process was consistent each time. 25 time points were set within 0-8 hours, and a fermentation sample was collected at each time point. A total of 75 batches of samples were obtained in three experiments. After each sampling, hyperspectral image measurement was performed immediately.
[0123] S2. Image data acquisition and preprocessing: Hyperspectral image data is collected for the experimental samples, and preprocessing such as background removal and SG smoothing is performed.
[0124] The hyperspectral image is subjected to the following black and white correction formula on the original hyperspectral image to calculate the reflectance of the sample and reduce the influence of illumination and camera dark current on the sample image. The correction formula is as follows (1):
[0125] , (1)
[0126] in R is the rectified image, R 0 is the original hyperspectral image, R d and R w They are black reference image and white reference image;
[0127] After the hyperspectral images are collected, they are processed uniformly by Python software. After removing the background, the average spectrum of each sample is extracted, and all average spectra are smoothed by SG. The polynomial order of SG smoothing preprocessing is 3 and the window size is 7.
[0128] S2. Fermented black tea image data collection and catechin determination, where the fermented black tea catechin determination flow chart is as follows Figure 2As shown in the figure, the specific steps are as follows: immediately after the image acquisition is completed, the collected black tea samples are put into a net bag and placed in a -196℃ liquid nitrogen tank for freezing. A total of 150 black tea spectral samples were collected in three experiments. After the experiment, the frozen black tea samples were vacuum dried using a freeze dryer at -80℃ for 48 hours. After drying, the fermentation process samples were stored in a -20℃ refrigerator for subsequent chemical component testing. The detection method for catechins refers to the national standard "GB / T8313-2018".
[0129] The catechin determination described in S2 is completed by ultra-performance liquid chromatography (UPLC). The chemical detection steps are as follows: first, the freeze-dried black tea sample is ground into powder by a sample grinder and passed through a 0.45mm sieve. Accurately weigh 0.2g of the crushed tea sample, place the sample powder in a 10mL centrifuge tube, add 5mL of 70% methanol aqueous solution preheated at 70℃, stir well with a glass rod, and immediately move into a 70℃ water bath, extract for 10min, then take the supernatant and transfer it to a 10mL volumetric flask, and extract the residue once with 5mL of 70% methanol aqueous solution, and repeat the above operation. Finally, combine the extracts and make up to 10mL. Filter the extracted solution with a 0.22μm organic filter membrane, seal it in a brown reagent bottle, and store it in a -4℃ refrigerator for later use.
[0130] The chromatographic conditions described in S2 are as follows: chromatographic column: ACQUITY UPLC T3 column (2.1 × 100 mm, 1.8μm, Waters, USA); column temperature: 25℃; detection wavelength: 280nm; injection volume: 2 μL; mobile phase A: ultrapure water (with 0.1% formic acid); mobile phase B: acetonitrile solution (with 0.1% formic acid); elution gradient: 0-6 min, mobile phase A gradually decreased from 92% to 90%, mobile phase B increased from 8% to 10%; 6-14 min, mobile phase A gradually decreased from 90% to 80%, while mobile phase B gradually increased from 10% to 20%; 14-15 min mobile phase A gradually decreased from 80% to 76%, mobile phase B gradually increased from 20% to 24%; 15-26 min, mobile phase A was 76%, mobile phase B was 24%; 26-26.1 min, mobile phase A was 20% and mobile phase B was 76%. From 26.1 to 28 min, mobile phase A was 92%, mobile phase B was 8%, and mobile phase A and mobile phase B remained unchanged.
[0131] S3. Flow chart of fermented black tea spectrum and label data generation Figure 3 As shown in the figure, the specific steps are as follows: after the DCGAN-L model training is completed, the parameters of G-Ⅰ are fixed, 2000 100*1 Gaussian noises are input, and finally 2000 fake spectral data are generated. Then these 2000 fake spectra are input into the generator G-Ⅱ to label this batch of spectral data.
[0132] The DCGAN network structure in the DCGAN-L model described in step S3 consists of a G-I and a D. G-I consists of four consecutive deconvolution layers. The network first receives a 100×1 Gaussian noise vector Z. Among the four layers, the kernel size of the first deconvolution layer is 17, while the kernel size of the remaining layers is 4. Each deconvolution operation of the first three layers is followed by batch normalization and processed by the LeakyReLU activation function to generate feature vectors of 128×17, 32×35 and 16×70 in turn. The last deconvolution layer is followed by a tanh activation function to finally generate an output spectrum with 140 channels. In contrast, the discriminator D consists of four convolution layers, and its structure is opposite to that of the generator in order. The input layer of the discriminator accepts 1×140 spectral data, the kernel size of the first three convolution layers is 4, and the kernel size of the last layer is 17. The LeakyReLU nonlinear activation function is applied after the first three convolution layers. The last convolutional layer is followed by a sigmoid function, producing a single scalar that computes the probability of the input spectrum being classified as real data.
[0133] The artificial label generator G-Ⅱ described in S3 is used to assign data labels to the spectral data generated from G-Ⅰ. Since the generated fake spectral data and the real fermented black tea spectral data have the same dimension, the nearest neighbor regression algorithm (KNN) is used to label the artificial samples. The specific implementation process is shown in the following formula:
[0134] The formula for finding the real spectrum sample closest to the false spectrum data in step S3 is as follows (2):
[0135] , (2)
[0136] in D ij Indicates i The false spectral data and j The distance between the real data. F ik Indicates i The pseudo-spectrum k bands, and F jk Indicates j The real spectrumk Bands, M Represents the number of spectral bands.
[0137] S3 calculates all D ij Finally, the real spectrum data closest to the false spectrum is selected, and their distance is expressed as D iz First, calculate the value closest to the i The true spectral distance weight of a false spectrum W iz The formula is as follows (3):
[0138] , (3)
[0139] in D iz Representation and generation i The distances between the five closest real spectra to a false spectrum.
[0140] Then use the following weight formula to generate the i The false spectrum is assigned a label value, as shown in Formula 4:
[0141] , (4)
[0142] in L ih Indicates i The false spectrum data h Chemical value, C zh Indicates the closest i Pseudo-spectrum z The real spectrum corresponds to h Chemical value, W iz Indicates the closest i Pseudo-spectrum z The weight corresponding to the real spectrum.
[0143] In step S3, G-1 and D in the DCGAN-L model need to be trained. Based on the Adam optimizer, G-I and D are trained by back propagation. After the training is completed, the parameters of G-I are fixed, and 2000 100*1 Gaussian noises are input to finally generate 2000 fake spectral data. These 2000 fake spectra are then input into the generator G-II to label the chemical value labels for this batch of spectral data. The hyperparameters of the proposed DCGAN-L network during the training process are set to: batch = 4, learning rate = 0.0001, training cycle = 5000, and the slope of the LeakyReLU function = 0.2.
[0144] S4. Generated data quality assessment results: The generated fake spectral data is evaluated using spectral similarity indicators, and the generated fake labels and real label data are evaluated using significance analysis and bar graphs to evaluate the data generation quality.
[0145] The spectral similarity evaluation described in S4 adopts the generated data quality indicator (IGDQ) proposed, and the IGDQ formula is as follows (5):
[0146] , (5)
[0147] in M represents the number of spectral bands, Expressed as the average value of all real spectral data, is represented by the average value of all generated pseudo-spectral data, F fake Represented as the generated fake spectral data, Represents the spectral data after smoothing the generated pseudo spectrum, k Represented as spectral bands, n Indicates the number of fake spectra generated.
[0148] The smaller the IGDQ calculation value described in S4, the smaller the difference in the spectral curves. Conversely, the larger the IGDQ calculation value, the larger the difference in the spectral curves.
[0149] The significance analysis described in S4 is a method for detecting whether there is a difference between the real label data and the fake label data and whether the difference is significant. The larger the P value obtained by the significance analysis, the smaller the difference between the real data and the fake data, and the smaller the P value, the greater the difference between the real data and the fake data. When the P value is less than 0.05, it indicates that there is a significant difference between the two data.
[0150] S4. Generate data quality assessment results: The significance analysis and bar graph assessment results described in S4 are shown as follows Figure 4a , Figure 4b After 20,000 iterations, the fake fermented black tea spectral data generated by the DCGAN-L model is close to the original fermented black tea spectral data. The chemical value distribution of the fake fermented black tea spectral data generated by the DCGAN-L model covers the original chemical values, and the generated chemical value data is close to the real chemical value data. After significance analysis of the data generated by DCGAN-L, it was found that the P values were all greater than 0.05, which were 0.082, 0.1472, 0.2101, and 0.1226 respectively. The generated spectra and label results show that the fake data generated by the DCGAN-L model can be used for data enhancement of the regression model.
[0151] S5. Data augmentation effect evaluation: Compare the results of the RF and BLS regression models before and after data augmentation to evaluate the effectiveness of data augmentation in the quantitative analysis of fermented black tea catechins in regression problems. Figure 5 As shown, Figure 5 shows the R of different models trained on different augmented training sets 2 For the RF model, when the training set size is increased by 100 data points compared to without data augmentation, the performance of CC, ECG, and EGC reaches the best, R 2 The values of the RF model and the R value of the RF model were improved by 0.31, 0.25, and 0.09, respectively. Then, as the amount of data further increased, the performance of the RF model decreased. When the training set increased to 200, the performance of the RF model for the chemical value C reached the highest level, with the highest R 2 It reaches 0.8661 with an increment of 0.34.
[0152] For the BLS model, as the training set size increases to 300, the R 2 Specifically, the R values of CC, C, ECG, and EGC 2 The values reach 0.843, 0.849, 0.903, and 0.36, respectively, with increments of 0.11, 0.105, 0.101, and 0.185, respectively. When the training set size increases beyond 300, the R 2 The values do not change much and fluctuate around their highest values. These results suggest that data augmentation has a positive impact on the performance of the BLS model, especially before reaching a certain data volume threshold.
[0153] S5 Data augmentation effect evaluation showed that a fermented black tea catechin quantification method based on data augmentation and label generation is effective in the quantification of fermented black tea catechins.
[0154] In summary, the technical effect of the present invention is remarkable, and it has made a good technical contribution to the development of black tea processing and production, and has broad application prospects in the field of black tea fermentation research and considerable economic benefits. The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modification, equivalent replacement and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
[0155] It is to be understood that the present invention is described by some embodiments, and it is known to those skilled in the art that various changes or equivalent substitutions may be made to these features and embodiments without departing from the spirit and scope of the present invention. In addition, under the teachings of the present invention, these features and embodiments may be modified to adapt to specific circumstances and materials without departing from the spirit and scope of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application are within the scope of protection of the present invention.
Claims
1. A method for quantifying catechins in fermented black tea based on data enhancement and label generation, characterized in that: The following steps are involved: S1. Experimental platform construction: Build the experimental platform and complete the equipment debugging; S2. Fermented black tea image data acquisition and catechin determination: Data acquisition of hyperspectral images of experimental samples, preprocessing of the acquired image data, selection of regions of interest and extraction of average spectra, and determination of chemical values of experimental samples by ultra-high performance liquid chromatography after image acquisition; S3. Generation of spectrum and label data of fermented black tea: Design a DCGAN-L model to generate fake spectrum data and fake label data based on the fermented black tea training set data; In S3, the DCGAN-L model is used to simultaneously generate fake spectral data and its corresponding multiple label values to expand the training set data samples. The DCGAN-L model contains two generators, namely generator G-Ⅰ and generator G-Ⅱ, and a discriminator D. Generator G-Ⅰ and discriminator D are used to generate fake spectral data, and generator G-Ⅱ generates label values for fake spectral data. The DCGAN network structure in the DCGAN-L model in S3 consists of a generator G-Ⅰ and a discriminator D. The generator G-Ⅰ consists of four consecutive deconvolution layers. The DCGAN network first receives a 100×1 Gaussian noise vector Z. Each deconvolution operation of the first three deconvolution layers is batch normalized and processed by the LeakyReLU activation function to generate feature vectors of 128×17, 32×35 and 16×70 in turn. The last deconvolution layer is followed by a tanh activation function to finally generate an output spectrum with 140 channels. The discriminator D consists of four convolution layers, and its structure is opposite to that of the generator G-Ⅰ in order. The input layer of the discriminator G-Ⅰ accepts 1×140 spectral data. The LeakyReLU nonlinear activation function is applied after the first three convolution layers. The last convolution layer is followed by a sigmoid function to generate a single scalar to calculate the probability that the input spectrum is classified as real data. The Label network structure in the DCGAN-L model in S3 is composed of an artificial label generator G-Ⅱ, which is used to assign label data to the spectral data generated from G-Ⅰ. G-Ⅱ uses the nearest neighbor regression algorithm KNN to label the fake spectra, maps the generated fake spectra and the real black tea fermentation spectra into a multidimensional space, and uses the KNN algorithm to find the five samples closest to the fake spectral data. The formula for finding the real spectrum sample closest to the false spectrum data is as follows (2): ,(2) in D ij Indicates i The false spectral data and j The distance between the real data, F ik Indicates i The pseudo-spectrum k bands, and F jk Indicates j The real spectrum k bands, M represents the number of spectral bands; For each pseudo-spectrum, calculate all D ij Finally, the real spectrum data point closest to the fake spectrum is selected, and their distance is expressed as D iz , first calculate the distance weights of the five true spectra closest to the false spectra according to formula (3) W iz , the formula is as follows (3): , (3) in D iz Representation and generation i The distance between the five closest real spectra to a false spectrum; Then use the following weight formula to generate the i Give the false spectrum a label value: , (4) in L ih Indicates i The false spectrum data h Chemical value, C zh Indicates the closest i Pseudo-spectrum z The real spectrum corresponds to h Chemical value, W iz Indicates the closest i Pseudo-spectrum z The weight corresponding to the real spectrum; Generator G-1 and discriminator D in the DCGAN-L model are trained by back propagation based on the Adam optimizer. After the training is completed, the parameters of generator G-I are fixed, and multiple 100*1 Gaussian noises are input to finally generate multiple fake spectral data. Subsequently, multiple fake spectral data are input into generator G-II, and chemical value labels are annotated for the batch of fake spectral data. During the training process, the hyperparameters of the proposed DCGAN-L network are set to: batch = 4, learning rate = 0.0001, training cycle = 5000, and the slope of the LeakyReLU function = 0.2; S4. Generated label data quality assessment: Use spectral similarity indicators to evaluate the quality of the fake spectral data generated in step S3, and use significance analysis to compare the similarity between the fake label data generated in step S3 and the real label data distribution to evaluate the quality of the generated label data; S5. Evaluation of data augmentation effect: The fake spectral data generated in step S3 were used to augment the fermented black tea training set. The model performance of the random forest RF and width learning BLS regression models before and after data augmentation were compared to evaluate the effectiveness of data augmentation for the quantitative analysis of catechins in fermented black tea.
2. The method for quantifying catechins in fermented black tea based on data enhancement and label generation according to claim 1, characterized in that: The experimental platform described in S1 includes fermentation equipment and a hyperspectral image acquisition device, wherein the hyperspectral image acquisition device includes a hyperspectral camera, a ring-shaped halogen tungsten lamp light source, image acquisition software and an image acquisition platform; the fermentation equipment is used for the preparation of experimental samples, and the end of rolling is set as the fermentation time 0, 25 sampling points are set during the fermentation process, and multiple fermented black tea samples are collected at each time point; the sensor of the hyperspectral camera moves inside the camera, so that the fermented black tea sample and the hyperspectral camera are relatively still.
3. The method for quantifying catechins in fermented black tea based on data enhancement and label generation according to claim 1, characterized in that: The debugging of the equipment described in S1 includes debugging the hyperspectral camera exposure time and the hyperspectral lens height.
4. The method for quantifying fermented black tea catechins based on data enhancement and label generation according to claim 1, characterized in that: In S2, after the tea leaves are rolled, they are transported to the fermentation room to extend the fermentation time so that the black tea samples cover the over-fermentation stage; The hyperspectral image is corrected using white reference and black reference images and the reflectance is calculated. During the correction process, a white plate is placed behind the fermented black tea. The correction formula is as follows (1): (1) in R is the corrected image, R 0 is the original hyperspectral image, R d and R w They are black reference image and white reference image; The spatial resolution of the collected hyperspectral images is 2000*2000, and the spectral band is 470nm~900nm, with a total of 140 bands; The image data preprocessing is aimed at hyperspectral images, including background removal and noise removal. The collected hyperspectral images are processed by Python software. After background removal, the average spectrum of each sample is extracted, and all average spectra are smoothed.
5. The method for quantifying catechins in fermented black tea based on data enhancement and label generation according to claim 1, characterized in that: The reagents used for the determination of the chemical values described in S2 include: acetonitrile, methanol, formazan, ultrapure water, and caffeine; The experimental steps for determining the chemical value are as follows: grind the freeze-dried black tea sample into powder by a sample grinder, pass through a sieve, accurately weigh the crushed tea sample, place the sample powder in a centrifuge tube, add preheated 70% methanol aqueous solution, stir well with a glass rod, and immediately transfer to a 70°C water bath for extraction, then take the supernatant and transfer it to a volumetric flask, extract the residue once again with 70% methanol aqueous solution, repeat the above operation, and finally combine the extracts and make up to volume; The chromatographic conditions of the chromatographic column used in S2 are: column temperature: 25°C; detection wavelength: 280nm; injection volume: 2 μL; mobile phase A: ultrapure water with 0.1% formic acid added; mobile phase B: acetonitrile solution with 0.1% formic acid added.
6. The method for quantifying catechins in fermented black tea based on data enhancement and label generation according to claim 1, characterized in that: The fake spectral data generated in S4 are evaluated using spectral similarity indicators, and the generated fake labels and real label data are evaluated using significance analysis and bar graphs to evaluate the data generation quality; The similarity evaluation adopts the proposed generated spectrum quality index IGDQ, and the IGDQ formula is as follows (5): , (5) in M represents the number of spectral bands, Expressed as the average value of all real spectral data, is represented by the average value of all generated pseudo-spectral data, F fake Represented as the generated fake spectral data, It is expressed as the spectrum data after generating pseudo spectrum smoothing, k Represented as spectral bands, n Indicates the number of pseudo spectra generated; The smaller the IGDQ calculation value is, the smaller the difference of the spectral lines is. On the contrary, the larger the IGDQ calculation value is, the larger the difference of the spectral lines is. The larger the P value obtained by the significance analysis, the smaller the difference between the real data and the false data, and the smaller the P value, the greater the difference between the real data and the false data. When the P value is less than 0.05, it indicates that there is a significant difference between the two data.
7. The method for quantifying catechins in fermented black tea based on data enhancement and label generation according to claim 1, characterized in that: The evaluation indicators of the regression model in S5 are the root mean square error RMSE, the determination coefficient R 2 , correlation coefficient r, root mean square error RMSE, determination coefficient R2, correlation coefficient r calculation formula are as follows (6)(7)(8): , (6) in m is the total number of samples, Expressed as a Prediction values, y a Expressed as a True value; , (7) in m is the total number of samples, Expressed as a Prediction values, y a Expressed as a True value, Expressed as the mean of the true values; , (8) in m is the total number of samples, y a Expressed as a True value, Expressed as a Prediction values, is expressed as the mean of the true values, Expressed as the mean of the predicted values; RMSE measures the difference between the model prediction value and the actual observation value. The lower the RMSE value, the smaller the difference between the model prediction value and the actual value, that is, the higher the prediction accuracy of the model. 2 An indicator that reflects the degree to which the model explanatory variables explain the fluctuations of the dependent variable. r is an indicator that measures the strength of the linear relationship between two variables. 2 The closer and r are to 1, the better the prediction effect of the model.
