Method for regulating and controlling tobacco leaf moisture, environment temperature and tobacco leaf storage duration in leaf storage room based on deep learning, electronic equipment and medium
By using a deep learning model to predict the moisture content of tobacco leaves and adjust the ambient temperature and duration of the storage room, the problems of inaccurate moisture control and excessive energy consumption in existing technologies have been solved, achieving on-demand control and energy optimization.
Patent Information
- Application Number
- CN202511018418.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-23
- Publication Date
- 2025-11-18
AI Technical Summary
Existing methods for controlling tobacco moisture in tobacco storage rooms rely on manual experience, which cannot achieve precise control. The coupling between temperature and moisture is insufficient, and the fixed storage time cannot adapt to the differences in the physicochemical properties of different batches of tobacco leaves, resulting in excessive energy consumption and an inability to adjust according to demand.
A deep learning-based approach is used to predict the moisture content of tobacco leaves through first and second deep learning models. Based on the predicted value, target moisture content, and energy consumption parameters, the ambient temperature and storage time are dynamically adjusted to achieve on-demand regulation and reduce unnecessary energy consumption.
It enables flexible adjustment based on user needs, reduces energy consumption in scenarios where high accuracy of moisture content is not required, and achieves the goal of reducing production costs.
Smart Images

Figure CN120959444A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of deep learning, in particular to a method for regulating tobacco moisture, environmental temperature and tobacco storage time in a tobacco storage room based on deep learning, an electronic device and a medium. BACKGROUND
[0002] The existing tobacco storage room has the following problems:
[0003] ①Moisture control relies on manual experience: The traditional method controls the water addition amount by fixed parameters, but it is difficult to achieve precise control due to environmental humidity, tobacco batch differences and other factors.
[0004] ②Insufficient coupling between temperature and moisture: Environmental humidity regulation and tobacco moisture change do not form a dynamic closed loop, resulting in uneven distribution of tobacco moisture in the tobacco storage cabinet.
[0005] ③Fixed storage time: Fixed storage time cannot adapt to the differences in physical and chemical properties of different batches of tobacco, which may cause excessive storage or moisture loss.
[0006] The existing tobacco storage room moisture regulation method generally uses fixed or high standard moisture content control targets, and sets the environmental temperature and storage time accordingly. This single-dimensional regulation strategy lacks flexibility and cannot dynamically adjust the control target according to the actual process requirements of the tobacco (such as different tolerance of different grades of tobacco to moisture content accuracy). As a result, in scenarios where the moisture content accuracy is not extreme, this strategy often leads to high energy consumption for environmental regulation, failing to achieve energy optimization under on-demand regulation. SUMMARY
[0007] Therefore, one of the purposes of the embodiments of the present application is to provide a method for regulating tobacco moisture, environmental temperature and storage time in a tobacco storage room based on deep learning, which can improve the problem that the existing tobacco storage room moisture regulation method fails to achieve energy optimization under on-demand regulation.
[0008] To achieve the above technical purposes, the technical solutions adopted by the present application are as follows:
[0009] In a first aspect, the embodiments of the present application provide a method for regulating tobacco moisture, environmental temperature and storage time in a tobacco storage room based on deep learning, comprising:
[0010] obtaining tobacco parameters, current environmental temperature, energy consumption parameters and time sequence parameters, wherein the tobacco parameters include initial tobacco moisture content and tobacco cumulative amount, the energy consumption parameters include actual power of energy-consuming appliances in the tobacco storage room, and the time sequence parameters include set storage time;
[0011] inputting the tobacco leaf parameters, the current environment temperature and the timing parameters into a first deep learning model, and causing the first deep learning model to output a predicted final tobacco leaf moisture content;
[0012] obtaining a target environment temperature and a target tobacco leaf storage duration according to the predicted final tobacco leaf moisture content, a target tobacco leaf moisture content, an energy consumption parameter and a regulation mode;
[0013] adjusting the environment temperature and the tobacco leaf storage duration to the target environment temperature and the target tobacco leaf storage duration respectively;
[0014] When the regulation mode is the first mode, the target environment temperature and the target tobacco leaf storage duration are obtained based on a first strategy, so that a difference between the target tobacco leaf moisture content and an actual final tobacco leaf moisture content is located in a first moisture content interval, and a difference between an actual energy consumption value and a target energy consumption value is located in a first energy consumption interval. When the regulation mode is the second mode, the target environment temperature and the target tobacco leaf storage duration are obtained based on a second strategy, so that the difference between the target tobacco leaf moisture content and the actual final tobacco leaf moisture content is located in a second moisture content interval, and the difference between the actual energy consumption value and the target energy consumption value is located in a second energy consumption interval. The length of the first moisture content interval is less than the length of the second moisture content interval, and the length of the first energy consumption interval is greater than the length of the second energy consumption interval.
[0015] Further, the obtaining of the target environment temperature and the target tobacco leaf storage duration according to the predicted final tobacco leaf moisture content, the target tobacco leaf moisture content, the energy consumption parameter and the regulation mode comprises:
[0016] inputting the predicted final tobacco leaf moisture content, the energy consumption parameter, the target tobacco leaf moisture content and the regulation mode into a second deep learning model, wherein, when the regulation mode is the first mode, the second deep learning model outputs the target environment temperature and the target tobacco leaf storage duration corresponding to the first mode based on the predicted final tobacco leaf moisture content, the target tobacco leaf moisture content and the energy consumption parameter, and when the regulation mode is the second mode, the second deep learning model outputs the target environment temperature and the target tobacco leaf storage duration corresponding to the second mode based on the predicted final tobacco leaf moisture content, the target tobacco leaf moisture content and the energy consumption parameter.
[0017] Further, before the inputting of the predicted final tobacco leaf moisture content, the target tobacco leaf moisture content and the regulation mode into the second deep learning model, the method comprises:
[0018] collect a first historical data set and a second historical data set, and mark a first identifier corresponding to a first mode in the first historical data set, and mark a second identifier corresponding to a second mode in the second historical data set, the first historical data set includes a plurality of first data mapping relationships, the first data mapping relationship includes a corresponding first historical predicted final tobacco moisture content, a first historical target tobacco moisture content, a first historical energy consumption parameter, a first historical target environment temperature and a first historical target tobacco storage time; the second historical data set includes a plurality of second data mapping relationships, the second data mapping relationship includes a corresponding second historical predicted final tobacco moisture content, a second historical target tobacco moisture content, a second historical energy consumption parameter, a second historical target environment temperature and a second historical target tobacco storage time;
[0019] input the first historical data set into the second deep learning model for training the second deep learning model;
[0020] input the second historical data set into the second deep learning model for training the second deep learning model;
[0021] input part of the first data mapping relationship in the first historical data set and part of the second data mapping relationship in the second historical data set into the second deep learning model for training the second deep learning model.
[0022] Further, the target environment temperature and the target tobacco storage time are obtained according to the predicted final tobacco moisture content, the target tobacco moisture content, the energy consumption parameter and the regulation mode, comprising:
[0023] when the regulation mode is the first mode, the target environment temperature and the target tobacco storage time are obtained according to the predicted final tobacco moisture content, the target tobacco moisture content, the energy consumption parameter and the regulation mode based on a first algorithm, the first algorithm is:
[0024] the objective function is:
[0025] the constraint condition is:
[0026] wherein, MC(t) is the predicted final tobacco moisture content at time t;
[0027] T(t), H(t) represent the target environment temperature and the target environment humidity at time t respectively;
[0028] τ represents the target tobacco storage time;
[0029] λ1 represents the first time penalty coefficient;
[0030] MC targetindicates a target tobacco moisture content;
[0031] t0 indicates a starting time when the tobacco enters the tobacco barn;
[0032] E(t0+τ) is the total energy consumption at time t0+τ.
[0033] Further, the target environment temperature and the target tobacco storage duration are obtained according to the predicted final tobacco moisture content, the target tobacco moisture content, the energy consumption parameter, and the regulation mode, including: when the regulation mode is the second mode, the target environment temperature and the target tobacco storage duration are obtained according to the predicted final tobacco moisture content, the target tobacco moisture content, the energy consumption parameter, and the regulation mode based on a second algorithm, the second algorithm being:
[0034] The objective function is:
[0035] The constraint condition is:
[0036] λ2 indicates a second duration penalty coefficient.
[0037] Further, before the tobacco parameter, the current environment temperature, and the time sequence parameter are input into the first deep learning model, the method further includes:
[0038] A third historical data set is collected, the third historical data set including a plurality of third data mapping relationships, the third data mapping relationship including a historical tobacco parameter, a historical environment temperature, a historical time sequence parameter, and a historical actual final tobacco moisture content;
[0039] The third historical data set is input into the first deep learning model for training the first deep learning model.
[0040] In a second aspect, the embodiments of the present application further provide an electronic device, which includes a processor and a memory coupled with each other, and the memory stores a computer program. When the computer program is executed by the processor, the electronic device executes the method described above.
[0041] In a third aspect, the embodiments of the present application further provide a computer readable storage medium, which stores a computer program. When the computer program is executed on a computer, the computer executes the method described above.
[0042] The application with the above technical solution has the following advantages:
[0043] In the technical scheme provided in the present application, the first deep learning model is used to obtain the predicted final tobacco moisture content, and then the target environment temperature and the target leaf storage duration are obtained according to the predicted final tobacco moisture content, the target tobacco moisture content, the energy consumption parameter and the regulation mode, so that the user can focus on energy consumption or tobacco moisture content, and the first mode or the second mode selected by the user is used to regulate the environment temperature and the leaf storage duration of the leaf storage house according to different requirements of the tobacco, which overcomes the limitation of single control target in the prior art, realizes on-demand regulation, significantly reduces unnecessary energy consumption in a scenario where the accuracy requirement of the moisture content is not the highest, and achieves the purpose of reducing production cost. BRIEF DESCRIPTION OF DRAWINGS
[0044] The present application can be further illustrated by the non-limiting embodiments shown in the accompanying drawings. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be considered as limiting the scope, and other related drawings can also be obtained by those skilled in the art without creative labor.
[0045] Figure 1 The flowchart provided for the embodiments of the present application. DETAILED DESCRIPTION
[0046] The present application will be described in detail below in combination with the drawings and specific embodiments. It should be noted that in the drawings or description, similar or identical parts are denoted by the same reference numerals, and the implementation modes not shown or described in the drawings are known to those skilled in the art. In the description of the present application, the terms "first", "second", etc. are only used for differentiation and description, and cannot be understood as indicating or implying relative importance.
[0047] The electronic device provided in the embodiments of the present application can include a processing module and a storage module. The storage module stores a computer program, and when the computer program is executed by the processing module, the electronic device can execute the corresponding steps in the following regulation method.
[0048] Please refer to Figure 1 The present application also provides a regulation method for tobacco moisture, environment temperature and leaf storage duration of a leaf storage house based on deep learning. The regulation method can include the following steps:
[0049] S110, obtaining tobacco parameters, current environment temperature, energy consumption parameter and time sequence parameter, the tobacco parameters including initial tobacco moisture content and tobacco cumulative amount, the energy consumption parameter including actual power of an energy consumption appliance in the leaf storage house, and the time sequence parameter including set leaf storage duration;
[0050] S120, inputting the tobacco leaf parameter, the current environment temperature and the timing parameter into a first deep learning model, and causing the first deep learning model to output a predicted final tobacco leaf moisture content;
[0051] S130, obtaining a target environment temperature and a target tobacco leaf storage duration according to the predicted final tobacco leaf moisture content, a target tobacco leaf moisture content, an energy consumption parameter and a regulation mode;
[0052] S140, adjusting the environment temperature and the tobacco leaf storage duration to the target environment temperature and the target tobacco leaf storage duration respectively.
[0053] When the regulation mode is the first mode, the target environment temperature and the target tobacco leaf storage duration are obtained based on a first strategy, so that a difference between the target tobacco leaf moisture content and an actual final tobacco leaf moisture content is located in a first moisture content interval, and a difference between an actual energy consumption value and a target energy consumption value is located in a first energy consumption interval; when the regulation mode is the second mode, the target environment temperature and the target tobacco leaf storage duration are obtained based on a second strategy, so that the difference between the target tobacco leaf moisture content and the actual final tobacco leaf moisture content is located in a second moisture content interval, and the difference between the actual energy consumption value and the target energy consumption value is located in a second energy consumption interval, a length of the first moisture content interval is less than a length of the second moisture content interval, and a length of the first energy consumption interval is greater than a length of the second energy consumption interval.
[0054] It can be understood that the first mode and the second mode are selected by a user, that is, the user can select the first mode or the second mode to determine the target environment temperature and the target tobacco leaf storage duration, for example, an identifier of the first mode and an identifier of the second mode can be displayed on a display screen of an electronic device, when the user selects the first mode, the electronic device sends a message, the message displays the identifier of the first mode and does not display the identifier of the second mode, after receiving the message, a controller integrated with the above method calculates the target environment temperature and the target tobacco leaf storage duration based on the first mode, and sends the target environment temperature and the target tobacco leaf storage duration to a tobacco leaf storage device.
[0055] The steps of the regulation method will be described in detail as follows:
[0056] In S110, the initial tobacco leaf moisture content can be detected by a microwave / near-infrared online detector, for example, a plurality of groups of microwave / near-infrared online detectors for detecting the initial tobacco leaf moisture content can be arranged at the inlet / outlet of the tobacco leaf storage cabinet, and then the initial moisture content of the tobacco leaf is determined by a weighted average method.
[0057] The tobacco leaf cumulative amount can be obtained by weighing by a nuclear scale or a belt scale.
[0058] The current environment temperature can be obtained by collecting through a plurality of temperature sensors arranged in the tobacco leaf storage room.
[0059] The actual power of the energy-consuming appliance in the leaf storage room can be collected by a related collection device, and the final energy consumption can be calculated based on the actual power and the actual leaf storage duration.
[0060] The leaf storage duration is set as an empirical value set by the user.
[0061] In S120, the first deep learning model is used to predict and output the predicted final tobacco moisture content, and the training mode of the first deep learning model can be:
[0062] The third historical data set is collected, and the third historical data set includes a plurality of third data mapping relationships, and the third data mapping relationship includes historical tobacco parameters, historical environmental temperature, historical time sequence parameters and historical actual final tobacco moisture content.
[0063] The third historical data set is input into the first deep learning model for training the first deep learning model.
[0064] Exemplarily, the first deep learning model can be a CNN-LSTM hybrid neural network model, wherein the convolutional neural network (CNN) component is responsible for extracting spatial features. For example: identifying the local influence of temperature distribution difference in different areas (such as corners and center) in the leaf storage room on tobacco moisture evaporation, capturing the spatial coupling relationship between tobacco accumulation and temperature field (such as faster moisture diffusion in high flow area). The long short-term memory network (LSTM) component is responsible for modeling time dependence. For example: learning the delayed effect of high temperature in the previous 24 hours on subsequent moisture change, the stable characteristics of moisture content after the leaf storage duration reaches the critical point (such as 48 hours).
[0065] The model is composed of five core structures, forming a complete path of “feature extraction-time sequence modeling-decision output”, including the following parts:
[0066] 1. Input layer, the input data structure is:
[0067] Time dimension: continuous time step sequence (for example, sampling every hour, a total of 72 hours);
[0068] Feature dimension (included per time step): tobacco static parameters (initial moisture content, tobacco accumulation)
[0069] Environmental dynamic parameters (current environmental temperature)
[0070] Control parameters (cumulative leaf storage duration)
[0071] Physical meaning: build a “parameter space-time matrix” reflecting the whole leaf storage process, and each row of the matrix represents the process state at a time point.
[0072] 2. CNN feature extraction layer
[0073] Core operation: sliding scan along time axis using 1D convolution kernel, analyzing 3-5 hours data window each time, identifying local patterns (e.g. "temperature spike accompanied by sharp moisture drop") through nonlinear activation function, for discovering spatial correlation (e.g. tobacco dehydration rate 15% faster in upper layer than lower layer in a cabinet) extracting key feature maps: transforming original parameters into high-dimensional feature vectors (e.g. mapping "temperature + initial moisture" into "moisture evaporation potential index").
[0074] 3. Sequence reconstruction layer
[0075] Pass-through: reorganizing feature maps output by CNN by time step, forming sequence format processable by LSTM. For example, compressing 72 hours raw data into 36 time steps, each carrying 64-dimensional features.
[0076] 4. LSTM time series modeling layer
[0077] Including double-layer cascading structure, respectively, first layer LSTM and second layer LSTM.
[0078] First layer LSTM: for retaining all time step outputs, capturing medium and short-term dependencies (e.g. influence of temperature and humidity fluctuations within 6 hours);
[0079] Second layer LSTM: for outputting only the final state, focusing on long-term regularities (e.g. moisture balance characteristics in the later stage of tobacco storage)
[0080] Memory mechanism: forgetting gate determines how much historical information to retain (e.g. ignoring temporary temperature sensor failure) input gate filters current important features (e.g. sudden humidity changes).
[0081] 5. Fully connected output layer
[0082] Feature fusion: reducing and integrating high-order time series features output by LSTM, eliminating redundant information
[0083] Final prediction: outputting a single prediction value - tobacco moisture content percentage (e.g. 19.5%) through linear activation function.
[0084] Data processing flow using this model: standardizing input data → CNN extracting spatial patterns → LSTM modeling time evolution → outputting moisture content prediction value.
[0085] In this embodiment, it can be understood that the historical tobacco parameters include historical initial tobacco moisture content and historical tobacco cumulative amount, and the historical time series parameters include historical actual tobacco storage time, and the third historical data set can be obtained from the database of the completed tobacco storage house.
[0086] In S130, the following steps are specifically included:
[0087] The predicted final tobacco moisture content, energy consumption parameter, target tobacco moisture content, and regulation mode are input into a second deep learning model, wherein when the regulation mode is the first mode, the second deep learning model outputs the target environment temperature and target leaf storage time corresponding to the first mode based on the predicted final tobacco moisture content, target tobacco moisture content, and energy consumption parameter, and when the regulation mode is the second mode, the second deep learning model outputs the target environment temperature and target leaf storage time corresponding to the second mode based on the predicted final tobacco moisture content, target tobacco moisture content, and energy consumption parameter.
[0088] In this embodiment, the training process of the second deep learning model is a key link, and the core goal is to enable the model to automatically generate optimal target environment temperature and target leaf storage time according to different regulation modes (the first mode focuses on moisture content accuracy, and the second mode focuses on energy consumption control).
[0089] The architecture of the second deep learning model is usually a deep neural network (DNN) model with pattern perception capability, which needs to meet the following requirements:
[0090] Handle mixed type inputs: can receive both continuous numerical features (predicted moisture content, target moisture content, energy consumption parameter) and classification features (regulation mode).
[0091] Mode-conditioned output: can dynamically adjust its internal calculation path or weight according to the input regulation mode value (first mode or second mode) to output target environment temperature and target leaf storage time that adapt to different optimization goals (moisture content accuracy priority or energy consumption priority).
[0092] The architecture of the model includes:
[0093] 1. Input layer node number: equal to the total dimension of input features.
[0094] Input features: predicted final tobacco moisture content: 1 continuous numerical node.
[0095] Target tobacco moisture content: 1 continuous numerical node.
[0096] Energy consumption parameter: can be 1 (such as total power) or multiple nodes (such as power of different devices).
[0097] Assuming K continuous numerical nodes. Regulation mode: 1 classification feature node. Usually One-Hot Encoding: if the mode has only two types (first mode, second mode), encoded as [1, 0] and
[0098] [0,1], occupies 2 nodes. (More modes are theoretically possible). Total input dimension: 1 (predicted water cut) + 1 (target water cut) + K (energy consumption) + 2 (mode encoding) = 4 + K nodes.
[0099] 2. Feature fusion layer, purpose: map different types and dimensions of input features (numerical features + encoded categorical features) to a unified representation space that can be effectively processed by the subsequent network.
[0100] Structure: 1 or more fully connected layers (DenseLayers).
[0101] Operation: All input nodes (water cut, target, energy consumption, mode encoding) are connected to each neuron in this layer. Activation function: ReLU (Rectified Linear Unit) or its variants (such as LeakyReLU) are usually used to introduce nonlinearity. Sometimes tanh is also used. Output: a higher-dimensional feature vector (e.g., containing M neurons) that integrates all input information.
[0102] 3. Mode-aware hidden layer (core), purpose: let the network learn to select or adjust its calculation method according to the mode encoding to fit the optimal control strategy under different modes.
[0103] Structure: multiple fully connected layers (DenseLayers) stacked. This is the key part of the model to learn complex mode-strategy mapping.
[0104] Key mechanism: The input feature fusion vector contains the encoding information of the control mode ([1,0] or [0,1]). These mode information propagate in the network together with water cut and energy consumption information.
[0105] Through training, the network automatically learns that some parts of its weight matrix or activation patterns will differ depending on the input control mode. In essence, the network "learns" internally: when it sees [1,0] (first mode), the activation is biased towards learning the feature combination needed for "precise control of water cut". When it sees [0,1] (second mode), the activation is biased towards learning the feature combination needed for "optimizing energy consumption".
[0106] Activation function: ReLU or its variants are still the mainstream choice to maintain non-linear representation ability.
[0107] Number of layers and width: The specific number of layers (such as 2-5 layers) and the number of neurons in each layer (such as 32, 64, 128) are hyperparameters that need to be determined through experiments (such as cross-validation) according to the amount of data and the complexity of the task to balance the fitting ability and the risk of overfitting.
[0108] 4. Output layer
[0109] Objective: Generate final prediction values - target ambient temperature and target storage duration.
[0110] Structure: 1 fully connected layer.
[0111] Number of nodes: 2 (corresponding to target ambient temperature and target storage duration respectively).
[0112] Activation function: Usually use linear activation function (LinearActivation) or identity function (IdentityFunction). This is because the output is continuous value (temperature, duration), no need for non-linear transformation for range limitation (such as Softmax in classification task). Sometimes in order to ensure the output is positive number (duration is definitely positive), ReLU can be used in duration output node, but this is not absolutely necessary, and linear output is more general.
[0113] The second deep learning model is trained by learning "what is the historically optimal control parameter (temperature, duration) under certain input (moisture content prediction, target, energy consumption) and certain mode (first or second)". The mode label tells the model which set of historically optimal strategy to apply.
[0114] In this embodiment, the training of the second deep learning model is realized by the following way:
[0115] Collect the first historical data set and the second historical data set, and label the first historical data set with the first label corresponding to the first mode, and label the second historical data set with the second label corresponding to the second mode, the first historical data set includes a plurality of first data mapping relationships, the first data mapping relationship includes corresponding first historical predicted final tobacco moisture content, first historical target tobacco moisture content, first historical energy consumption parameter, first historical target ambient temperature and first historical target storage duration; the second historical data set includes a plurality of second data mapping relationships, the second data mapping relationship includes corresponding second historical predicted final tobacco moisture content, second historical target tobacco moisture content, second historical energy consumption parameter, second historical target ambient temperature and second historical target storage duration;
[0116] Input the first historical data set into the second deep learning model for training the second deep learning model;
[0117] Input the second historical data set into the second deep learning model for training the second deep learning model;
[0118] Map the part of the first data mapping relationship in the first historical data set and the part of the second data mapping relationship in the second historical data set into a second deep learning model for training the second deep learning model.
[0119] Exemplarily, the following is a scheme for training a second deep learning model based on the above scheme. The following scheme is a supervised learning process based on dual-mode historical data, aiming to enable the model to learn how to generate accurate control targets (environmental temperature, leaf storage time) and prediction values (final tobacco moisture content) under two different optimization targets (optimal tobacco moisture mode vs. optimal energy consumption mode).
[0120] The steps for training the second deep learning model are as follows:
[0121] Data preparation and annotation:
[0122] Data set division: Collect historical operation data and explicitly divide it into two categories: the first historical data set: contains all historical batch data running under the "optimal tobacco moisture mode". The second historical data set: contains all historical batch data running under the "optimal energy consumption mode".
[0123] Annotation mode identification:
[0124] On each data sample (or "first data mapping relationship") in the first historical data set, add an explicit first identification (e.g., label Mode = Quality or value 1) to indicate that the data sample is generated under the "optimal tobacco moisture mode".
[0125] On each data sample (or "second data mapping relationship") in the second historical data set, add an explicit second identification (e.g., label Mode = Efficiency or value 0) to indicate that the data sample is generated under the "optimal energy consumption mode".
[0126] Construct data mapping relationship: Each data sample (whether first or second data set) contains the following key elements to form a complete "mapping relationship":
[0127] Input features (conditions that the model needs to learn) include:
[0128] Mode identification (Mode_ID): Tell the model which optimization mode the current sample belongs to (first identification or second identification).
[0129] Predicted_Final_MC: More reasonable inputs are the current state information (such as batch initial parameters, real-time environment, storage time of leaves, etc.) and the set target (target moisture content MC_target, target energy consumption Energy_target). MC_target: The desired final moisture content set by the process. Target_Temp / Target_Humidity: (Note: The description only mentions temperature, but humidity is usually equally important) Presumably this refers to the actual environmental temperature control target value being executed at the time. Target_Storage_Time: Presumably this refers to the actual total storage time target value being executed or planned at the time. Energy_Params: Data describing the actual energy consumption (such as total energy consumption, average power, etc.).
[0130] Training process:
[0131] First stage: Mode-specific preliminary learning Training set 1: Input the entire first historical data set (all samples labeled with the first identifier) into the second deep learning model for training. Purpose: Let the model deeply learn how to accurately predict the final moisture content (Predicted_Final_MC) based on the input batch state, environmental state, set MC_target and Energy_target (under the moisture mode, Energy_target constraints may be more relaxed) under the "optimal leaf moisture mode" (first identifier), and generate an environmental temperature control target (Target_Temp) and a storage time target (Target_Storage_Time) that can accurately achieve the moisture prediction value (and meet the strict moisture deviation requirement). Training set 2: Input the entire second historical data set (all samples labeled with the second identifier) into the same second deep learning model for training. Purpose: Let the model deeply learn how to accurately predict the final moisture content based on the input batch state, environmental state, set MC_target (relaxed constraints) and Energy_target (strict constraints) under the "optimal energy consumption mode" (second identifier), and generate an environmental temperature control target (Target_Temp) and a storage time target (Target_Storage_Time) that can make the actual energy consumption as close as possible to Energy_target and meet the relaxed moisture constraint.
[0132] Second stage: Mode mixing and generalization learning Training set 3: Extract a portion of samples from the first historical dataset (partial first identification samples) and a portion of samples from the second historical dataset (partial second identification samples), mix them together to form a comprehensive training set, input to the same second deep learning model for training. The purpose is to prevent mode overfitting: avoid the model performing well only when seeing single mode data. Mixed training forces the model to strengthen the water priority behavior when seeing the first identification, and to strengthen the energy consumption priority behavior when seeing the second identification.
[0133] Learning mode switching and trade-off: Let the model understand the core difference between the two modes (identified by Mode_ID), and learn how to adjust its internal parameters to optimize different goals (moisture accuracy vs. energy consumption accuracy) under different identifications.
[0134] Enhance generalization ability: Make the model robustly generate appropriate control targets when facing slightly different new batches or environmental conditions, regardless of which mode it is in.
[0135] Training mechanism: The model (such as a deep neural network-DNN with multiple task output heads, or a time series model such as Transformer / LSTM) receives input features X. The model tries to predict three target values simultaneously: Predicted_Final_MC, Target_Temp, Target_Storage_Time. Calculate the loss (Loss) between the predicted values of the model and the true target values (Y) provided in the training data (i.e. historical predicted final tobacco moisture content, historical target environment temperature, historical target leaf storage time in the data items). Common loss functions such as mean square error (MSE) or mean absolute error (MAE). Use optimization algorithms (such as Adam) to backpropagate errors according to loss values, update model weight parameters to minimize total prediction error. This process is repeated in three stages (pure mode 1 data, pure mode 2 data, mixed data) until the model's performance on the validation set reaches a satisfactory or no longer significant improvement.
[0136] In this embodiment, the mode identification is the core input: the first identification / second identification is the key signal that tells the model which optimization strategy needs to be executed. Without it, the model cannot distinguish between moisture priority or energy consumption. The role of data items needs to be clear: the historical predicted final tobacco moisture content, historical target environment temperature, historical target leaf storage time in the training data should be the target output (Y) of the model learning. Historical target tobacco moisture content, historical energy consumption parameters, and unmentioned target energy consumption values, batch parameters, environmental conditions, etc. should be part of the input features (X).
[0137] Three-stage training strategy: Stage 1 (pure mode 1): Focus on learning precise regulation in the "water priority" mode. Stage 2 (pure mode 2): Focus on learning precise regulation in the "energy consumption priority" mode. Stage 3 (mixed mode): Improve the model's ability to distinguish between modes, flexible switching, and generalization.
[0138] The second deep learning model after training should have the ability to accurately predict the final tobacco moisture content (Predicted_Final_MC) under the condition of executing regulation according to the input mode identification, batch state, environmental state, set moisture target (MC_target) and energy consumption target (Energy_target). Generate the most suitable environmental temperature regulation target (Target_Temp) and storage time target (Target_Storage_Time) for the current mode. In the water mode, the generated Target_Temp and Target_Storage_Time should ensure that the final moisture strictly meets the standard; in the energy consumption mode, the generated Target_Temp and Target_Storage_Time should make the energy consumption as close to the target value as possible, while the moisture meets the relaxed requirements. Through this multi-stage training based on the annotated dual-mode historical data set, the second deep learning model can ultimately understand and execute two different optimization strategies, and when receiving the corresponding mode identification, it can accurately output the environmental temperature regulation target and storage time target that meet the requirements of the strategy, thereby realizing the "dual-mode intelligent linkage regulation" you initially described.
[0139] In at least one embodiment, when it is the first mode, the target environmental temperature and the target storage time can be obtained based on the first algorithm according to the predicted final tobacco moisture content, the target tobacco moisture content, the energy consumption parameter, and the regulation mode,
[0140] The first algorithm is:
[0141] The objective function is:
[0142] The constraint condition is:
[0143] Wherein, MC(t) is the predicted final tobacco moisture content at time t;
[0144] T(t), H(t) represent the target environmental temperature and target environmental humidity at time t, respectively;
[0145] v represents the target storage time;
[0146] λ1 represents the first time penalty coefficient;
[0147] MC target represents the target tobacco moisture content;
[0148] t0 represents the starting moment when the tobacco leaves enter the tobacco storage house;
[0149] E(t0+τ) is the total energy consumption at time t0+τ.
[0150] When the regulation mode is the second mode, according to the predicted final tobacco moisture content, the target tobacco moisture content, the energy consumption parameter and the regulation mode, a target environment temperature and a target tobacco storage time length are obtained based on a second algorithm, the second algorithm being that a target function is:
[0151] Constraint condition:
[0152] λ2 represents a second time length penalty coefficient.
[0153] In this embodiment, the processing module can be an integrated circuit chip with signal processing capability. The processing module can be a general-purpose processor. For example, the processor 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 device, a discrete gate or transistor logic device, a discrete hardware component, and can implement or execute the disclosed methods, steps and logic block diagrams in the embodiments of the present application.
[0154] The storage module can be, but is not limited to, a random access memory, a read-only memory, a programmable read-only memory, an erasable programmable read-only memory, an electrically erasable programmable read-only memory, etc.
[0155] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the electronic device described above can refer to the corresponding process of each step in the foregoing method, and will not be described in more detail here.
[0156] The embodiments of the present application also provide a computer readable storage medium. The computer readable storage medium stores a computer program, and when the computer program runs on a computer, the computer executes the regulation method as described in the above embodiments.
[0157] Those skilled in the art can clearly understand the technical solutions of the present application through the above description of the embodiments of the present application. The technical solutions of the present application can be implemented by hardware, or by software with the aid of necessary universal hardware platforms. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product. The software product can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash disk, a mobile hard disk, or the like), and includes a number of instructions for causing a computer device (which can be a personal computer, an electronic device, or a network device, or the like) to execute the methods described in the various embodiments of the present application.
[0158] In the embodiments provided by the present application, it should be understood that the disclosed method can also be implemented in other manners. The embodiments described above are merely exemplary. For example, the flowcharts and block diagrams in the accompanying drawings show the possible implementation architectures, functions and operation of the methods and computer program products according to the embodiments of the present application. In this regard, each block in the flowcharts or block diagrams can represent a module, a program segment or a part of code, which contains one or more executable instructions for implementing the specified logic function. It should also be noted that each block in the flowcharts or block diagrams, or a combination of blocks in the flowcharts or block diagrams, can be implemented by a dedicated hardware-based system, or can be implemented by a combination of special-purpose hardware and computer instructions. In addition, the various functional modules in the embodiments of the present application can be integrated into one independent part, or can exist separately, or two or more functional modules can be integrated into one independent part.
[0159] The above only describes the embodiments of the present application and is not used to limit the protection scope of the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for regulating tobacco leaf moisture, ambient temperature, and storage time in tobacco storage rooms based on deep learning, characterized in that, The method includes: Acquire tobacco leaf parameters, current ambient temperature, energy consumption parameters, and time series parameters. The tobacco leaf parameters include the initial tobacco leaf moisture content and the cumulative amount of tobacco leaves. The energy consumption parameters include the actual power of the energy-consuming electrical appliances in the leaf storage room. The time series parameters include the set leaf storage duration. The tobacco leaf parameters, current ambient temperature, and time series parameters are input into the first deep learning model, so that the first deep learning model outputs a prediction of the final tobacco leaf moisture content. Based on the predicted final tobacco leaf moisture content, target tobacco leaf moisture content, energy consumption parameters, and control mode, the target ambient temperature and target leaf storage time are obtained. Adjust the ambient temperature and leaf storage time to the target ambient temperature and target leaf storage time, respectively; Wherein, when the control mode is the first mode, the target ambient temperature and target leaf storage time are obtained based on the first strategy, so that the difference between the target tobacco leaf moisture content and the actual final tobacco leaf moisture content is within the first moisture content range, and the difference between the actual energy consumption value and the target energy consumption value is within the first energy consumption range; when the control mode is the second mode, the target ambient temperature and target leaf storage time are obtained based on the second strategy, so that the difference between the target tobacco leaf moisture content and the actual final tobacco leaf moisture content is within the second moisture content range, and the difference between the actual energy consumption value and the target energy consumption value is within the second energy consumption range, wherein the length of the first moisture content range is less than the length of the second moisture content range, and the length of the first energy consumption range is greater than the length of the second energy consumption range.
2. The method according to claim 1, characterized in that, The process of obtaining the target ambient temperature and target storage time based on the predicted final tobacco leaf moisture content, target tobacco leaf moisture content, energy consumption parameters, and control mode includes: The predicted final tobacco leaf moisture content, energy consumption parameters, target tobacco leaf moisture content, and control mode are input into the second deep learning model. When the control mode is the first mode, the second deep learning model outputs the target ambient temperature and target storage time corresponding to the first mode based on the predicted final tobacco leaf moisture content, target tobacco leaf moisture content, and energy consumption parameters. When the control mode is the second mode, the second deep learning model outputs the target ambient temperature and target storage time corresponding to the second mode based on the predicted final tobacco leaf moisture content, target tobacco leaf moisture content, and energy consumption parameters.
3. The method according to claim 2, characterized in that, Before inputting the predicted final tobacco leaf moisture content, the target tobacco leaf moisture content, and the control mode into the second deep learning model, the method includes: A first historical dataset and a second historical dataset are collected. A first identifier corresponding to a first pattern is labeled in the first historical dataset, and a second identifier corresponding to a second pattern is labeled in the second historical dataset. The first historical dataset includes several first data mapping relationships, each including a corresponding first historical predicted final tobacco leaf moisture content, a first historical target tobacco leaf moisture content, a first historical energy consumption parameter, a first historical target ambient temperature, and a first historical target leaf storage time. The second historical dataset includes several second data mapping relationships, each including a corresponding second historical predicted final tobacco leaf moisture content, a second historical target tobacco leaf moisture content, a second historical energy consumption parameter, a second historical target ambient temperature, and a second historical target leaf storage time. The first historical dataset is input into the second deep learning model to train the second deep learning model; The second historical dataset is input into the second deep learning model to train the second deep learning model; A portion of the first data mapping relationship in the first historical dataset and a portion of the second data mapping relationship in the second historical dataset are input into the second deep learning model to train the second deep learning model.
4. The method according to claim 1, characterized in that, The process of obtaining the target ambient temperature and target storage time based on the predicted final tobacco leaf moisture content, target tobacco leaf moisture content, energy consumption parameters, and control mode includes: When the control mode is the first mode, based on the predicted final tobacco leaf moisture content, target tobacco leaf moisture content, energy consumption parameters, and control mode, the target ambient temperature and target leaf storage time are obtained using the first algorithm. The first algorithm is as follows: The objective function is: Constraints: Where MC(t) is the predicted final moisture content of tobacco leaves at time t; T(t) and H(t) represent the target ambient temperature and target ambient humidity at time t, respectively; τ represents the target leaf storage time; λ1 represents the penalty coefficient for the first duration; MC target Indicates the target tobacco leaf moisture content; t0 represents the starting time when the tobacco leaves enter the storage room; E(t0+τ) represents the total energy consumption at time t0+τ.
5. The method according to claim 4, characterized in that, The step of obtaining the target ambient temperature and target storage time based on the predicted final tobacco leaf moisture content, target tobacco leaf moisture content, energy consumption parameters, and control mode includes: when the control mode is the second mode, obtaining the target ambient temperature and target storage time based on the predicted final tobacco leaf moisture content, target tobacco leaf moisture content, energy consumption parameters, and control mode using a second algorithm, wherein the second algorithm is: The objective function is: Constraints: λ2 represents the second duration penalty coefficient.
6. The method according to claim 4, characterized in that, Before inputting the tobacco leaf parameters, current ambient temperature, and time-series parameters into the first deep learning model, the method further includes: Collect a third historical dataset, which includes several third data mapping relationships, including historical tobacco leaf parameters, historical ambient temperature, historical time series parameters, and historical actual final tobacco leaf moisture content. The third historical dataset is input into the first deep learning model to train the first deep learning model.
7. 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-6.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when run on a computer, causes the computer to perform the method as described in any one of claims 1-6.