Tea quality detection and evaluation method and device based on continuous wavelength and ratio algorithm

The method for detecting core chemical substances in tea based on continuous wavelength and ratio algorithms has solved the problem of quality prediction for fresh tea leaves and early-dried tea leaves, achieving efficient and accurate tea quality evaluation. It is applicable to the detection of multiple quality parameters of tea raw materials.

CN121409901APending Publication Date: 2026-01-27CHONGQING ACAD OF AGRI SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511581525.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-31
Publication Date
2026-01-27

AI Technical Summary

Technical Problem

Existing technologies lack quality prediction models applicable to fresh tea leaves and leaves at various stages of initial drying, and also lack comprehensive evaluation methods for tea raw materials based on multiple quality parameters.

Method used

A core chemical substance detection method for tea based on continuous wavelength and ratio algorithm is adopted. Near-infrared spectral data is collected, and baseline correction, noise smoothing and multivariate scattering correction are performed. The absorbance ratio is calculated and a partial least squares regression model is constructed. The quality evaluation is carried out by combining the random forest regression model.

Benefits of technology

It enables the detection and quality evaluation of the core chemical content of fresh tea leaves and early-dried tea leaves. The method and device have good versatility, high evaluation accuracy, small error, and are close to the evaluation results of senior tea tasters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121409901A_ABST
    Figure CN121409901A_ABST
Patent Text Reader

Abstract

The invention discloses a tea quality detection and evaluation method and device based on a continuous wavelength and ratio algorithm, and the method comprises the steps: collecting an absorbance matrix of tea, processing the absorbance matrix to obtain a comprehensive feature matrix, inputting the comprehensive feature matrix into a partial least square regression model to obtain the content of core substances of the tea, and calculating the content of the core substances of the tea. And inputting the tea leaf core substance content into the random forest regression model to obtain a tea leaf quality score. According to the method and the device, the technical problems of detection and quality evaluation of the core chemical substance content of the fresh tea leaves and the primarily-dried leaves of various degrees are solved, the method and the device are good in universality, the evaluation error between quality evaluation and high-grade tea evaluators is small, and the evaluation accuracy is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of tea quality testing technology, and in particular to an auxiliary device for traction of embedded teeth. Background Technology

[0002] Tea is an important economic industry. Quality testing of tea raw materials not only ensures the quality of the finished tea but also assists in decision-making regarding tea processing techniques. Currently, tea raw material grading is mostly based on the harvesting season and tea leaf morphology (one bud and one leaf, one bud and two leaves, etc.). While these two factors can serve as initial screening, the fundamental factor determining tea quality is the internal quality of the raw materials. Visible / near-infrared spectroscopy can rapidly and non-destructively detect the internal components of leaves. Many scholars have conducted multi-quality testing studies on fresh tea leaves and finished tea, but existing research has the following limitations:

[0003] (1) Current technical solutions only target the quality testing of fresh tea leaves or finished tea products, and lack a quality prediction model applicable to all tea raw materials (fresh tea leaves and leaves at various stages of initial drying).

[0004] (2) There is still a lack of a comprehensive evaluation method for tea raw materials based on multiple quality parameters. Summary of the Invention

[0005] In view of this, the present invention provides a method for detecting core chemical substances in tea based on a continuous wavelength and ratio algorithm, in order to solve the technical problem of detecting and evaluating the content of core chemical substances in fresh tea leaves and tea leaves at various stages of initial drying.

[0006] The method for detecting core chemical substances in tea based on continuous wavelength and ratio algorithm of the present invention includes the following steps:

[0007] 1) Collect the absorbance of the tea sample to the 900-1700nm near-infrared continuous band, and construct an absorbance matrix using the absorbance of the tea sample to near-infrared light of different wavelengths.

[0008] 2) Perform interference removal processing on the absorbance matrix obtained in step 1) to obtain the standardized absorbance matrix.

