RNN (Recurrent Neural Network)-based leaf storage room moisture regulation and control method, electronic equipment and program product

By employing an RNN-based method for regulating moisture in leaf storage rooms, and utilizing prediction networks and hardware adjustment strategies, the problem of moisture prediction lag in traditional regulation methods is solved, achieving precise control of moisture in leaf storage rooms and batch consistency.

CN120973140APending Publication Date: 2025-11-18CHONGQING CHINA TOBACCO IND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510931998.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-07
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

Traditional methods of moisture control in tobacco storage rooms cannot accurately predict future moisture trends, resulting in control actions lagging behind actual needs and affecting batch consistency.

Method used

An RNN-based method for regulating tobacco storage room moisture is adopted. By acquiring and preprocessing state data, a preset RNN prediction network is used to predict the moisture content of tobacco leaves after a certain period of time. Based on the difference, a hardware adjustment strategy is determined to achieve precise moisture control.

Benefits of technology

It enables precise prediction and control of moisture in leaf storage rooms, improves the lag problem of traditional control methods, and enhances batch consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120973140A_ABST
    Figure CN120973140A_ABST
Patent Text Reader

Abstract

The invention provides an RNN-based leaf storage room moisture regulation and control method, electronic equipment and a program product, and relates to the technical field of artificial intelligence. The method comprises the following steps: acquiring state data representing the internal state of a to-be-conditioned leaf storage room at the current moment; preprocessing the state data to obtain preprocessed state data; according to the preprocessed state data, through a preset RNN prediction network, predicting the moisture content of the tobacco leaves after a preset duration at the current moment, and taking the predicted moisture content as a predicted moisture content; determining an adjustment strategy of the target hardware according to a difference value between the predicted moisture content and a preset target moisture content; and regulating and controlling the operation parameters of the target hardware through the regulation strategy so as to regulate the moisture of the to-be-regulated leaf storage room. Therefore, the problem that the regulation action lags behind the actual demand due to the fact that the moisture change trend of the tobacco leaves in the leaf storage room in a future period of time cannot be accurately estimated in a traditional leaf storage room moisture regulation mode can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and more specifically, to a method, electronic device and program product for regulating moisture in a leaf storage room based on RNN. Background Technology

[0002] In the tobacco processing industry, environmental control in the leaf storage room directly determines the fermentation quality of tobacco leaves and the taste of the finished product. Moisture content, as a core indicator, needs to be consistently maintained within the target range (finished tobacco shreds are typically 12%-15%, and to ensure that tobacco leaves are transported from the storage room to the subsequent processing line and undergo a series of processes to obtain finished tobacco shreds with a moisture content of 12%-15%, the moisture content in the storage room also needs to be maintained at 18%-22%). Traditional control relies on manual experience and basic automated equipment, but factors such as the hygroscopicity of tobacco leaves, environmental disturbances, and equipment response delays cause frequent moisture fluctuations, severely affecting batch consistency. In recent years, intelligent manufacturing technology has gradually penetrated the tobacco production technology field, necessitating the precise control of moisture content in the leaf storage room through automated control methods.

[0003] In existing implementations, the mainstream approach is to use a PID-based temperature and humidity control system, triggering the operation of fans or steam valves through fixed thresholds. For example, when the sensor detects that the humidity is below the target value, the steam valve opening is linearly increased; or the fan speed is set based on historical data. Some improved solutions introduce static material balance formulas to estimate moisture evaporation based on tobacco leaf storage, but do not consider the coupling effect of dynamic environment. Such control methods can only adjust based on current static data, and cannot accurately predict the moisture change trend of the storage room / tobacco leaves in the future, resulting in control actions lagging behind actual needs. Summary of the Invention

[0004] In view of this, the purpose of this application is to provide an RNN-based method, electronic device and program product for controlling the moisture in a tobacco storage room, which can improve the problem that traditional methods for controlling the moisture in a tobacco storage room cannot accurately predict the moisture change trend of the tobacco leaves in the storage room over a period of time, resulting in the control action lagging behind the actual needs.

[0005] To achieve the above technical objectives, the technical solution adopted in this application is as follows:

[0006] In a first aspect, embodiments of this application provide a method for regulating moisture in a leaf storage room based on an RNN, the method comprising:

[0007] Obtain status data that characterizes the internal state of the tobacco storage room at the current moment. The status data includes at least one of the following: ambient temperature, ambient humidity, material storage, tobacco moisture content, fan speed, and steam valve opening.

[0008] The state data is preprocessed to obtain preprocessed state data;

[0009] Based on the preprocessed state data, the moisture content of tobacco leaves after a preset time period is predicted using a preset RNN prediction network, and this prediction is used as the moisture content.

[0010] Based on the difference between the predicted moisture content and the preset target moisture content, the adjustment strategy for the target hardware is determined;

[0011] The operating parameters of the target hardware are adjusted using the adjustment strategy to regulate the moisture content of the leaf storage room to be adjusted.

[0012] In conjunction with the first aspect, in some optional implementations, state data characterizing the current internal state of the leaf chamber to be regulated is obtained, including:

