Liupao tea year grade identification method based on terahertz spectrum

Through terahertz spectroscopy technology and improved hippo algorithm, the Liubao tea year grade is quickly and accurately identified, solving the complex and time-consuming problem of sample preprocessing in the existing technology, and achieving safe and efficient detection.

CN120404649APending Publication Date: 2025-08-01GUILIN UNIV OF ELECTRONIC TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510490128.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-18
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

The existing Liubao tea detection technology has high requirements for sample extraction quality, is complex in preprocessing, and takes a long time to meet the needs of rapid testing.

Method used

The terahertz spectroscopy technology combined with the improved hippo algorithm is used to prepare samples by crushing and tableting, and the spectral data is obtained using a transmission terahertz time domain spectroscopy system, two-dimensional wavelet transformation is performed and a customized gating identification model is constructed to achieve rapid identification of Liubao tea year grade.

Benefits of technology

It has achieved rapid and accurate identification of Liubao tea year grade, simple operation, safe and free of radiation pollution, and improved detection efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120404649A_ABST
    Figure CN120404649A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of terahertz spectrum detection, and discloses a Liupao tea year grade identification method based on terahertz spectrum. According to the method, time-domain spectrums of Liupao tea of different years and grades are obtained through a terahertz time-domain spectroscopy system, and a multi-task learning model is constructed to realize identification. Aiming at the problem that a traditional algorithm is easy to fall into local optimum, three optimization strategies are provided: an exponential decay formula is adopted to dynamically adjust a boundary range, and a search space is prevented from being reduced too early; a mirror reflection mechanism is introduced to process boundary-crossing individuals, exploration information is reserved, and search coverage is expanded; and a dynamic mixing strategy of probability selection is adopted to balance global exploration and local development capabilities. According to the improved algorithm, the convergence and the optimization capacity are remarkably improved, and the year and grade identification accuracy reaches 100% finally by combining an attention layer and a customized gating model. The method disclosed by the invention is simple to operate, can effectively realize rapid and accurate identification of Liupao tea of different years and grades, and provides a new method for tea quality grading.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of terahertz spectroscopy detection, and particularly relates to a method for identifying the year and grade of Liubao tea based on terahertz spectroscopy. Background Art

[0004] Currently, the common detection technologies for Liubao tea mainly include sensory analysis, near-infrared spectroscopy, Raman spectroscopy, DNA fingerprinting technology, spectrophotometry, gas chromatography and liquid chromatography technologies, etc. These detection methods have strong specificity and high detection accuracy, but have high requirements for the quality of sample extraction, complex pretreatment, and long sampling and detection time. They not only require high professional qualities of the detection personnel, but also are difficult to meet the application requirements of rapid detection in some actual situations. Therefore, there is an urgent need to establish a new type of faster, more efficient and greener detection method for Liubao tea. Summary of the Invention

[0005] The purpose of the present invention is to provide a fast and efficient method for identifying the year and grade of Liubao tea, making up for the deficiencies of the existing technology to achieve rapid and accurate identification of the year and grade of Liubao tea.

[0006] To achieve the above purpose, a method for identifying the year and grade of Liubao tea based on terahertz spectroscopy adopted by the present invention includes the following steps:

[0007] (1): Select five Sanhe Liubao teas of the same series with different years and grades as experimental samples, crush, sieve and tablet the Liubao teas of different grades and years to obtain smooth and flat Liubao tea sample tablets;

[0008] (2): Use a transmission terahertz time-domain spectroscopy system to perform spectral detection on Liubao teas of different years and grades to obtain a time-domain spectral dataset of Liubao teas of different years and grades.

[0009] (3): Decompose the time-domain spectral dataset of Liubao teas of different years and grades obtained in (2) by two-dimensional wavelet transform and convert it into a time-frequency distribution map.

[0010] (4): Divide the dataset into a training set and a test set, and use an improved hippopotamus algorithm to construct a customized gated discrimination model for the year and grade of Liubao tea;

