Jasmine tea flavor quality prediction method based on extreme learning machine
By applying the limit learning machine in the jasmine tea flavor quality prediction, optimizing data balance and feature fusion, and dynamically adjusting parameters, the subjectivity, cumbersomeness and low accuracy of jasmine tea flavor quality prediction in the prior art are solved, and more efficient and accurate flavor quality prediction is achieved.
Patent Information
- Application Number
- CN202510369043.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-27
- Publication Date
- 2025-04-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art has problems such as strong subjectivity, cumbersome operation, long time and low prediction accuracy in predicting the flavor quality of jasmine tea.
Using the method of the extreme learning machine, a jasmine tea flavor quality prediction model is established by optimizing data balance, feature fusion and dynamic parameter adjustment. The specific steps include obtaining the initial data set, performing sequence sampling optimization, extracting features using spectral imaging method, generating new samples, standardizing feature data, solving the weight matrix of the limit learning machine, and building a prediction model.
The prediction accuracy of the jasmine tea flavor quality model is improved, the impact of sample imbalance on the prediction model is reduced, overfitting is avoided, and the optimized extraction process is stable, reliable and has good repeatability.
Smart Images

Figure CN119886583A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of application of computer models based on extreme learning machines in food quality prediction, and in particular to a method for realizing efficient prediction of jasmine tea flavor quality by optimizing data balance, feature fusion and dynamic parameter adjustment. Background Art
[0002] Jasmine tea is a reprocessed tea made by mixing processed and dried tea leaves with jasmine buds. It is usually made of green tea, and a few are black tea and oolong tea. It has a fresh and lasting aroma, a mellow and refreshing taste, a bright yellow-green soup color, and tender and soft leaves. The research and application of jasmine tea flavor quality prediction mainly focus on sensory evaluation, component analysis and detection, and machine learning methods. A high-quality jasmine tea has a tight and uniform appearance of dry tea, a dark brown and oily color, and a fresh and lasting aroma after brewing. Rapid, objective and efficient prediction of jasmine tea flavor quality is the key basis for distinguishing its quality, but conventional detection methods are complex, cumbersome and have low accuracy. In the era of big data, there are many methods applied to the prediction of jasmine tea flavor quality. At present, the prediction methods of jasmine tea flavor quality mainly include random forest, support vector machine, improved whale algorithm, machine learning method, computer vision technology, etc.
[0003] After searching relevant patents and literature at home and abroad, regarding the prediction and evaluation methods of jasmine tea flavor quality, there are papers such as "Research on flavor molecules from the perspective of machine learning and its application in jasmine tea", which discusses the application of machine learning in analyzing the relationship between molecular structure and flavor characteristics, jasmine tea quality prediction and control, flavor analysis, prediction and optimization, intelligent processing, etc., and puts forward research prospects, in order to provide technical support for improving the quality of jasmine tea and the development of the tea industry. This method requires multivariate statistical analysis and is relatively difficult. Another paper "Analysis of the origin differences of jasmine tea aroma components based on electronic nose and ATD-GC-MS technology" measured jasmine tea from Fuzhou and Hengxian. The results showed that the total response value of the electronic nose sensor to Hengxian jasmine tea was significantly greater than that of Fuzhou jasmine tea; multivariate statistical analysis of the electronic nose data results can achieve the origin classification of jasmine tea samples, but the prediction accuracy of this method is low. For example, the invention patent application number: CN202010433329.2 "A method for evaluating the aroma quality of jasmine tea and its application" judges the quality of jasmine tea based on the ratio of (cis-3-hexenol benzoate + indole + methyl anthranilate) content / (linalool + leaf acetate + benzyl acetate) content. However, the jasmine tea quality evaluation established by this method lacks the ability to process irrelevant information, extract characteristic variables, and establish calibration models.
[0004] Although the above patents and documents have studied the quality evaluation methods of jasmine tea, the traditional quality evaluation methods of jasmine tea mainly rely on sensory evaluation and chemical analysis. However, these methods have the disadvantages of strong subjectivity, cumbersome operation, and long time consumption. A jasmine tea flavor quality prediction method based on an extreme learning machine can establish a jasmine tea flavor quality prediction model, realize the rapid and accurate identification of the flavor quality of jasmine tea, and is conducive to promoting the standardized development of the scented tea industry. Summary of the invention
[0005] In view of the shortcomings existing in the prior art, the present invention provides a jasmine tea flavor quality prediction method using an extreme learning machine, which has significant advantages in parameter optimization, can effectively improve the prediction accuracy of the jasmine tea flavor quality model and generate samples between each eigenvalue of the majority class sample set and the minority class sample set, improve the interpolation between eigenvalues, thereby helping to avoid overfitting, and has more significant advantages in dealing with the problem of imbalance of different samples, solving the problem that the prediction model of jasmine tea flavor quality is difficult to establish. The prediction model established by the method is embedded with an algorithm iterative optimization process, and the initial sample set can be processed to form a balanced data set, thereby improving the impact of sample imbalance on the prediction model, reducing a large amount of calculations, and further making the optimized extraction process stable, reliable and repeatable, laying an experimental foundation for the quality control of jasmine tea flavor quality.
[0006] The present invention provides a method for predicting the flavor quality of jasmine tea using an extreme learning machine, comprising the following steps: S1, obtain the initial data set of jasmine tea samples and build a jasmine tea flavor quality database; S2, based on the jasmine tea flavor quality database, performing sequence sampling optimization on the initial data set, dividing the majority class sample set and the minority class sample set to obtain the divided sample set, and extracting physical and chemical features associated with flavor quality; S3, using spectral imaging method to collect spectral and morphological features of samples, expanding feature space through interpolation to form a balanced data set; S4, generating new samples according to the difference between the majority class sample set and the minority class sample set to expand the feature space; S5, performing standardization processing on the multidimensional feature data in the balanced data set to eliminate dimensional differences, and then solving the weight matrix of the extreme learning machine by using a generalized inverse matrix; S6, constructing a prediction model based on the standardized feature data and the weight matrix, and outputting a grading result of the flavor quality of jasmine tea.
[0007] Furthermore, in the method for predicting the flavor quality of jasmine tea using an extreme learning machine of the present invention, step S2 comprises: Step S21, setting the initial number of majority class sample sets and minority class sample sets, and determining the category distribution benchmark; Step S22, calculating the number of new samples to be generated based on the initial number difference, providing a target value for balancing the data set, and randomly selecting sample pairs from the two types of sample sets; Step S23, based on the sample pairs selected in step S22, new samples are generated by interpolation according to the difference parameters in their feature space, and the samples are supplemented to at least a few categories to form a balanced data set.
[0008] Furthermore, in the method for predicting the flavor quality of jasmine tea using an extreme learning machine of the present invention, the method for generating new samples in step S23 is: According to the feature differences between minority class samples and majority class samples, new sample parameters are generated by interpolation in the feature space.
[0009] Furthermore, in the method for predicting the flavor quality of jasmine tea using an extreme learning machine of the present invention, the implementation of the spectral imaging method in step S3 includes: Multispectral imaging was performed on jasmine tea samples to extract the reflectance spectrum data of the tea surface, and the tea strand density and color distribution were analyzed using a morphological algorithm.
[0010] Jasmine tea samples were scanned using a multispectral imager (wavelength range 400-1000nm, resolution 0.5nm) to extract the reflectance spectral data of the tea surface in 8 bands. The compactness (measured by pixel area ratio) and color distribution (calculated as the saturation mean in the HSV color space) of the tea leaves were analyzed through the opening and closing operations in the morphological algorithm.
[0011] Furthermore, in the method for predicting the flavor quality of jasmine tea using an extreme learning machine of the present invention, the measurement method of the sample difference in step S4 includes: Calculate the Euclidean distance between majority class samples and minority class samples in the feature space, and select the sample pair with the largest difference to generate a new sample.
[0012] Furthermore, in the method for predicting the flavor quality of jasmine tea using an extreme learning machine of the present invention, the standardization process in step S5 comprises: The multi-dimensional feature data is mapped to a uniform numerical interval, and the weight matrix is solved by a generalized inverse matrix.
[0013] Furthermore, in the jasmine tea flavor quality prediction method using an extreme learning machine described in the present invention, the solution process of the regularized least squares method includes: based on the linear relationship between the hidden layer output matrix and the target output matrix, regularization processing is performed by constraining the L2 norm of the weight matrix.
[0014] Furthermore, in the method for predicting the flavor quality of jasmine tea using an extreme learning machine of the present invention, the construction of the prediction model in step S6 comprises: The hidden layer output matrix is linearly combined with the weight matrix, and the classification result is obtained through activation function mapping.
[0015] Furthermore, the method for predicting the flavor quality of jasmine tea using an extreme learning machine of the present invention further comprises step S7: According to the fluctuation threshold of the classification result of the validation set, the prediction model is iteratively optimized, and the number of hidden layer nodes and the regularization parameter are dynamically adjusted until the convergence condition is met.
[0016] Furthermore, in the method for predicting the flavor quality of jasmine tea using an extreme learning machine of the present invention, the convergence conditions include: a fluctuation threshold of the grading results of the validation set is less than 1%, or a preset maximum number of iterations is reached.
[0017] The advantages and beneficial effects of the present invention are: Compared with the random forest method, a jasmine tea flavor quality prediction method based on an extreme learning machine has significant advantages in parameter optimization, can effectively improve the prediction accuracy of the jasmine tea flavor quality model, generate samples between each eigenvalue of the majority class sample set and the minority class sample set, improve the interpolation between eigenvalues, and thus help avoid overfitting. It has more significant advantages in dealing with the imbalance problem of different samples, and solves the problem of difficulty in establishing a prediction model for the flavor quality of jasmine tea.
[0018] Compared with the system cluster analysis method, the prediction model established by this method is embedded in the algorithm iterative optimization process, which can process the initial sample set to form a balanced data set, improve the impact of sample imbalance on the prediction model, reduce a lot of calculations, and further make the optimized extraction process stable, reliable and repeatable, laying an experimental foundation for the quality control of jasmine tea flavor quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is a flowchart of the extreme learning machine’s jasmine tea flavor quality prediction method.
[0020] Figure 2 2 is a performance comparison chart of the prediction model of the present invention. DETAILED DESCRIPTION
[0021] An embodiment of the present invention is further described below with reference to the accompanying drawings.
[0022] The method for predicting the flavor quality of jasmine tea using an extreme learning machine provided by the present invention comprises the following steps: To achieve the above goals, please refer to Figure 1 to Figure 2The present invention is implemented by the following technical scheme: a method for predicting the flavor quality of jasmine tea using an extreme learning machine is proposed, comprising the following steps: First, the initial sample set of jasmine tea flavor quality is defined, and a jasmine tea database is established. The sample data of the jasmine tea database is optimized by sequence sampling. Combined with the spectral imaging method, the jasmine tea samples are photographed and compared, the number of samples in the minority sample set and the number of samples in the majority sample set are set, and the number of new samples required is generated. A majority sample and a minority sample are randomly selected from the majority sample set and the minority sample set, respectively, and the root mean square error between the majority sample and the minority sample is calculated. According to the root mean square error, the minority sample farthest from the minority sample is found. A feature space is formed between the two minority samples, each feature of the new sample is calculated, and the relevant feature parameters are extracted to form a feature data sample. Then, the feature data sample is standardized, and the weight matrix is solved by the least squares method to pave the way for the subsequent prediction model. After completing the weight matrix, the output matrix of the prediction model is obtained. Therefore, after completing the training of the extreme learning machine, the jasmine tea flavor quality prediction model based on the extreme learning machine can be obtained, so that the flavor quality and appearance of the tea can be graded, and the final prediction result is obtained, which improves the detection accuracy.
[0023] The process of the extreme learning machine jasmine tea flavor quality prediction method includes the following steps: first, take the initial sample set of jasmine tea flavor quality and use the polynomial Defined as, (1) Where: , , is the coefficient of the sample set, and x is the state variable. A jasmine tea database is established, and the sample data of the jasmine tea database is optimized by sequence sampling.
[0024] Combined with the spectral imaging method, the jasmine tea samples were photographed and compared, and the number of samples in the minority class sample set was set to And the number of samples in the majority class sample set is , then the number of new samples required to generate is N, (2) (3) Where: is the coefficient vector, is the sample of the optimal solution of t iterations, is the sample of t iterations, i and n are positive integers, is the convergence factor, is a random vector between [0, 1], is the maximum number of iterations, and t is the number of iterations.
[0025] Randomly select a majority class sample from the majority class sample set and the minority class sample set respectively and minority class samples , calculate the majority class samples and minority class samples The root mean square error between , (4) Find the minority class sample based on the root mean square error The furthest minority class sample .
[0026] Here and A feature space is formed between them, and each feature of the new sample is calculated , extract relevant feature parameters and form feature data samples.
[0027] (5) Where: is the weight vector connecting the hidden nodes to the output layer, is the weight vector connecting the hidden nodes to the input layer, is the kernel parameter, is the bias of the hidden node.
[0028] Then the feature data samples are standardized and the weight matrix is solved by the least squares method. , paving the way for subsequent prediction models, (6) Where: is the hidden layer generalized inverse matrix, is the transposed matrix, is the regularization coefficient.
[0029] After completing the weight matrix, the output matrix As the hidden layer output of the extreme learning machine, the output matrix of the prediction model is , (7) Where: is the number of misclassified samples in the training sample set, is the activation function.
[0030] Thus, after completing the training of the extreme learning machine, a jasmine tea flavor quality prediction model can be obtained, thereby grading the flavor quality and appearance of the tea leaves, obtaining the final prediction result, and improving the detection accuracy. By comparison, under the same number of iterations, the accuracy of the patented method is higher than that of the random forest method. Figure 2 shown.
[0031] In the morphological analysis of jasmine tea samples, the quantification of cord compactness was achieved by the following steps: Image preprocessing: Grayscale and binarization processing is performed on the tea samples after multispectral imaging, and the tea strip area is extracted through threshold segmentation.
[0032] Morphological operation: Opening operation (erosion followed by dilation) is used to eliminate small noises, and closing operation (dilation followed by erosion) is used to fill holes, connect broken areas, and enhance the integrity of the cable structure.
[0033] Compactness calculation: The effective pixel area of the tea leaves in the binary image after statistical processing is calculated, and its ratio to the total area of the image is calculated. The higher the ratio, the tighter the tea leaves.
[0034] For color distribution analysis, the specific steps are as follows: Color space conversion: Convert multispectral imaging data from RGB space to HSV (hue, saturation, value) space, and extract the saturation (S) channel to represent color purity.
[0035] Region segmentation: Different color regions (such as dark brown and yellow-green) are divided according to the multi-spectral reflectance characteristics of tea samples.
[0036] Saturation statistics: Calculate the mean saturation value by region, combine it with the reflectance spectrum data, and construct a color distribution matrix to reflect the color uniformity of different regions.
[0037] The above morphological algorithms are implemented based on general image processing libraries such as OpenCV. The specific parameters (such as the size of the structural element and the number of iterations) can be adjusted according to the sample characteristics. In the implementation of regularized least squares, the construction of linear relationships and the solution of weights are achieved through the following process: Hidden layer output matrix generation: Randomly initialize the weights and biases from the input layer to the hidden layer, input the standardized multi-dimensional feature data into the hidden layer nodes, and generate the hidden layer output matrix through a nonlinear activation function (such as the Sigmoid function).
[0038] Regularization constraint: When solving the weight matrix, add the L2 norm regularization term (i.e., weight decay term) to control the model complexity by adjusting the regularization coefficient λ to prevent overfitting caused by high-dimensional features.
[0039] Matrix operation: Based on the linear relationship between the hidden layer output matrix and the target output matrix, the generalized inverse matrix is used to directly solve the weights, avoiding the iterative calculation of the traditional gradient descent method and improving the computational efficiency.
[0040] The selection of activation functions and hierarchical mapping are determined according to the specific application scenario: Activation function type: According to the nonlinearity of the feature data, select the Sigmoid function (suitable for probability output), ReLU function (alleviate gradient disappearance), or Tanh function (centralized output).
[0041] Grading strategy: After linearly combining the hidden layer output and the weight matrix, it is mapped to the [0,1] interval through the activation function, and the grading threshold (such as 0.3, 0.7) is set to divide the flavor quality level (excellent, good, poor).
[0042] The above steps are based on the classic framework of extreme learning machine (ELM). The core is to quickly solve the model weights by randomly initializing the hidden layer parameters and regularized least squares method. For relevant technical details, please refer to the ELM standard implementation process.
[0043] Solutions for sample imbalance: Technical means: Step S2 sequence sampling optimization: by dividing the majority class / minority class sample sets, calculating the number of new samples to be generated, and generating new samples based on distribution distance interpolation in the feature space.
[0044] Step S4: Feature space expansion: Based on the distribution difference between majority class and minority class samples, the sample pairs with the largest difference are preferentially selected to generate new feature parameters.
[0045] Logical relevance: By dynamically balancing the sample distribution, the problem of insufficient learning of minority class features by traditional machine learning methods is solved, and the model's ability to capture low-frequency flavor features is improved.
[0046] The generated new samples cover the sparse areas of the feature space, avoiding the prediction results being biased towards the majority class samples.
[0047] Solutions to suppress overfitting: Technical means: Step S5 regularized weight solution: use the generalized inverse matrix combined with the regularization coefficient to constrain the norm of the weight matrix.
[0048] Step S7: Dynamic hidden layer adjustment: Dynamically prune redundant hidden layer nodes according to the validation set fluctuation threshold.
[0049] Logical relevance: Regularized least squares suppresses the risk of overfitting in high-dimensional feature space by constraining model complexity.
[0050] The dynamic node adjustment strategy eliminates redundant connections in the hidden layer to avoid over-sensitivity to noisy data.
[0051] Solutions to improve computing efficiency: Technical means: Step S9 iterative optimization termination condition: terminate the training early when the fluctuation of the classification result of the verification set is less than 1%.
[0052] Step S5: Standardization processing: mapping multi-dimensional features to a uniform interval to reduce the complexity of matrix operations.
[0053] Logical relevance: The hierarchical convergence strategy reduces the number of invalid iterations and shortens the training time.
[0054] Feature standardization preprocessing optimizes matrix operation efficiency and meets the real-time requirements of industrial scenarios.
[0055] Solutions to optimize feature space generation: Technical means: Step S3: multispectral imaging: extracting the reflectance spectrum data of the tea surface and analyzing the tea leaf density in combination with morphological algorithms.
[0056] Step S5: Distribution distance measurement: Based on the distance calculation in the feature space, new samples covering key quality-related features are generated.
[0057] Logical relevance: Multimodal feature fusion (spectral + morphological) improves the model's ability to model the correlation between tea appearance and flavor.
[0058] The distribution distance measurement rule guides the direction of new sample generation and solves the problem that traditional clustering methods cannot capture nonlinear relationships.
Claims
1. A method for predicting the flavor quality of jasmine tea using an extreme learning machine, characterized in that: The steps include: S1, obtain the initial data set of jasmine tea samples and build a jasmine tea flavor quality database; S2, based on the jasmine tea flavor quality database, performing sequence sampling optimization on the initial data set, dividing the majority class sample set and the minority class sample set to obtain the divided sample set, and extracting physical and chemical features associated with flavor quality; S3, using spectral imaging method to collect spectral and morphological features of samples, expanding feature space through interpolation to form a balanced data set; S4, generating new samples according to the difference between the majority class sample set and the minority class sample set to expand the feature space; S5, performing standardization processing on the multidimensional feature data in the balanced data set to eliminate dimensional differences, and then solving the weight matrix of the extreme learning machine by using a generalized inverse matrix; S6, constructing a prediction model based on the standardized feature data and the weight matrix, and outputting a grading result of the flavor quality of jasmine tea.
2. The method for predicting the flavor quality of jasmine tea using an extreme learning machine according to claim 1, characterized in that: The step S2 comprises: Step S21, setting the initial number of majority class sample sets and minority class sample sets, and determining the category distribution benchmark; Step S22, calculating the number of new samples to be generated based on the initial number difference, providing a target value for balancing the data set, and randomly selecting sample pairs from the two types of sample sets; Step S23, based on the sample pairs selected in step S22, new samples are generated by interpolation according to the difference parameters in their feature space, and the samples are supplemented to at least a few categories to form a balanced data set.
3. The method for predicting the flavor quality of jasmine tea using an extreme learning machine according to claim 2, characterized in that: The method of generating a new sample in step S23 is: According to the feature differences between minority class samples and majority class samples, new sample parameters are generated by interpolation in the feature space.
4. The method for predicting the flavor quality of jasmine tea using an extreme learning machine according to claim 1, characterized in that: The implementation of the spectral imaging method in step S3 includes: Multispectral imaging was performed on jasmine tea samples to extract the reflectance spectrum data of the tea surface, and the tea strand density and color distribution were analyzed using a morphological algorithm.
5. The method for predicting the flavor quality of jasmine tea using an extreme learning machine according to claim 1, characterized in that: The measurement method of the sample difference in step S4 includes: Calculate the Euclidean distance between majority class samples and minority class samples in the feature space, and select the sample pair with the largest difference to generate a new sample.
6. The method for predicting the flavor quality of jasmine tea using an extreme learning machine according to claim 1, characterized in that: The standardization process in step S5 includes: The multi-dimensional feature data is mapped to a uniform numerical interval, and the weight matrix is solved by a generalized inverse matrix.
7. The method for predicting the flavor quality of jasmine tea using an extreme learning machine according to claim 6, characterized in that: The solution process of the regularized least squares method includes: based on the linear relationship between the hidden layer output matrix and the target output matrix, regularization processing is performed by constraining the L2 norm of the weight matrix.
8. The method for predicting the flavor quality of jasmine tea using an extreme learning machine according to claim 1, characterized in that: The construction of the prediction model in step S6 includes: The hidden layer output matrix is linearly combined with the weight matrix, and the classification result is obtained through activation function mapping.
9. The method for predicting the flavor quality of jasmine tea using an extreme learning machine according to claim 8, characterized in that: The step S7 is also included: According to the fluctuation threshold of the classification result of the validation set, the prediction model is iteratively optimized, and the number of hidden layer nodes and the regularization parameter are dynamically adjusted until the convergence condition is met.
10. The method for predicting the flavor quality of jasmine tea using an extreme learning machine according to claim 9, characterized in that: The convergence conditions include: the fluctuation threshold of the grading result of the verification set is less than 1%, or the preset maximum number of iterations is reached.
Citation Information
Patent Citations
Jasmine tea aroma quality evaluation method and application thereof
CN111738548A
Tea flavor quality component food directional manufacturing technology integration system and method
CN105104590A
Method of using minimized-loss learning to classify imbalanced samples
WO2019033636A1
Cited By
Tea quality grading system and method based on image detection
CN120510460A
Tea color automatic evaluation method and system based on machine vision
CN121207890A
Method, device and equipment for discriminating flavor source of seasoned food and medium
CN121431745A