[0013] Acquiring sensor data, including at least one of the following: ambient temperature, ambient humidity, material storage capacity, tobacco leaf moisture content, fan speed, and steam valve opening.

[0014] The sensor data is converted into a vector representation to obtain the vector features corresponding to each data item in the sensor data. The vector features corresponding to each data item are then concatenated to obtain an initial feature vector.

[0015] The state data is obtained by concatenating the preset tobacco leaf batch feature vector with the initial feature vector.

[0016] In conjunction with the first aspect, in some optional implementations, the state data is preprocessed to obtain preprocessed state data, including:

[0017] The state data is filtered using a multi-channel Wiener filter to obtain filtered state data.

[0018] By weighting each data point in the filtered state data using a preset airflow field distribution matrix, airflow compensation data is obtained.

[0019] The airflow compensation data is normalized to obtain normalized data, which is used as the preprocessed state data.

[0020] In conjunction with the first aspect, in some optional embodiments, based on the preprocessed state data, a preset RNN prediction network is used to predict the moisture content of tobacco leaves after a preset time interval at the current moment, which is then used as the predicted moisture content. This includes:

[0021] The input data is feature extracted by the feature extraction layer in the preset RNN prediction network to obtain the spatiotemporal feature vector corresponding to the input data. The input data includes the preprocessed state data within a preset time step.

[0022] Based on the time-controlled feature vector, the spatiotemporal feature vector is subjected to gating operation through the feature enhancement layer in the preset RNN prediction network to obtain the hidden state feature vector;

[0023] Based on the hidden state feature vector, the attention weights corresponding to the hidden state feature vector are determined through the temporal attention layer in the preset RNN prediction network.

[0024] Based on the hidden state feature vector and the attention weight, the moisture content of the tobacco leaf after a preset duration at the current moment is determined through the multi-scale prediction output layer in the preset RNN prediction network, and is used as the predicted moisture content.

[0025] In conjunction with the first aspect, in some optional implementations, the spatiotemporal feature vector includes a spatial feature vector and a temporal feature vector;

[0026] The input data is processed by the feature extraction layer in the preset RNN prediction network to obtain the spatiotemporal feature vector corresponding to the input data, including:

[0027] Using a preset convolution kernel weight matrix, the input data is convolved in one dimension through the feature extraction layer to obtain the spatial feature vector:

[0028]

[0029] In the formula, Represents spatial eigenvectors. Represents one-dimensional convolution. Indicates input data, This represents the preset convolution kernel weight matrix;

[0030] Using a preset gating weight matrix and a preset airflow field distribution matrix, the input data is subjected to gating operations through the feature extraction layer to obtain the time feature vector:

[0031]

[0032] In the formula, Represents the time feature vector. This represents the sigmoid activation function. This represents the preset gate weight matrix. This represents the preset airflow field distribution matrix. Indicates the first bias term;

[0033] The spatial feature vector and the temporal feature vector are fused to obtain the spatiotemporal feature vector:

[0034]

[0035] In the formula, Represents the spatiotemporal feature vector. This indicates element-wise multiplication.

[0036] In conjunction with the first aspect, in some optional implementations, based on the temporal feature vector, a gating operation is performed on the spatiotemporal feature vector through the feature enhancement layer in the preset RNN prediction network to obtain the hidden state feature vector, including:

[0037] Using a preset airflow field distribution matrix and the fan speed, the physical delay compensation parameters are determined:

[0038]

[0039] In the formula, Indicates the physical delay compensation parameter. Indicates the fan speed. This represents the preset airflow field distribution matrix. This represents the gradient norm of the airflow field corresponding to the preset airflow field distribution matrix. , These are learnable parameters;

[0040] The input data for the gating operation is initialized using a preset multilayer perceptron and a preset tobacco batch feature vector to obtain the initial operation input:

[0041]

[0042] In the formula, , As the initial input for the operation, This indicates a preset multilayer sensor. This represents the preset feature vector of tobacco leaf batch. To preset the parameters of the multilayer perceptron, This represents the trainable batch feature matrix of tobacco leaves. Indicates the second bias term;

[0043] Based on the initial computational input and the physical delay compensation parameters, the spatiotemporal feature vector is subjected to the gating operation through the feature enhancement layer to obtain the hidden state feature vector:

[0044]

[0045] In the formula, This represents the sigmoid activation function. , , , For a trainable weight matrix, express The spatiotemporal feature vector at time t, , , , These are the third, fourth, fifth, and sixth bias terms, respectively. express The spatiotemporal feature vector at time t, This represents the hidden state feature vector.

[0046] In conjunction with the first aspect, in some optional implementations, based on the hidden state feature vector and the attention weights, the moisture content of the tobacco leaf after a preset duration at the current time is determined as the predicted moisture content through the multi-scale prediction output layer in the preset RNN prediction network, including:

[0047] Based on the hidden state feature vector and the attention weight within the preset time step, long-term and short-term features are determined through the multi-scale prediction output layer:

[0048]