[0011] (5): Input the time-frequency distribution map data of the Liubao tea training set samples of different years and grades into the improved hippopotamus algorithm customized gated model for training;

[0012] (6): Input the time-frequency distribution map dataset of the Liubao tea to be identified into the trained model for discrimination and output the discrimination result.

[0013] Further, five kinds of Liubao tea with different year grades were selected as experimental samples, and all the tea leaves were qualified products with national quality supervision and inspection and quarantine certifications. During the process of preparing the experimental samples, an electric pulverizer was used to crush the Liubao tea with different year grades into powders. Secondly, a test sieve was used to sieve the ground Liubao tea powders. The particle size of the sieved powders was about 0.15 mm. Finally, a tablet press was used to press the sieved Liubao tea powders. When pressing, the pressure of the tablet press was about 10 MPa for 1 minute. After the pressing was completed, the tablets were disc-shaped, about 1 mm thick and about 13 mm in diameter, with uniform internal structure and parallel two sides.

[0014] Further, the terahertz time-domain spectroscopy system used the terahertz time-domain spectroscopy system CCT-1800 produced by China Huaxun Fangzhou Technology Co., Ltd. to detect the prepared Liubao tea samples. During the process of obtaining the spectral data sets of Liubao tea with different year grades using the transmission terahertz time-domain spectroscopy system, the femtosecond laser pulse was divided into a pump pulse and a probe pulse after passing through the beam splitter. The pump pulse was incident on the terahertz radiation generating device after passing through the time delay system to generate a terahertz pulse. The probe pulse and the terahertz pulse were collinearly incident on the terahertz detection device together, and used to drive the terahertz detection device to collect data and input it into the computer to obtain the time-domain spectral data sets of Liubao tea with different year grades.

[0015] Further, the data processing was to perform two-dimensional wavelet transform on the obtained time-domain spectral data sets of Liubao tea with different years and grades using the complex Morlet wavelet as the basis function to convert the time-domain spectrum into a time-frequency distribution map.

[0016] Further, the improvement process was to dynamically adjust the boundary range using the exponential decay formula to avoid prematurely shrinking the search space; introduce a mirror reflection mechanism to handle out-of-bounds individuals, retain exploration information and expand the search coverage; adopt a dynamic hybrid strategy of probabilistic selection to balance the global exploration and local development capabilities.

[0017] Further, during the model training process, 80% of the data was randomly selected from the Liubao tea time-frequency distribution map data set as the training set and input into the customized gated discrimination model constructed by the improved hippopotamus algorithm for training to obtain the best classification and discrimination model.

[0018] Further, during the testing process, the remaining 20% of the data in the Liubao tea time-frequency distribution map data set was used as the test set and input into the customized gated discrimination model constructed by the improved hippopotamus algorithm for classification and discrimination, and the discrimination results were output.

[0019] The advantages of the present invention are as follows:

[0020] (1) Terahertz time-domain spectroscopy technology has advantages such as fingerprint characteristics and low energy. Using a terahertz spectroscopy system for the detection of the year and grade of Liubao tea is fast, simple, accurate and efficient.

[0021] (2) The improved hippopotamus algorithm can effectively prevent the algorithm from falling into local optima, and at the same time improve the convergence speed and convergence accuracy of the algorithm.

[0022] (3) The terahertz time-domain spectroscopy system used in the present invention is easy to operate, the device is safe to use, there is no radiation hazard, and it will not cause pollution to the environment. Description of the Drawings

[0023] Figure 1 It is a schematic flow chart of a method for identifying the year and grade of Liubao tea based on terahertz spectroscopy according to the present invention.

[0024] Figure 2 It is a system schematic diagram of the terahertz time-domain spectroscopy system CCT-1800 of the present invention.

[0025] Figure 3 It is the terahertz average time-domain spectrogram of 5 kinds of Liubao tea in the 0-30 ps band.

[0026] Figure 4 It is a visualization diagram of the confusion matrix prediction result. Detailed Embodiments

