Method for predicting, collecting and testing dry moisture of cyperus esculentus based on LSTM (Long Short Term Memory)
By using the LSTM moisture prediction acquisition and testing method, the sampling frequency and spatial priority are dynamically adjusted, which solves the problem of synergistic optimization between acquisition strategy and prediction model in the existing technology, and improves the moisture prediction accuracy and system stability of tiger nuts drying process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-12
- Publication Date
- 2026-03-24
AI Technical Summary
Existing LSTM-based methods for predicting the drying moisture content of tiger nuts fail to achieve coordinated optimization of the data acquisition strategy and the prediction model, cannot adapt to the dynamic characteristics of the drying process, ignore spatial heterogeneity, and are limited by resource constraints that restrict the stable operation of the system.
An LSTM-based method for predicting the moisture content of dried tiger nuts was adopted. The sampling frequency and spatial priority were dynamically adjusted through a data acquisition module, an LSTM moisture prediction module, a reinforcement learning agent module, and an adaptive sampling controller. Combined with multimodal data fusion and a hierarchical reinforcement learning architecture, resource allocation was optimized.
While ensuring the accuracy of moisture prediction, it significantly improves the efficiency of data acquisition and testing, enhances the system's adaptability and robustness to dynamic environments, and ensures the continuous and stable operation of the system under various working conditions.
Smart Images