[0049] In the formula, Indicates short-term characteristics, Indicates long-term features, Indicates attention weights, Represents hidden state features. Indicates the preset time step. Indicates the short-term window size;

[0050] Based on the long-term and short-term features, the multi-scale prediction output layer predicts the tobacco leaf moisture content after a preset duration at the current moment, which is then used as the predicted moisture content.

[0051]

[0052] In the formula, This indicates the predicted moisture content. Indicates the current moment. Indicates the preset duration. This represents the preset prediction weight matrix, and this represents the seventh bias term.

[0053] In conjunction with the first aspect, in some optional implementations, an adjustment strategy for the target hardware is determined based on the difference between the predicted moisture content and the preset target moisture content, including:

[0054] The adjustment strategy is determined based on the absolute value of the difference between the predicted moisture content and the preset target moisture content;

[0055] Wherein, when the absolute value of the difference is less than or equal to a first preset threshold, the steam valve and the blower are taken as the target hardware, and the adjustment strategy is determined to be the first strategy for fine-tuning the target hardware;

[0056] When the absolute value of the difference is greater than the first preset threshold and less than or equal to the second preset threshold, the dehumidifier unit and the steam valve are taken as the target hardware, and the adjustment strategy is determined to be the second strategy of step control of the target hardware.

[0057] When the absolute value of the difference is greater than or equal to the second preset threshold, all hardware devices are taken as the target hardware, and the adjustment strategy is determined to be the third strategy of shutting down the target hardware.

[0058] Secondly, embodiments of this application also provide an electronic device, which includes a processor and a memory coupled to each other. The memory stores a computer program, and when the computer program is executed by the processor, the electronic device performs the above-described method.

[0059] Thirdly, embodiments of this application also provide a computer program product, including a computer program that implements the above-described method when executed by a processor.

[0060] The invention employing the above technical solution has the following advantages:

[0061] The technical solution provided in this application first acquires state data characterizing the current internal state of the tobacco storage room to be adjusted, and preprocesses the state data to obtain preprocessed state data. Then, based on the preprocessed state data, a preset RNN prediction network is used to predict the tobacco moisture content after a preset time period, which is then used as the predicted moisture content. Next, based on the difference between the predicted moisture content and the preset target moisture content, an adjustment strategy for the target hardware is determined. Finally, the operating parameters of the target hardware are adjusted according to the adjustment strategy to regulate the moisture content of the tobacco storage room. Thus, based on state data, the RNN prediction network predicts the moisture content of the tobacco leaves in the storage room after a period of time, and based on the difference between the predicted value and the desired target moisture content, hardware operating parameter adjustment decisions are made, achieving precise predictive control of the moisture content in the storage room. This improves upon the problem of traditional tobacco storage room moisture control methods, which cannot accurately predict the moisture change trend of the tobacco leaves in the storage room over a future period, resulting in a lag in control actions compared to actual needs. Attached Figure Description

[0062] This application can be further illustrated by the non-limiting embodiments given in the accompanying drawings. It should be understood that the following drawings only illustrate some embodiments of this application and should not be considered as limiting the scope. For those skilled in the art, other related drawings can be obtained from these drawings without any inventive effort.

[0063] Figure 1 This is a structural block diagram of an electronic device provided in an embodiment of this application.

[0064] Figure 2 This is a schematic flowchart of the RNN-based moisture regulation method for leaf storage rooms provided in the embodiments of this application.

[0065] Icons: 100 - Electronic device; 101 - Processor; 102 - Memory. Detailed Implementation

[0066] The present application will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that similar or identical parts are referred to by the same reference numerals in the drawings or description. Implementations not shown or described in the drawings are forms known to those skilled in the art. In the description of this application, terms such as "first" and "second" are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0067] Please refer to Figure 1This application provides an electronic device 100 that may include a processor 101 and a memory 102. The memory 102 stores a computer program, which, when executed by the processor 101, enables the electronic device 100 to perform the corresponding steps in the following RNN-based leaf storage room moisture regulation method.