[0027] The following further describes the detailed embodiments of the present invention with reference to the drawings, so that those skilled in the art can better understand the present invention.

[0028] Please refer to Figure 1 , the method for identifying the year and grade of Liubao tea based on terahertz spectroscopy according to the present invention has the following specific implementation steps:

[0029] (1): Select five samples of Sanhe Liubao tea of the same series with different years and grades as experimental samples. Crush, sieve and press the Liubao tea of different grades and years through an electric pulverizer to obtain a smooth and flat pressed tablet of Liubao tea sample;

[0030] (2): Use a transmission terahertz time-domain spectroscopy system to perform spectral detection on Liubao tea of different years and grades to obtain a time-domain spectral dataset of Liubao tea of different years and grades.

[0031] (3): Decompose the time-domain spectral dataset of Liubao tea of different years and grades obtained in (2) by two-dimensional wavelet transform and convert it into a time-frequency distribution diagram.

[0032] (4): Divide the dataset into a training set and a test set, and use the improved hippopotamus algorithm to construct a customized gated discrimination model for the year and grade of Liubao tea;

[0033] (5): Input the time-frequency distribution map data of the Liubao tea training set samples of different years and grades into the improved Hippopotamus algorithm customized gating model for training;

[0034] (6): Input the time-frequency distribution map data set of the Liubao tea to be identified into the trained model for identification, and output the identification result.

[0035] In the above step (1), five kinds of Liubao tea of different years and grades were selected as experimental samples, namely the special grade in 2015, the special grade, first grade, and second grade in 2018, and the special grade of Sanhe Liubao tea in 2021. All the tea leaves are qualified products with national quality supervision and inspection and quarantine certifications. The sample information is shown in Table 1. During the process of preparing the experimental samples, an electric pulverizer was used to pulverize the Liubao tea of different years and grades into powders. Secondly, a test sieve was used to screen the ground Liubao tea powders. The particle size of the screened powders was about 0.15 mm. Finally, a tablet press was used to press the screened Liubao tea powders. When pressing, the pressure of the tablet press was about 10 MPa and lasted for 1 minute. After pressing, the tablets were disk-shaped, about 1 mm thick and about 13 mm in diameter, with uniform internal structure and parallel two sides. 120 samples were made for each kind of Liubao tea, totaling 600 samples.

[0036] Table 1 Experimental sample information

[0037]

[0038] In the above step (2), the terahertz time-domain spectroscopy system CCT-1800 produced by China Huaxun Fangzhou Technology Co., Ltd. was used to detect the prepared Liubao tea samples. The system schematic diagram of CCT-1800 is as Figure 2 shown. The system mainly consists of four parts: a femtosecond laser, a time delay control module, a terahertz wave generation device, and a terahertz wave detection device. The working principle of the system is as follows: The femtosecond laser emits a 780 nm laser pulse, which is divided into a pump light and a probe light by a beam splitter. The pump light is incident on the transmitting antenna and generates a terahertz pulse under the excitation of a bias voltage. This pulse is focused by an off-axis parabolic mirror and then irradiates the experimental sample. The terahertz pulse carrying the sample information passes through the off-axis parabolic mirror again and finally converges with the probe light and is incident on the receiving antenna together. The receiving antenna transmits the processed data to the computer, thereby obtaining the terahertz time-domain spectroscopy signal of the sample. In order to ensure the accuracy of the experimental data, the interference of water vapor absorption on terahertz waves must be eliminated before the experiment. It is necessary to introduce dry nitrogen into the sample experimental chamber to make the relative humidity in the sample chamber lower than 2%.

[0039] The terahertz time-domain spectroscopy obtained using the above-mentioned terahertz time-domain spectroscopy system is as Figure 3Figure 2 shows the average terahertz time-domain spectra of five different Liubao tea grades from different years in the 0-30 ps frequency range. The time-domain spectra of all Liubao tea samples exhibit similar waveforms and amplitudes, with no significant differences. This indicates that the terahertz spectra of Liubao tea from different years and grades vary very little, making direct observation difficult to distinguish. Therefore, machine learning methods are needed to quickly and effectively identify Liubao tea from different years and grades.