Figure CN121725907A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of agricultural product processing technology, specifically to a method for predicting and collecting moisture content data for drying tiger nuts based on LSTM. Background Technology
[0002] Tiger nuts, as an important oilseed crop, have a crucial impact on the final product quality during the drying process. Accurate monitoring and control of moisture content is a core technological step in ensuring the quality of dried tiger nuts. Currently, this field mainly employs sensor-based moisture detection methods.
[0003] Existing moisture detection methods are mainly divided into two categories: direct measurement methods and indirect prediction methods. Direct measurement methods typically use humidity sensor arrays to collect sample moisture data at fixed time intervals. This method has significant limitations: the fixed collection frequency leads to a large amount of redundant data, increasing the data processing burden; simultaneously, frequent collection accelerates sensor wear and increases system energy consumption. Indirect prediction methods predict moisture content by establishing a mathematical model between the moisture content and easily measurable parameters, among which time series prediction methods based on long short-term memory networks show promising application prospects.
[0004] However, existing LSTM-based moisture prediction methods still have many shortcomings. First, these methods typically treat data acquisition and prediction modeling as two independent processes, failing to achieve coordinated optimization of the acquisition strategy and the prediction model. Second, fixed sampling strategies cannot adapt to the dynamic characteristics of the drying process, resulting in resource waste during periods of slow moisture change and potential omission of key data points during periods of rapid change. Furthermore, existing methods do not adequately consider the spatial heterogeneity of the drying environment, making it difficult to address the inconsistent moisture evaporation rates of tiger nuts at different locations within the drying chamber. Existing solutions often neglect resource constraints in practical applications. Limitations in sensor node battery capacity, computing resources, and communication bandwidth all affect the long-term stable operation of the system. Although some studies have attempted to adjust the sampling frequency using simple thresholds, this heuristic strategy lacks theoretical basis and struggles to achieve an optimal balance between prediction accuracy and acquisition efficiency. Therefore, we propose an LSTM-based method for predicting and testing moisture content during tiger nut drying. Summary of the Invention
[0005] The purpose of this invention is to provide an LSTM-based method for predicting and collecting moisture content in dried tiger nuts, in order to solve the problems mentioned in the background art.
[0006] To achieve the above objectives, the present invention provides the following technical solution: a method for predicting and collecting moisture content in dried tiger nuts based on LSTM, comprising the following steps:
[0007] S1. Collect multimodal data during the drying process of tiger nuts using a data acquisition module;
[0008] S2. Predict future moisture content based on the multimodal data using the LSTM moisture prediction module;
[0009] S3. The reinforcement learning agent module selects the action to adjust the sampling frequency based on the state space;
[0010] S4. The sampling frequency and spatial priority are dynamically adjusted according to the action by the adaptive sampling controller.
[0011] Optionally, the environmental multimodal features in the state space are subjected to dimensionality reduction processing through feature encoding. The state space includes moisture prediction error, collection history, environmental multimodal features and resource status. The environmental multimodal features are subjected to dimensionality reduction processing through feature encoding, and principal component analysis or autoencoder is used to compress the environmental multimodal data into a low-dimensional vector.
[0012] Optionally, the reinforcement learning agent module uses the Q-learning algorithm, whose reward function is based on water prediction error, collection cost, resource consumption, and fault tolerance indicators; the reward function also includes an information gain reward, which is calculated based on the entropy of water prediction uncertainty.
[0013] Optionally, the adaptive sampling controller allocates sampling resources based on spatial priority, which is calculated using the uncertainty of moisture prediction at the sensor location.
[0014] Optionally, it also includes a multimodal data fusion step, which encodes the spatial correlation of the sensor network through a graph convolutional network, wherein the multimodal data includes moisture content, temperature, and airflow velocity.
[0015] Optionally, the reinforcement learning agent module adopts a layered reinforcement learning architecture, including a high-level agent and a low-level agent.
[0016] Optionally, the resource status includes battery level and communication bandwidth, and the reward function includes a resource penalty term.
[0017] Optionally, when the sensor health status indicates a fault, an alternative sampling strategy is enabled, which uses interpolation of data from adjacent sensors to calculate the moisture content.
[0018] This invention also proposes an LSTM-based system for predicting and acquiring moisture content in dried tiger nuts, comprising:
[0019] The data acquisition module is used to collect multimodal data during the drying process of tiger nuts;
[0020] The LSTM moisture prediction module is used to predict future moisture content based on the multimodal data.
[0021] The reinforcement learning agent module is used to select actions that adjust the sampling frequency based on the state space.
[0022] An adaptive sampling controller is used to dynamically adjust the sampling frequency and spatial priority according to the action.
[0023] Compared with existing technologies, this invention provides an LSTM-based method for predicting and collecting moisture content in dried tiger nuts, which has the following advantages:
[0024] This LSTM-based method for predicting moisture content in dried tiger nuts dynamically adjusts the sampling frequency and spatial priority through the synergistic effect of a reinforcement learning agent module and an adaptive sampling controller. It intelligently allocates acquisition resources according to the specific characteristics of the drying process, significantly improving acquisition and testing efficiency while ensuring the accuracy of moisture prediction.
[0025] Simultaneously, by combining multimodal data fusion and hierarchical reinforcement learning architecture, we can achieve fine modeling and stage division of the drying process, optimize resource allocation strategies, enhance the system's adaptability to dynamic environments, and improve the accuracy and robustness of moisture prediction.
[0026] By integrating resource-aware reward functions and fault-tolerance mechanisms, the system monitors sensor health status and resource consumption in real time, automatically activating backup strategies when equipment malfunctions or resources are limited, ensuring continuous and stable operation of the system under various working conditions. Attached Figure Description
[0027] Figure 1 This is a schematic diagram of the process structure of the present invention. Detailed Implementation
[0028] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. 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.
[0029] like Figure 1 As shown, the present invention provides a technical solution: a method for predicting and collecting moisture content in dried tiger nuts based on LSTM, comprising the following steps:
[0030] S1. Multimodal data, including moisture content, temperature, and airflow velocity, is collected during the drying process of tiger nuts via a data acquisition module. The data acquisition module is deployed inside the drying chamber and includes multiple sensor nodes installed in different locations in a spatially distributed manner. The initial acquisition frequency is set to a fixed low value to reduce initial resource consumption.
[0031] S2. Predict future moisture content based on multimodal data using the LSTM moisture prediction module. The LSTM model employs an encoder-decoder structure, and its unit update process includes the calculation of the input gate, forget gate, output gate, and cell state. The specific calculation formulas are as follows:
[0032] Input gate calculation: ;
[0033] Forget Gate Calculation: ;
[0034] Output gate calculation: ;
[0035] Cell status update: ;
[0036] in: ;
[0037] Hidden output: ;
[0038] in, , , These represent the activation vectors of the input gate, forget gate, and output gate, respectively, controlling the flow of information; This represents the cell state vector, responsible for maintaining long-term memory; This represents the hidden state vector, which is the output of the current time step. , , , The weight matrices correspond to the input data to each gate respectively; , , , These correspond to the weight matrices from the hidden state to each gate; , , , These are the bias vectors for each gate; denoted by sigmoid, and tanh by hyperbolic tangent activation function; This indicates element-wise multiplication.
[0039] S3. The reinforcement learning agent module selects actions to adjust the sampling frequency based on the state space. The state space includes moisture prediction error, collection history, environmental multimodal features, and resource status. Environmental multimodal features are dimensionality-reduced through feature encoding, and principal component analysis or an autoencoder is used to compress the environmental multimodal data into a low-dimensional vector.
[0040] The reinforcement learning agent module uses the Q-learning algorithm, and its reward function is based on water prediction error, collection cost, resource consumption, and fault tolerance metrics. The formula for calculating the reward function is: ;
[0041] in, This is due to the error in moisture prediction. To reduce data collection costs, This is a tolerance penalty item. For information gain reward, This represents the instantaneous reward value at time step t; is the weighting coefficient. , , , Used to balance the importance of various objectives.
[0042] Information gain reward is calculated based on the entropy of the uncertainty in moisture prediction: ;
[0043] in, H(·) represents the information gain reward value; H(·) represents the information entropy function. This represents the probability distribution of the predicted moisture values; this reward encourages the system to increase sampling in areas with high prediction uncertainty.
[0044] S4. The adaptive sampling controller dynamically adjusts the sampling frequency and spatial priority based on the action. The adaptive sampling controller allocates sampling resources based on spatial priority, which is calculated by the uncertainty of moisture prediction at the sensor location. Locations with higher uncertainty are assigned higher priority.
[0045] The method also includes a multimodal data fusion step, which encodes the spatial correlation of the sensor network through a graph convolutional network. The graph convolutional network constructs an adjacency matrix and node features based on the physical locations of the sensors to model the spatial heterogeneity of the drying process.
[0046] The reinforcement learning agent module adopts a hierarchical reinforcement learning architecture, consisting of a high-level agent and a low-level agent. The high-level agent divides the drying stages based on the moisture reduction rate, while the low-level agent performs sampling frequency adjustment actions under stage constraints.
[0047] Resource status includes battery level and communication bandwidth, and the reward function includes a resource penalty term, calculated based on remaining battery level and bandwidth congestion status.
[0048] When the sensor health status indicates a fault, a backup sampling strategy is activated, using interpolation of data from adjacent sensors to calculate the moisture content. The interpolation formula is as follows: ;
[0049] The system includes a data acquisition module 100, an LSTM moisture prediction module 200, a reinforcement learning agent module 300, and an adaptive sampling controller 400. The data acquisition module 100 is deployed inside the drying chamber and includes multiple humidity sensors, temperature sensors, and airflow velocity sensors.
[0050] Data acquisition module 100 acquires data at an initial frequency, and after preprocessing, inputs it into LSTM moisture prediction module 200. Preprocessing includes data normalization and feature construction; the normalization formula is as follows:
[0051] ;
[0052] in, This represents the normalized moisture content value; This represents the original moisture content measurement value; , These represent the minimum and maximum expected values of moisture content, respectively; the normalization formula linearly transforms the original moisture data to the [0,1] interval, eliminating the influence of dimensions;
[0053] The LSTM moisture prediction module 200 employs an encoder-decoder architecture. The encoder maps the input sequence to hidden states, and the decoder generates the prediction output based on the hidden states. Model training uses the mean squared error loss function.
[0054] ;
[0055] in, This represents the mean squared error loss of the LSTM model; Indicates the number of training samples; This indicates the actual moisture content value; This represents the moisture content value predicted by LSTM; the mean squared error loss function is used to guide the parameter optimization process of the LSTM model.
[0056] The reinforcement learning agent module 300 uses the Q-learning algorithm. Its state space includes moisture prediction error, data collection history, environmental multimodal features, and resource status. The Q-value update rule is as follows:
[0057] ;
[0058] in, Representing state Next action Q value; This represents the learning rate and controls the step size for updating parameters. This represents a discount factor that balances the importance of current and future rewards. Indicates the instant reward value; Indicates the maximum expected cumulative reward for the next state;
[0059] The adaptive sampling controller 400 executes the output actions of the reinforcement learning agent, dynamically adjusting the sampling frequency. The frequency adjustment rule is as follows:
[0060] When the action is reduced: ;
[0061] When the action is held: ;
[0062] When the action is an increase: ;
[0063] Spatial priority allocation is based on calculations of moisture prediction uncertainty: ;
[0064] in, This indicates the sampling priority of the i-th sensor; This represents the uncertainty in moisture prediction at the location of the i-th sensor. This represents the total number of sensors; this formula ensures that areas with high uncertainty receive higher sampling priority.
[0065] Multimodal data fusion utilizes graph convolutional networks, with the graph structure built based on the physical locations of sensors. The resource-aware reward function includes a resource penalty term, calculated based on battery level and communication bandwidth status.
[0066] When a sensor fails, a backup sampling strategy is activated, using data interpolation from adjacent sensors:
[0067] ;
[0068] in, The interpolated moisture content indicates the faulty sensor. The set of adjacent sensors representing the faulty sensor; Indicates the number of adjacent sensors; Indicates the moisture measurement values of adjacent sensors
[0069] This formula provides data integrity assurance in the event of sensor failure; in the hierarchical reinforcement learning architecture, the higher-level agent divides the drying stage based on the moisture reduction rate, and the lower-level agent performs sampling frequency adjustment under stage constraints.
[0070] As one application of this embodiment:
[0071] By leveraging the synergy of a reinforcement learning agent module and an adaptive sampling controller, the sampling frequency and spatial priority are dynamically adjusted, and acquisition resources are intelligently allocated based on the specific characteristics of the drying process. This significantly improves acquisition and testing efficiency while ensuring the accuracy of moisture prediction. Furthermore, by combining multimodal data fusion and a hierarchical reinforcement learning architecture, the system achieves refined modeling and stage division of the drying process, optimizes resource allocation strategies, enhances the system's adaptability to dynamic environments, and improves the accuracy and robustness of moisture prediction.
[0072] The present invention has been described in detail above. However, modifications or improvements can be made to it, which will be obvious to those skilled in the art. Therefore, any modifications or improvements that do not depart from the spirit of the present invention are within the scope of protection of the present invention.
Claims
1. A method for predicting and collecting moisture content in dried tiger nuts based on LSTM, characterized in that, Includes the following steps: S1. Collect multimodal data during the drying process of tiger nuts using a data acquisition module; S2. Predict future moisture content based on the multimodal data using the LSTM moisture prediction module; S3. The reinforcement learning agent module selects the action to adjust the sampling frequency based on the state space; S4. The sampling frequency and spatial priority are dynamically adjusted according to the action by the adaptive sampling controller.
2. The method for predicting and collecting moisture content of dried tiger nuts based on LSTM according to claim 1, characterized in that, The environmental multimodal features in the state space are dimensionality reduced through feature encoding. The state space includes moisture prediction error, data collection history, environmental multimodal features, and resource status. The environmental multimodal features are dimensionality reduced through feature encoding, and principal component analysis or autoencoder is used to compress the environmental multimodal data into a low-dimensional vector.
3. The method for predicting and collecting moisture content of dried tiger nuts based on LSTM according to claim 1, characterized in that, The reinforcement learning agent module uses the Q-learning algorithm, and its reward function is based on water prediction error, collection cost, resource consumption, and fault tolerance indicators. The reward function also includes an information gain reward, which is calculated based on the entropy of water prediction uncertainty.
4. The method for predicting and collecting moisture content of dried tiger nuts based on LSTM according to claim 1, characterized in that, The adaptive sampling controller allocates sampling resources based on spatial priority, which is calculated by the uncertainty of moisture prediction at the sensor location.
5. The LSTM-based method for predicting and collecting moisture content in dried tiger nuts as described in claim 1, characterized in that, It also includes a multimodal data fusion step, which encodes the spatial correlation of the sensor network through a graph convolutional network. The multimodal data includes moisture content, temperature, and airflow velocity.
6. The method for predicting and collecting moisture content of dried tiger nuts based on LSTM according to claim 1, characterized in that, The reinforcement learning agent module adopts a layered reinforcement learning architecture, including a high-level agent and a low-level agent.
7. The method for predicting and collecting moisture content of dried tiger nuts based on LSTM according to claim 1, characterized in that, The resource status includes battery level and communication bandwidth, and the reward function includes a resource penalty term.
8. The method for predicting and collecting moisture content of dried tiger nuts based on LSTM according to claim 1, characterized in that, When the sensor health status indicates a fault, the backup sampling strategy is activated, and the moisture content is calculated by interpolation using data from adjacent sensors.
9. A LSTM-based system for predicting and acquiring moisture content in dried tiger nuts, characterized in that, include: The data acquisition module is used to collect multimodal data during the drying process of tiger nuts; The LSTM moisture prediction module is used to predict future moisture content based on the multimodal data. The reinforcement learning agent module is used to select actions that adjust the sampling frequency based on the state space. An adaptive sampling controller is used to dynamically adjust the sampling frequency and spatial priority according to the action.