[0068] In this embodiment, the processor 101 can be an integrated circuit chip with signal processing capabilities. The processor 101 can be a general-purpose processor. For example, the processor 101 can be a central processing unit (CPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application.

[0069] The memory 102 can be, but is not limited to, random access memory, read-only memory, programmable read-only memory, erasable programmable read-only memory, electrically erasable programmable read-only memory, etc. In this embodiment, the memory 102 can be used to store state data, preprocessed state data, a preset RNN prediction network, predicted moisture content, a preset target moisture content, adjustment strategies, a first preset threshold, a second preset threshold, etc. Of course, the memory 102 can also be used to store programs, which the processor 101 executes after receiving an execution instruction.

[0070] Understandable, Figure 1 The electronic device 100 shown is only a schematic diagram; the electronic device 100 may also include components that are more... Figure 1 More components are shown. Figure 1 The components shown can be implemented using hardware, software, or a combination thereof.

[0071] In this embodiment, the electronic device 100 can be a personal computer, cloud server, etc. It is used to acquire state data characterizing the current internal state of the leaf storage room to be adjusted, and preprocess the state data to obtain preprocessed state data. Then, based on the preprocessed state data, a preset RNN prediction network is used to predict the tobacco leaf moisture content after a preset time period, which is taken as the predicted moisture content. Then, based on the difference between the predicted moisture content and the preset target moisture content, an adjustment strategy for the target hardware is determined. Finally, the operating parameters of the target hardware are adjusted according to the adjustment strategy to adjust the moisture content of the leaf storage room to be adjusted.

[0072] Please refer to Figure 2 This application also provides an RNN-based method for regulating moisture in a leaf storage room, which can be applied to the aforementioned electronic device 100, and the electronic device 100 executes or implements the various steps of the method. The RNN-based method for regulating moisture in a leaf storage room may include the following steps:

[0073] Step 210: Obtain status data characterizing the current internal state of the tobacco storage room, wherein the status data includes at least one of ambient temperature, ambient humidity, material storage, tobacco moisture content, fan speed, and steam valve opening.

[0074] Step 220: Preprocess the state data to obtain preprocessed state data;

[0075] Step 230: Based on the preprocessed state data, predict the moisture content of tobacco leaves after a preset time period using a preset RNN prediction network, and use this as the predicted moisture content.

[0076] Step 240: Determine the adjustment strategy for the target hardware based on the difference between the predicted moisture content and the preset target moisture content;

[0077] Step 250: Adjust the operating parameters of the target hardware using the adjustment strategy to adjust the moisture content of the leaf storage room to be adjusted.

[0078] In the above implementation, firstly, state data representing the current internal state of the storage room to be adjusted is acquired and preprocessed to obtain preprocessed state data. Then, based on the preprocessed state data, a preset RNN prediction network is used to predict the tobacco moisture content after a preset time period, which is then used as the predicted moisture content. Next, based on the difference between the predicted moisture content and the preset target moisture content, an adjustment strategy for the target hardware is determined. Finally, the operating parameters of the target hardware are adjusted according to the adjustment strategy to regulate the moisture content of the storage room. Thus, based on state data, the RNN prediction network predicts the moisture content of the tobacco leaves in the storage room after a certain period, and based on the difference between the predicted value and the desired target moisture content, hardware operating parameter adjustment decisions are made, achieving precise predictive control of the moisture content in the storage room. This improves upon the problem of traditional storage room moisture control methods, which cannot accurately predict the moisture change trend of the tobacco leaves in the storage room over a future period, resulting in a lag in control actions compared to actual needs.

[0079] The steps of the RNN-based leaf storage room moisture regulation method will be described in detail below:

[0080] This can be understood as follows: in order to facilitate the implementation of the technical solution proposed in this application, some preset parameters need to be initialized before step 210, including but not limited to preset target moisture content (%). Preset duration (min) Preset tobacco leaf batch feature vector Preset airflow field distribution matrix (m) 3 / S\cdotpm 2 ) wait.

[0081] In step 210, obtaining state data characterizing the current internal state of the leaf chamber to be regulated may include:

[0082] Acquiring sensor data, including at least one of the following: ambient temperature, ambient humidity, material storage capacity, tobacco leaf moisture content, fan speed, and steam valve opening.

[0083] The sensor data is converted into a vector representation to obtain the vector features corresponding to each data item in the sensor data. The vector features corresponding to each data item are then concatenated to obtain an initial feature vector.

[0084] The state data is obtained by concatenating the preset tobacco leaf batch feature vector with the initial feature vector.

[0085] In this embodiment, the current internal state parameters of the tobacco storage room are first acquired. These parameters include sensor data such as ambient temperature, ambient humidity, material storage capacity, tobacco moisture content, fan speed, and steam valve opening. The sensor data are then converted into vector representations and concatenated to obtain an initial feature vector, as shown below:

[0086] (1)

[0087] In the formula, Represents the initial feature vector. , , , , , These represent the vector features corresponding to ambient temperature, ambient humidity, material storage, tobacco moisture content, fan speed, and steam valve opening, respectively.

[0088] Then, the preset tobacco batch feature vector is concatenated with the initial feature vector to obtain the state data, as shown below:

[0089] (2)

[0090] In the formula, Represents state data, This represents vector concatenation. This represents a preset batch feature vector of tobacco leaves, for example, It is obtained after normalization by one-hot encoding.

[0091] In this embodiment, the state data can be acquired during the testing phase of the technical solution proposed in this application, whereby the user presets the data and stores it in the memory 102 of the electronic device 100. Then, during subsequent tobacco moisture content prediction and target hardware decision control, the data is invoked based on instructions initiated by the user through the processor 101 of the electronic device 100. Alternatively, the state data can be acquired in real-time during the application phase of the technical solution proposed in this application, and then processed through vector conversion, splicing, etc., to obtain the state data. No specific limitations are placed on the method of acquiring the state data here.

[0092] Thus, by integrating the characteristics of tobacco leaf batches (such as variety, initial moisture content, region, etc.), a comprehensive state vector is constructed to improve the completeness of the state representation of storage rooms / tobacco leaves by integrating multi-source data.