[0040] In the above step (3), after obtaining the terahertz time-domain spectrum, a two-dimensional wavelet transform is performed using the complex Morlet wavelet as the basis function to convert the time-domain spectrum into a time-frequency distribution diagram. The calculation formula is:

[0041]

[0042] Where a is the scale factor and b is the translation factor.

[0043] The Customized Gate Control (CGC) in step (4) above is a structure of a multi-task learning (MTL) model that improves the performance and efficiency of the model by clearly distinguishing between shared parameters and task-specific parameters. In the CGC model, there are shared expert modules and task-specific expert modules. The shared expert module is responsible for learning shared patterns between all tasks, while the task-specific expert module focuses on extracting patterns related to specific tasks. The advantage of this structure is that it can reduce the negative transfer phenomenon between different tasks, that is, the optimization of one task will not have a negative impact on other tasks. The output of task k can be expressed as:

[0044] y k (x) = t k (g k (x))

[0045] Among them, t k represents the tower network of task k, g k (x) is the gating network, which can be expressed as:

[0046] g k (x) = w k (x)S k (x)

[0047] where w k Is to choose expert system S k The weights of all expert networks in can be expressed as:

[0048]

[0049] in m k and ms are the number of shared task experts and the number of task - specific experts for task k respectively, and d is the input dimension. S k which is composed of shared - task experts and task - specific experts and can be expressed as:

[0050]

[0051] In the above step (4), due to the different learning difficulties and convergence speeds of different tasks, resulting in the task imbalance problem, the Hippopotamus Optimization Algorithm is used to adjust the model weights. Taking the random solution as the initial state, during training, the position update formula of male hippopotamus is used to adjust the weights according to the task feedback. For the year - level discrimination task with slow learning, the better and average weights are referred to for accelerated optimization; when falling into the local - optimal imbalance, the defense and escape formula comes into play, adjusting the weights to break through the limitation, enhancing the search ability, and balancing the tasks.

[0052] In the improved Hippopotamus Algorithm process in the above step (4), the specific improved Hippopotamus Algorithm is as follows:

[0053] (1) In the present invention, a mirror - reflection mechanism is introduced into the Hippopotamus Algorithm to handle out - of - bound individuals. The values beyond the boundary can be reflected back into the search space in a symmetric way, retaining the exploration information of individuals in the direction beyond the boundary, increasing the diversity of the population, helping the algorithm to explore more widely at the edge of the search space, reducing the possibility of the algorithm falling into local optimum, and improving the global search ability. The specific formula is as follows:

[0054]

[0055] where lb is the global lower bound and ub is the global upper bound.

[0056] (2) In the present invention, an exponential - decay formula is adopted in the third stage of the Hippopotamus Algorithm to dynamically adjust the boundary range, replacing the original linear - decay boundary method. It can adjust the search range more flexibly according to the number of iterations. Allowing a larger search range in the initial stage of iteration helps global search; gradually narrowing the search range in the later stage of iteration focuses on more potential regions and improves the local search accuracy. The specific formula is as follows:

[0057] LO_LOCAL = lb·e -αt / T ,HI_LOCAL = ub·e -αt / T

[0058] where LO_LOCAL is the local - search lower bound, HI_LOCAL is the local - search upper bound, α is the decay exponent, T is the maximum number of iterations, and t is the current number of iterations.

[0059] (3) In the third stage of the Hippopotamus algorithm, the present invention introduces a dynamic hybrid strategy of probabilistic selection, which selects different strategies according to the random probability p. When p < 0.5, local exploitation is carried out, and a dynamic boundary is used to search near the current position; when p >= 0.5, it approaches the current optimal solution to accelerate convergence. This hybrid strategy can better balance the global exploration and local exploitation capabilities of the algorithm. The specific formula is as follows:

[0060]

[0061] where r2, D1, and p follow a uniform distribution on the interval (0, 1), D2 follows a standard normal distribution with a mean of and a standard deviation of 1, and x best is the current global optimal solution.

