A tea variety identification method and system based on deep neural network

Through the tea variety identification method based on deep neural network, combined with the optimization of linear regression, random forest and deep neural network models, the problem of information asymmetry in the tea market is solved, the accuracy and reliability of tea variety identification is improved, and the tea is enhanced Quality maintenance and brand value.

CN114139596BActive Publication Date: 2025-01-03HUIZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111201874.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-15
Publication Date
2025-01-03
Estimated Expiration
2041-10-15

AI Technical Summary

Technical Problem

The domestic tea market has information asymmetry in the effective identification of tea quality, which weakens the advantages of tea varieties and makes it difficult for the existing technology to provide accurate tea variety identification methods.

Method used

Using the tea variety identification method based on deep neural network, tea sample data is collected, linear regression, random forest, and deep neural network models are pre-processed and constructed, the model with the highest accuracy is selected, and its parameters are optimized to form the final prediction. Model to improve prediction accuracy.

Benefits of technology

A higher accuracy of tea variety identification is achieved, a more reliable prediction model is formed, and the maintenance of tea quality and the direct significance of brand is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114139596B_ABST
    Figure CN114139596B_ABST
Patent Text Reader

Abstract

The present invention discloses a tea variety identification method and system based on a deep neural network, comprising the following steps: collecting tea sample data to obtain a first data set; preprocessing the first data set to obtain a second data set; using the second data set to respectively construct three prediction models of linear regression, random forest, and deep neural network; training the linear regression, random forest, and deep neural network prediction models respectively, and selecting the prediction model with the highest accuracy; optimizing the prediction model with the highest accuracy to form a final prediction model; inputting the second data set into the final prediction model to obtain a classification result. The present invention uses three models to predict the tea variety data set, and selects the prediction model with the highest accuracy through training and comparison, and then optimizes the important parameters of the prediction model to form a final model, thereby obtaining a more reliable prediction accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of biometric information recognition, and more specifically, to a tea variety identification method and system based on a deep neural network. Background Art

[0002] The quality of tea is particularly related to the variety and origin of the raw materials. However, the current domestic tea market is insufficient in the effective identification of quality, and the information asymmetry is serious, which weakens the variety and origin advantages of my country's tea. Therefore, it is necessary to develop an effective and accurate method for identifying tea varieties, which has direct practical significance for maintaining tea brands and improving tea quality. Summary of the invention

[0003] The primary purpose of the present invention is to provide a tea variety identification method based on a deep neural network to address the problems existing in the prior art, and to optimize the neural network to effectively improve the prediction accuracy.

[0004] The technical effects to be achieved by the present invention are achieved through the following technical solutions:

[0005] A tea variety identification method based on deep neural network includes the following steps:

[0006] S1, collecting tea sample data to obtain a first data set;

[0007] S2, preprocessing the first data set to obtain a second data set;

[0008] S3. Use the second data set to construct three prediction models: linear regression, random forest, and deep neural network;

[0009] S4, training the linear regression, random forest, and deep neural network prediction models respectively, and selecting the prediction model with the highest accuracy;

[0010] S5, optimizing the prediction model with the highest accuracy to form a final prediction model;

[0011] S6. Input the second data set into the final prediction model to obtain a classification result.

[0012] Preferably, the step S1 uses a genome-encoded RNA second-generation sequencing method to obtain the first data set; the transcriptome sequencing data downloaded from a public data platform (Sequence reads archive, SRA) is decompressed as the tea sample data, and then all short repetitive sequences are found from the tea sample data for molecular labeling as candidate features, and the tea sample data and the candidate features together form the first data set.

[0013] Preferably, in step S2, sites with an occurrence frequency in the population lower than 20%, a distance between two molecular markers being less than 20 bases, and an overall deletion rate greater than 20% are selected from the selected features, and sites that meet one of the three aforementioned conditions are deleted, and finally molecular marker sites that meet the conditions are obtained, thereby cleaning and obtaining the second data set.

[0014] Preferably, the tea sample data is divided into a training set, a test set, and a validation set, and the ratios of the three are 0.8, 0.1, and 0.1, respectively. In step S4, the linear regression, random forest, and deep neural network prediction models are all trained on 80% of the tea sample data, and then the remaining 20% ​​are tested and verified, and it is concluded that the deep neural network prediction model has the highest accuracy.

[0015] Preferably, in step S5, the parameters of the deep neural network prediction model are optimized using the Tensorflow 2.0 software package, and the parameters are step size, number of training sets, number of layers, and number of nodes.

