Tea quality evaluation method based on climate data
Through the tea quality assessment method based on climate data, the tea quality is predicted using regression model and ARIMA model, which solves the problems of inaccurate and high cost of tea quality assessment in the existing technology, and achieves more efficient and accurate tea quality monitoring.
Patent Information
- Application Number
- CN202411748555.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-03-21
AI Technical Summary
The prior art is difficult to effectively use climate data to evaluate tea quality, resulting in high cost of monitoring tea quality and inaccurate evaluation.
The tea quality assessment method based on climate data is adopted, and the final tea quality prediction value is obtained by collecting tea garden climate data, multiple window features are extracted, and the trained regression model and ARIMA model are used for prediction.
It reduces the cost of tea quality monitoring, improves the confidence of tea nutrient prediction values and the accuracy of quality evaluation, and supports the layout adjustment of different tea tree planting areas and the optimization of tea preparation and processing technology.
Smart Images

Figure CN119671380A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of tea quality assessment, and in particular to a tea quality assessment method based on climate data. Background Art
[0002] China has a long history of tea culture and is a major tea planting, production and consumption country. The quality of tea raw materials determines the quality of finished tea. Currently, the material content of fresh tea is mainly measured by chemical methods, electronic noses and / or spectroscopy. The quality of tea is not only related to the tea variety, the level of tea garden management and tea production and processing, but also affected by the overall ecological environment around the tea trees and the picking time. Environmental factors related to the overall ecological environment of the tea garden include ambient temperature, ambient humidity, precipitation, sunshine, soil temperature, soil moisture, pH and organic matter content.
[0003] Tea tree is a shade-loving plant. Studies have shown that shading measures can reduce the light intensity and leaf temperature on the crown to a certain extent, increase the relative humidity of the air and soil, thereby improving the microenvironment for tea tree growth, which is conducive to the accumulation of amino acids in tea leaves, reducing the content of tea polyphenols and the phenol-ammonia ratio, increasing the chlorophyll content, reducing bitterness, and improving the taste of tea.
[0004] Tea trees also require a large amount of water during their growth and development. The distribution of rainfall and rainfall seasons affects the growth of tea trees and the quality of tea leaves. When rainfall is low and the water content in the soil is low, tea trees grow slowly, resulting in thick and rough tea leaves and a large number of clamped leaves. When rainfall is too high, the tea tree roots lack oxygen, causing the stomata of the leaves to close, and the transport of photosynthetic products to be blocked, resulting in reduced activity of photosynthesis-related enzymes, resulting in reduced chlorophyll synthesis in tea leaves, and reduced tea quality. Tea trees prefer acidic soils, and the growth of tea trees and the accumulation of metabolites are closely related to the soil environment.
[0005] Therefore, it is feasible to explore the use of climate data before tea bud picking to establish a tea polyphenol, amino acid, and caffeine content estimation model for tea, and then comprehensively evaluate the quality of tea. This can reduce the cost of monitoring tea quality, and provide a scientific basis for the layout adjustment of different tea planting areas, rapid analysis and evaluation of tea quality, and tea preparation and processing technology. Summary of the invention
[0006] In order to overcome the problems existing in the related art, the purpose of the present invention is to provide a tea quality assessment method based on climate data, which can reduce the monitoring cost of tea quality, and provide a scientific basis for the layout adjustment of different tea tree planting areas, rapid analysis and assessment of tea quality, tea preparation and processing technology. The present invention combines a trained regression model such as an SVR model and an ARIMA model to accurately calculate the final prediction value of tea corresponding to the climate data. The final prediction value depends on the time series, reflecting the change of the final prediction value of tea nutrients within a continuous time range, thereby improving the confidence of the final prediction value of tea nutrients and the confidence of tea quality determined according to the final prediction value.
[0007] A tea quality assessment method based on climate data, comprising:
[0008] Collecting climate data of the tea garden, performing multiple window feature extraction on the climate data, and obtaining multiple window features;
[0009] Inputting the plurality of window features into a trained regression model for prediction to obtain a preliminary prediction value;
[0010] According to the preliminary prediction value, an ARIMA model is used to perform dynamic fitting to obtain a residual value;
[0011] Adding the preliminary prediction value and the residual value to obtain a final prediction value;
[0012] The tea quality corresponding to the climate data is determined according to the final predicted value.
[0013] In a preferred technical solution of the present invention, the step of extracting multiple window features from the climate data to obtain multiple window features includes:
[0014] Define multiple time windows;
[0015] Features are extracted from the climate data corresponding to each of the time windows to obtain a plurality of window features.
[0016] In a preferred technical solution of the present invention, the feature extraction from the climate data corresponding to each time window to obtain multiple window features includes:
[0017] Traversing all the time windows;
[0018] Calculating the mean and standard deviation of the climate variable within each of said time windows;
[0019] Based on the mean and the standard deviation, the climate data corresponding to each time window is normalized to obtain a plurality of window features; wherein the window features are represented in the form of a matrix.
[0020] In a preferred technical solution of the present invention, before inputting the plurality of window features into a trained regression model for prediction and obtaining a preliminary prediction value, the method further comprises:
[0021] Construct loss function;
[0022] The regression model to be trained is trained according to the loss function to obtain a trained regression model.
[0023] In a preferred technical solution of the present invention, the construction of the loss function includes:
[0024] The loss function is constructed according to the following formula:
[0025]
[0026] Among them, w is the weight vector, ξ i is the ith positive slack variable, is the i-th negative slack variable, C is the penalty coefficient, α is the first hyperparameter, N is the total number of positive slack variables, L(w,ξ,ξ',β) is the loss function, β j is the weight of the jth kernel function.
[0027] In a preferred technical solution of the present invention, before constructing the loss function according to the following formula, it also includes:
[0028] The multi-core function is constructed using the following formula:
[0029]
[0030] Among them, K j (x,x') is the jth kernel function, K final (x, x') is the multi-kernel function, M is the total number of kernel functions, x p is the p-th window feature, x q is the qth window feature.
[0031] In a preferred technical solution of the present invention, the dynamic fitting using the ARIMA model according to the preliminary predicted value to obtain the residual value includes:
[0032] The residual value is dynamically fitted using the following formula:
[0033]
[0034] Among them, y t-k represents the actual observation value at time tk, Φ k represents the kth observation coefficient; ε t-h represents the th noise, θ h represents the hth noise coefficient, εt represents the tth noise; p represents the number of actual observations, q represents the number of noises, r t Represents the residual value at time t; wherein all the observation coefficients and all the noise coefficients are determined by the preliminary prediction value.
[0035] In a preferred technical solution of the present invention, the collection of climate data of the tea garden includes using sensors to collect the ambient temperature, ambient humidity, soil temperature, soil humidity and sunshine intensity of the tea garden.
[0036] In a preferred technical solution of the present invention, the step of determining the tea quality corresponding to the climate data according to the final prediction value includes:
[0037] Screening out the predicted content of tea polyphenols and the predicted content of amino acids from the final predicted values;
[0038] Detecting whether the predicted content of tea polyphenols is greater than or equal to a tea polyphenol threshold, and if so, detecting whether the predicted content of amino acids is greater than or equal to an amino acid threshold;
[0039] If the predicted amino acid content is greater than or equal to the amino acid threshold, the tea quality corresponding to the climate data is determined to be of the first quality category;
[0040] If the predicted tea polyphenol content is less than the tea polyphenol threshold, and the predicted amino acid content is less than the amino acid threshold, it is determined that the tea quality corresponding to the climate data is the second quality category.
[0041] In a preferred technical solution of the present invention, after determining the tea quality corresponding to the climate data according to the final prediction value, the method further includes:
[0042] The prediction performance of the trained regression model and the ARIMA model is evaluated according to the following formula:
[0043]
[0044] Among them, R 2 is the coefficient of determination, S is the total number of samples, y' c is the cth final prediction value, is the cth actual observation value, is the average value of the final prediction values.
[0045] The beneficial effects of the present invention are:
[0046] The tea quality assessment method based on climate data provided by the present invention includes collecting climate data of a tea garden, extracting multiple window features from the climate data, and obtaining multiple window features. The multiple window features conform to the temporal sequence and have temporal correlation. The multiple window features are input into a trained regression model for prediction to obtain a preliminary prediction value. The trained regression model fits a hyperplane for the input multiple window features, and the distance between the hyperplane and the farthest data point is the smallest, so that the hyperplane is used to predict the data. Only the trained regression model is used to predict the multiple window features, and there is an error between the obtained preliminary prediction value and the actual observation value. Therefore, the present invention uses the ARIMA model for dynamic fitting according to the preliminary prediction value to obtain a residual value. The preliminary prediction value and the residual value are added to compensate for the preliminary prediction value, so that the final prediction value is closer to the actual observation value. The final prediction value includes the tea polyphenol content and the amino acid content of the tea, and the tea quality corresponding to the climate data is determined according to the final prediction value. The present invention combines trained regression models such as the SVR model and the ARIMA model to accurately calculate the final prediction value of tea corresponding to the climate data. The final prediction value depends on the time series and reflects the changes in the final prediction value of the tea nutrients within a continuous time range, thereby improving the confidence of the final prediction value of the tea nutrients and the confidence of the tea quality determined according to the final prediction value. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 is a flow chart of the tea quality assessment method based on climate data of the present invention;
[0048] Figure 2 is a flow chart of extracting features from climate data corresponding to each time window of the present invention;
[0049] Figure 3 is a diagram showing the prediction results of the tea polyphenols content of the present invention;
[0050] Figure 4 It is a prediction result diagram of the amino acid content of the present invention. DETAILED DESCRIPTION
[0051] The preferred embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the preferred embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to make the present invention more thorough and complete, and to fully convey the scope of the present invention to those skilled in the art.
[0052] Example 1
[0053] like Figure 1As shown, this embodiment provides a tea quality assessment method based on climate data, comprising:
[0054] S1: collecting climate data of the tea garden, performing multiple window feature extraction on the climate data, and obtaining multiple window features.
[0055] S2: Input the multiple window features into the trained regression model for prediction to obtain preliminary prediction values.
[0056] S3: Dynamically fit the ARIMA model according to the preliminary prediction value to obtain a residual value.
[0057] S4: Add the preliminary prediction value and the residual value to obtain a final prediction value.
[0058] S5: Determine the tea quality corresponding to the climate data according to the final prediction value.
[0059] The climate data of the tea garden include ambient temperature, ambient humidity, soil temperature, soil moisture, sunshine, precipitation, pH and organic matter content.
[0060] The extracting of multiple window features from the climate data to obtain multiple window features includes:
[0061] S12: Define multiple time windows.
[0062] S13: Extracting features from the climate data corresponding to each of the time windows to obtain a plurality of window features.
[0063] Before step S12, the method further includes step S11: collecting climate data of the tea garden.
[0064] Use multiple sensors such as temperature sensors and humidity sensors to collect 15 days of tea garden climate data. Each day is a time window. Extract the window features of each day to obtain 15 window features. Since the collected data fluctuates, in order to eliminate the influence of random factors and obtain more stable window features, it is necessary to preprocess the data.
[0065] like Figure 2 As shown, the feature is extracted from the climate data corresponding to each time window to obtain multiple window features, including:
[0066] S131: traverse all the time windows.
[0067] S132: Calculate the mean and standard deviation of the climate variables in each of the time windows.
[0068] S133: Based on the mean and the standard deviation, normalize the climate data corresponding to each of the time windows to obtain a plurality of window features; wherein the window features are represented in the form of a matrix.
[0069] Traverse from the 1st time window to the 15th time window, each time window corresponds to one day, for example, the 1st time window corresponds to the 1st day, the 2nd time window corresponds to the 2nd day, and the 15th time window corresponds to the 15th day. Calculate the mean and standard deviation of the climate data in each time window, and normalize the climate data according to the following formula:
[0070]
[0071]
[0072]
[0073] in, is the window feature of the t-th time window after normalization, x t is the climate data of the tth time window, specifically referring to a climate-related parameter such as ambient temperature, ambient humidity, sunshine and precipitation, pH or organic matter content, u x is the mean of climate data, σ x is the standard deviation of the climate data, time is the time in the tth time window, tmax is the maximum time in the tth time window, time is less than tmax, for example, time is 1 hour or 8 hours, x time is the climate data at time time in the t-th time window, It is the accumulated data from time 0 to tmax in the tth time window, and tmax is set to 24 hours, that is, the climate data after accumulation on the tth day, where 1≤t≤15.
[0074] Based on the mean and standard deviation of climate data, the climate data is normalized to eliminate the dimensional differences between climate variables and ensure data consistency. After calculating multiple window features, different window features are stored in chronological order. By traversing multiple time windows, rich characteristic information of climate variables can be extracted, and the window features are stored in the form of a matrix. Multiple window features are input into the regression model to be trained, and the regression model to be trained can be trained. Multiple window features are input into the trained regression model to predict the quality of tea.
[0075] The adding of the preliminary prediction value and the residual value to obtain a final prediction value comprises:
[0076] The final prediction value is calculated according to the following formula:
[0077]
[0078] in, is the final predicted value, is the preliminary prediction value, r t is the residual value.
[0079] The tea quality assessment method based on climate data provided in this embodiment includes collecting climate data of a tea garden, extracting multiple window features from the climate data, and obtaining multiple window features. The multiple window features conform to the temporal sequence and have temporal correlation. The multiple window features are input into a trained regression model for prediction to obtain a preliminary prediction value. The trained regression model fits a hyperplane for the multiple window features input, and the distance between the hyperplane and the farthest data point is the smallest, so that the hyperplane is used to predict the data. Only the trained regression model is used to predict the multiple window features, and there is an error between the obtained preliminary prediction value and the actual observation value. Therefore, the present invention uses the ARIMA model for dynamic fitting according to the preliminary prediction value to obtain a residual value. The preliminary prediction value and the residual value are added to compensate for the preliminary prediction value, so that the final prediction value is closer to the actual observation value. The final prediction value includes the tea polyphenol content and the amino acid content of the tea, and the tea quality corresponding to the climate data is determined according to the final prediction value. The present invention combines trained regression models such as the SVR model and the ARIMA model to accurately calculate the final prediction value of tea corresponding to the climate data. The final prediction value depends on the time series and reflects the changes in the final prediction value of the tea nutrients within a continuous time range, thereby improving the confidence of the final prediction value of the tea nutrients and the confidence of the tea quality determined according to the final prediction value.
[0080] Example 2
[0081] This embodiment provides a tea quality assessment method based on climate data. This embodiment only describes the differences from Embodiment 1. Before inputting the plurality of window features into a trained regression model for prediction and obtaining a preliminary prediction value, the method further includes:
[0082] S11': Construct loss function.
[0083] S12': Train the regression model to be trained according to the loss function to obtain a trained regression model.
[0084] Steps S11'-S12' and S11-S13 are parallel steps. Steps S11'-S12' may be performed first, and then steps S11-S13, or steps S11'-S12' and S11-S13 may be performed simultaneously, which is not limited here.
[0085] The constructing loss function comprises:
[0086] The loss function is constructed according to the following formula:
[0087]
[0088] Among them, w is the weight vector, ξ i is the ith positive slack variable, is the i-th negative slack variable, C is the penalty coefficient, α is the first hyperparameter, N is the total number of positive slack variables, L(w,ξ,ξ',β) is the loss function, β j is the weight of the jth kernel function.
[0089] The first hyperparameter α is used to control the regularization strength of the kernel weight, which can avoid overfitting of the model due to excessive weight of a kernel function. The trained regression model of the present invention adopts the SVR (Support Vector Regression) model. The SVR model sets interval bands on both sides of the linear function, i.e., the hyperplane. All data points falling within the interval bands are not included in the loss function. Only data points outside the interval bands are included in the loss function. Since the SVR model needs to abandon some points located in the edge area to minimize the interval band, a positive relaxation variable ξ is introduced. i and negative slack variables Positive slack variables are used to measure the upper edge of the hyperplane, that is, the distance between the point above the hyperplane and the point farthest from the hyperplane. Negative slack variables are used to measure the lower edge of the hyperplane, that is, the distance between the point below the hyperplane and the point farthest from the hyperplane. The penalty coefficient C is used to adjust the positive and negative slack variables to prevent the sum of N positive slack variables and N negative slack variables from being too large or too small.
[0090] The weight vector w is related to the slope of the hyperplane. The larger the absolute value of the weight vector w, the larger the slope of the hyperplane.
[0091] Before constructing the loss function according to the following formula, it also includes:
[0092] The multi-core function is constructed using the following formula:
[0093]
[0094] Among them, K j (x,x') is the jth kernel function, K final (x, x') is the multi-kernel function, M is the total number of kernel functions, x p is the p-th window feature, x q is the qth window feature.
[0095] The M kernel functions of the present invention all use linear kernel functions, for example, M=3, and weighted summation is performed on the three linear kernel functions to obtain a multi-kernel function. The present invention uses multiple linear kernel functions to measure the correlation between different window features from different angles, and the pth window feature x belonging to the same time series is p and the qth window feature x q The weights of multiple kernel functions are added to the loss function of the regression model to be trained, and the constraints on the correlation of time series are increased during the training process, so as to better capture the temporal dynamic changes and nonlinear relationships in climate data, and effectively improve the prediction accuracy of tea nutrients such as tea polyphenols and amino acids.
[0096] After determining the tea quality corresponding to the climate data according to the final prediction value, the method further includes:
[0097] The prediction performance of the trained regression model and the ARIMA model is evaluated according to the following formula:
[0098]
[0099] Among them, R 2 is the coefficient of determination, S is the total number of samples, y' c is the cth final prediction value, is the cth actual observation value, is the average value of the final prediction values.
[0100] Coefficient of determination R 2 It represents the relationship between a random variable and multiple random variables, and can reflect the reliability of the dependent variable changes of the trained regression model. 2 If the value of is small, adjust the size of the time window, the parameters of the kernel function of the SVR model, and the order of the ARIMA model.
[0101] The regression model to be trained in this embodiment adopts an SVR model, and the loss function of the SVR model consists of three parts, the first part is a weight vector, the second part is a plurality of positive slack variables and a plurality of negative slack variables, and the third part is the sum of squares of weights of M kernel functions. In the process of training the regression model to be trained, the width of the interval band of the hyperplane of the SVR model is gradually reduced, the slope of the hyperplane and the weight of the kernel function are continuously adjusted, and the value of the loss function is continuously reduced, thereby preventing the overfitting and underfitting of the trained regression model, and the temporal correlation of the climate data corresponding to different time windows.
[0102] Example 3
[0103] This embodiment provides a tea quality assessment method based on climate data. This embodiment only describes the differences from Embodiment 1. The ARIMA model is used to dynamically fit the preliminary predicted value to obtain the residual value, including:
[0104] The residual value is dynamically fitted using the following formula:
[0105]
[0106] Among them, y t-k represents the actual observation value at time tk, Φ k represents the kth observation coefficient; ε t-h represents the th noise, θ h represents the hth noise coefficient, ε t represents the tth noise; p represents the number of actual observations, q represents the number of noises, r t Represents the residual value at time t; wherein all the observation coefficients and all the noise coefficients are determined by the preliminary prediction value.
[0107] The trained regression model uses the SVR model. Although the SVR model can effectively handle nonlinear relationships, it cannot capture the autocorrelation in the time series. Therefore, the ARIMA model is used to perform dynamic regression analysis on the initial forecast value of the SVR model to obtain the residual value. The residual value is used to compensate the initial forecast value to obtain the final forecast value.
[0108] The dynamic fitting of the ARIMA model is divided into two processes. The first dynamic fitting process is to collect the actual observations from the 1st to the 15th day during the training of the regression model to be trained, and input the window features corresponding to the climate data of each day for 15 consecutive days into the regression model to be trained, and output 15 preliminary prediction values. Subtract the corresponding preliminary prediction values from the actual observations from the 1st to the 15th day to obtain 15 residual values. The ARIMA model is used to fit the 1st to the 15th residual values in turn, and the parameters of the ARIMA model are continuously adjusted during the 15 fitting processes. After the 15th fitting process is completed, the parameters of the ARIMA model are determined.
[0109] The second dynamic fitting process is to wait for the training regression model to be trained and obtain the trained regression model, then input the window features of the 16th day into the trained regression model to obtain the preliminary forecast value of the 16th day. Input the actual observation values corresponding to some time windows, such as the actual observation values from the 10th to the 15th day, and the noise into the ARIMA model to fit the residual value of the 16th day. Add the preliminary forecast value of the 16th day and the residual value of the 16th day to obtain the final forecast value of the 16th day. The difference between the final forecast value of the 16th day and the actual observation value of the 16th day is small, so the final forecast value of the 16th day can be used as the actual observation value of the 16th day.
[0110] The final prediction value is calculated according to the following formula:
[0111]
[0112] in, is the final predicted value, is the preliminary prediction value, r t is the residual value.
[0113] The ARIMA model is used to model the time dependence of the predicted residual values, thereby improving the overall prediction accuracy. The dual modeling approach effectively improves the prediction ability of tea quality.
[0114] Determining the tea quality corresponding to the climate data according to the final prediction value includes:
[0115] S51: Screening out the predicted content of tea polyphenols and the predicted content of amino acids from the final predicted values.
[0116] S52: Detect whether the predicted content of tea polyphenols is greater than or equal to a tea polyphenol threshold value, and if so, detect whether the predicted content of amino acids is greater than or equal to an amino acid threshold value.
[0117] S53: If the predicted amino acid content is greater than or equal to the amino acid threshold, it is determined that the tea quality corresponding to the climate data is of the first quality category.
[0118] S54: If the predicted tea polyphenol content is less than the tea polyphenol threshold, and the predicted amino acid content is less than the amino acid threshold, it is determined that the tea quality corresponding to the climate data is the second quality category.
[0119] Tea polyphenols is the general name for catechins, acetones, phenolic acids and anthocyanins in tea. It is one of the main components that form the color, aroma and taste of tea. Tea polyphenols have certain effects in inhibiting cardiovascular and cerebrovascular diseases and delaying aging. Tea contains a variety of amino acids, which make the flavor of tea diverse.
[0120] The higher the content of tea polyphenols and amino acids in tea leaves, the better. If the predicted content of tea polyphenols is greater than or equal to the tea polyphenol threshold, and the predicted content of amino acids is less than the amino acid threshold, the tea quality corresponding to the climate data is determined to be the third-class quality. If the predicted content of tea polyphenols is less than the tea polyphenol threshold, and the predicted content of amino acids is greater than or equal to the amino acid threshold, the tea quality corresponding to the climate data is determined to be the fourth-class quality. Arrange the tea quality from high to low, the first-class quality> the third-class quality= the fourth-class quality> the second-class quality.
[0121] Figure 3 is a diagram showing the predicted results of the tea polyphenols content of the present invention, Figure 4 It is a prediction result diagram of the amino acid content of the present invention. Figure 3 The straight line in is the final predicted value of tea polyphenols in tea leaves fitted by the present invention combining the SVR model and the ARIMA model. Figure 3 The data points in are the actual measured values of tea polyphenols in tea leaves. Figure 4 The straight line in is the final predicted value of amino acids in tea leaves fitted by the present invention combining the SVR model and the ARIMA model. Figure 4 The data points in are the actual measured values of amino acids in tea leaves.
[0122] In this embodiment, the tea quality corresponding to the climate data is determined according to the final predicted value, including selecting the predicted content of tea polyphenols and the predicted content of amino acids from the final predicted value, detecting whether the predicted content of tea polyphenols is greater than or equal to the tea polyphenol threshold, and if so, detecting whether the predicted content of amino acids is greater than or equal to the amino acid threshold. If the predicted content of amino acids is greater than or equal to the amino acid threshold, the tea quality corresponding to the climate data is determined to be the first type of quality. If the predicted content of tea polyphenols is less than the tea polyphenol threshold, and the predicted content of amino acids is less than the amino acid threshold, the tea quality corresponding to the climate data is determined to be the second type of quality. After the present invention calculates the final predicted values of different components in tea leaves, the difference between the final predicted value and the true value of each component is small, and the final predicted value of each component can be used as the true value, so that there is no need to use multiple chemical detection processes to detect the content of different components in tea leaves. In addition, the content of different components in tea leaves changes over time. If tea leaves are continuously collected and component detection is performed, the tea leaves in the tea garden will be destroyed. The present invention calculates the final predicted values of different components of tea leaves, and then comprehensively determines the quality of the tea leaves based on the final predicted values of the multiple components of the tea leaves. It has a strong time correlation and can reflect the changes in tea leaves components in the same tea garden after experiencing different climate changes without causing damage to the tea leaves in the tea garden.
[0123] Example 4
[0124] A computer device is also provided in an embodiment of the present application, which may be a server, wherein the computer device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the computer design is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal via a network connection.
[0125] This embodiment also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method for evaluating tea quality based on climate data described in any one of Embodiments 1 to 3 is implemented. It can be understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.
[0126] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.
[0127] The above description is only a preferred embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for evaluating tea quality based on climate data, characterized in that: include: Collecting climate data of the tea garden, performing multiple window feature extraction on the climate data, and obtaining multiple window features; Inputting the plurality of window features into a trained regression model for prediction to obtain a preliminary prediction value; According to the preliminary prediction value, an ARIMA model is used to perform dynamic fitting to obtain a residual value; Adding the preliminary prediction value and the residual value to obtain a final prediction value; The tea quality corresponding to the climate data is determined according to the final predicted value.
2. The tea quality assessment method based on climate data according to claim 1, characterized in that: The extracting of multiple window features from the climate data to obtain multiple window features includes: Define multiple time windows; Features are extracted from the climate data corresponding to each of the time windows to obtain a plurality of window features.
3. The tea quality assessment method based on climate data according to claim 2, characterized in that: The extracting of features from the climate data corresponding to each of the time windows to obtain a plurality of window features includes: Traversing all the time windows; Calculating the mean and standard deviation of the climate variable within each of said time windows; Based on the mean and the standard deviation, the climate data corresponding to each time window is normalized to obtain a plurality of window features; wherein the window features are represented in the form of a matrix.
4. The tea quality assessment method based on climate data according to claim 1, characterized in that: Before inputting the plurality of window features into the trained regression model for prediction to obtain a preliminary prediction value, the method further includes: Construct loss function; The regression model to be trained is trained according to the loss function to obtain a trained regression model.
5. The tea quality assessment method based on climate data according to claim 4, characterized in that: The constructing loss function comprises: The loss function is constructed according to the following formula: Among them, w is the weight vector, ξ i is the ith positive slack variable, is the i-th negative slack variable, C is the penalty coefficient, α is the first hyperparameter, N is the total number of positive slack variables, L(w,ξ,ξ',β) is the loss function, β j is the weight of the jth kernel function.
6. The tea quality assessment method based on climate data according to claim 5, characterized in that: Before constructing the loss function according to the following formula, it also includes: The multi-core function is constructed using the following formula: Among them, K j (x,x') is the jth kernel function, K final (x, x') is the multi-kernel function, M is the total number of kernel functions, x p is the p-th window feature, x q is the qth window feature.
7. The tea quality assessment method based on climate data according to claim 1, characterized in that: The dynamically fitting using the ARIMA model according to the preliminary predicted value to obtain the residual value includes: The residual value is dynamically fitted using the following formula: Among them, y t-k represents the actual observation value at time tk, Φ k represents the kth observation coefficient; ε t-h represents the th noise, θ h represents the hth noise coefficient, ε t represents the tth noise; p represents the number of actual observations, q represents the number of noises, r t Represents the residual value at time t; wherein all the observation coefficients and all the noise coefficients are determined by the preliminary prediction value.
8. The tea quality assessment method based on climate data according to claim 1, characterized in that: The collecting of climate data of the tea garden includes using sensors to collect the ambient temperature, ambient humidity, soil temperature, soil humidity and sunshine intensity of the tea garden.
9. The tea quality assessment method based on climate data according to claim 1, characterized in that: Determining the tea quality corresponding to the climate data according to the final prediction value includes: Screening out the predicted content of tea polyphenols and the predicted content of amino acids from the final predicted values; Detecting whether the predicted content of tea polyphenols is greater than or equal to a tea polyphenol threshold, and if so, detecting whether the predicted content of amino acids is greater than or equal to an amino acid threshold; If the predicted amino acid content is greater than or equal to the amino acid threshold, the tea quality corresponding to the climate data is determined to be of the first quality category; If the predicted tea polyphenol content is less than the tea polyphenol threshold, and the predicted amino acid content is less than the amino acid threshold, it is determined that the tea quality corresponding to the climate data is the second quality category.
10. The tea quality assessment method based on climate data according to claim 7, characterized in that: After determining the tea quality corresponding to the climate data according to the final prediction value, the method further includes: The prediction performance of the trained regression model and the ARIMA model is evaluated according to the following formula: Among them, R 2 is the coefficient of determination, S is the total number of samples, y' c is the cth final prediction value, is the cth actual observation value, is the average value of the final prediction values.