[0062] The above-improved Hippopotamus algorithm optimizes the loss function weights of the year and grade of Liubao tea, and obtains an improved customized gating discrimination model for classifying the year and grade of Liubao tea.

[0063] In the above step (5), 80% of the data is randomly selected from the Liubao tea time-frequency distribution map dataset as the training set, and is input into the customized gating discrimination model constructed by the improved Hippopotamus algorithm for training to obtain the best classification discrimination model.

[0064] In the above step (6), the remaining 20% of the data of the Liubao tea time-frequency distribution map dataset with different years and grades is used as the test set and input into the customized gating discrimination model constructed by the improved Hippopotamus algorithm for classification discrimination, and the discrimination results are output, as shown in Table 2. Figure 4 is the confusion matrix of the classification results of the classification models before and after improvement, where (a) and (b) are the confusion matrices of the classification results of the year and grade before improvement, and (c) and (d) are the confusion matrices of the classification results of the year and grade after improvement. By comparing the output results before and after improvement, it can be seen that by retaining exploration information through mirror reflection, dynamically adjusting the search range through exponential decay, and balancing exploration and exploitation through probabilistic mixing, the optimization ability of the Hippopotamus algorithm is significantly improved, enabling the model to more accurately learn the year and grade characteristics of Liubao tea, effectively solving the misjudgment problem existing before improvement, enhancing the global search and local exploitation capabilities of the algorithm, and improving the accuracy and reliability of the model for classifying the year and grade of Liubao tea.

[0065] Table 2 Classification results of the model before and after improvement

[0066]

[0067] In summary, through spectral processing, parameter optimization, and classification model establishment, on the premise of correctly selecting the classification model parameters, the accuracy of the customized gating discrimination model constructed based on the improved hippopotamus algorithm reaches the highest, and the classification accuracies of the training set and the test set for the year and grade both reach 100%. The results show that the method proposed by the present invention can effectively qualitatively classify and discriminate the year and grade of Liubao tea.

[0068] The above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the purpose and scope of the technical solutions of the present invention, and they should all be covered within the scope of the claims of the present invention.

Claims

1. A method for identifying the year and grade of Liubao tea based on terahertz spectroscopy, which includes the following steps: (1): Select five Sanhe Liubao teas of the same series with different years and grades as experimental samples. Crush, sieve, and press the Liubao teas of different grades and years to obtain smooth and flat pressed samples of Liubao tea. (2): Use a transmission terahertz time-domain spectroscopy system to perform spectral detection on Liubao teas of different years and grades to obtain a terahertz time-domain spectral dataset of Liubao teas of different years and grades. (3): Decompose the terahertz time-domain spectral dataset of Liubao teas of different years and grades obtained in (2) using two-dimensional wavelet transform and convert it into a time-frequency distribution map. (4): Divide the dataset into a training set and a test set, and use an improved hippopotamus algorithm to construct a customized gated identification model for the year and grade of Liubao tea. (5): Input the time-frequency distribution map data of the training set samples of Liubao teas of different years and grades into the improved hippopotamus algorithm customized gated model for training. (6): Input the time-frequency distribution map dataset of the Liubao tea to be identified into the trained model for identification and output the identification result.

2. The method for identifying the year level of Liubao tea based on terahertz spectroscopy according to claim 1, characterized in that In the above step (1), five Liubao teas of different years and grades were selected as experimental samples, and all the teas are qualified products with national quality supervision and inspection and quarantine certifications. During the preparation of the experimental samples, an electric crusher was used to crush the Liubao teas of different years and grades into powders. Secondly, a test sieve was used to sieve the ground Liubao tea powders. The particle size of the sieved powders is about 0.15 mm. Finally, a tablet press was used to press the sieved Liubao tea powders. When pressing, the pressure of the tablet press is about 10 MPa for 1 minute. After pressing, the tablets are disk-shaped, about 1 mm thick, about 13 mm in diameter, with uniform internal structure and parallel two sides.