[0016] Preferably, in step S5, the number of step-size training times is 5000-30000 times, and the step-size interval is 5000; the number of training sets for each training is 150-300, without replacement, and the step-size interval is 50; each data is trained for more than 10 times, and the optimal accuracy, average accuracy, and average accuracy of the training set excluding 100% are scored, and the highest-ranked step-size training times and training set numbers are selected as the preferred parameters.

[0017] Preferably, in step S5, by judging and comparing the accuracy of layers 2-5 respectively, the best ranked layer is selected as the preferred number of layers; by training the number of nodes in the hidden layer of the deep neural network prediction model more than twice, scoring according to the optimal accuracy, average accuracy, and average accuracy of the training set excluding 100% and the optimal accuracy, average accuracy, and average accuracy of the validation set excluding 100%, the best ranked number of nodes is selected as the preferred parameter.

[0018] Preferably, the deep neural network prediction model is optimized using the preferred step size, number of training sets, number of layers, and number of nodes to obtain the final prediction model.

[0019] Preferably, the classification result is obtained after the test set of the second data set is input into the final prediction model.

[0020] In addition, the second object of the present invention is to provide a system for identifying tea varieties based on a deep neural network, wherein the system applies the tea variety identification method based on a deep neural network, and includes a data acquisition module, a data cleaning module, a prediction model construction module, a prediction model training module, and a prediction model optimization module, wherein:

[0021] The data collection module is used to collect tea sample data and form a first data set;

[0022] The data cleaning module preprocesses the first data set to obtain a second data set;

[0023] The prediction model construction module constructs three prediction models, namely linear regression, random forest and deep neural network, according to the second data set;

[0024] The prediction model training module trains the linear regression, random forest, and deep neural network prediction models respectively, and then selects the prediction model with the highest accuracy;

[0025] The prediction model optimization module uses the Tensorflow 2.0 software package to optimize the four parameters of the step size, number of training sets, number of layers, and number of nodes of the prediction model with the highest accuracy to form a final prediction model.

[0026] Compared with the prior art, the present invention has the following beneficial effects:

[0027] The present invention adopts three models to predict the tea variety data set, and selects the prediction model with the highest accuracy through training and comparison, and then optimizes the important parameters of the prediction model to form a final model, so as to obtain more reliable prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0029] Figure 1 Schematic diagram of the working process of this embodiment. DETAILED DESCRIPTION

[0030] The specific embodiments of the present invention are further described below in conjunction with the accompanying drawings. It should be noted that the description of these embodiments is used to help understand the present invention, but does not constitute a limitation of the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0031] This embodiment provides a method for identifying tea varieties based on a deep neural network (DNN), comprising the following steps:

[0032] S1, collecting tea sample data to obtain a first data set;

[0033] S2, preprocessing the first data set to obtain a second data set;

[0034] S3. Use the second data set to construct three prediction models: linear regression, random forest, and deep neural network;

[0035] S4, training the linear regression, random forest, and deep neural network prediction models respectively, and selecting the prediction model with the highest accuracy;

[0036] S5, optimizing the prediction model with the highest accuracy to form a final prediction model;

[0037] S6. Input the second data set into the final prediction model to obtain a classification result.

[0038] Taking a specific scheme as an example, first, the step S1 adopts the method of second-generation sequencing of genome-encoded RNA to obtain the first data set; the high-throughput sequencing data needs to be downloaded from the public data platform and decompressed to generate transcriptome sequencing data, which is used as the tea sample data, and then 2700 features to be selected are found therein, and the sequencing data and the features to be selected form the first data set.

[0039] It is additionally noted that the candidate feature refers to a short repeat sequence (simple sequence repeat, i.e., SSR) present in the genome, and obtaining the candidate feature from transcriptome sequencing data is a molecular marker method frequently used in species classification. In this embodiment, the public data platform preferably uses the SRA database (Sequence Read Archive, i.e., sequence read archive) of NCBI.

[0040] Secondly, in step S2, the data of 2700 candidate features need to be cleaned first. The specific method is to first use PSR software (polymorphic SSR retrieval) to identify all polymorphic sites in the tea tree, and then identify whether these sites exist in each individual, and filter out sites with a frequency of less than 20% in the population, or two molecular markers with less than 20 bases adjacent, or an overall deletion rate greater than 20%, and finally screen out molecular marker sites that only exist in 15 chromosomes. Next, select several test features from the cleaned candidate features in terms of specificity and difference. The specific method is to divide 370 varieties into four groups, label them to form a linear regression graph, and select more than 700 points with high correlation, and then use variance analysis to find points with large differences, and finally obtain 54 test features with large differences.