[0093] In step 220, the state data is preprocessed to obtain preprocessed state data, which may include:

[0094] The state data is filtered using a multi-channel Wiener filter to obtain filtered state data.

[0095] By weighting each data point in the filtered state data using a preset airflow field distribution matrix, airflow compensation data is obtained.

[0096] The airflow compensation data is normalized to obtain normalized data, which is used as the preprocessed state data.

[0097] In this embodiment, the state data is first subjected to multi-channel Wiener filtering to obtain filtered state data:

[0098] (3)

[0099] In the formula, This represents the filtered state data. Represents state data, This indicates a multi-channel Wiener filter used to suppress sensor crosstalk.

[0100] Then, the airflow compensation data is obtained by weighting each sensor data in the filtered state data using a preset airflow field distribution matrix:

[0101] (4)

[0102] In the formula, This represents airflow compensation data. This represents the preset airflow field distribution matrix. This represents the filtered state data. This represents the Hadamard product, which is the product of elements.

[0103] Finally, the airflow compensation data is normalized to obtain normalized data, which serves as the preprocessed state data. The normalization method can be Z-score normalization, i.e., standard score normalization. It is represented as follows:

[0104] (5)

[0105] In the formula, This represents the normalized data. This indicates Z-score normalization.

[0106] Thus, this technical solution compensates for spatial inhomogeneity (such as humidity monitoring distortion in the corners of the leaf storage room) by weighting the airflow, thereby improving the reliability of the data. Normalization enhances the convergence speed of the subsequent prediction model and improves the model's generalization ability.

[0107] In step 230, based on the preprocessed state data, the moisture content of the tobacco leaves after a preset time interval is predicted using a preset RNN prediction network. The predicted moisture content may include:

[0108] The input data is feature extracted by the feature extraction layer in the preset RNN prediction network to obtain the spatiotemporal feature vector corresponding to the input data. The input data includes the preprocessed state data within a preset time step.

[0109] Based on the time-controlled feature vector, the spatiotemporal feature vector is subjected to gating operation through the feature enhancement layer in the preset RNN prediction network to obtain the hidden state feature vector;

[0110] Based on the hidden state feature vector, the attention weights corresponding to the hidden state feature vector are determined through the temporal attention layer in the preset RNN prediction network.

[0111] Based on the hidden state feature vector and the attention weight, the moisture content of the tobacco leaf after a preset duration at the current moment is determined through the multi-scale prediction output layer in the preset RNN prediction network, and is used as the predicted moisture content.

[0112] In this embodiment, the spatiotemporal feature vector includes a spatial feature vector and a temporal feature vector;

[0113] By extracting features from the input data through the feature extraction layer in the preset RNN prediction network, the spatiotemporal feature vector corresponding to the input data can be obtained, which may include:

[0114] Using a preset convolution kernel weight matrix, the input data is convolved in one dimension through the feature extraction layer to obtain the spatial feature vector:

[0115] (6)

[0116] In the formula, Represents spatial eigenvectors. This represents a one-dimensional convolution with a kernel size of 5. Indicates input data, This represents the preset convolution kernel weight matrix;

[0117] Using a preset gating weight matrix and a preset airflow field distribution matrix, the input data is subjected to gating operations through the feature extraction layer to obtain the time feature vector:

[0118] (7)

[0119] In the formula, Represents the time feature vector. This represents the sigmoid activation function. This represents the preset gate weight matrix. This represents the preset airflow field distribution matrix. Indicates the first bias term;

[0120] The spatial feature vector and the temporal feature vector are fused to obtain the spatiotemporal feature vector:

[0121] (8)

[0122] In the formula, Represents the spatiotemporal feature vector. This indicates element-wise multiplication.

[0123] In this embodiment, based on the temporal feature vector, the hidden state feature vector is obtained by performing gating operations on the spatiotemporal feature vector through the feature enhancement layer in the preset RNN prediction network, which may include:

[0124] Using a preset airflow field distribution matrix and the fan speed, the physical delay compensation parameters are determined:

[0125] (9)

[0126] In the formula, Indicates the physical delay compensation parameter. Indicates the fan speed. This represents the preset airflow field distribution matrix. This represents the airflow field gradient norm corresponding to the preset airflow field distribution matrix, used to quantify the non-uniformity of the leaf storage room space. , These are learnable parameters;

[0127] The input data for the gating operation is initialized using a preset multilayer perceptron and a preset tobacco batch feature vector to obtain the initial operation input:

[0128] (10)

[0129] In the formula, , As the initial input for the operation, This indicates a preset multilayer sensor. This represents the preset feature vector of tobacco leaf batch. To preset the parameters of the multilayer perceptron, This represents the trainable batch feature matrix of tobacco leaves. Indicates the second bias term;

[0130] Understandably, in the following gating operation, the hidden state feature vector at time t is based on the hidden state feature vector at time t-1 and the consistency feature vector. This is obtained by performing gating operations. Therefore, in practical applications, the input of the gating operation needs to be initialized. and After performing iterative gating operations on the two, the hidden state feature vector at time t is obtained.