3. The method for identifying the year level of Liubao tea based on terahertz spectroscopy according to claim 1, wherein In the above step (2), a terahertz time-domain spectroscopy system CCT-1800 produced by China Huaxun Fangzhou Technology Co., Ltd. was used to detect the prepared Liubao tea samples. During the process of obtaining the terahertz spectral dataset of Liubao teas of different years and grades using the transmission terahertz time-domain spectroscopy system, the femtosecond laser pulse is divided into a pump pulse and a probe pulse after passing through the beam splitter. The pump pulse passes through the time delay system and then is incident on the terahertz radiation generation device to generate a terahertz pulse. The probe pulse and the terahertz pulse are collinearly incident on the terahertz detection device together, and this is used to drive the terahertz detection device to collect data and input it into the computer to obtain the terahertz time-domain spectral dataset of Liubao teas of different years and grades.

4. A method for identifying the year and grade of Liubao tea based on terahertz spectroscopy according to claim 1, characterized in that, In the above step (3), the terahertz time-domain spectral dataset of Liubao teas of different years and grades obtained is subjected to two-dimensional wavelet transform using the complex Morlet wavelet as the basis function to convert the time-domain spectrum into a time-frequency distribution map. The calculation formula is: where a is the scale factor and b is the translation factor.

5. A method for identifying the year and grade of Liubao tea based on terahertz spectroscopy according to claim 1, characterized in that, In the process of the improved hippopotamus algorithm in the above step (4), the specific improved hippopotamus algorithm is as follows: (1) The present invention introduces a mirror reflection mechanism in the Hippopotamus algorithm to handle out-of-bounds individuals, which can reflect the values beyond the boundary back into the search space in a symmetric manner, retaining the exploration information of individuals in the direction beyond the boundary, increasing the diversity of the population, helping the algorithm to conduct a more extensive exploration at the edge of the search space, reducing the possibility of the algorithm falling into local optima, and improving the global search ability. The specific formula is as follows: Where lb is the global lower bound and ub is the global upper bound. (2) The present invention adopts an exponential decay formula in the third stage of the Hippopotamus algorithm to dynamically adjust the boundary range, replacing the original linear decay boundary method, which can more flexibly adjust the search range according to the number of iterations. A larger search range is allowed in the initial stage of iteration, which helps with global search; the search range gradually shrinks in the later stage of iteration, focusing on more potential areas and improving the local search accuracy. The specific formula is as follows: LO_LOCAL = lb·e -αt / T , HI_LOCAL = ub·e -αt / T Where LO_LOCAL is the local search lower bound, HI_LOCAL is the local search upper bound, α is the decay exponent, T is the maximum number of iterations, and t is the current number of iterations. (3) The present invention introduces a dynamic hybrid strategy of probabilistic selection in the third stage of the Hippopotamus algorithm, which selects different strategies according to the random probability p. When p < 0.5, local exploitation is performed, and the dynamic boundary is used to search near the current position; when p >= 0.5, it approaches the current optimal solution to accelerate convergence. This hybrid strategy can better balance the global exploration and local exploitation capabilities of the algorithm. The specific formula is as follows: where r2, D1, and p are uniformly distributed over the interval (0, 1), D2 follows a standard normal distribution with mean and standard deviation of 1, and x best is the current global optimal solution.

6. The method for identifying the year and grade of Liubao tea based on terahertz spectroscopy according to claim 1, wherein, In step (5) above, 80% of the data is randomly selected from the time-frequency distribution map dataset of Liubao tea as the training set and input into the customized gated discrimination model constructed by the improved Hippopotamus algorithm for training to obtain the best classification discrimination model.

7. The method for identifying the year level of Liubao tea based on terahertz spectroscopy according to claim 1, wherein In step (6) above, the remaining 20% of the data in the time-frequency distribution map dataset of Liubao tea of different years and grades is used as the test set and input into the customized gated discrimination model constructed by the improved Hippopotamus algorithm for classification discrimination, and the discrimination result is output.