Liupao tea year identification method based on combination of terahertz spectrum and improved optimization algorithm
By combining terahertz spectroscopy technology and improved optimization algorithm, the support vector machine model is built and parameters are optimized, and the problems of fast, accurate and efficient identification of Liubao tea year are solved, which is efficient identification of Liubao tea year is achieved, and the problem of counterfeit aging of new tea on the market is solved.
Patent Information
- Application Number
- CN202510013311.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-06
- Publication Date
- 2025-05-06
AI Technical Summary
The prior art is difficult to quickly, accurately and efficiently identify the years of Liubao Tea, and there are problems such as low accuracy of results, cumbersome steps and environmental pollution.
The detection technology based on terahertz spectroscopy combined with an improved optimization algorithm is used to detect the terahertz time domain spectroscopy of Liubao Tea through the terahertz time domain spectroscopy system, and feature data are extracted using fast Fourier transform and principal component analysis, a support vector machine model is constructed, and the model parameters are optimized through differentiated creative search algorithms to achieve efficient identification of Liubao Tea years.
It has achieved rapid, accurate and efficient identification of Liubao tea years, solved the problem of counterfeit and aging of new teas on the market, the entire inspection process is convenient, the result output is fast and clear, suitable for large-scale analysis.
Smart Images

Figure CN119935946A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of terahertz detection technology and optimization algorithm application, and specifically relates to a method for identifying the year of Liubao tea based on terahertz spectroscopy combined with an improved optimization algorithm. Background Art
[0002] Tea is currently one of the three most popular non-alcoholic beverages in the world due to its benefits to human health. Liubao tea, produced in Guangxi, China, is a special post-fermented tea that enjoys a high reputation in Southeast Asia. The raw materials of Liubao tea are fresh leaves of large and medium-leaf varieties of camellia grown in Wuzhou, Guangxi. The production process usually includes withering, rolling, pile fermentation, pile turning, drying, fermentation and aging. As a representative black tea, Liubao tea contains beneficial ingredients that are easily absorbed by the human body and can be used to prevent hypertension and cardiovascular diseases. It also has the effects of promoting weight loss, relieving metabolic syndrome and regulating intestinal microbiota. The antioxidant and in vitro bile acid binding effects of its extract highlight its medicinal value. Unlike other black teas, the rich bioactive ingredients of Liubao tea give it good antioxidant and anti-inflammatory effects and can be used to improve oral problems. The quality of Liubao tea is determined by the aging time. The microbial action in the post-fermentation process can produce a unique aged aroma, and the polyphenol content in the tea will decrease with the aging time. Therefore, the Liubao tea with a long aging time tastes sweeter and has better quality.
[0003] Post-fermented tea is called vintage tea after aging, and the quality of fermented tea is usually identified by sensory evaluation and high-performance liquid chromatography. The results obtained by these two methods are low in accuracy and the steps are cumbersome. In particular, the sensory evaluation method has the problem of poor result stability, and the evaluation results are overly dependent on human experience. In order to obtain more accurate results, some detection methods have been widely used in recent years, such as liquid chromatography, spectrophotometry and near-infrared spectroscopy. There are environmental pollution problems in the detection process of the above-mentioned chemical methods, and the sensitivity of near-infrared spectroscopy is reduced due to the influence of scattering effects and thermal radiation. Both terahertz time-domain spectroscopy and infrared spectroscopy obtain time-domain spectra through time delay measurement, and the spectral information of the medium in the frequency domain can be obtained after Fourier transform. Unlike infrared spectroscopy, terahertz time-domain spectroscopy uses femtosecond laser light source, which gives it high time resolution. At the same time, terahertz time-domain spectroscopy can directly obtain information on the refractive index of the sample, simplifying the complex calculation of optical parameters and showing unique high reliability.
[0004] Therefore, it is urgent to design a method based on terahertz spectroscopy detection technology combined with machine learning to identify the age of Liubao tea in order to solve the above technical problems. Summary of the invention
[0005] The present invention aims to provide a method for identifying the age of Liubao tea based on terahertz spectroscopy combined with an improved optimization algorithm. The present invention can accurately, quickly and efficiently identify Liubao teas of different years, solving the problem of new Liubao teas being counterfeited as aged Liubao teas on the market; the entire identification and detection process is fast and convenient, and the result output is rapid and clear, so that large-scale Liubao tea age identification and analysis can be carried out.
[0006] The technical problem to be solved by the present invention is to quickly, accurately and efficiently identify the year of Liubao tea. To solve the above technical problem, the present invention is implemented by the following technical solutions.
[0007] A method for identifying the age of Liubao tea based on terahertz spectroscopy combined with an improved optimization algorithm comprises the following steps:
[0008] S1: Crush the Liubao tea of different years and sift out the fine powder, then press out the Liubao tea round-shaped samples with smooth surface, and use a vernier caliper to measure the thickness to ensure that the thickness is within the error range;
[0009] S2: Use the terahertz time-domain spectroscopy system to detect Liubao tea samples of different years, and obtain the terahertz time-domain spectroscopy dataset of Liubao tea of different years;
[0010] S3: Perform fast Fourier transform (FFT) on the terahertz time-domain spectrum data obtained in S2 to obtain frequency-domain signals, and then use the frequency-domain signals to obtain absorption spectrum data. The peak noise is removed by Gaussian smoothing algorithm, and the principal component analysis dimensionality reduction algorithm is used to obtain feature data as the input data set;
[0011] S4: Use support vector machine (SVM) to build a qualitative analysis model for vintage Liubao tea;
[0012] S5: Use the Differentiated Creative Search (DCS) algorithm to optimize the support vector machine model parameters and obtain the optimal performance parameter combination of the support vector machine;
[0013] S6: Use the guided learning strategy (GLS) to balance the convergence and divergence states of the differentiated creative search algorithm, and use the convergence and divergence schemes of the differentiated creative search algorithm as the update scheme of the guided learning strategy;
[0014] S7: The extracted characteristic spectral datasets of Liubao tea from different years are input into the qualitative identification model optimized by the improved differentiated creative search algorithm, and the model identification results are output.
[0015] Optionally, the sieved fine powder in the sample preparation process is the fine powder obtained after passing through a 200-mesh sieve, the sample thickness is controlled by weighing method, the mass range is about 200 mg, and the mold is used for pressing under the same pressure.
[0016] Optionally, the input data set is to divide the feature data into a training set and a test set in a ratio of 3:2. The model uses the training set for learning and then predicts the test set to obtain the result.
[0017] Optionally, the parameter optimization for the support vector machine is a differential creative search algorithm (DCS) that searches for optimal values of a parameter g and a regularization parameter c of a Gaussian radial basis kernel function of the support vector machine, and the parameters g and c are performance parameters of the model.
[0018] Optionally, the model identification result uses accuracy, recall, recall rate and F1 score as evaluation indicators of model performance.
[0019] The invention discloses a method for identifying the year of Liubao tea based on terahertz spectroscopy combined with an improved optimization algorithm. The method uses terahertz time-domain spectroscopy technology combined with an improved differentiated creative search algorithm to perform qualitative analysis on Liubao teas of different years, thereby identifying the year of Liubao tea. A differentiated creative search algorithm with strong global search capability is used to select the performance parameters of a support vector machine to avoid falling into a local optimal solution. A guided learning strategy is introduced to simultaneously replace the convergent and divergent update scheme, thereby solving the problems of poor algorithm search efficiency and mismatch of the guided strategy update scheme. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to make the content of the present invention more clearly understood, the present invention is further described in detail below according to specific embodiments of the present invention in conjunction with the accompanying drawings, wherein
[0021] Figure 1 The present invention is a flow chart of a method for identifying the age of Liubao tea based on terahertz spectroscopy combined with an improved optimization algorithm.
[0022] Figure 2 It is the smooth absorption spectrum of the Liubao tea samples of different years in the characteristic band of 0.2-1.6THz described in the present invention.
[0023] Figure 3 It is a working principle diagram of the differentiated creative search algorithm described in the present invention.
[0024] Figure 4 It is an update process scheme of the guided learning strategy described in the present invention.
[0025] Figure 5 This is the specific process of using a guided learning strategy to improve a differentiated creative search algorithm as described in the present invention.
[0026] Figure 6 This is the process of optimizing SVM parameters by using the improved differentiated creative search algorithm described in the present invention. DETAILED DESCRIPTION
[0027] In order to make the purpose and advantages of the present invention more clearly understood, the specific implementation of the present invention is further described in detail below with reference to the accompanying drawings.
[0028] The implementation flow chart of the present invention is as follows: Figure 1 As shown, the specific implementation steps are as follows:
[0029] S1: Select Liubao tea samples from different years and make experimental samples;
[0030] S2: Use the terahertz time-domain spectroscopy system to detect Liubao tea samples of different years and obtain terahertz time-domain spectroscopy data;
[0031] S3: Calculate the terahertz time-domain spectrum obtained in S2 to obtain a terahertz absorption spectrum, perform smoothing preprocessing and dimension reduction on the terahertz absorption spectrum to extract features, and obtain an input data set;
[0032] S4: Use support vector machine (SVM) to build a qualitative identification model for Liubao tea of different years;
[0033] S5: Use the Differentiated Creative Search (DCS) algorithm to optimize the parameters of the support vector machine and improve the optimization algorithm;
[0034] S6: Balance the convergence and divergence states of the differentiated creative search algorithm through a guided learning strategy, and use the convergence and divergence schemes of the differentiated creative search algorithm to replace the update scheme of the guided learning strategy;
[0035] S7: Input the characteristic spectral data set of Liubao tea of different years to be identified into the optimized classification and identification model, and output the analysis results.
[0036] Specifically, in the step (1), samples are prepared by drying, crushing, sieving, grinding, weighing and tableting Liubao tea of different years to obtain experimental samples suitable for transmission detection.
[0037] Specifically, in the step (2), the sample spectrum is collected, and the terahertz time-domain spectrum data is obtained by a spectrum acquisition system composed of a CCT-1800 terahertz time-domain spectrometer (Shenzhen Huaxun Technology, China) and a control computer. The spectrometer uses a 780nm femtosecond laser for excitation, and the detection range is 0.1-4THz, of which the effect is best in the range of 0.1-1.6, the signal-to-noise ratio in the low frequency band is 75dB, and the resolution is up to 20GHz. During the experiment, the indoor temperature is kept at about 22°C, nitrogen is introduced to stabilize the spectrum, the transmission spectrum mode is selected, the reference signal is obtained when no load is applied, and then the sample signal is obtained in sequence. The data set is divided into a training set and a test set at a ratio of 3:2, with 24 groups of training set data and 16 groups of test set data of each type. There are 144 groups of training set data in total and 96 groups of test set data in total.
[0038] Specifically, in the step (3), the terahertz absorption spectrum is calculated, and the preprocessing and dimensionality reduction method is used to transform the terahertz spectrum time domain signal into the frequency domain signal using the fast Fourier transform (FFT). The formula is as follows:
[0039]
[0040] Where A(ω) is the amplitude of the electric field, is the phase difference between the reference signal and the sample signal, E(t) is the terahertz time domain signal, and E(ω) is the converted frequency domain signal.
[0041] Then use the absorbance formula to calculate the sample absorbance A sam The calculation formula is as follows:
[0042]
[0043] In the formula, E sam (ω) is the spectral signal of the sample, E ref (ω) is the reference signal.
[0044] The Gaussian smoothing method is used to preprocess the terahertz absorption spectrum. The preprocessed data removes the spike noise and reduces the system interference. The smoothed data is extracted using the principal component analysis dimensionality reduction algorithm to obtain effective feature data.
[0045] Specifically, in step (4), a support vector machine model is established. Support vector machine (SVM) is a supervised classifier for binary classification problems. When dealing with multivariate problems, a certain class and other classes are usually regarded as binary classifications. It is very suitable for solving problems with small-size sample data, and also has many advantages in solving nonlinear and high-dimensional pattern recognition. In order to ensure that the sample space is linearly separable, SVM also introduces a kernel function, which maps the original space to a higher-dimensional space to find a feature space in which the sample is linearly separable. Commonly used kernel functions include linear kernels, polynomial kernels, and Gaussian kernels, which are shown below:
[0046]
[0047]
[0048]
[0049] Where d is the degree of the polynomial, σ g is the bandwidth of the Gaussian kernel.
[0050] Specifically, in step (5), the differentiated creative search (DCS) algorithm is used to perform parameter optimization. The core principles mainly include three parts: differentiated knowledge acquisition (DKA), creative realism, and retrospective evaluation. The purpose of the entire process is to iteratively optimize team performance. The iterative process divides team members into three groups with different functions. High performers are responsible for creating innovative and divergent solutions, ordinary performers have convergent thinking and generate feasible solutions, and low performers provide diverse options. The update of each individual in the DKA process can be expressed as a mathematical expression:
[0051] j rand =randint(1,D)
[0052]
[0053] where j rand is a random integer in the range (1, D), U(0,1) is uniformly distributed on the interval (0, 1), η i,t is the individual’s quantitative knowledge acquisition rate (qKR), which is expressed by the following formula.
[0054]
[0055] in It can be obtained by the following formula:
[0056]
[0057] Where R i,t is the ranking of individual i at the tth iteration, and NP is the number of populations.
[0058] After classification through DKA, average performers generate feasible solution updates based on convergent thinking, and the updated equation is shown below.
[0059] v i,d =w×x best,d +λ t ×(x r2,d -x i,d )+ω i,t ×(x r1,d -x i,d )
[0060] w is the weight coefficient, x best,d is the best individual, λ t is the λ parameter value at the tth iteration, ω i,t is the ω parameter value at the tth iteration, x r1,d and x r2,d are random individuals selected from different ranges. It is worth mentioning that low performers will be replaced by new members to provide diversity for the team. The replacement formula is as follows.
[0061] V NP =LB+U(0,1)×(UB-LB)
[0062] Where LB and UB are the overall upper and lower limits.
[0063] Retrospective assessment (RA) is mainly divided into individual selection and optimal individual update. The individual selection formula is as follows:
[0064]
[0065] Where V i,t is the current individual, X i,t is a historical individual, f(V i,t ) is the current individual fitness value, f(X i,t ) is the fitness value of the historical individual. The result of the optimization process is determined by the update of the optimal individual, and the formula is as follows.
[0066]
[0067] X i,t+1 is the best individual in the current iteration, X best,t is the best individual in the previous iteration, f(X i,t+1 ) is the current optimal fitness, f(X best,t ) is the previous optimal fitness.
[0068] Specifically, in step (6), the convergence and divergence states of the differentiated creative search algorithm are balanced by a guided learning strategy, which is to use a guided learning strategy (GLS) to update and select the DCS to achieve the effect of balancing the degree of divergence and the degree of convergence. In the initialization stage of the DCS algorithm, GLS follows the algorithm to initialize parameters. When DCS completes the population update for the first time, GLS will store historical individuals based on the generated population. The algorithm then evaluates the population and determines the C parameter. When C>Cmax, the overall discreteness of the population is calculated to obtain the feedback result. The larger the Cmax, the lower the execution frequency of GLS. If the feedback result is highly discrete, the DCS will be guided to use the convergence solution of ordinary performers to update the population. When the feedback is low in discreteness, the innovative divergence solution of high performers is used to update the population. When updated to C<Cmax, an evaluation is performed to obtain the current best individual, and then a condition is used to determine whether to continue iterative updating until the optimal solution to the global problem is found.
[0069] Specifically, the evaluation indicators of the model output results in step (7) use accuracy, recall, recall and F1 score to evaluate the performance of the classification model. The accuracy can directly indicate the ability of the model to correctly identify the classification, while the recall rate indicates whether the model has the problem of missed detection. The recall rate represents the accuracy of the model. The F1 score represents the balance between the recall rate and the recall rate. The higher the F1 score, the better the overall performance of the model.
[0070] See also Figures 2 to 6 , the present invention provides a specific embodiment:
[0071] (1) Selection of research subjects and preparation of test samples
[0072] Liubao tea of different years is the specific implementation object of the present invention. The production years are 2017, 2018, 2019, 2020, 2021 and 2023, all purchased from Guangxi Wuzhou Zhongming Tea Industry Co., Ltd. The sample is dried and crushed to obtain fine-grained Liubao tea powder. 200 mg of powder is taken from each sample and pressed into tablets at a pressure of 12 MPa. The sample has a diameter of 13 mm and a thickness of 1 mm. 40 tablets of Liubao tea of each year are made, with a total of 240 samples. There are 24 samples in the training set and 16 samples in the test set for each year.
[0073] (2) Terahertz time-domain spectroscopy acquisition and processing
[0074] All samples were collected using a terahertz time-domain spectroscopy system. The obtained terahertz time-domain spectrum needs to be converted to the frequency domain through fast Fourier transform (FFT). After the frequency domain spectrum is obtained, the frequency domain spectrum is calculated into an absorption spectrum using the absorbance formula. The smoothed spectrum is shown in Figure 2 .
[0075] (3) Constructing DCS improved SVM model
[0076] The Differentiated Creative Search (DCS) algorithm is used to optimize the parameters of the support vector machine, and the smoothed terahertz spectral data is reduced in dimension as the input of the model. The optimization algorithm is used to optimize the kernel function parameter g and the regularization coefficient c of the SVM, which can improve the classification performance of the model. The Differentiated Creative Search (DCS) algorithm is a meta-heuristic parameter optimization algorithm, which is inspired by the mutation strategy of differential evolution. For the specific workflow, see Figure 3 .
[0077] (4) Introducing GLS-improved DCS algorithm
[0078] A guided learning strategy is used to balance the convergence and divergence of the differentiated creative search algorithm. The guided learning strategy is updated based on the feedback results of the population dispersion degree. For the specific workflow, see Figure 4 The process of introducing the guided learning strategy into the differentiated creative search algorithm is to directly replace the convergence and divergence schemes of the guided learning strategy with the convergence and divergence update schemes of the differentiated creative search algorithm itself. For the specific process, see Figure 5 .
[0079] (5) Constructing the SVM model of GLS optimization DCS algorithm
[0080] The differentiated creative search algorithm with guided learning strategy is used for parameter optimization of support vector machine. In the iteration, the algorithm quickly finds an optimal solution locally, and easily jumps out of the local range to obtain a new local optimal solution. After 35 iterations, an optimal solution is found globally, and the entire convergence time is greatly reduced, indicating that GLS can enable DCS to generate feasible convergence solutions more quickly. The best fitness is 96%, and the fitness reaches the best fitness in the later iteration. For details, see Figure 6 .
[0081] (6) Evaluation and analysis of qualitative identification models
[0082] Table 1 shows the performance indicators of each model. According to the classification accuracy, it can be concluded that GA-SVM has the worst classification effect, while the improved GLS-DCS-SVM has the best classification effect. The global search ability of the POS-SVM model is improved compared with the GA-SVM model, and the accuracy of the classification results has reached 94%. In addition, the classification accuracy of the DCS algorithm with diversified update factors has reached 95%. The classification results show that GLS is effective in guiding DCS, and the GLS-DCS-SVM model is suitable for the identification of the year of Liubao tea in terms of accuracy and F1 score indicators. Its performance is almost close to the ideal balance state, and the F1 score reaches 0.9683. From the comprehensive results, the DCS algorithm after adding GLS has improved the performance of the model in all aspects. .
[0083] Table 1 Comparison of the performance of Liubao tea year identification models using different optimization algorithms
[0084]
[0085] The above is only a representative embodiment of the present invention, and this example cannot be limited to the scope of rights of the present invention. Ordinary technicians in this field should be aware that only modifications or equivalent replacements of the technical solution of the present invention do not deviate from the purpose and scope of the technical solution of the present invention and still fall within the scope covered by the present invention.
Claims
1. A method for identifying the year of Liubao tea based on terahertz spectroscopy combined with an improved optimization algorithm, characterized in that: The following steps are involved: S1: Crush the Liubao tea of different years and sift out the fine powder, then press out the Liubao tea round-shaped samples with the same thickness and smooth surface; S2: Use the terahertz time-domain spectroscopy system to detect Liubao tea samples of different years, and obtain the terahertz time-domain spectroscopy data set of Liubao tea of different years; S3: Perform fast Fourier transform (FFT) on the terahertz time-domain spectrum data obtained in S2 to obtain frequency-domain signals, and then use the frequency-domain signals to obtain absorption spectrum data. The peak noise is removed by Gaussian smoothing algorithm, and the principal component analysis dimensionality reduction algorithm is used to obtain characteristic data. S4: Use support vector machine (SVM) to build a qualitative analysis model for vintage Liubao tea; S5: Use the Differentiated Creative Search (DCS) algorithm to optimize the support vector machine model parameters and obtain the optimal combination of kernel function parameters and regularization coefficients of the support vector machine; S6: Use the guided learning strategy (GLS) to balance the convergence and divergence states of the differentiated creative search algorithm, and use the convergence and divergence schemes of the differentiated creative search algorithm as the update scheme of the guided learning strategy; S7: The extracted characteristic spectral datasets of Liubao tea from different years are input into the qualitative identification model optimized by the improved differentiated creative search algorithm, and the model identification results are output.
2. The method for identifying the year of Liubao tea based on terahertz spectroscopy combined with an improved optimization algorithm according to claim 1, characterized in that: The prepared circular sample is passed through a terahertz time-domain spectroscopy system to obtain the time-domain spectrum, and after the absorption spectrum data is calculated, the terahertz absorption spectrum data is subjected to Gaussian smoothing and principal component analysis dimensionality reduction to extract effective terahertz characteristic data of Liubao tea.
3. The improved differentiated creative search algorithm according to claim 1, characterized in that: Through guided learning strategies, the convergence and divergence states of the differentiated creative search algorithm are balanced to improve its efficiency.
4. The improved guided learning strategy according to claim 1, characterized in that: The convergent and divergent update schemes of the differentiated creative search algorithm are used to replace the original update scheme of the guided learning strategy.
5. The method for identifying the year of Liubao tea based on terahertz spectroscopy combined with an improved optimization algorithm according to claim 1, characterized in that: The improved differentiated creative search algorithm is used to optimize the support vector machine, and this model is called GLS-DCS-SVM.