[0131] Based on the initial computational input and the physical delay compensation parameters, the spatiotemporal feature vector is subjected to the gating operation through the feature enhancement layer to obtain the hidden state feature vector:

[0132] (11)

[0133] In the formula, This represents the sigmoid activation function. , , , For a trainable weight matrix, express The spatiotemporal feature vector at time t, , , , These are the third, fourth, fifth, and sixth bias terms, respectively. express The spatiotemporal feature vector at time t, This represents the hidden state feature vector.

[0134] In this way, by quantifying the delay time of steam diffusion through physical delay compensation parameters, the prediction model (i.e., the RNN prediction network) learns the response inertia of the hardware device, thereby directly alleviating the time lag between control commands and execution effects through the delay compensation mechanism.

[0135] In this embodiment, determining the attention weights corresponding to the hidden state feature vector through the temporal attention layer in the preset RNN prediction network, based on the hidden state feature vector, may include:

[0136] Based on the hidden state feature vector, determine the attention score corresponding to each time step within the preset time step:

[0137] (12)

[0138] In the formula, This represents the attention score at time step t. , This represents the trainable attention weights and attention vector. Indicates attention bias;

[0139] Based on the attention scores, determine the attention weights corresponding to each time step:

[0140] (13)

[0141] In the formula, This represents the attention weights corresponding to time step t. This indicates the preset time step.

[0142] In this embodiment, based on the hidden state feature vector and the attention weights, the moisture content of the tobacco leaf after a preset duration at the current time is determined through the multi-scale prediction output layer in the preset RNN prediction network, and this determination, as the predicted moisture content, may include:

[0143] Based on the hidden state feature vector and the attention weight within the preset time step, long-term and short-term features are determined through the multi-scale prediction output layer:

[0144] (14)

[0145] In the formula, Indicates short-term characteristics, Indicates long-term features, Indicates attention weights, Represents hidden state features. Indicates the preset time step. This indicates the short-term window size, which is usually set to 10.

[0146] Based on the long-term and short-term features, the multi-scale prediction output layer predicts the tobacco leaf moisture content after a preset duration at the current moment, which is then used as the predicted moisture content.

[0147] (15)

[0148] In the formula, This indicates the predicted moisture content. Indicates the current moment. Indicates the preset duration. This represents the preset prediction weight matrix, and this represents the seventh bias term.

[0149] In this way, short-term features are used to capture sudden disturbances (such as opening doors for material feeding), and long-term features are used to capture steady-state patterns. The two are then weighted and fused to improve the predictive robustness of the prediction model.

[0150] In step 240, the adjustment strategy for the target hardware is determined based on the difference between the predicted moisture content and the preset target moisture content, which may include:

[0151] The adjustment strategy is determined based on the absolute value of the difference between the predicted moisture content and the preset target moisture content;

[0152] Wherein, when the absolute value of the difference is less than or equal to a first preset threshold, the steam valve and the blower are taken as the target hardware, and the adjustment strategy is determined to be the first strategy for fine-tuning the target hardware;

[0153] When the absolute value of the difference is greater than the first preset threshold and less than or equal to the second preset threshold, the dehumidifier unit and the steam valve are taken as the target hardware, and the adjustment strategy is determined to be the second strategy of step control of the target hardware.

[0154] When the absolute value of the difference is greater than or equal to the second preset threshold, all hardware devices are taken as the target hardware, and the adjustment strategy is determined to be the third strategy of shutting down the target hardware.

[0155] In this embodiment, the first preset threshold and the second preset threshold can be flexibly set according to user needs, such as 0.3%, 0.5%, 1%, etc. In this embodiment, the first preset threshold can be 0.3%, and the second preset threshold can be 1%.

[0156] In this embodiment, when the absolute value of the difference between the predicted moisture content and the preset target moisture content is less than or equal to 0.3%, the moisture content of the tobacco leaves in the storage room is determined to be within the normal fluctuation range, and the adjustment strategy is determined to be the first strategy characterizing the fine-tuning mode. In the first strategy, the steam valve and the fan are used as target hardware, and the steam valve opening and fan speed are adjusted through the first strategy. The specific adjustment amount is calculated as follows:

[0157] (16)

[0158] In the formula, This indicates the adjustment amount of the steam valve opening. , This represents the trainable proportional coefficient and integral coefficient. This represents the absolute value of the difference between the predicted moisture content and the preset target moisture content.

[0159] (17)

[0160] In the formula, This indicates the amount of fan speed adjustment. This represents the gradient norm of the airflow field corresponding to the preset airflow field distribution matrix.

[0161] In this embodiment, when the absolute value of the difference is greater than 0.3% and less than or equal to 1%, the tobacco leaf moisture content in the storage room is determined to be in a state of significant deviation, and the adjustment strategy is determined to be the second strategy, which characterizes the rapid adjustment mode. In the second strategy, the dehumidifier unit and the steam valve are used as target hardware, and the opening degree of the steam valve and the opening and closing state of the dehumidifier unit are rapidly adjusted through the second strategy. Specifically, the adjustment result of the steam valve opening degree and the decision of the opening and closing state of the dehumidifier unit are as follows:

[0162] (18)

[0163] (19)

[0164] In the formula, This indicates the adjusted steam valve opening. This indicates the steam valve opening degree before adjustment. Indicates the on / off status of the dehumidifier unit. When, it indicates that the dehumidifier unit is in the on state, when When this time, it indicates that the dehumidifier unit is in a shut-off state.

[0165] In this embodiment, when the absolute value of the difference is greater than or equal to 1%, it is determined that the moisture content of the tobacco leaves in the storage room is in an abnormal process state. The adjustment strategy is determined to be the third strategy, which represents the emergency shutdown mode, and a shutdown command is executed on all hardware equipment.

[0166] In this way, by classifying responses according to the absolute value of moisture deviation, over-control can be avoided, equipment wear and tear can be reduced, control efficiency can be improved, and process accidents can be prevented.

[0167] In step 250, after determining the adjustment strategy, the operating parameters of each target hardware are adjusted based on the adjustment strategy. For example, the steam valve opening, fan speed, and the on / off status of the dehumidifier unit are adjusted to achieve the purpose of adjusting the moisture content in the leaf storage chamber.

[0168] It should be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the electronic device 100 described above can be referred to the corresponding process of each step in the aforementioned method, and will not be elaborated further here.

[0169] This application also provides a computer program product, characterized in that it includes a computer program, which, when executed by processor 101, implements the above-described RNN-based leaf storage room moisture regulation method.

[0170] Based on the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by hardware or by using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application can be embodied in the form of a software product. This software product can be stored in a non-volatile storage medium (such as CD-ROM, USB flash drive, mobile hard drive, etc.) and includes several instructions to cause a computer device (such as a personal computer, server, or network device, etc.) to execute the methods described in the various implementation scenarios of this application.

[0171] In summary, this application provides an RNN-based method, electronic device, and program product for controlling the moisture content of tobacco storage rooms. In this technical solution, firstly, state data characterizing the current internal state of the storage room to be adjusted is acquired and preprocessed to obtain preprocessed state data. Then, based on the preprocessed state data, a preset RNN prediction network is used to predict the tobacco moisture content after a preset time period, which is then used as the predicted moisture content. Next, based on the difference between the predicted moisture content and the preset target moisture content, an adjustment strategy for the target hardware is determined. Finally, the operating parameters of the target hardware are adjusted according to the adjustment strategy to regulate the moisture content of the storage room. Thus, based on state data, the RNN prediction network predicts the moisture content of the tobacco leaves in the storage room after a period of time, and based on the difference between the predicted value and the desired target moisture content, hardware operating parameter adjustment decisions are made, achieving precise predictive control of the moisture content in the storage room. This improves upon the problem of traditional tobacco storage room moisture control methods, which cannot accurately predict the moisture change trend of the tobacco leaves in the storage room over a future period, resulting in a lag in control actions compared to actual needs.

[0172] In the embodiments provided in this application, it should be understood that the disclosed methods can also be implemented in other ways. The method embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or part of code, which includes one or more executable instructions for implementing a specified logical function. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions. Furthermore, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0173] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A method for regulating moisture in a leaf storage room based on RNN, characterized in that, The method includes: Obtain status data that characterizes the internal state of the tobacco storage room at the current moment. The status data includes at least one of the following: ambient temperature, ambient humidity, material storage, tobacco moisture content, fan speed, and steam valve opening. The state data is preprocessed to obtain preprocessed state data; Based on the preprocessed state data, the moisture content of tobacco leaves after a preset time period is predicted using a preset RNN prediction network, and this prediction is used as the moisture content. Based on the difference between the predicted moisture content and the preset target moisture content, the adjustment strategy for the target hardware is determined; The operating parameters of the target hardware are adjusted using the adjustment strategy to regulate the moisture content of the leaf storage room to be adjusted.

2. The method according to claim 1, characterized in that, Obtain state data characterizing the current internal state of the leaf chamber to be regulated, including: Acquiring sensor data, including at least one of the following: ambient temperature, ambient humidity, material storage capacity, tobacco leaf moisture content, fan speed, and steam valve opening. The sensor data is converted into a vector representation to obtain the vector features corresponding to each data item in the sensor data. The vector features corresponding to each data item are then concatenated to obtain an initial feature vector. The state data is obtained by concatenating the preset tobacco leaf batch feature vector with the initial feature vector.

3. The method according to claim 1, characterized in that, The state data is preprocessed to obtain preprocessed state data, including: The state data is filtered using a multi-channel Wiener filter to obtain filtered state data. By weighting each data point in the filtered state data using a preset airflow field distribution matrix, airflow compensation data is obtained. The airflow compensation data is normalized to obtain normalized data, which is used as the preprocessed state data.