[0009] 3) Calculate the Pearson correlation coefficient between absorbance and core chemical substances in tea in the standardized absorbance matrix, set a correlation threshold, and screen out the wavelengths corresponding to absorbance with Pearson correlation coefficients greater than or equal to the correlation threshold to obtain m initial wavelengths.

[0010] 4) Construct all asymmetric ordered wavelength pairs (λ) based on m initially selected wavelengths. _i , λ _j ), i=1~m, j=1~m, i≠j; calculate the absorbance ratio R for each asymmetric ordered wavelength pair.ij = A_msc (λ i ) / A_msc (λ j ), where A_msc(λ i ) represents the wavelength λ i The corresponding absorbance, A_msc (λ) j ) represents the wavelength λ j For the corresponding absorbance, set the minimum threshold T of the denominator of the absorbance ratio. If A_msc (λ j If ) < T, then force A_msc (λ) to be executed. j =T; a total of m×(m-1) absorbance ratio variables are generated through calculation.

[0011] 5) Using the content of core chemical substances in tea as the target variable, the absorbance ratio variable is screened for characteristic correlation to obtain the effective absorbance ratio variable that is strongly correlated with the content of core chemical substances.

[0012] 6) Combine the m absorbance values ​​corresponding to the m initially selected wavelengths with the effective absorbance ratio variables obtained in step 5) to form a comprehensive feature matrix X.

[0013] 7) The partial least squares regression model is used as the detection model for detecting the content of various core chemical substances in tea. The comprehensive feature matrix X is input into the detection model, and the detection model outputs the detection of the core chemical substance content of the tested tea sample.

[0014] Furthermore, the content of the core chemical substances includes the content of tea polyphenols, caffeine, soluble sugars, free amino acids, and water extracts.

[0015] Furthermore, the interference elimination process described in step 2) includes:

[0016] Baseline correction: The baseline drift of absorbance in the absorbance matrix was corrected by a 3rd order polynomial fitting method. The baseline was fitted in the 900-920nm band to obtain the corrected matrix A_base.

[0017] Noise smoothing: The Savitzky-Golay filtering method is used to filter the matrix A_base to obtain the smoothed matrix A_smooth;

[0018] Multivariate scattering correction: By calculating the average absorbance A_avg of all corrected samples, linear regression is performed on A_smooth, A_smooth = k×A_avg + b. After solving for the slope k and intercept b, the scattering interference caused by sample granularity differences is eliminated by A_msc = (A_smooth - b) / k, and the normalized absorbance matrix A_msc is obtained.

[0019] Furthermore, the feature correlation screening described in step 5) includes: calculating the correlation strength between each absorbance ratio variable and each target variable using partial correlation analysis or mutual information entropy method; ranking the correlation strength between the absorbance ratio variables and the target variables, and retaining the absorbance ratio variables that meet the ranking requirements; merging the absorbance ratio variables retained for each target variable, and deleting duplicate absorbance ratio variables, thereby obtaining effective absorbance ratio variables.

[0020] This invention also discloses a tea quality evaluation method based on the detection method of core chemical substances in tea using a continuous wavelength and ratio algorithm: the content of core chemical substances in the tea sample output by the detection model is input into a random forest regression model, and the random forest regression model outputs a quality score value.

[0021] Furthermore, the random forest regression model is obtained through the following method:

[0022] Several tea samples were collected from different seasons, origins, and quality grades. The core chemical content of the tea samples was measured according to standard methods. Several senior tea tasters scored the tea samples according to five dimensions: appearance, liquor color, aroma, taste, and infused leaves. The average value was taken as the final quality score. The core chemical content and the final quality score were used to construct training and testing sets. The core parameters of the random forest regression model were set. The random forest regression model was then trained and tested using the training and testing sets to obtain a qualified random forest regression model.