[0041] After obtaining more than 300 tea sample data and 54 test features according to the above operations, three prediction models, linear regression, random forest and deep neural network, were used to train the above two types of data respectively. After training, the one with the highest accuracy was selected as the preferred prediction model, and the preferred prediction model was further optimized to make the prediction effect of the high-accuracy model more reliable.

[0042] As described in step S4, this embodiment uses three models to train the data, namely, a linear regression prediction model (logestic regression), a random forest prediction model, and a deep neural prediction model (i.e., a DNN prediction model). After testing this embodiment, it is found that the accuracy of the linear regression prediction model is 72.5%, the accuracy of the random forest prediction model is 75%, and the accuracy of the deep neural network prediction model is better than the other two models, reaching 95%, so the deep neural model is selected for further optimization.

[0043] Specifically, the test method of the linear regression model is: divide the 370 samples into two parts, 80% of which are training data and 20% are validation data. The parameter setting uses C=1e-5, where 1 represents the mantissa, e represents the exponent sign, and -5 represents the exponent; other default parameters; train 80% of the tea sample data, and then test and validate the remaining 20%. The random forest model uses the grid search method (grid search) with different parameters: the number of estimators (200, 600, 1000, 4000), the maximum feature method (sqrt, log2, auto), the maximum depth (2, 4, 6, 8...40), the fitting standard (gini and entropy), and cross validation 5 times. The number of training sets for the deep neural network is 200, the number of training times is 5000, the number of hidden layers is 2, the first layer is 40, and the second layer is 80. In this embodiment, the prediction model is trained using a training set, the trained model is input into a test set to obtain a prediction result, and finally the prediction result is compared with the actual result to obtain the accuracy rate.

[0044] Next, step S5 optimizes the deep neural network prediction model with an accuracy of 95%, specifically using the Tensorflow 2.0 software package that comes with DNN to optimize the four parameters of the deep neural model, namely, the step size (i.e., step), the number of training sets (i.e., batch number), the number of layers, and the number of nodes. In this embodiment, the 370 samples are divided into three parts: training set, test set, and validation set, and the test ratios are 0.8, 0.1, and 0.1 respectively.

[0045] The number of training steps is generally 5000-30000 times, and the step interval is 5000; the number of training sets is the number of samples for each training from 370, and 30-370 are selected, without replacement, and the step interval is 50. Each data is done 10 times, and the optimal accuracy, average accuracy, and average accuracy of the training set with 100% removed are scored, and the highest ranked step training times and training set number are selected as the preferred parameters. In this embodiment, the parameters of 10000 step training times and 200 training sets are preferably used.

[0046] In addition, the step S5 also optimizes the number of hidden layers and the number of neural nodes in each layer to form an optimal combination, and selects the best ranked layer as the preferred number of layers by judging and comparing the accuracy of layers 2-5 respectively; the number of nodes in the hidden layer of the deep neural network prediction model is trained ten times each, and scored according to the optimal accuracy, average accuracy, and average accuracy of the training set with 100% removed, and the optimal accuracy, average accuracy, and average accuracy of the validation set with 100% removed, and the best ranked number of nodes is selected as the preferred parameter.

[0047] Furthermore, this embodiment optimizes the deep neural network prediction model using the preferred step size of 10,000, the number of training sets of 200, the number of layers of 2, and the number of nodes of 94 and 40, and finally obtains a deep neural network with an average accuracy of more than 95%.

[0048] Figure 1 This is a schematic diagram of the workflow of this embodiment, which can be used to explain the above data optimization process.

[0049] In addition, the second object of the present invention is to provide a system for applying the above-mentioned tea variety identification method based on deep neural network, the system includes a data acquisition module, a data cleaning module, a prediction model construction module, a prediction model training module, and a prediction model optimization module, wherein:

[0050] The data collection module is used to collect tea sample data and form a first data set;

[0051] The data cleaning module preprocesses the first data set to obtain a second data set;

[0052] The prediction model construction module constructs three prediction models, namely linear regression, random forest and deep neural network, according to the second data set;

[0053] The prediction model training module trains the linear regression, random forest, and deep neural network prediction models respectively, and then selects the prediction model with the highest accuracy;

[0054] The prediction model optimization module uses the Tensorflow 2.0 software package to optimize the four parameters of the step size, number of training sets, number of layers, and number of nodes of the prediction model with the highest accuracy to form a final prediction model.

[0055] Finally, the classification result can be obtained by inputting the test set of the second data set into the final prediction model. If there are other varieties that need to be predicted, the user can directly input the corresponding test feature information to obtain the classification result.

