A tea seed stir-frying endpoint judgment method
By combining near-infrared spectroscopy and colorimetry with Fisher linear discriminant analysis, the inaccuracy in determining the end point of tea seed roasting was solved, enabling rapid and accurate determination of the degree of tea seed roasting and ensuring quality stability.
Patent Information
- Application Number
- CN202611361170.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-03
- Publication Date
- 2026-11-24
AI Technical Summary
In existing technologies, the determination of the end point of tea seed roasting relies on the operator's experience, resulting in large differences in tea seed flavor and unstable oil quality.
The moisture content of tea seed powder was detected by near-infrared spectroscopy, and the brightness and color were measured by colorimeter. The degree of roasting was judged by Fisher linear discriminant analysis, and a unified discrimination standard was established.
It enables rapid and accurate determination of the roasting degree of tea seeds, eliminates the interference of human operation factors, and ensures the stability of the roasting process and the consistency of tea oil quality.
Smart Images

Figure CN123155442A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of tea seed roasting technology, and in particular to a method for determining the endpoint of tea seed roasting based on a data model. Background Technology
[0002] Aroma camellia oil is favored by consumers for its unique fragrance and nutritional value. Currently, aroma camellia oil is mainly produced and processed using two methods: roasted seed-screw pressing and hot steam-hydraulic pressing. In the roasted seed-screw pressing process, the roasting process is the core step that determines the flavor of the finished camellia oil; the degree of roasting directly affects the final oil's flavor and quality. If the camellia seeds are under-roasted, the finished oil will have a weak aroma and a low oil yield; if the roasting time is too long, the camellia seeds are prone to developing a burnt odor, ruining the oil's flavor and also promoting the formation of harmful substances such as benzo[a]pyrene, posing a food safety risk.
[0003] Currently, the industry relies entirely on the operator's experience to determine the end point of tea seed roasting. This means that the operator judges the changes in color, aroma, and texture of the tea seed kernels by crushing them, and then uses their personal experience to determine the end point of roasting. This results in differences in the flavor of tea seeds between batches, and makes it difficult to guarantee the stability of the oil quality.
[0004] In view of this, a new technical solution is needed to solve the above-mentioned technical problems. Summary of the Invention
[0005] The purpose of this invention is to provide a method for rapidly detecting the moisture and color changes of tea seed kernel powder using near-infrared spectroscopy, colorimeter and other equipment, and combining it with Fisher linear discriminant analysis to determine whether the tea seeds have reached the optimal roasting state. Compared with the traditional method that relies on human experience for judgment, this invention makes the standard for judging the degree of tea seed roasting more unified and the results more accurate.
[0006] To achieve the above objectives, the present invention employs the following technical means: A method for determining the endpoint of tea seed roasting includes the following steps: Step 1, Sample Preparation: Take the roasted tea seeds, remove the shells and skins to obtain tea seed kernels; crush and sieve to obtain tea seed powder samples; Step 2, Moisture content detection: The moisture content of the tea seed powder sample obtained in Step 1 is determined by using a near-infrared spectrometer. Step 3, Color Detection: Use a colorimeter to detect the tea seed powder sample obtained in Step 1, and obtain color information including brightness L, red-green hue a, and yellow-blue hue b; Step 4, Comprehensive Judgment: Fisher linear discriminant analysis is performed on the moisture content obtained in Step 2 and the color information obtained in Step 3 to determine whether the degree of stir-frying meets the standard.
[0007] As a further improvement, the sample preparation step also includes: Tea seeds were selected from different points at the top, middle, and bottom of the roasted tea seeds; And / or, select tea seeds according to different sizes of tea seed particles.
[0008] As a further improvement, the color detection step also includes: The tea seed powder was placed in a box, compacted, covered with a transparent glass plate, and then the color was measured.
[0009] As a further improvement, the following steps are also included: Measure at several different locations on the transparent glass slide, and then take the average value to obtain color information.
[0010] As a further improvement, an oil stain removal step is included before the color detection.
[0011] As a further improvement, the step of pulverizing tea seed kernels includes the following steps: The method of multiple interval crushing is adopted, with each crushing time not exceeding 6 seconds and the interval time not less than 5 seconds, and the crushing is performed 2 to 3 times.
[0012] As a further improvement, the stir-frying results include three levels: slightly undercooked, moderately cooked, and slightly burnt.
[0013] As a further improvement, the Fisher linear discriminant analysis specifically includes the following steps: Data processing: Take a certain number of standard samples, each of which contains 4 features: brightness L, red-green hue a, yellow-blue hue b, and moisture content %. Divide all standard samples into three categories: slightly raw, moderate, and slightly blurry. Modeling: All standard samples are divided into training and test sets in a 2:1 ratio to ensure that the proportions of each class are the same. Then, the LDA model is trained to obtain the linear discriminant coefficient and the interpretable variance ratio of the data projected onto the two-dimensional plane, as well as the centroid coordinates of the three classes in the two-dimensional plane. Test: After calculating LD1 and LD2 for the new sample, the coordinates (LD1, LD2) of the new sample in the two-dimensional plane are obtained. The results are then determined based on the principle of proximity to the centroid of each category. LD1 and LD2 are calculated using the following formula: LD1 = A1L + A2a + A3b + A4 water content; LD2 = B1L + B2a + B3b + B4 (water content); A1, A2, A3, A4; B1, B2, B3, B4 are the linear discriminant coefficients given by the LDA model based on standard data.
[0014] As a further improvement, data standardization is also included, with the following standardization formula: .
[0015] As a further improvement, the following steps are included before the test steps: Model credibility assessment: The model credibility is determined by using a confusion matrix to assess the test set data. Only models with a credibility of 90% or higher are usable; otherwise, standard samples are selected again.
[0016] Compared with existing technologies, the present invention brings the following technical effects: This invention can quickly and accurately detect the moisture content and color changes of tea seeds after roasting. By simply entering the measured data into the tea seed roasting model database, the current roasting status can be determined in real time. This establishes a unified roasting evaluation standard, which can effectively eliminate interference from factors such as tea seed variety, raw material quality, and manual operation, and ensure the stability of the roasting process. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 The figure shows the scatter plot of LD1-LD2 samples after 90 standard samples were input into the LDA model in a preferred embodiment of the present invention. As can be seen from the figure, the three types of cooking results are clustered and separated from each other. Detailed Implementation
[0019] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0020] This invention provides a method for determining the endpoint of tea seed roasting, comprising the following steps: S100 Sample preparation: Take the roasted tea seeds, remove the shells and skins to obtain tea seed kernels; crush and sieve to obtain tea seed powder samples.
[0021] Tea seeds are roasted with their shells on. During this process, the color of the seed shell and inner skin does not change significantly and cannot indicate the degree of roasting. Only the color change of the seed kernel can significantly reflect the degree of roasting. Therefore, when preparing samples, it is necessary to eliminate the influence of the color of the shell and skin itself.
[0022] Furthermore, due to variations in the size and plumpness of tea seed kernels, the color of the same batch of tea seed kernels varies considerably. Specifically, under the same roasting conditions, smaller tea seeds are more prone to burning, while larger tea seed kernels exhibit a gradual color change, darker in the center and lighter around the edges. Therefore, to reduce or account for the differences caused by the size of the tea seed kernels, or to make the judgment results more representative, when selecting samples, it is necessary to uniformly sample different sizes of particles from different points (top, middle, and bottom), then crush the tea seed kernels and compare the overall color.
[0023] S200, Moisture content detection: The tea seed powder sample obtained in step S100 is detected using a near-infrared spectrometer to obtain the moisture content of the tea seed powder sample.
[0024] Specifically, if tea seed powder is measured in bulk, light scattering will occur, affecting the measurement results; moreover, uneven particle distribution will also affect the spectrometer's measurements. Therefore, in a preferred solution, the crushed tea seeds should be sieved to ensure uniform particle size, for example, through a 10-mesh sieve. The tea seed powder should then be placed in a 1cm thick, 10cm side-length square box, compacted, and covered with a high-transmittance glass slide. The colorimeter measures the powder at five different locations through the glass slide, and the average value is taken to improve detection accuracy. Of course, the box dimensions can be other values, and the number of measurement points can be replaced with 6, 7, or 8. Generally, the more sampling points, the more accurate the results.
[0025] It should be noted that near-infrared spectroscopy directly measures the emission / reflection value (or ratio) of light signals, and cannot directly measure moisture information. However, there is a stable functional relationship between the emission / reflection value (or ratio) of light signals and the moisture content of tea seed powder samples. Based on this relationship, a quantitative moisture prediction model can be established in advance, thereby calculating the moisture content of tea seed powder. The technique of constructing a stable mapping relationship between near-infrared spectroscopy measurement data and the moisture content of the analyte is existing technology, such as Chinese patent publications CN112285057A and CN114942234A, etc., and will not be elaborated further in this embodiment.
[0026] S300, Color Detection: The tea seed powder sample obtained in step S100 is detected using a colorimeter to obtain color information including brightness L, red-green hue a, and yellow-blue hue b.
[0027] In addition to the aforementioned brightness L, red-green hue a, and yellow-blue hue b, the colorimeter can also measure other data such as saturation and hue angle. However, the applicant has found that, in the technical context of this invention, brightness L, red-green hue a, and yellow-blue hue b are sufficient to reflect the different roasting levels of tea seed kernels. More measurement parameters will only increase the complexity of the method, without significantly improving the accuracy of the results.
[0028] In a preferred embodiment, an oil removal step is included before color detection. Tea seeds are prone to releasing oil after roasting, resulting in oil precipitation on the surface of the crushed tea seed powder. This affects light reflection and thus measurement accuracy. Therefore, to avoid this effect, it is necessary to remove the oil from the surface of the tea seed powder sample before color measurement, for example, by washing away the surface oil with a paper towel. Additionally, the crushing process involves compression, which can also cause the tea seed powder to release oil. Therefore, the crushing process needs to be adjusted. Specifically, a multi-interval crushing method should be adopted, with each crushing session lasting no more than 6 seconds, with a 5-second interval between each crushing session, and the number of crushing sessions controlled to 2-3 times, to minimize oil release from the tea seed powder.
[0029] S400, Comprehensive Judgment: Fisher linear discriminant analysis is performed on the moisture content obtained in step S200 and the color information obtained in step S300 to determine whether the degree of frying meets the standard.
[0030] In this embodiment, the degree of cooking includes three results: slightly undercooked, moderately cooked, and slightly burnt. Among them, moderately cooked is the standard, while the others are not.
[0031] Fisher's Linear Discriminant Analysis (LDA) is a linear learning method belonging to the field of machine learning, primarily used for classification and dimensionality reduction. Through multiple experiments, the applicant discovered that this analysis method is perfectly suited to the application scenario of this invention. First, the tea seed roasting results are categorized into three types: slightly undercooked, moderately roasted, and slightly burnt. Second, there are four parameters (four-dimensional data) used to characterize the degree of roasting: moisture percentage (%), brightness (L), red-green hue (a), and yellow-blue hue (b). The LDA analysis method can effectively reduce the four-dimensional data to two dimensions, ultimately displaying the classification results on a two-dimensional plane, thereby determining the specific roasting result for a particular roasting cycle.
[0032] The LDA analysis process will be described in detail below through several specific examples.
[0033] 1. Data processing: Take a certain number of standard samples, each of which contains 4 features: brightness L, red-green hue a, yellow-blue hue b, and moisture content %. Divide all standard samples into three categories: slightly raw, moderate, and slightly blurry.
[0034] For example, 90 standard samples are taken, of which 30 are slightly undercooked, 30 are moderately cooked, and 30 are slightly burnt. These standard samples are determined using existing methods, i.e., the degree of cooking is judged manually. Data for each sample is collected according to steps S100 to S300, including four characteristics: L (brightness), a (red-green hue), b (yellow-blue hue), and moisture content (%). The average values are as follows: It is evident that the three types of samples are clearly distinguishable in terms of L and a, and there are also differences in b and moisture percentage, making them suitable for analysis using the LDA model.
[0035] 2. Modeling: Divide all standard samples into training and test sets in a 2:1 ratio to ensure that the proportions of each class are the same. Then train the LDA model to obtain the linear discriminant coefficients and interpretable variance ratios of the data projected onto the two-dimensional plane, as well as the centroid coordinates of the three classes of results in the two-dimensional plane.
[0036] Specifically, the 90 samples were divided into a training set (60 samples) and a test set (30 samples) in a 2:1 ratio to ensure equal proportions for each class. An LDA model was trained using Python to obtain the linear discriminant coefficients (weights) and the explained variance ratio. A scatter plot of the 90 samples and the three class structures was then generated on a two-dimensional plane (see...). Figure 1 ).
[0037] Linear discriminant function coefficients (after standardization): LD1 mainly reflects the contrast between slightly smeared and slightly raw results; LD2 mainly reflects results that tend to be moderate.
[0038] Variance contribution: LD1 explains 86.7% of the inter-class variance; LD2 explains 13.3% of the inter-class variance. The sum of the two equals 1, indicating that the standard sample was appropriately selected and suitable for the LDA model.
[0039] It should be noted that, in addition to Python, software such as MATLAB and SPSS can also be used to train LDA models.
[0040] Preferably, before conducting the testing step, the model's credibility is assessed. Specifically, this can be done by using a confusion matrix to evaluate the test set data, thereby obtaining the model's credibility. Only models with a credibility score above 90% are usable; otherwise, standard samples are reselected. Regarding the specific numerical range of credibility: In practical industry applications, 70-80% accuracy is used for basic theoretical research and preliminary exploration; 85-90% accuracy is used for industrial online initial screening and auxiliary grading. These two credibility ranges are still too low. While they meet the requirements for qualitative analysis or auxiliary grading, they cannot replace human experience. Through repeated experiments and comparisons, the inventors discovered that only models with a credibility score greater than 90% can be used for high-precision automatic sorting, replacing manual quality inspection. At this point, the judgment results are highly consistent with traditional judgment results.
[0041] Specifically, the validation was performed using 30 samples from the aforementioned test set, employing a confusion matrix. The results are as follows: As shown in the table above, only one "moderate" sample was misclassified as "slightly blurry" in the test results, while all the others were correct, i.e., the accuracy rate was 96.7%, indicating that the model has high credibility and can meet the requirements of this invention.
[0042] 3. Testing: After calculating LD1 and LD2 for the new sample, the coordinates (LD1, LD2) of the new sample in the two-dimensional plane are obtained. The results are then determined based on the principle of proximity to the centroid of each category. LD1 and LD2 are calculated using the following formula: LD1 = A1L + A2a + A3b + A4 water content; LD2 = B1L + B2a + B3b + B4 (water content); A1, A2, A3, A4; B1, B2, B3, B4 are the linear discriminant coefficients given by the LDA model based on standard data (see step 2).
[0043] In one specific embodiment, three groups of samples were stir-fried separately. After pretreatment (steps S100 to S300), the values of L, a, b, and moisture percentage were obtained as follows: a. Determine the model parameters (population mean and standard deviation) The population mean (μ) and population standard deviation (σ) of each indicator, calculated based on all 90 samples (30 each of slightly raw, moderate, and slightly mushy), are as follows: b. Standardize the original values of the new samples using the Z-score. Standardized formula: Substitute the new sample test value into the standard value Z: c. Substitute into the LDA discriminant function to calculate the projected coordinates (LD1, LD2). Group 1: LD1 = -0.82 × 1.079 + 0.91 × (-0.701) - 0.08 × 0.416 - 0.45 × 1.399 = -2.186; LD2=0.15×1.079-0.23×(-0.701)+0.97×0.416-0.11×1.399=0.573; That is, the projected coordinates of the sample on the discrimination plane are (-2.186, 0.573); Group 2: LD1 = -0.82×0.340 + 0.91×0.285 - 0.08×1.038 - 0.45×(-0.148) = -0.036; LD2=0.15×0.340-0.23×0.285+0.97×1.038-0.11×(-0.148)=1.008; That is, the projected coordinates of the sample on the discrimination plane are (-0.036, 1.008); Group 3: LD1 = -0.82 × (-1.315) + 0.91 × 1.621 - 0.08 × (-2.210) - 0.45 × (-0.893) = 3.132; LD2=0.15×(-1.315)-0.23×1.621+0.97×(-2.210)-0.11×(-0.893)=-2.616; That is, the projected coordinates of the sample on the discrimination plane are (3.132, -2.616). d. Calculate the Euclidean distance to the centroid of each category and determine the category. The centroids (center points) of the three types of tea seeds in the LD1-LD2 discriminant space are as follows: slightly unripe: (-3.2, 0.4), moderately unripe: (0.7, 2.1), and slightly mushy: (3.8, -1.5). These centroid coordinates can be directly obtained after inputting standard samples into the model.
[0044] Euclidean distance calculation formula: Calculate separately: 5. Judgment Result Group 1 Distance Ranking: D (Slightly Undeveloped) = 1.029 < D (Moderate) = 3.266 < D (Slightly Blurry) = 6.335 Two groups of distance sorting: D (moderate) = 1.317 < D (slightly raw) = 3.222 < D (slightly blurry) = 4.584 The distance ranking for the three groups is as follows: D (slightly blurry) = 1.300 < D (moderate) = 5.306 < D (slightly raw) = 7.014 Therefore, the stir-frying state of Group 1 was judged to be slightly undercooked; the stir-frying state of Group 2 was judged to be moderately cooked; and the stir-frying state of Group 3 was judged to be slightly burnt.
[0045] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom still fall within the scope of protection of this invention.
Claims
1. A method for determining the endpoint of tea seed roasting, characterized in that, Includes the following steps: Step 1, Sample Preparation: Take the roasted tea seeds, remove the shells and skins to obtain tea seed kernels; crush and sieve to obtain tea seed powder samples; Step 2, Moisture content detection: The moisture content of the tea seed powder sample obtained in Step 1 is determined by using a near-infrared spectrometer. Step 3, Color Detection: Use a colorimeter to detect the tea seed powder sample obtained in Step 1, and obtain color information including brightness L, red-green hue a, and yellow-blue hue b; Step 4, Comprehensive Judgment: Fisher linear discriminant analysis is performed on the moisture content obtained in Step 2 and the color information obtained in Step 3 to determine whether the degree of stir-frying meets the standard.
2. The method as described in claim 1, characterized in that, The sample preparation steps also include: Tea seeds were selected from different points at the top, middle, and bottom of the roasted tea seeds; And / or, select tea seeds according to different sizes of tea seed particles.
3. The method as described in claim 1, characterized in that, The color detection step also includes: The tea seed powder was placed in a box, compacted, covered with a transparent glass plate, and then the color was measured.
4. The method as described in claim 3, characterized in that, It also includes the following steps: Measure at several different locations on the transparent glass slide, and then take the average value to obtain color information.
5. The method as described in claim 1, characterized in that, Prior to the color detection, a step of removing oil stains is also included.
6. The method as described in claim 1, characterized in that, The step of pulverizing tea seed kernels includes the following steps: The method of multiple interval crushing is adopted, with each crushing time not exceeding 6 seconds and the interval time not less than 5 seconds, and the crushing is performed 2 to 3 times.
7. The method as described in claim 1, characterized in that, The cooking results can be categorized into three types: slightly undercooked, moderately cooked, and slightly burnt.
8. The method as described in claim 7, characterized in that, The Fisher linear discriminant analysis specifically includes the following steps: Data processing: Take a certain number of standard samples, each of which contains 4 features: brightness L, red-green hue a, yellow-blue hue b, and moisture content %. Divide all standard samples into three categories: slightly raw, moderate, and slightly blurry. Modeling: All standard samples are divided into training and test sets in a 2:1 ratio to ensure that the proportions of each class are the same. Then, the LDA model is trained to obtain the linear discriminant coefficient and the interpretable variance ratio of the data projected onto the two-dimensional plane, as well as the centroid coordinates of the three classes in the two-dimensional plane. Test: After calculating LD1 and LD2 for the new sample, the coordinates (LD1, LD2) of the new sample in the two-dimensional plane are obtained. The results are then determined based on the principle of proximity to the centroid of each category. LD1 and LD2 are calculated using the following formula: LD1 = A1L + A2a + A3b + A4 water content; LD2 = B1L + B2a + B3b + B4 (water content); A1, A2, A3, A4; B1, B2, B3, B4 are the linear discriminant coefficients given by the LDA model based on standard data.
9. The method as described in claim 8, characterized in that, This also includes data standardization operations, with the standardization formula as follows: 。 10. The method as described in claim 8, characterized in that, The following steps are included before the test steps: Model credibility assessment: The model credibility is determined by using a confusion matrix to assess the test set data. Only models with a credibility of 90% or higher are usable; otherwise, standard samples are selected again.
Citation Information
Patent Citations
Method for rapidly detecting water content of water-milled glutinous rice flour based on near infrared spectrum technology
CN112285057A
Water activity detection method and application thereof
CN114942234A