[0023] This invention also discloses a tea quality detection device based on a continuous wavelength and ratio algorithm, comprising a housing, a processor, a display, a spectrometer, a light source, a power supply, an optical fiber, and a handle. The processor, display, spectrometer, light source, and power supply are disposed within the housing. The power supply is electrically connected to the processor, display, spectrometer, and light source respectively. The processor is electrically connected to the display and spectrometer respectively. One end of the optical fiber is connected to the spectrometer and the light source respectively, and the other end of the optical fiber is connected to the handle. The processor is used to execute a computer program that processes the output data of the spectrometer. When executed by the processor, the computer program implements steps 1) to 7) of the tea core chemical substance detection method based on the continuous wavelength and ratio algorithm.

[0024] Furthermore, the computer program, when executed by the processor, also includes the step of implementing a tea quality evaluation method.

[0025] Furthermore, the light source is used to output near-infrared light with a wavelength in the range of 900-1700nm.

[0026] The beneficial effects of this invention are:

[0027] This invention solves the technical problem of detecting and evaluating the content of core chemical substances in fresh tea leaves and leaves at various stages of initial drying. The method and apparatus have good versatility, and the quality evaluation has a small error compared with that of senior tea tasters, with high evaluation accuracy. Attached Figure Description

[0028] Figure 1 This is a three-dimensional structural diagram of a tea quality testing device.

[0029] Figure 2 This is a schematic diagram of the three-dimensional structure of the tea quality testing device after the display has been removed.

[0030] Figure 3 This is a schematic diagram of the internal three-dimensional structure of a tea quality testing device. Detailed Implementation

[0031] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0032] Example 1: The method for detecting core chemical substances in tea based on continuous wavelength and ratio algorithm in this example includes the following steps:

[0033] 1) Collect the absorbance of the tested tea sample in the 900-1700nm near-infrared continuous band, and construct an absorbance matrix using the absorbance of the tea sample to near-infrared light of different wavelengths. The 900-1700nm near-infrared continuous band is selected as the detection range, which covers the characteristic absorption region of the core chemical substances of tea (tea polyphenols, caffeine, soluble sugars, free amino acids, and water extracts). With a sampling interval of 1nm, an absorbance matrix of 801 wavelength points is obtained in a single acquisition, denoted as A_raw, with a dimension of 1×801.

[0034] 2) Perform interference removal processing on the absorbance matrix A_raw obtained in step 1) to obtain the normalized absorbance matrix A_msc. The interference removal processing includes:

[0035] ① Baseline Correction: The baseline drift of absorbance in the absorbance matrix is ​​corrected using a third-order polynomial fitting method. The baseline is fitted using the 900-920nm band (a blank band without characteristic absorption of tea components), resulting in the corrected matrix A_base. Baseline correction eliminates baseline drift caused by heat generation from the light source and equipment vibration in the absorbance detection device.

[0036] Noise smoothing: The Savitzky-Golay filtering method is used to filter the matrix A_base, with a window length of 11, to obtain the smoothed matrix A_smooth. Noise smoothing can eliminate electronic noise and ambient stray light interference from the absorbance detection device.

[0037] ③ Multivariate scattering correction: By calculating the average absorbance A_avg of all corrected samples, linear regression is performed on A_smooth, A_smooth = k×A_avg + b. After solving for the slope k and intercept b, the scattering interference caused by sample granularity differences is eliminated by A_msc = (A_smooth - b) / k, and the standardized absorbance matrix A_msc is obtained.

[0038] 3) Calculate the Pearson correlation coefficients between the 801 absorbance values ​​in the standardized absorbance matrix and the five core chemical substances of tea (specifically: tea polyphenols, caffeine, soluble sugars, free amino acids, and water extracts). Set a correlation threshold. In this embodiment, the correlation threshold is set to 0.4. Select the wavelengths corresponding to the absorbance values ​​with a Pearson correlation coefficient r ≥ 0.4 and record them as m, where m ≤ 801, thus obtaining m initial wavelengths.

