A method and system for determining the end of fermentation in a human-machine collaboration
By employing a three-class random forest model and online random forest update method, combined with multidimensional parameters and human sensory verification, the problems of subjectivity in judging the fermentation endpoint of black tea and insufficient model confidence were solved, achieving accurate determination of the fermentation endpoint and improving computational efficiency.
Patent Information
- Application Number
- CN202611413885.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-11
- Publication Date
- 2026-11-27
AI Technical Summary
Traditional methods for determining the end point of black tea fermentation rely on human experience, which is subject to problems such as strong subjectivity, difficulty in standardization, difficulty in passing on experience, and inability to continuously track the fermentation process. Existing machine learning solutions are inaccurate when the confidence level is insufficient, and the correspondence between the human review conclusion and the sensor data is not accurate. The feedback annotation is noisy and inefficient.
A three-class random forest model was adopted, combined with a pre-set confidence threshold, verification timestamp alignment, and online random forest update. The fermentation endpoint was determined by multi-dimensional parameter fusion, and human sensory verification was triggered when the confidence was insufficient. The model was updated online using newly labeled data.
It achieves accurate determination of fermentation endpoint, reduces misjudgment and annotation noise, lowers computational overhead, and improves the model's adaptability and accuracy.
Smart Images

Figure CN123179145A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of tea processing technology, specifically to a method and system for determining the endpoint of human-machine collaborative fermentation. Background Technology
[0002] Fermentation is the core process in shaping the quality of black tea. Under suitable temperature, humidity, and oxygen conditions, polyphenol oxidase catalyzes the enzymatic oxidation of tea polyphenols, producing characteristic oxidation products such as theaflavins and thearubigins, while aroma substances are formed and transformed simultaneously. Precise control of the fermentation degree directly determines whether the "strong, robust, fresh, and refreshing" characteristics of black tea can be fully presented: insufficient fermentation results in a green and astringent tea soup with a raw taste; excessive fermentation leads to a dull aroma and a dark brown color.
[0003] The traditional method of judging the end point of black tea fermentation relies on the sensory experience of tea masters, who make comprehensive decisions by observing changes in leaf color, smelling the evolution of aroma, and touching the temperature and feel of the leaves. This method of judgment, which relies entirely on human experience, has the following shortcomings: (1) It is highly subjective, and it is difficult to unify the judgment standards between different masters and different batches, resulting in large fluctuations in the quality of finished products from different batches in the same factory; (2) It is difficult to pass on experience, and the judgment ability is highly dependent on the individual and is difficult to replicate as the scale of the enterprise expands; (3) Manual inspection is a discrete sampling judgment, which cannot continuously track the fermentation process and is easy to miss the best end point.
[0004] In recent years, sensor technologies such as electronic noses and machine vision, as well as machine learning methods, have been gradually applied to determine the fermentation level of black tea, and human evaluation can be introduced when the model confidence is insufficient. However, existing solutions still suffer from problems such as inaccurate correspondence between human verification conclusions and sensor data, significant noise in feedback annotations, and low utilization efficiency of newly added annotation data.
[0005] When the model confidence is insufficient, the operator needs to conduct a manual sensory review based on leaf color, aroma, leaf temperature and feel. If the review conclusion cannot accurately correspond to the sensor characteristics at the time the review sample was obtained, subsequent model updates will introduce incorrect annotations.
[0006] During fermentation, parameters such as the alcohol-aldehyde response ratio and leaf temperature change over time. When the data is correlated with the overall batch data, the conclusions drawn by humans and the sensor data are prone to time misalignment. Therefore, it is necessary to select the corresponding feature vector according to the verification timestamp.
[0007] The amount of newly added manually labeled data is usually limited. If all historical data is retrained each time, the computational cost is large. Using an online random forest algorithm that can update the statistics of decision tree nodes using newly labeled data can reduce the amount of computation required for on-site updates. Summary of the Invention
[0008] This invention proposes a human-machine collaborative method and system for determining the fermentation endpoint. It achieves human-machine collaborative determination of the fermentation endpoint through three-class random forest, pre-set confidence threshold for diversion, verification timestamp alignment, and online random forest update.
[0009] A method for determining the endpoint of human-machine collaborative fermentation includes the following steps:
[0010] S1: Collect multidimensional parameters during the fermentation process at a fixed sampling period. The multidimensional parameters include at least ambient temperature, ambient humidity, fermentation leaf temperature, fermentation time, and the ratio of the response value of the alcohol sensor to the response value of the aldehyde sensor in the electronic nose sensor.
[0011] S2: After normalizing the multidimensional parameters, construct a feature vector and input it into a pre-trained random forest classifier. The random forest classifier outputs the voting ratio, predicted category, and confidence level for each of the three categories of fermentation maturity: "insufficient", "moderate", and "excessive". The predicted category is the category with the largest voting ratio, and the confidence level is the voting ratio of the predicted category.
[0012] S3: Obtain the preset confidence threshold;
[0013] S4: Compare the confidence level with the preset confidence threshold: If the confidence level is greater than or equal to the preset confidence threshold, generate a fermentation endpoint determination result based on the predicted category. When the predicted category is "insufficient", output "continue fermentation"; when the predicted category is "moderate", output "suggest termination of fermentation"; when the predicted category is "excessive", output "termination of fermentation" and "excessive risk warning". If the confidence level is less than the preset confidence threshold, record the review timestamp of the human sensory review, trigger the human sensory review, obtain the human review category and output it as the basis for this determination.
[0014] S5: Retrieve the sampling time in the cached sensor data that is closest to the verification timestamp and whose time difference is less than half of the sampling period. Store the manual verification category, verification timestamp, and feature vector of the sampling time as a set of labeled data in the feedback database. When the number of newly added labeled data in the feedback database reaches M, update the random forest classifier using the online random forest algorithm and remove the used labeled data from the feedback database.
[0015] In one embodiment, the preset confidence threshold is 0.80; the threshold is written into the system configuration before model deployment and remains unchanged during the current judgment process.
[0016] In one embodiment, the human sensory verification is performed by combining leaf color, aroma, leaf temperature and feel: when the leaf color Lab value a value is between 12 and 18 and the b value is between 22 and 28, it is determined to meet the appropriate characteristics; when the alcohol-aldehyde response ratio decreases for two consecutive sampling periods and is lower than 0.3 times the ratio at the beginning of fermentation, the aroma is judged in combination with the operator's smelling results; when the fermentation leaf temperature is between 28 and 30°C, the temperature difference between different temperature measurement points in the leaf pile is not greater than 2°C, and the fermentation leaves are soft and not sticky, the leaf temperature and feel are determined to meet the appropriate characteristics.
[0017] In one embodiment, each decision tree in the forest maintains a temporary sample cache; after new labeled data reaches a leaf node along the decision path, the category count is updated and written to the cache; when the new labeled data accumulates to a set number, a split check is triggered, the Gini gain of the candidate split is calculated, and the node split is performed when the Gini gain is greater than a set threshold.
[0018] A human-machine collaborative fermentation endpoint determination system for implementing the method, comprising:
[0019] The sensor array includes an ambient temperature sensor, an ambient humidity sensor, a leaf temperature sensor, a timer, and an electronic nose sensor array, wherein the electronic nose sensor array includes at least a first gas sensor sensitive to alcohols and a second gas sensor sensitive to aldehydes.
[0020] The data acquisition module is connected to the sensor group and configured to acquire the multidimensional parameters at a fixed sampling period;
[0021] The feature processing module, connected to the data acquisition module, is configured to normalize the multidimensional parameters and construct the feature vector;
[0022] The memory stores the random forest classifier and the feedback database;
[0023] A processor, connected to the feature processing module and the memory, is configured to execute steps S2 to S5 of the method;
[0024] The human-computer interaction interface is connected to the processor and configured to display the judgment result, confidence level and manual review request, and receive the manual review category input by the operator;
[0025] The model update module is configured to trigger the online random forest algorithm and update the random forest classifier in the memory when the number of newly labeled data in the feedback database reaches M.
[0026] Compared with the prior art, the present invention has the following beneficial effects:
[0027] 1. Multi-parameter fusion judgment. The three-category judgment is based on a combination of ambient temperature, ambient humidity, fermentation leaf temperature, fermentation time, and electronic nose alcohol-aldehyde response ratio, reducing misjudgments caused by relying on a single parameter.
[0028] 2. Timestamp alignment for verification. Associate the manual verification category with feature vectors near the verification time to reduce annotation noise caused by mismatch between manual verification conclusions and data from other fermentation stages.
[0029] 3. Online incremental update. The class counts of leaf nodes in the random forest are updated using newly added manually reviewed and labeled data, and node splitting is performed when conditions are met, avoiding retraining on all historical data every time.
[0030] 4. Human-machine collaborative judgment. When the confidence level reaches the preset threshold, the automatic judgment result is output. When the confidence level is insufficient, human sensory review is triggered, and the category of human review is used as the basis for this judgment.
[0031] 5. Sensory verification aids for quantification. The interface displays leaf color, aldol response ratio, leaf temperature and leaf-to-pil temperature difference information, providing quantitative assistance for operators to conduct manual sensory verification. Attached Figure Description
[0032] Figure 1 This is an overall flowchart of the method of the present invention;
[0033] Figure 2 This is a schematic diagram of the module structure of the system of the present invention;
[0034] Figure 3 This is a flowchart of the decision-making process under a pre-set confidence threshold in this invention.
[0035] Figure 4 This is a flowchart of the online random forest incremental update process of the present invention. Detailed Implementation
[0036] To make the above-mentioned objects, features, and advantages of the present invention more readily understood, specific embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the specific details described below are only a part of the embodiments of the present invention, and the present invention can be implemented in many other embodiments different from those described herein. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of the present invention.
[0037] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
[0038] The overall process of the method of the present invention is as follows: Figure 1 As shown, the process includes steps S1 to S5 executed sequentially: S1, multi-parameter acquisition; S2, feature construction and three-classification model inference; S3, obtaining a pre-set confidence threshold; S4, decision splitting and human sensory verification; S5, verification timestamp alignment and online random forest update.
[0039] The overall system structure is as follows Figure 2 As shown: Sensor group 1 (ambient temperature sensor 11, ambient humidity sensor 12, leaf temperature sensor 13, timer 14, electronic nose sensor array 15), data acquisition module 2, feature processing module 3, memory 4, processor 5, human-computer interaction interface 6, model update module 7.
[0040] Inside the fermentation workshop, an array of ambient temperature sensors, ambient humidity sensors, leaf temperature sensors, and electronic nose sensors are connected to a data acquisition module; a timer starts counting from the moment fermentation begins, and the data acquisition module writes timestamps to each sampling record.
[0041] The following describes in detail the specific implementation method of each step in the order of steps.
[0042] Step S1: Multi-parameter acquisition
[0043] In step S1, ambient temperature T_amb, ambient humidity RH, fermentation leaf temperature T_leaf, fermentation time t, and alcohol-aldehyde response ratio Ratio=R_alcohol / R_aldehyde are collected at a fixed sampling period.
[0044] (I) Sensor Selection and Installation
[0045] The ambient temperature sensor 11 uses a PT100 temperature sensor with a measurement accuracy of ±0.2℃.
[0046] The ambient humidity sensor 12 uses the HIH4000 humidity sensor, with a measurement accuracy of ±3%RH.
[0047] The leaf temperature sensor 13 is a thermocouple inserted inside the fermentation leaf pile.
[0048] Timer 14 is used to record the fermentation time and provide timestamps for each sampling and manual verification.
[0049] The electronic nose sensor array 15 includes multiple gas sensors, including W1C and W2W types, among which channels that respond to alcohols and aldehydes are selected to calculate the alcohol-aldehyde response ratio.
[0050] (ii) Sensor calibration
[0051] Each sensor was preheated and calibrated according to its instructions, and baseline values were recorded before the data acquisition began.
[0052] (III) Sampling Period, Filtering and Data Upload
[0053] The data acquisition module 2 reads each sensor at a frequency of 1Hz and forms a set of multidimensional parameters according to a fixed sampling period; the fixed sampling period in this embodiment is 1 minute.
[0054] Each set of multidimensional parameters and sampling timestamps are transmitted to the industrial control computer via RS485 and written into the cache, so that step S5 can retrieve the corresponding feature vector according to the verification timestamp.
[0055] Step S2: Feature Construction and Model Inference
[0056] In step S2, the multidimensional parameters collected in S1 are normalized to construct a feature vector X=[T_amb_norm,RH_norm,T_leaf_norm,t_norm,Ratio_norm]. This vector is then input into a pre-trained random forest classifier, which outputs the voting ratio, predicted category, and confidence level conf for each of the three categories: “insufficient”, “moderate”, and “excessive”.
[0057] (a) Feature Construction
[0058] Each dimension of the parameters is normalized using Z-score to construct the feature vector. Z-score normalization (also known as standard deviation normalization or zero mean normalization) is a method that unifies continuous features with different dimensions and numerical ranges to the same scale: each original value is subtracted from the mean of the feature and then divided by the standard deviation, so that the mean of the transformed data is 0 and the standard deviation is 1. This eliminates the influence of dimensions and prevents features with large numerical ranges (such as fermentation time, which can reach hundreds of minutes) from dominating features with small numerical ranges (such as the aldol ratio before normalization) in model training, so that each dimension of the feature has an equal initial weight contribution in the classifier.
[0059] Taking ambient temperature as an example, its normalization formula is:
[0060] T_amb_norm = (T_amb − μ_T) / σ_T
[0061] The meanings of each symbol are as follows:
[0062] T_amb — The original ambient temperature (°C) measured at the current sampling time, collected in step S1;
[0063] μ_T — the mean of the ambient temperature characteristics, that is, the average ambient temperature of all samples in the training set.
[0064] σ_T — Standard deviation of ambient temperature characteristics, reflecting the degree of dispersion of ambient temperature values in the training set;
[0065] T_amb_norm — The dimensionless value of the normalized ambient temperature, i.e., the actual eigenvector components constructed.
[0066] The same logic applies to the other dimensions, in the following order:
[0067] RH_norm = (RH − μ_RH) / σ_RH, where RH is the measured ambient humidity (%), and μ_RH and σ_RH are the mean and standard deviation of the ambient humidity in the training set, respectively;
[0068] T_leaf_norm = (T_leaf − μ_TL) / σ_TL, where T_leaf is the measured fermentation leaf temperature (°C), and μ_TL and σ_TL are the mean and standard deviation of the fermentation leaf temperature in the training set, respectively.
[0069] t_norm = (t − μ_t) / σ_t, where t is the measured fermentation time (min), and μ_t and σ_t are the mean and standard deviation of the fermentation time of the training set, respectively;
[0070] Ratio_norm=(Ratio−μ_R) / σ_R, where μ_R and σ_R are the mean and standard deviation of the alcohol-aldehyde response ratio in the training set, respectively.
[0071] The five-dimensional feature vector constructed in this way is X = [T_amb_norm, RH_norm, T_leaf_norm, t_norm, Ratio_norm], that is, each component of X is a dimensionless standardized value of the corresponding original parameter.
[0072] The mean and standard deviation mentioned above are obtained from the training set during the offline training phase of the model and are saved together with the model; during the model inference phase, the same set of parameters is used to normalize the real-time collected data.
[0073] (ii) Offline training of random forest classifier
[0074] Offline training of random forest classifiers includes training data collection and labeling, splitting training and test sets, setting hyperparameters, model training, and performance evaluation.
[0075] 1. Collection of training data
[0076] Complete process data from multiple fermentation batches were collected. For each batch, ambient temperature, ambient humidity, fermentation leaf temperature, fermentation time, and alcohol-aldehyde response ratio were recorded. Samples were obtained at different fermentation stages and manually labeled.
[0077] 2. Determination of Sample Labels
[0078] Each sample was independently judged by three people with tea tasting experience; when at least two people reached the same conclusion, the sample was labeled as “insufficient,” “moderate,” or “excessive” at that point in time. Samples that could not form a majority opinion were not included in the training data.
[0079] 3. Division of training and test sets
[0080] All batches are divided into training and test sets in a 7:3 ratio, and all time point samples in the same batch belong to only one dataset. The training set is used to select model parameters, and the test set is used to evaluate the final model.
[0081] 4. Classifier hyperparameter settings and their meanings
[0082] In this embodiment, the random forest classifier includes 100 decision trees, each with a maximum depth of 10, and the minimum number of samples required for internal nodes to continue splitting is 5.
[0083] Hyperparameters Value meaning n_estimators 100 The total number of decision trees in the forest, i.e., the number of decision trees trained in parallel. The more trees, the more stable the model, but the greater the computational cost. max_depth 10 The maximum depth of each decision tree, i.e., the maximum number of splits allowed from the root node to the leaf node, prevents a single tree from becoming too deep and overfitting. min_samples_split 5 The minimum number of samples required for an internal node to continue splitting; splitting stops when the number of samples in a node falls below this value.
[0084] 5. Calculation of category probability and confidence level
[0085] After training, for any new input fermentation feature vector X, each of the 100 decision trees in the forest independently determines its category and votes. The probability value of the "moderate" category is calculated using the following formula:
[0086] p_moderate = N_vote_moderate / N_tree
[0087] For category c∈{insufficient, moderate, excessive}, the voting proportion p_c=N_vote_c / N_tree; the predicted category c_pred is the category with the largest voting proportion, and the confidence level conf is the voting proportion of the predicted category.
[0088] 6. Model performance evaluation (5-fold cross-validation and test set verification)
[0089] During training, 5-fold cross-validation is performed on the training set, and accuracy, recall, and F1 score for each of the "insufficient," "moderate," and "excessive" categories are calculated on the test set. The model is then used for on-site evaluation after it meets the preset evaluation requirements.
[0090] 7. Assessment of Feature Importance
[0091] The random forest classifier can calculate the importance of features based on the decrease in impurity generated by each feature during decision tree splitting, and display the ranking of the most recently predicted feature importance on the human-computer interaction interface 6.
[0092] 8. Model saving and deployment
[0093] The trained random forest classifier, along with the normalization parameters of each feature, is stored in memory 4. The feedback database records the category of manual review, the review timestamp, the corresponding feature vector, and whether the labeled data has been used for model updates.
[0094] Step S3: Obtain the preset confidence threshold
[0095] In step S3, a preset confidence threshold θ is read from the system configuration. In this embodiment, θ is set to 0.80, and this threshold remains unchanged during this determination process.
[0096] Step S4: Decision-making triage and human-machine collaborative review
[0097] In step S4, such as Figure 3 As shown, the confidence level conf is compared with the preset confidence threshold θ; at the arrival of each sampling period, processor 5 executes the following logic:
[0098] (a) Automatic branch determination (conf≥θ)
[0099] When the predicted category is "insufficient," the output is "Continue to ferment"; when the predicted category is "moderate," the output is "It is recommended to stop fermentation"; when the predicted category is "excessive," the output is "Stop fermentation" and an excessive risk warning. The judgment result, along with the voting ratio, confidence level, and parameter values of each dimension for the three categories, is displayed on the human-computer interaction interface 6.
[0100] (ii) Human-machine collaboration branch (conf<θ)
[0101] When the confidence level conf is lower than the preset confidence threshold θ, the human-computer interaction interface 6 triggers a human sensory review request and records the review timestamp t_review; the interface displays the current sensor data curve, model output, feature importance ranking, and historical human review records similar to the current feature vector.
[0102] The operator selects "insufficient", "moderate" or "excessive" based on the following quantitative auxiliary criteria, and the system outputs the manual review category as the basis for determining the fermentation endpoint.
[0103] (III) Quantitative auxiliary standards for human sensory verification
[0104] To reduce the difference in judgment between operators, the human-machine interface 6 displays the leaf color measurement value, the change curve of the alcohol-aldehyde response ratio, the temperature difference between different temperature measurement points of the fermentation leaf temperature and the leaf pile.
[0105] Leaf color quantification: The Lab value of fermented leaves was measured using a colorimeter (a handheld spectrophotometer in this embodiment); when the a value was between 12 and 18 and the b value was between 22 and 28, the leaf color was determined to meet the appropriate characteristics.
[0106] Aroma quantification: When the alcohol-aldehyde response ratio decreases for two consecutive sampling periods and the current ratio is less than 0.3 times the ratio at the start of fermentation, and the operator confirms by smelling that there is a floral and fruity aroma and no obvious grassy or sour smell, the aroma is judged to meet the appropriate characteristics.
[0107] Leaf temperature and feel quantification: When the fermentation leaf temperature is between 28 and 30℃, the temperature difference between different temperature measurement points in the leaf pile is no more than 2℃, and the fermentation leaves are soft and not sticky to the touch, the leaf temperature and feel are judged to meet the appropriate characteristics.
[0108] Comprehensive judgment: When all three characteristics of leaf color, aroma, leaf temperature and feel meet the criteria for "appropriate", the manual review category is "appropriate"; when only two characteristics meet the criteria, the operator shall make a careful judgment based on the current fermentation process.
[0109] Step S5: Spatiotemporal alignment of feedback data and online incremental learning
[0110] In step S5, the manually reviewed categories, review timestamps, and corresponding feature vectors are used to construct labeled data and stored in the feedback database; when the number of newly added labeled data reaches M, the online random forest algorithm is used to update the model.
[0111] (i) Spatiotemporal alignment of feedback data
[0112] Using the manually reviewed review timestamp t_review as the alignment benchmark, the sampling time t_sensor closest to t_review is retrieved from the cached sensor data, and it is required that |t_sensor−t_review| is less than half of the sampling period. The manual review category, review timestamp, and the feature vector corresponding to t_sensor are stored as a set of labeled data in the feedback database.
[0113] (II) Online Random Forest Incremental Learning Algorithm
[0114] When the cumulative number of newly labeled data in the feedback database reaches M, the model update module 7 starts the online random forest update; in this embodiment, M is 20.
[0115] Step A: Each decision tree in the forest maintains a temporary sample cache.
[0116] Step B: When new labeled data arrives, traverse the decision path of the decision tree to the leaf node, update the category count of the leaf node, and write the new labeled data into the temporary sample cache.
[0117] Step C: When the newly labeled data accumulates to a set quantity, a node split check is triggered. The Gini gain of the candidate split is calculated using a temporary sample cache. When the Gini gain is greater than a set threshold, left and right child nodes are created, and the data in the cache is redistributed to the left and right child nodes. In this embodiment, the set threshold is 0.01.
[0118] After the online random forest is updated, the updated random forest classifier is saved in memory 4, and the labeled data used in this operation is removed from the feedback database.
[0119] Reference Figure 2 and Figure 4 A human-machine collaborative fermentation endpoint determination system for implementing the above method includes:
[0120] Sensor group 1 includes an ambient temperature sensor 11, an ambient humidity sensor 12, a leaf temperature sensor 13, a timer 14, and an electronic nose sensor array 15 including W1C and W2W types.
[0121] Data acquisition module 2: It uses an STM32 microcontroller to read sensor data at a frequency of 1Hz and upload it to the industrial computer via RS485.
[0122] Feature processing module 3: Located in the industrial control computer, it performs Z-score normalization on multi-dimensional parameters and constructs feature vectors.
[0123] Memory 4: Used to store the random forest classifier, normalization parameters, and feedback database.
[0124] Processor 5: Used to perform feature construction, model inference, threshold comparison, manual review and splitting, and labeled data alignment.
[0125] Human-machine interface 6: It adopts an industrial touch screen to display real-time data, judgment results, confidence level and manual review requests, and receive manual review categories input by the operator.
[0126] Model update module 7: When the number of newly labeled data entries in the feedback database reaches M, the online random forest update is triggered.
[0127] The system records sensor data, model prediction results, confidence levels, manual review categories, and model update times by fermentation batch, so as to trace each judgment and model update.
[0128] This invention is mainly used for determining the endpoint of the fermentation process of black tea. When applied to other fermented teas, it is necessary to re-collect and label training data for the corresponding raw materials and retrain the random forest classifier.
[0129] The embodiments described above are merely examples of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention.
Claims
1. A method for determining the endpoint of human-machine collaborative fermentation, characterized in that, Includes the following steps: S1: Collect multidimensional parameters during the fermentation process at a fixed sampling period. The multidimensional parameters include at least ambient temperature, ambient humidity, fermentation leaf temperature, fermentation time, and the ratio of the response value of the alcohol sensor to the response value of the aldehyde sensor in the electronic nose sensor. S2: After normalizing the multidimensional parameters, construct a feature vector and input it into a pre-trained random forest classifier. The random forest classifier outputs the voting ratio, predicted category, and confidence level for each of the three categories of fermentation maturity: "insufficient", "moderate", and "excessive". The predicted category is the category with the largest voting ratio, and the confidence level is the voting ratio of the predicted category. S3: Obtain the preset confidence threshold; S4: Compare the confidence level with the preset confidence threshold: If the confidence level is greater than or equal to the preset confidence threshold, generate a fermentation endpoint determination result based on the predicted category, wherein if the predicted category is "insufficient", output to continue fermentation; if the predicted category is "moderate", output to suggest terminating fermentation; and if the predicted category is "excessive", output to terminate fermentation and an excessive risk warning; if the confidence level is less than the preset confidence threshold, record the review timestamp of the human sensory review, trigger the human sensory review, obtain the human review category and output it as the basis for this determination. S5: Retrieve the sampling time in the cached sensor data that is closest to the verification timestamp and whose time difference is less than half of the sampling period. Store the manual verification category, verification timestamp, and feature vector of the sampling time as a set of labeled data in the feedback database. When the number of newly added labeled data in the feedback database reaches M, update the random forest classifier using the online random forest algorithm and remove the used labeled data from the feedback database.
2. The method according to claim 1, characterized in that, The preset confidence threshold is 0.
80.
3. The method according to claim 1, characterized in that, The artificial sensory verification was conducted based on the following quantitative auxiliary standards: Leaf color: The Lab color space values of fermented leaves were measured using a colorimeter. When the a value was between 12 and 18 and the b value was between 22 and 28, the leaf color was deemed to meet the appropriate characteristics. Aroma: When the ratio decreases for two consecutive sampling periods and the current ratio is less than 0.3 times the ratio at the start of fermentation, the aroma is judged to meet the appropriate characteristics based on the operator's smelling results; Leaf temperature and feel: When the fermentation leaf temperature is between 28 and 30℃, the temperature difference between different temperature measurement points in the leaf pile is no more than 2℃, and the fermentation leaves are soft and not sticky, the leaf temperature and feel are considered to meet the appropriate characteristics. When the leaf color, aroma, leaf temperature, and feel all meet the characteristics of "moderate", the manual verification category "moderate" is output.
4. The method according to claim 1, characterized in that, The online random forest algorithm includes: each decision tree in the forest maintains a temporary sample cache; when new labeled data arrives, it traverses along the decision path to the leaf node, updates the class count of the leaf node, and writes the new labeled data into the temporary sample cache; when the new labeled data accumulates to a set number, it triggers a node split check, uses the Gini index to evaluate candidate splits, and performs node splits when the Gini gain is greater than a set threshold.
5. The method according to claim 1, characterized in that, The random forest classifier consists of 100 decision trees, each with a maximum depth of 10, and a minimum number of samples required for internal nodes to continue splitting.
6. A human-machine collaborative fermentation endpoint determination system for implementing the method of any one of claims 1 to 5, characterized in that, include: The sensor array includes an ambient temperature sensor, an ambient humidity sensor, a leaf temperature sensor, a timer, and an electronic nose sensor array, wherein the electronic nose sensor array includes at least a first gas sensor sensitive to alcohols and a second gas sensor sensitive to aldehydes. The data acquisition module is connected to the sensor group and configured to acquire the multidimensional parameters at a fixed sampling period; The feature processing module, connected to the data acquisition module, is configured to normalize the multidimensional parameters and construct the feature vector; The memory stores the random forest classifier and the feedback database; A processor, connected to the feature processing module and the memory, is configured to execute steps S2 to S5 of the method; The human-computer interaction interface is connected to the processor and configured to display the judgment result, confidence level and manual review request, and receive the manual review category input by the operator; The model update module is configured to trigger the online random forest algorithm and update the random forest classifier in the memory when the number of newly labeled data in the feedback database reaches M.
7. The system according to claim 6, characterized in that, The human-computer interaction interface is also configured to display the current sensor data curve, the most recent model prediction feature importance ranking, and historical manual review records similar to the current feature vector when a manual sensor review is triggered.
