Improved STA-BiLSTM for tea withering moisture content: detection and prediction model
摘要
Accurately predicting the moisture content of tea leaves during the withering process is crucial for ensuring process stability and maintaining tea quality. However, the withering process exhibits complex spatiotemporal characteristics and environmental interferences, posing significant challenges to deep learning methods. To address this, we propose a novel Spatiotemporal Attention-based Bidirectional Long Short-Term Memory (STA-BiLSTM) model integrated with XGBoost for moisture content prediction. First, a portable dielectric constant-based detection device was developed to acquire feature data. Compared to hyperspectral or near-infrared spectroscopy, this device offers advantages in cost-effectiveness (using low-cost capacitive and temperature/humidity sensors), portability (310 mm × 210 mm × 25 mm, 3D-printed resin casing), and industrial applicability (real-time monitoring with a capacitance range of 10–200 pF and ± 0.1% RH humidity accuracy). Its reliability was validated through extensive experiments, achieving a moisture content detection range of 9%–28% with bulk density compensation. The maximum relevance minimum redundancy (mRMR) algorithm identified seven key features (e.g., capacitance, temperature, bulk density) from high-dimensional data. A BiLSTM network extracted temporal dependencies, while a spatiotemporal attention mechanism adaptively focused on critical features and time steps. Finally, XGBoost was integrated as a post-processing ensemble layer to enhance robustness against noise and outliers in industrial environments. Specifically, XGBoost processes the STA-BiLSTM output by leveraging its regularization and gradient-boosted trees to suppress sensor noise and improve generalization. Experiments on a real-world dataset demonstrated that STA-BiLSTM-XGBoost achieved superior performance (RMSE: 0.022, R2: 0.967) over baseline models, validating its effectiveness for industrial tea withering applications.