[0039] 4) Construct all asymmetric ordered wavelength pairs (λ) based on m initially selected wavelengths. _i , λ _j ), i=1~m, j=1~m, i≠j; calculate the absorbance ratio R for each asymmetric ordered wavelength pair. ij = A_msc (λ i ) / A_msc (λ j ), where A_msc(λ i ) represents the wavelength λ i The corresponding absorbance, A_msc (λ) j ) represents the wavelength λ j The corresponding absorbance, with a minimum threshold T=0.001 for the denominator of the absorbance ratio, if A_msc (λ j If ) < T, then force A_msc (λ) to be executed. j=T to avoid numerical overflow due to an excessively small denominator and to ensure the validity of the ratio calculation; a total of m×(m-1) absorbance ratio variables are generated through calculation.

[0040] 5) Using the content of core chemical substances in tea (specifically: tea polyphenols, caffeine, soluble sugars, free amino acids, and water extracts) as the target variable, feature correlation screening is performed on the absorbance ratio variable to obtain effective absorbance ratio variables strongly correlated with the content of core chemical substances. In this embodiment, feature correlation screening includes:

[0041] Partial correlation analysis or mutual information entropy method is used to calculate the correlation strength between each absorbance ratio variable and each target variable; the correlation strength between the absorbance ratio variables and the target variables is ranked, and the top 20% of absorbance ratio variables are retained (the retention amount can be adjusted according to the situation in specific implementation); the absorbance ratio variables retained for each target variable are merged, and duplicate absorbance ratio variables are deleted, thereby obtaining the effective absorbance ratio variables.

[0042] 6) Combine the m absorbance values ​​corresponding to the m initially selected wavelengths with the effective absorbance ratio variables obtained in step 5) to form a comprehensive feature matrix X;

[0043] 7) The partial least squares regression model is used as the detection model for detecting the content of various core chemical substances in tea. The comprehensive feature matrix X is input into the detection model, and the detection model outputs the detection of the core chemical substance content of the tested tea sample.

[0044] In practice, tea samples with different seasons, origins, and moisture content (1%-80%) can be collected, covering three quality grades: low, medium, and high. The comprehensive feature matrix X of different tea samples is obtained using the methods described in steps 1) to 6), and the contents of the core chemical substances of the samples—tea polyphenols, caffeine, soluble sugars, free amino acids, and water extracts—are determined. These data form a training set, a validation set, and a test set to train, validate, and test the partial least squares regression model, thereby obtaining a qualified partial least squares regression model as the detection model.

[0045] Example 2: A tea quality evaluation method based on the detection method of core chemical substances in tea using a continuous wavelength and ratio algorithm. The core chemical substance content of the tea sample, output by the detection model described in Example 1, is input into a random forest regression model, which outputs a quality score. The random forest regression model in this example is obtained through the following method:

[0046] Several tea samples were collected, and the tea samples came from different seasons, origins, and quality grades. The content of core chemical substances in the tea samples was measured according to standard methods. Specifically, the content of tea polyphenols was measured according to GB / T 8307-2013, the content of caffeine was measured according to GB / T 8312-2013, the content of soluble sugars was measured according to GB / T 8306-2013, the content of free amino acids was measured according to GB / T 8308-2013, and the content of water extract was measured according to GB / T 8304-2013. Several senior tea tasters scored the tea samples according to standard methods, evaluating them across five dimensions: appearance (20 points), liquor color (15 points), aroma (25 points), taste (30 points), and infused leaf appearance (10 points). The average score was used as the final quality score. Training and testing sets were constructed using the obtained core chemical content and the final quality score. Core parameters of the random forest regression model were set, including 80 decision trees, a maximum tree depth of 12, and a minimum number of leaf nodes of 4. The random forest regression model was then trained and tested using the training and testing sets, respectively. In practice, when data is limited, the training set can be divided into five parts for 5-fold cross-training and validation to obtain a qualified random forest regression model.

[0047] The quality of 200 tea samples was evaluated using the method described in Example 2, and these tea samples were evaluated by 5 senior tea tasters. The results are as follows:

[0048] Scoring consistency: The correlation coefficient R between the quality score Y_{final} output by the random forest regression model and the average score of 5 tea masters is 0.90, with an absolute error ≤ 2.3 points. Based on a small sample of 200 groups, it achieves effective benchmarking against human scoring.

[0049] Stability: When the same sample was tested 10 times, the relative standard deviation (RSD) of Y_{final} was 1.5%, with no significant fluctuation, indicating that the method has good stability.

[0050] Anti-interference performance: Under scenarios with light source intensity fluctuation of ±5% and sample thickness deviation of ±0.2mm, the absolute error change of Y_{final} is ≤0.4 points, and the interference effect is controllable.

[0051] Applicability: There was no significant difference in Y_{final} error among samples with different moisture contents (1%-80%) (ANOVA P=0.58>0.05), making it suitable for tea samples with a full range of moisture content and covering actual testing scenarios without the need for additional samples.

[0052] Example 3: Figure 1 As shown, a tea quality detection device based on a continuous wavelength and ratio algorithm includes a housing 1, a processor 2, a display 3, a spectrometer 4, a light source 5, a power supply 6, an optical fiber 7, and a handle 8. The processor, display, spectrometer, light source, and power supply are housed within the housing. The power supply is electrically connected to the processor, display, spectrometer, and light source. The processor is electrically connected to the display and spectrometer. One end of the optical fiber is connected to the spectrometer and the light source, and the other end is connected to the handle. The light source outputs near-infrared light with a wavelength in the range of 900-1700 nm. The processor executes a computer program that processes the data output from the spectrometer. When executed by the processor, the computer program implements steps 1) to 7) of the tea core chemical substance detection method based on the continuous wavelength and ratio algorithm.

[0053] In this embodiment, the optical fiber 7 is a six-in-one optical fiber, consisting of a central optical fiber 71 and six peripheral optical fibers 72 evenly distributed around the central optical fiber. After the peripheral and central optical fibers are separated within the housing, the peripheral optical fibers are connected to the light source, and the central optical fiber is connected to the spectrometer. The light waves emitted by the light source are emitted through the peripheral optical fibers and projected onto the tea being tested. The light waves emitted by the tea being tested are input to the spectrometer through the central optical fiber. In this embodiment, the tea quality testing device also includes an optical fiber sheath 9 connecting the housing 1 and the handle 8, which protects the optical fiber.

[0054] As an improvement to the above embodiments, the computer program, when executed by a processor, further includes the step of implementing a tea quality evaluation method.

[0055] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for detecting core chemical substances in tea based on continuous wavelength and ratio algorithm, characterized in that: Includes the following steps: 1) Collect the absorbance of the tea sample to the 900-1700nm near-infrared continuous band, and construct an absorbance matrix using the absorbance of the tea sample to near-infrared light of different wavelengths. 2) Perform interference removal processing on the absorbance matrix obtained in step 1) to obtain a standardized absorbance matrix; 3) Calculate the Pearson correlation coefficient between absorbance and core chemical substances in tea in the standardized absorbance matrix, set a correlation threshold, and screen out the wavelengths corresponding to absorbance with Pearson correlation coefficients greater than or equal to the correlation threshold to obtain m initial wavelengths; 4) Construct all asymmetric ordered wavelength pairs (λ) based on m initially selected wavelengths. _i , λ _j ), i=1~m, j=1~m, i≠j; calculate the absorbance ratio R for each asymmetric ordered wavelength pair. ij = A_msc (λ i ) / A_msc (λ j ), where A_msc (λ i ) represents the wavelength λ i The corresponding absorbance, A_msc (λ) j ) represents the wavelength λ j For the corresponding absorbance, set the minimum threshold T of the denominator of the absorbance ratio. If A_msc (λ j If ) < T, then force A_msc (λ) to be executed. j =T; a total of m×(m-1) absorbance ratio variables are generated through calculation; 5) Using the content of core chemical substances in tea as the target variable, the absorbance ratio variable is screened for characteristic correlation to obtain the effective absorbance ratio variable that is strongly correlated with the content of core chemical substances. 6) Combine the m absorbance values ​​corresponding to the m initially selected wavelengths with the effective absorbance ratio variables obtained in step 5) to form a comprehensive feature matrix X; 7) The partial least squares regression model is used as the detection model for detecting the content of various core chemical substances in tea. The comprehensive feature matrix X is input into the detection model, and the detection model outputs the detection of the core chemical substance content of the tested tea sample.