[0056] This embodiment uses three models to predict the tea variety data set, and selects the prediction model with the highest accuracy through training and comparison, and then optimizes the important parameters of the prediction model to form a final model, so as to obtain more reliable prediction accuracy.

[0057] The embodiments of the present invention are described in detail above with reference to the accompanying drawings, but the present invention is not limited to the described embodiments. For those skilled in the art, various changes, modifications, substitutions and variations of these embodiments are made without departing from the principles and spirit of the present invention, and still fall within the protection scope of the present invention.

Claims

1. A tea variety identification method based on deep neural network, characterized in that: The following steps are involved: S1, collecting tea sample data to obtain a first data set; S2, preprocessing the first data set to obtain a second data set; S3. Use the second data set to construct three prediction models: linear regression, random forest, and deep neural network; S4, training the linear regression, random forest, and deep neural network prediction models respectively, and selecting the prediction model with the highest accuracy; S5, optimizing the prediction model with the highest accuracy to form a final prediction model; S6, inputting the second data set into the final prediction model to obtain a classification result; The step S1 uses a genome-encoded RNA second-generation sequencing method to obtain the first data set; specifically, the high-throughput sequencing data is downloaded from a public data platform and the decompressed transcriptome sequencing data is used as the tea sample data, and then all short repetitive sequences are found in the tea sample data for molecular labeling as the selected features, and the tea sample data and the selected features together form the first data set; In step S2, sites with an occurrence frequency in the population lower than 20%, a distance between two molecular markers being less than 20 bases, and an overall deletion rate greater than 20% are selected from the selected features, and sites that meet one of the three aforementioned conditions are deleted, and finally molecular marker sites that meet the conditions are obtained, thereby cleaning and obtaining the second data set.

2. The tea variety identification method based on deep neural network according to claim 1 is characterized in that: The tea sample data is divided into a training set, a test set, and a validation set, with the ratios of the three being 0.8, 0.1, and 0.1, respectively. In step S4, the linear regression, random forest, and deep neural network prediction models are all trained on 80% of the tea sample data, and then the remaining 20% ​​is tested and verified, and it is concluded that the deep neural network prediction model has the highest accuracy.

3. The tea variety identification method based on deep neural network according to claim 1 is characterized in that: In step S5, the parameters of the deep neural network prediction model are optimized using the Tensorflow 2.0 software package, and the parameters are step size, number of training sets, number of layers, and number of nodes.

4. The tea variety identification method based on deep neural network according to claim 3 is characterized in that: In step S5, the number of step length training times is 5000-30000 times, and the step length interval is 5000; the number of training sets for each training is 30-370, without replacement, and the step length interval is 50; each data is trained for more than 10 times, and the optimal accuracy, average accuracy, and average accuracy of the training set with 100% removed, as well as the optimal accuracy, average accuracy, and average accuracy of the validation set with 100% removed are scored, and the highest ranked number of step length training times and number of training sets are selected as the preferred parameters.

5. The method for identifying tea varieties based on deep neural network according to claim 4, characterized in that: In step S5, by judging and comparing the accuracy of layers 2-5 respectively, the best ranked layer is selected as the preferred number of layers; by training the number of nodes in the hidden layer of the deep neural network prediction model more than twice, scoring according to the optimal accuracy, average accuracy, and average accuracy of the training set with 100% removed, and the optimal accuracy, average accuracy, and average accuracy of the validation set with 100% removed, the best ranked number of nodes is selected as the preferred parameter.

6. The tea variety identification method based on deep neural network according to claim 5 is characterized in that: The deep neural network prediction model is optimized using the optimal step size, number of training sets, number of layers, and number of nodes to obtain the final prediction model.

7. The method for identifying tea varieties based on deep neural network according to claim 1, characterized in that: The classification result is obtained by inputting the test set of the second data set into the final prediction model.

8. A system for identifying tea varieties based on deep neural networks, characterized in that: The system is applied to the tea variety identification method based on deep neural network according to any one of claims 1 to 7, comprising a data acquisition module, a data cleaning module, a prediction model construction module, a prediction model training module, and a prediction model optimization module, wherein: The data collection module is used to collect tea sample data and form a first data set; the data cleaning module pre-processes the first data set to obtain a second data set; The prediction model construction module constructs three prediction models, namely, linear regression, random forest, and deep neural network, according to the second data set; The prediction model training module trains the linear regression, random forest, and deep neural network prediction models respectively, and then selects the prediction model with the highest accuracy; The prediction model optimization module uses the Tensorflow 2.0 software package to optimize the four parameters of the step size, number of training sets, number of layers, and number of nodes of the prediction model with the highest accuracy to form a final prediction model.