4. The method according to claim 1, characterized in that, Based on the preprocessed state data, the moisture content of tobacco leaves after a preset time period is predicted using a preset RNN prediction network. This predicted moisture content includes: The input data is feature extracted by the feature extraction layer in the preset RNN prediction network to obtain the spatiotemporal feature vector corresponding to the input data. The input data includes the preprocessed state data within a preset time step. Based on the time-controlled feature vector, the spatiotemporal feature vector is subjected to gating operation through the feature enhancement layer in the preset RNN prediction network to obtain the hidden state feature vector; Based on the hidden state feature vector, the attention weights corresponding to the hidden state feature vector are determined through the temporal attention layer in the preset RNN prediction network. Based on the hidden state feature vector and the attention weight, the moisture content of the tobacco leaf after a preset duration at the current moment is determined through the multi-scale prediction output layer in the preset RNN prediction network, and is used as the predicted moisture content.

5. The method according to claim 4, characterized in that, The spatiotemporal feature vector includes spatial feature vector and temporal feature vector; The input data is processed by the feature extraction layer in the preset RNN prediction network to obtain the spatiotemporal feature vector corresponding to the input data, including: Using a preset convolution kernel weight matrix, the input data is convolved in one dimension through the feature extraction layer to obtain the spatial feature vector: ; In the formula, Represents spatial eigenvectors. Represents one-dimensional convolution. Indicates input data, This represents the preset convolution kernel weight matrix; Using a preset gating weight matrix and a preset airflow field distribution matrix, the input data is subjected to gating operations through the feature extraction layer to obtain the time feature vector: ; In the formula, Represents the time feature vector. This represents the sigmoid activation function. This represents the preset gate weight matrix. This represents the preset airflow field distribution matrix. Indicates the first bias term; The spatial feature vector and the temporal feature vector are fused to obtain the spatiotemporal feature vector: ; In the formula, Represents the spatiotemporal feature vector. This indicates element-wise multiplication.

6. The method according to claim 4, characterized in that, Based on the time-controlled feature vector, a gating operation is performed on the spatiotemporal feature vector through the feature enhancement layer in the preset RNN prediction network to obtain the hidden state feature vector, including: Using a preset airflow field distribution matrix and the fan speed, the physical delay compensation parameters are determined: ; In the formula, Indicates the physical delay compensation parameter. Indicates the fan speed. This represents the preset airflow field distribution matrix. This represents the gradient norm of the airflow field corresponding to the preset airflow field distribution matrix. , These are learnable parameters; The input data for the gating operation is initialized using a preset multilayer perceptron and a preset tobacco batch feature vector to obtain the initial operation input: ; In the formula, , As the initial input for the operation, This indicates a preset multilayer sensor. This represents the preset feature vector of tobacco leaf batch. To preset the parameters of the multilayer perceptron, This represents a trainable batch feature matrix of tobacco leaves. Indicates the second bias term; Based on the initial computational input and the physical delay compensation parameters, the spatiotemporal feature vector is subjected to the gating operation through the feature enhancement layer to obtain the hidden state feature vector: ; In the formula, This represents the sigmoid activation function. , , , For a trainable weight matrix, express The spatiotemporal feature vector at time t, , , , These are the third, fourth, fifth, and sixth bias terms, respectively. express The spatiotemporal feature vector at time t, This represents the hidden state feature vector.

7. The method according to claim 4, characterized in that, Based on the hidden state feature vector and the attention weights, the moisture content of the tobacco leaf after a preset duration at the current time is determined through the multi-scale prediction output layer in the preset RNN prediction network, and is used as the predicted moisture content, including: Based on the hidden state feature vector and the attention weight within the preset time step, long-term and short-term features are determined through the multi-scale prediction output layer: ; In the formula, Indicates short-term characteristics, Indicates long-term features, Indicates attention weights, Represents hidden state features. Indicates the preset time step. Indicates the short-term window size; Based on the long-term and short-term features, the multi-scale prediction output layer predicts the tobacco leaf moisture content after a preset duration at the current moment, which is then used as the predicted moisture content. ; In the formula, This indicates the predicted moisture content. Indicates the current moment. Indicates the preset duration. This represents the preset prediction weight matrix, and this represents the seventh bias term.

8. The method according to claim 1, characterized in that, Based on the difference between the predicted moisture content and the preset target moisture content, an adjustment strategy for the target hardware is determined, including: The adjustment strategy is determined based on the absolute value of the difference between the predicted moisture content and the preset target moisture content; Wherein, when the absolute value of the difference is less than or equal to a first preset threshold, the steam valve and the blower are taken as the target hardware, and the adjustment strategy is determined to be the first strategy for fine-tuning the target hardware; When the absolute value of the difference is greater than the first preset threshold and less than or equal to the second preset threshold, the dehumidifier unit and the steam valve are taken as the target hardware, and the adjustment strategy is determined to be the second strategy of step control of the target hardware. When the absolute value of the difference is greater than or equal to the second preset threshold, all hardware devices are taken as the target hardware, and the adjustment strategy is determined to be the third strategy of shutting down the target hardware.

9. An electronic device, characterized in that, The electronic device includes a processor and a memory coupled together, the memory storing a computer program that, when executed by the processor, causes the electronic device to perform the method as described in any one of claims 1-8.

10. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the method as described in any one of claims 1-8.