2. The method for detecting core chemical substances in tea based on continuous wavelength and ratio algorithm according to claim 1, characterized in that: The content of the core chemical substances includes tea polyphenols, caffeine, soluble sugars, free amino acids, and water extracts.

3. The method for detecting core chemical substances in tea based on continuous wavelength and ratio algorithm according to claim 1, characterized in that: The interference elimination process described in step 2) includes: Baseline correction: The baseline drift of absorbance in the absorbance matrix was corrected by a 3rd order polynomial fitting method. The baseline was fitted in the 900-920nm band to obtain the corrected matrix A_base. Noise smoothing: The Savitzky-Golay filtering method is used to filter the matrix A_base to obtain the smoothed matrix A_smooth; Multivariate scattering correction: By calculating the average absorbance A_avg of all corrected samples, linear regression is performed on A_smooth, A_smooth = k×A_avg + b. After solving for the slope k and intercept b, the scattering interference caused by sample granularity differences is eliminated by A_msc = (A_smooth -b) / k, and the normalized absorbance matrix A_msc is obtained.

4. The method for detecting core chemical substances in tea based on continuous wavelength and ratio algorithm according to claim 1, characterized in that: The feature correlation screening described in step 5) includes: calculating the correlation strength between each absorbance ratio variable and each target variable using partial correlation analysis or mutual information entropy method; ranking the correlation strength between the absorbance ratio variables and the target variables, and retaining the absorbance ratio variables that meet the ranking requirements; merging the absorbance ratio variables retained for each target variable, and deleting duplicate absorbance ratio variables, thereby obtaining effective absorbance ratio variables.

5. The tea quality evaluation method based on the continuous wavelength and ratio algorithm for detecting core chemical substances in tea according to any one of claims 1-5, characterized in that: The core chemical content of the tested tea sample is output from the detection model and input into the random forest regression model, which then outputs a quality score.

6. The tea quality evaluation method according to claim 5, characterized in that: The random forest regression model is obtained through the following method: Several tea samples were collected from different seasons, origins, and quality grades. The core chemical content of the tea samples was measured according to standard methods. Several senior tea tasters scored the tea samples according to five dimensions: appearance, liquor color, aroma, taste, and infused leaves. The average value was taken as the final quality score. The core chemical content and the final quality score were used to construct training and testing sets. The core parameters of the random forest regression model were set. The random forest regression model was then trained and tested using the training and testing sets to obtain a qualified random forest regression model.

7. A tea quality testing device according to the method for detecting core chemical substances in tea as described in claim 1, characterized in that: The device includes a housing, a processor, a display, a spectrometer, a light source, a power supply, an optical fiber, and a handle. The processor, display, spectrometer, light source, and power supply are housed within the housing. The power supply is electrically connected to the processor, display, spectrometer, and light source, respectively. The processor is electrically connected to the display and spectrometer, respectively. One end of the optical fiber is connected to the spectrometer and the light source, and the other end is connected to the handle. The processor executes a computer program that processes the output data of the spectrometer. When executed by the processor, the computer program implements steps 1) to 7) of the method for detecting core chemical substances in tea based on a continuous wavelength and ratio algorithm.

8. The tea quality testing device according to claim 7, characterized in that: When the computer program is executed by the processor, it further includes the step of implementing the tea quality evaluation method of claim 5.

9. The tea quality testing device according to claim 7, characterized in that: The light source is used to output near-infrared light with a wavelength in the range of 900-1700nm.