Sun withering method and system of Pu'er tea
By optimizing the Pu'er tea sun-drying process through deep reinforcement learning, the problems of low equipment utilization and large environmental impact were solved, the tea drying uniformity and production efficiency were improved, and the stability of tea quality was ensured.
Patent Information
- Application Number
- CN202411526861.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2044-10-30
AI Technical Summary
The existing Pu'er tea sun-drying equipment has low utilization rate, lacks intelligent scheduling, and is greatly affected by the environment, resulting in low production efficiency and unstable tea quality.
An intelligent control system based on deep reinforcement learning is adopted. By collecting environmental data in real time, building a meteorological feature library, calculating the sun-drying score, optimizing the turning strategy, and dynamically adjusting the sun-drying time, the turning strategy is optimized in combination with the deep Q network to achieve continuous sun-drying of multiple batches of tea.
It improves equipment utilization, ensures tea drying uniformity and quality stability, shortens sun-drying time, optimizes production scheduling, reduces production interruptions caused by weather changes, and improves overall production efficiency.
Smart Images

Figure CN120762358A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a Pu'er tea sun-drying optimization method and system, belonging to the technical field of tea sun-drying processing. Background Art
[0002] The sun-drying process of Pu'er tea significantly impacts its quality and final flavor, especially for large-leaf Pu'er tea. Controlling the drying time and frequency of turning the leaves during sun-drying is particularly crucial. While existing sun-drying equipment can turn the leaves over, it often relies on manual operation or simple timing mechanisms, lacking intelligent control. This results in significant variations in equipment efficiency and tea drying results under different environmental conditions.
[0003] Traditional sun-drying methods rely primarily on natural sunlight, which is subject to significant weather constraints and makes it difficult to precisely control the drying time and frequency of turning the tea leaves. In strong sunlight, inadequate turning can lead to over-drying of some tea leaves, resulting in excessive moisture loss. In weaker sunlight, excessive turning can extend the drying time, reducing production efficiency. Furthermore, prolonged sun-drying cannot achieve the target moisture content of the raw tea leaves, necessitating a second overnight sun-drying process, which can affect the tea's grade and quality. Therefore, in the sun-drying process for Pu'er tea, it is crucial to optimally schedule the turning frequency and drying time according to current environmental conditions.
[0004] Some tea factories have introduced simple automated equipment, such as timed turning machines and intelligent dryers, which automatically adjust the sun-drying process by setting the turning time or based on real-time monitored temperature and humidity conditions.
[0005] Although these devices have reduced manpower input to a certain extent, the control of sun-drying is still relatively extensive. Therefore, the existing sun-drying technology has the following problems:
[0006] (1) Low equipment utilization: Most sun-drying equipment can only process one batch of tea at a time, and does not fully utilize the favorable conditions when the weather is good;
[0007] (2) Lack of intelligent scheduling: The existing turning operation and sun-drying schedule cannot be dynamically adjusted according to real-time weather data, resulting in low production efficiency;
[0008] (3) Affected by the environment: Different weather conditions have a significant impact on the drying process. Existing methods are unable to flexibly respond to changes in the external environment, which can easily lead to uneven drying or insufficient drying.
[0009] (4) Production planning is difficult to optimize: Due to the uncertainty of the drying time, it is difficult to accurately arrange the connection between the previous process and the drying process, which often leads to waiting or accumulation on the production line, affecting the overall production efficiency. Summary of the Invention
[0010] The present application aims at the problems of low equipment utilization, lack of intelligent scheduling and large environmental influence in the existing Pu'er tea sun-curing process, and provides a technical solution capable of reasonably arranging sun-curing time and turning strategy according to real-time weather conditions and equipment turning capacity. On the one hand, the solution can effectively improve equipment utilization and realize sun-curing of multiple batches of tea, increasing the sun-curing batches to 1.5-2 batches per day. On the other hand, through more accurate sun-curing time prediction, the factory can better arrange the connection between the pre-production process and the sun-curing link, avoiding the impact on production progress due to waiting for sun-curing equipment. At the same time, by dynamically adjusting the turning frequency and time interval, the moisture evaporation is further accelerated, and the sun-curing time is significantly shortened, thereby improving the efficiency of the sun-curing process, realizing continuous sun-curing of multiple batches of tea, further improving production efficiency, and at the same time ensuring the stability of tea quality.
[0011] The technical solution of the present application is:
[0012] A sun-curing method of Pu'er tea, comprising the following steps:
[0013] S1 collecting sun-curing environment data and setting sun-curing control parameters;
[0014] S2 initializing sun-curing environment data, constructing and updating a weather feature library in real time;
[0015] S3 calculating average light intensity, average UV intensity, wind speed, temperature and humidity, moisture change rate, drying speed, remaining sun-curing time and weighted weather condition index based on sun-curing environment data and the weather feature library;
[0016] S4 calculating a sun-curing score according to the drying speed and uniformity;
[0017] S5 defining a state space and an action space based on sun-curing environment data and weather forecast data, and designing the architecture of a sun-curing control model;
[0018] S6 dynamically optimizing the sun-curing control model to optimize the turning strategy and shorten the sun-curing time;
[0019] S7 predicting the sun-curing time according to the sun-curing control model and performing sun-curing control.
[0020] Further, step S1 further comprises:
[0021] S1.1 collecting sun-curing environment data
[0022] The environmental information collected during the sun-curing process has a data collection interval of 15 minutes, and the environmental information includes:
[0023] • Ambient light intensity I(t): unit lux, range 0-100,000 lux,
[0024] ●Ambient temperature T(t): unit ℃, range 20-45℃,
[0025] ●Ambient humidity H(t): unit %RH, range 20-80%,
[0026] Wind speed W(t): unit m / s, range 0-8m / s,
[0027] Tea temperature t l (t): unit ℃, range 20-50℃,
[0028] ●Tea moisture content M(t): unit %, range 50-70%;
[0029] S1.2 Set the sun drying control parameters, including:
[0030] ● Initial turning frequency: range 0-3 times / hour,
[0031] ●Target moisture content: less than 10%.
[0032] Furthermore, step S2 further includes:
[0033] S2.1 Initialize the drying environment data, including:
[0034] ●Start drying time: accurate to the minute,
[0035] ● Location: longitude and latitude coordinates,
[0036] ●Season: Spring, Autumn,
[0037] ●Sun-drying conditions: Outdoor with a canopy
[0038] ●Tea varieties: Large-leaf Pu'er tea,
[0039] ● Initial moisture content: range 55-65%,
[0040] ●Height of sun-drying green leaves: 1-3cm.
[0041] S2.2 Establish a meteorological feature database to summarize current and predicted short-term meteorological data (hourly temperature, humidity, wind speed, UV intensity, weather conditions, and other weather forecast data for the next 6 hours), and continuously update it as the sun-drying process progresses.
[0042] Furthermore, step S3 further includes:
[0043] S3.1 Data cleaning: Clean the drying environment data in step S1.1, remove outliers that do not meet the range, and use linear interpolation to fill in missing values.
[0044] S3.2 Time series processing: The 1-hour sliding window method is used to process the sun-drying environment data, which can smooth short-term fluctuations and retain data trend characteristics.
[0045] S3.3 Feature Engineering: Based on the analysis of the sun-drying process, we extracted the following key features: calculated characteristic indicators such as light, temperature and humidity, and wind speed, which serve as input parameters for sun-drying effect evaluation and sun-drying control models, providing data support for optimizing the sun-drying process. This includes:
[0046] (a) Average light intensity: Calculate the average light intensity per hour as the main driving factor for drying rate
[0047]
[0048] Among them, I i is the light intensity value every 15 minutes, and n is the number of sampling times;
[0049] (b) Temperature and humidity change rate: Monitor temperature changes during the sun-drying process to optimize the turning strategy
[0050] ΔT(t)=T(t)-T(t-1)
[0051] ΔH(t)=H(t)-H(t-1)
[0052] Where T(t) is the temperature at the current moment, T(t-1) is the temperature at the previous moment, Δt is the time interval (unit: hour), H(t) is the humidity at the current moment, and H(t-1) is the humidity at the previous moment;
[0053] (c) Mean wind speed
[0054]
[0055] Where: W i is the wind speed value at minute i, and N is the time window size for calculating the mean;
[0056] (d) Tea moisture change rate:
[0057] (e) Tea temperature change rate
[0058] Among them, T l (t) is the current temperature of tea leaves, T l (t-1) is the tea temperature at the previous moment;
[0059] (f) Tea drying speed:
[0060] dM / dt is the rate of change of moisture content;
[0061] (g) Remaining drying time: Where M(t) is the water content of tea leaves at the current moment, M target is the target moisture content;
[0062] (h) Average temperature for the next 6 hours:
[0063] Among them, T f (j) is the temperature at hour j in the future;
[0064] (i) Average humidity for the next 6 hours:
[0065] Among them, H f (j) is the humidity at the jth hour in the future;
[0066] (j) Average wind speed for the next 6 hours:
[0067] Among them, W f (j) is the wind speed at the jth hour in the future;
[0068] (k) Average UV intensity over the next 6 hours:
[0069] Among them, UV i is the UV intensity at hour i;
[0070] (l) Weighted weather condition index for the next 6 hours: The weather impact index, which comprehensively considers time and trends, provides an important reference indicator for optimizing the sun-drying process.
[0071] Among them: Weather (j) is the weather condition code for the jth hour, w j is the weight of the jth hour,
[0072] w j =e -β(j-1) +λ·(Weather(j)-Weather(j-1))
[0073] β is the time decay coefficient
[0074] λ is the trend influence coefficient
[0075] The weather conditions are coded as follows:
[0076] Sunny: 0, Cloudy: 0.5, Overcast: 1, Light rain: 2, Moderate rain: 2.5, Heavy rain: 3.
[0077] Furthermore, step S4 further includes:
[0078] The evaluation of the sun drying effect is quantitatively scored using the two dimensions of "drying speed (D)" and "uniformity (U)". This score serves as the reward function of the sun drying control model below to guide the flipping decision and is also used to evaluate the sun drying efficiency and effect.
[0079] S=w1·f(D)+w2·g(U)
[0080] Where: S: Overall sun-drying effect score (also serves as the reward function R), f(D): Nonlinear transformation function of drying speed, g(U): Nonlinear transformation function of uniformity, w1, w2: Weight coefficients, where w1 + w2 = 1. Tea companies can adjust the importance of each factor based on production needs.
[0081] Specifically include:
[0082] Step 4.1 Drying Speed Score Calculation
[0083] The drying speed score evaluates the drying efficiency of the sun-drying process by measuring the rate of moisture loss in tea leaves per unit time and performing nonlinear conversion.
[0084] Drying speed: dM / dt: Moisture change rate, unit: % / hour
[0085] Drying speed score f(D) = 100·(1-e -αD ), the score was quantitatively evaluated using a 100-point system, where α was an adjustable parameter ranging from 0 < α < 1, which adjusted the sensitivity of the drying speed to the score;
[0086] Step 4.2 Calculation of evenness score
[0087] The uniformity score is evaluated by the dispersion of tea moisture content and the improvement effect of turning over, with the aim of ensuring the consistency of tea drying.
[0088] Uniformity:
[0089] σ(M): standard deviation of the moisture content of tea samples
[0090] μ(M): Average moisture content of tea samples
[0091] F uniformity : Flipping uniformity improvement factor, which measures the degree of improvement in uniformity after the flipping operation
[0092]
[0093] Among them, σ(M before ) and σ(M after ) are the standard deviations of moisture content before and after turning over;
[0094] Uniformity score: g(U) = 100·U β ,The score is quantitatively evaluated using a 100-point system, where β is an adjustable parameter ranging from 0 < β < 1, which adjusts the weight of the evenness score on the overall evaluation.
[0095] Furthermore, step S5 further includes:
[0096] Based on the analysis of the above feature engineering and effect evaluation system, an intelligent control model based on deep reinforcement learning is constructed.
[0097] S5.1 Define state space
[0098]
[0099] in:
[0100] M(t): Current water content of tea leaves, in %;
[0101] ΔT(t): Current ambient temperature change rate, in °C / hour;
[0102] ΔH(t): Current ambient humidity change rate, in %RH / hour;
[0103] Average light intensity, in lux;
[0104] The average value of the current ambient wind speed, in m / s;
[0105] ΔT l (t): tea temperature change rate, unit is ℃ / hour;
[0106] t: current drying time, in hours;
[0107] The average temperature for the next 6 hours, in °C, from the weather forecast;
[0108] Average humidity over the next 6 hours in %RH, from the weather forecast;
[0109] The average wind speed for the next 6 hours, in m / s, is from the weather forecast;
[0110] Average UV intensity over the next 6 hours, in W / m 2 , from the weather forecast;
[0111] WeatherIndex: weighted weather condition index;
[0112] Tr : Estimated remaining drying time in hours;
[0113] T lastflip : The time since the last flip, in hours;
[0114] S5.2 Define the action space A: [no action, flip];
[0115] S5.3 defines the reward function, using the sun-drying effect evaluation as the reward function: S = w1·f(D)+w2·g(U)
[0116] S5.4 Design the model architecture, including:
[0117] ○ Input layer: 14 neurons (each neuron corresponds to a variable in the state space),
[0118] ○LSTM layer: 128 units, used to process time series data,
[0119] ○ Hidden layer 1: 64 neurons, activation function ReLU,
[0120] ○ Hidden layer 2: 32 neurons, activation function ReLU,
[0121] ○ Hidden layer 3: 16 neurons, activation function ReLU,
[0122] ○ Output layer: 3 neurons, including:
[0123] ■1 neuron corresponds to the Q value of no action or flip in the action space (using softmax activation function),
[0124] ■1 neuron for predicting the next flip time (using a linear activation function),
[0125] ■1 neuron is used to predict the remaining drying time (using a linear activation function),
[0126] ○Network structure description:
[0127] ■Adopt feedforward neural network structure,
[0128] ■Use residual connections to improve network performance,
[0129] ■ Use layer normalization between hidden layers,
[0130] ■Loss functions, including:
[0131] Q-value loss: Huber loss,
[0132] ■Flip time prediction loss: mean absolute error (MAE),
[0133] ■ Total loss: Loss = Loss Q + λ * Loss time, where λ is the weight coefficient of time prediction loss, Loss time is the time prediction loss, Loss Q: Q value loss (state-action value function prediction error)
[0134] ■ Optimizer: Adam, learning rate is 0.0001, using learning rate decay strategy.
[0135] Further, step S6 includes the following steps:
[0136] For the complexity and uncertainty of the sunning process of Pu'er tea, we designed an intelligent control system based on deep Q network (DQN). The selection of DQN algorithm is mainly based on three considerations: the sunning process needs to make continuous decisions in a changing environment; there is a clear state-action-reward feedback cycle (environment state, turning action, effect evaluation); the decision result has the characteristics of delay and accumulation. Through the DQN algorithm, the system can learn the optimal turning strategy, shorten the sunning time while ensuring uniform drying. To achieve this goal, we designed a complete training process including experience replay, double network and multi-step learning.
[0137] S6.1 Initialize the experience replay pool D with capacity N, wherein the experience replay pool D is used to store experience data of multiple time steps, including state, action, reward and next state four tuples. The capacity of the experience pool, capacity N, represents how many experiences can be stored;
[0138] S6.2 Initialize action value function Q and target network Q', wherein Q is Q(φ(s t ),a; θ), the main network, used to estimate the state-action value function, represents the Q value of selecting action a in state φ(s t ), which is approximated by a neural network represented by parameter θ; Q': target network, used to calculate the target Q value, improve training stability;
[0139] S6.3 For each round, perform the following sub-steps:
[0140] a. Obtain the current weather conditions and 6-hour weather forecast,
[0141] b. Initialize sequence s1 = {x1} and preprocessed sequence where s1 represents the initial state sequence, containing a series of parameters, x1 represents the current tea moisture content, environmental temperature change rate, humidity, light intensity and other data; State preprocessing function. φ(s1) represents the preprocessed state, which normalizes, denoises and processes the state data to improve the training effect of the model,
[0142] c. For t = 1 to T (one time step every 15 minutes), where the starting value: t = 1, indicates the beginning of the round, and the ending value T indicates the end of the round (the specific value of T depends on the total duration of the sun drying process), execute:
[0143] (1) Select a random action a with probability ε t Otherwise, select a t =argmax a Q(φ(s t ),a;θ)+σ(θ), where ε is the exploration rate, which controls the frequency of random exploration; a t :Selected action; Q function, based on the current state s t Feature representation and the Q function of action a and parameter θ; argmax a Q(φ(s t ),a;θ) selects the action corresponding to the maximum Q value output by the Q network in the current state, that is, the optimal action; σ(θ) parameterizes the noise, which is used to increase randomness and prevent the model from falling into local optimality;
[0144] (2) If the flipping action is selected, predict the flipping time d t ;
[0145] (3) Execute the selected action a t (If flipping, use the predicted time d t ), observe the reward r t and the next state s t+1 , where a t The currently selected action. If it is a flip action, then perform the flip and calculate the time d t Control the turning time. t After executing an action, the system gives a reward. The reward function is related to objectives such as sun drying effect and drying uniformity. t+1 Indicates the next state after executing the action, including new environmental parameters, tea moisture content status, etc.
[0146] (4) Update status information and set s t+1 =s t ,a t , and preprocess Update the state sequence and preprocessed state;
[0147] (5) Transfer Store in D and calculate the priority;
[0148] (6) Sample small batch transfers from D Using priority sampling, importance sampling is performed according to priority, and more valuable experiences are selected for learning; a batch of data is sampled from the experience replay pool D for training, and the data is selected according to importance through the priority experience replay mechanism;
[0149] (7) Calculate n-step return: Where n-step return is an estimate of long-term reward in reinforcement learning, representing the cumulative discounted reward in the future n steps. The discount factor γ represents the decreasing importance of future rewards. R represents the cumulative reward in the future n steps from the current time;
[0150] (8) Set y j = R + γ n · Q'(φ j+n , argmax a Q(φ j+n , a; θ) ; θ') where y j is the target value, representing the n-step cumulative reward plus the estimated future Q value, calculated by the target network Q';
[0151] (9) Perform gradient descent steps to minimize the loss function: L = w·∑ i (y j - Q(φ j , a j ; θ)) 2 Where: w is the importance sampling weight, used to weight different training samples to improve training effect; y j - Q(φ j , a j ; θ), the error loss of the Q network.
[0152] (10) Update Q' = Q every C steps; copy the parameters of the Q network to the target network Q', to maintain the consistency of the two networks.
[0153] S6.4 The cycle ends after 1000 rounds.
[0154] Further, the DQN algorithm optimization includes:
[0155] (1) Double DQN: Use two Q networks, one for action selection and the other for value estimation;
[0156] (2) Priority experience replay: sample according to TD error size;
[0157] (3) Noise network: add parameterized noise when selecting actions;
[0158] (4) Multi-step learning: use n-step return instead of single-step return;
[0159] (5) Weather forecast correction: Dynamically adjust the weather forecast based on historical forecast accuracy.
[0160] Furthermore, step S7 further includes:
[0161] The system automatically predicts the sun-drying completion time for each batch of tea based on the sun-drying start time of each day, including:
[0162] S7.1 Control execution, including:
[0163] a) Select "No Action": a. Continue monitoring the status b. Set the next evaluation time (e.g. every 15 minutes).
[0164] b) Select "Flip": a. Perform the flip operation. b. Record the actual flipping time and the condition of the tea leaves after flipping.
[0165] S7.2 parameter output, including:
[0166] c) Current tea moisture content,
[0167] d) Estimated time to reach target moisture content (<10%),
[0168] e) Recommended time for next turning;
[0169] S7.3 Feedback loop, including:
[0170] f) After executing the action, collect new status information: a. New moisture content of tea leaves b. Tea temperature c. Environmental parameters (temperature, humidity, light, wind speed),
[0171] g) Calculate the deviation between the actual sun-drying effect and the predicted one,
[0172] h) Input new information into the model to make the next round of decision-making,
[0173] i) Dynamically adjust model parameters according to actual sun-drying results and weather changes.
[0174] The present invention also provides a Pu'er tea sun-drying system, comprising:
[0175] Sensors are used to collect data on the sun-drying environment, tea temperature, and moisture content;
[0176] The computer is used to set the sun-drying control parameters, initialize the sun-drying environment data, build and update the meteorological feature library in real time, calculate the average light intensity, average UV intensity, wind speed, temperature and humidity, moisture change rate, drying speed, remaining sun-drying time and weighted weather condition index, calculate the sun-drying score, define the state space, action space and design the architecture of the sun-drying control model, dynamically optimize the sun-drying control model, predict the sun-drying time according to the sun-drying control model and perform sun-drying control.
[0177] The beneficial effects of the present invention include:
[0178] (1) By combining control technology with deep reinforcement learning technology, the problem of uneven tea drying and low efficiency in the traditional sun-drying process was effectively solved;
[0179] (2) Improved tea moisture uniformity: The intelligent turning strategy optimizes the frequency and timing of tea turning, making the moisture content of tea leaves at different locations consistent, avoiding the problem of insufficient or excessive drying in some areas;
[0180] (3) Improved sun drying efficiency: The control algorithm based on Deep Q Network (DQN) optimization reduces drying time by rationally utilizing environmental conditions and weather forecast data while ensuring precise control of target moisture content;
[0181] (4) Optimized the production scheduling between multiple batches: The drying time can be predicted based on the start time of drying and weather forecast data. The factory can schedule production in advance based on the drying time and reasonably arrange the daily drying tasks of multiple batches of drying to ensure the seamless connection between the pre-drying process and the drying link, thereby improving the continuity of production and the efficiency of equipment use.
[0182] (5) Based on the predicted drying time, when natural conditions are insufficient to dry the tea leaves in time, appropriate manual intervention measures (such as combining drying with natural drying) are taken to reduce the risk of material degradation due to improper handling and ensure the stability of tea quality during the drying process. Through precise drying control, the quality of tea leaves can be avoided, the probability of degradation can be reduced, and higher product value can be guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS
[0183] Figure 1 It is a schematic diagram of the overall process of the present invention. DETAILED DESCRIPTION
[0184] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for describing the embodiments or the prior art.
[0185] Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the contents of the embodiments of the present invention and the structures shown in these drawings without any creative work.
[0186] In order to make the purpose, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below in conjunction with the drawings in the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0187] Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative work shall fall within the scope of protection of the present invention.
[0188] Example 1
[0189] Example 1 mainly illustrates a method for optimizing the sun-drying of large-leaf Pu'er tea provided by the present invention. Figure 1 shown.
[0190] Step 1: Collect drying environment data and set drying control parameters
[0191] 1.1 Collecting data on the sun-drying environment
[0192] The following is the parameter information collected during the sun drying process. The data collection interval is 15 minutes. Some of the data are as follows:
[0193]
[0194] 1.2 Setting the control parameters for sun drying
[0195] ●Initial turning frequency: 1 time / hour
[0196] ●Target moisture content: less than 10%
[0197] Step 2: Initialize the drying environment data, build a meteorological feature database and update the meteorological feature database in real time
[0198] 2.1 Initialize the drying environment data
[0199] ●Start drying time: 10:00
[0200] ●Location: Pu'er City, Yunnan Province (Longitude: 100.97°E, Latitude: 22.83°N)
[0201] Season: Autumn
[0202] ●Sun-drying conditions: Outdoor with a canopy
[0203] Tea variety: Large-leaf Pu'er tea
[0204] ●Initial moisture content: 60.7%
[0205] ●Height of sun-drying green leaves: 2cm.
[0206] 2.2 Update of meteorological characteristics database
[0207] A meteorological feature database is established to summarize current and predicted short-term meteorological data (hourly temperature, humidity, wind speed, UV intensity, weather conditions, and other weather forecast data for the next 6 hours), and is continuously updated as the sun-drying process progresses.
[0208] The weather forecast data for the next 6 hours include hourly temperature, humidity, wind speed, UV intensity, weather conditions, etc.:
[0209] time Temperature (℃) Humidity (%RH) Wind speed (m / s) Expected weather conditions Encoded value UV intensity 11:00 29 52 1.9 partly cloudy 0.5 6 12:00 32 45 2.2 sunny 0 8 13:00 35 35 2.5 sunny 0 9 14:00 36 28 2.7 sunny 0 10 15:00 36 27 2.8 sunny 0 10 16:00 32 29 2.6 sunny 0 9
[0210] Step 3: Calculate the average light intensity, average UV intensity, wind speed, temperature and humidity, moisture change rate, drying speed, remaining drying time and weighted weather condition index based on the drying environment data and meteorological feature database
[0211] 3.1 Data cleaning, removal of outliers and missing values
[0212] The data at 13:00 is as follows:
[0213]
[0214] 3.2 Time Series Processing
[0215] Use a 1-hour sliding window to process the data, using data from 12:00 to 13:00:
[0216]
[0217] 3.3 Feature Engineering (Based on Sliding Window Data)
[0218] Taking 12:00-13:00 as an example, it includes:
[0219] a) Calculate the average light intensity:
[0220] b) Calculate the temperature and humidity change rate: ΔT(t) = T(t) - T(t-1) = (36.0-35.0) = 1.0°C / h
[0221] c)ΔH(t)=H(t)-H(t-1)=(28-35)=-7%RH / h
[0222] d) Calculate the mean wind speed:
[0223] e) Calculate the rate of change of tea moisture:
[0224] f) Calculate the rate of change of tea temperature:
[0225] g) Calculation of tea drying rate: D = -dM / dt = -(25.0-39.0) / 1 = 14.0% / h
[0226] h) Calculate the remaining sun-drying time of tea leaves:
[0227] i) Average data for the next 6 hours (using previously given weather forecast data), including:
[0228] Average temperature for the next 6 hours
[0229] Average humidity for the next 6 hours
[0230] Average wind speed for the next 6 hours
[0231] Average UV intensity for the next 6 hours
[0232] Weighted Weather Condition Index
[0233] w j =e -β(j-1) +λ·(Weather(j)-Weather(-1))
[0234] Time decay coefficient β = 0.2, trend influence coefficient λ = 0.1;
[0235] Where β = 0.2 provides a moderate attenuation of historical data, ensuring that the model prioritizes recent data while not completely ignoring long-term trends. λ = 0.1 gives weather changes an appropriate influence, allowing the model to capture important trends without overreacting to short-term fluctuations.
[0236] Calculate the weight w:
[0237] w1=e -0.2(1-1) +0.1(0.5-0.5)=1
[0238] w2=e -0.2(2-1) +0.1(0-0.5)=0.7684
[0239] w3=e -0.2(3-1) +0.1(0-0)=0.6703
[0240] w4=e -0.2(4-1) +0.1(0-0)=0.5488
[0241] w5=e -0.2(5-1) +0.1(0-0)=0.4493
[0242] w6=e -0.2(6-1) +0.1(0-0)=0.3679
[0243] Compute the weighted sum:
[0244]
[0245] Compute weights and:
[0246] Compute weighted weather condition index:
[0247] 4. Calculate the withering score according to drying speed, uniformity
[0248] By combining the two key dimensions of tea moisture content drying speed (D) and uniformity (U), a comprehensive evaluation of the quality of the withering process is provided. Both indicators are quantitatively evaluated using a 100-point scale.
[0249] The weight coefficients (w1, w2) can be adjusted by the tea enterprise according to the importance of each factor in production requirements. This time, according to the user's preference, the drying speed weight w1 = 0.6, and the uniformity weight w2 = 0.4.
[0250] 4.1 Drying speed score calculation
[0251] Using the formula:
[0252] α = 0.1
[0253] f(D) = 100 · (1 - e -αD ) ≈ 75.34
[0254] 4.2 Uniformity score calculation
[0255] Collect multiple samples from the surface, middle and bottom layers of the tea leaves, and measure the moisture content of the tea leaves from multiple positions horizontally and vertically.
[0256] The standard deviation of the moisture content of the tea samples σ(M) = 2%
[0257] The average moisture content of the tea samples μ(M) = 25%
[0258] The standard deviation of the moisture content of the tea samples before turning σ(M before ) = 3%
[0259] The standard deviation of the moisture content of the tea samples after turning σ(M after ) = 2%
[0260] β = 0.5
[0261] First, calculate F uniformity :
[0262] Then calculate U:
[0263] Finally, calculate g(U): g(U) = 100 · Uβ =100·0.9333^0.5≈96.61
[0264] 4.3 Overall sun-drying effect rating
[0265] Equal weights for drying speed and uniformity: w1 = 0.6, w2 = 0.4
[0266] S=w1·f(D)+w2·g(U)=0.6·75.34+0.4·96.61=83.848
[0267] 5. Define the state space and action space based on environmental data and weather forecast data and design the sun-drying control model architecture
[0268] 5.1 Defining the optimized state space
[0269]
[0270] The example calculation is as follows (taking 13:00 as an example):
[0271] a) M(t) - current tea moisture content: 25.0%
[0272] b) ΔT(t) - ambient temperature change rate: (36.0-35.0) / 1 = 1.0°C / h
[0273] c) ΔH(t) - ambient humidity change rate: (28-35) / 1 = -7% RH / h
[0274] d) -Average light intensity: 78,000 lux
[0275] e)W - (t)-Average wind speed: 2.58m / s
[0276] f)ΔT l (t)-tea temperature change rate: (38.0-36.0) / 1=2.0℃ / h
[0277] g)t-drying time: 3h
[0278] h) -Average temperature for the next 6 hours: 30.9℃
[0279] i) -Average humidity over the next 6 hours: 35% RH
[0280] j) -Average wind speed in the next 6 hours: 2.58m / s
[0281] k) -Average UV intensity: 4
[0282] l)WeatherIndex-weighted weather index: = 0.5 / 3.8050≈0.1314
[0283] m)T r -Estimated remaining drying time: (22.0-10.0) / 14.0≈0.86h
[0284] n)T last flip - Time since last flip: 1h (last flip at 12:00)
[0285] Therefore, the state vector at 13:00 is: S(13:00) = [22.0, 1.0, -7, 78000, 2.58, 2.0, 3, 30.9, 35, 2.58, 4, 0.1314, 0.86, 1]
[0286] 5.2 Defining the Action Space
[0287] Keep the action space unchanged: A = [no operation, flip]
[0288] 5.3 Define the reward function,
[0289] Use the sun-drying effect evaluation as the reward function: S = w1·f(D)+w2·g(U)
[0290] 5.4 Design model architecture
[0291] Due to the increased dimensionality of the state space, the model architecture needs to be adjusted accordingly, including:
[0292] a) Input layer: 14 neurons (corresponding to 14 parameters in the state space)
[0293] b) LSTM layer: 128 units
[0294] c) Hidden layer 1: 64 neurons, ReLU activation
[0295] d) Hidden layer 2: 32 neurons, ReLU activation
[0296] e) Hidden layer 3: 16 neurons, ReLU activation
[0297] f) Output layer: 3 neurons, including:
[0298] 1 neuron corresponds to the Q value of no operation or flip in the action space (using softmax,activation function),
[0299] 1 neuron is used to predict the next flip time (using a linear activation function),
[0300] 1 neuron is used to predict the remaining drying time (using a linear activation function),
[0301] a) Network structure description:
[0302] ●Adopt feedforward neural network structure,
[0303] ●Use residual connections to improve network performance,
[0304] ● Use layer normalization between hidden layers,
[0305] Loss functions, including:
[0306] 1.Q value loss: Huber loss,
[0307] 2. Flip time prediction loss: mean absolute error (MAE),
[0308] 3. Total loss: Loss = Loss_Q + 0.1 * Loss_time, set λ = 0.1, which can better balance the training of the two tasks
[0309] Optimizer: Adam, learning rate is 0.0001, and learning rate decay strategy is used.
[0310] 6. Dynamically optimize the drying control model and optimize the turning strategy to shorten the drying time. The steps are as follows:
[0311] (1) Initialize the experience replay pool D with a capacity of N. The experience replay pool D is used to store experience data of multiple time steps, including the four-tuple of state, action, reward, and next state. The capacity of the experience pool, N, indicates how many experiences can be stored.
[0312] (2) Initialize the action value function Q and the target network Q', where Q is Q(φ(s t ),a;θ), the main network, used to estimate the state-action value function, expressed in state φ(s t ) selects the Q value of action a, which is approximated by the neural network represented by the parameter θ; Q': target network, used to calculate the target Q value and improve training stability;
[0313] (3) For each round, including:
[0314] a) Get the current weather conditions and the weather forecast for the next 6 hours
[0315] b) Initialization sequence s1 = {x1} and preprocessing sequence Among them, s1 represents the initial state sequence, which contains a series of parameters, and x1 represents the current tea moisture content, ambient temperature change rate, humidity, light intensity and other data; State preprocessing function. It represents the state after preprocessing, and performs normalization and denoising on the state data to improve the training effect of the model.
[0316] c) For t=1 to T (one time step every 15 minutes), where the starting value: t=1, indicates the beginning of the round, and the ending value: T, indicates the end of the round. The specific value of T depends on the total duration of the sun-drying process:
[0317] ○ Choose a random action a with probability ε t , otherwise select s t =argmax a Q(φ(s t ),a;θ)+σ(θ), where ε is the exploration rate, which controls the frequency of random exploration; a t :Selected action; Q function, based on the current state s t Feature representation and the Q function of action a and parameter θ; argmax a Q(φ(s t ),a;θ) selects the action corresponding to the maximum Q value output by the Q network in the current state, that is, the optimal action; σ(θ) parameterizes the noise, which is used to increase randomness and prevent the model from falling into local optimality.
[0318] ○ If you choose the flip action, predict the flipping time d t
[0319] ○Perform the selected action t (If it is flipped, use the predicted time d t ), observe the reward r t and the next state s t+1 , where a t The currently selected action. If it is a flip action, then perform the flip and calculate the time d t Control the turning time. t After executing an action, the system gives a reward. The reward function is related to objectives such as sun drying effect and drying uniformity. t+1 Indicates the next state after executing the action, including new environmental parameters, tea moisture content status, etc.
[0320] ○Update status information, set t+1 =s t , a t , and preprocess Update the state sequence and the preprocessed state.
[0321] ○ will be transferred Store in D and calculate the priority
[0322] ○ Sample small batches of transfers from D Priority sampling is used to perform importance sampling based on priority, and more valuable experiences are selected for learning. A batch of data is sampled from the experience replay pool D for training, and these data are selected based on importance through the priority experience replay mechanism.
[0323] ○Calculate the n-step reward: The n-step return is an estimate of the long-term reward in reinforcement learning, representing the discounted reward accumulated over the next n steps. γ is a discount factor, indicating the decreasing importance of future rewards. R represents the reward accumulated over the next n steps from the current moment.
[0324] ○Set y j =R+γ n ·Q′(φ j+n ,argmax a Q(φ j+n ,a;θ);θ′), where y j is the target value, which represents the cumulative reward of n steps plus the estimate of the future Q value, and the future action value is calculated through the target network Q'.
[0325] ○ Perform the gradient descent step to minimize the loss function: L = w·∑ i (y j -Q(φ j ,a j ;θ)) 2 , where: w is the importance sampling weight, which is used to weight different training samples to improve the training effect; y j -Q(φ j ,a j ; θ), the error loss of the Q network.
[0326] Update Q' = Q every C = 100 steps;
[0327] (4) The cycle ends after 1000 rounds.
[0328] DQN algorithm optimization includes:
[0329] a) Dual DQN: uses two Q networks, one for action selection and the other for value estimation; b) Prioritized Experience Replay: samples based on the TD error size;
[0330] c) Noise network: adds parameterized noise during action selection;
[0331] d) Multi-step learning: using n-step returns instead of single-step returns;
[0332] e) Weather forecast correction: Dynamically adjust the weather forecast based on historical forecast accuracy.
[0333] The training results (after 1000 rounds) are:
[0334] index Initial value Final Value Average Reward 65.2 91.7 Average drying time (hours) 5.5 4.25 Average moisture content (%) 12.5 9.8 Number of flips 2 3 Q-value convergence error 0.82 0.10 Flipping time prediction accuracy (%) 72.5 94.8 Remaining time prediction error (minutes) ±45 ±12 Moisture content prediction error (%) ±3.5 ±0.8
[0335] 7. Predict the drying time and control the drying process based on the drying control model
[0336] After multiple rounds of optimization, the model outputted the following parameters for the optimal sun-drying solution:
[0337] 7.1 Single Batch Sun-drying Optimization
[0338] a) Estimated total drying time: 4.15 hours
[0339] b) Prediction process:
[0340] Predicted flipping time Flipping order Predicting the moisture content of tea leaves Estimated time to reach target moisture content Recommended time for next turning 11:15 First flip 50.5% 3 hours 12:30 12:30 Second flip 35.5% 1.75 hours 13:45 13:45 Flip for the third time 19% 0.5 hours none 14:09 No operation 9.3% none none
[0341] c) Expected final moisture content: 9.3%
[0342] The actual execution process is recorded as follows:
[0343]
[0344] Forecast accuracy analysis:
[0345] 1. After the model predicts the flipping time, the operation is strictly executed according to the predicted time.
[0346] 2. Moisture content prediction error: average error within ±0.5%
[0347] 3. Total drying time: 6 minutes longer than expected
[0348] 4. Final moisture content: deviation 0.5%
[0349] To fully evaluate the optimization effect of the sun drying process, three different sun drying plans were compared under the same environment: no turning, turning once, and turning every 2 hours. Under the same environment, all three plans were sun dried to a moisture content below 10%:
[0350] Option 1: Normal sun drying (no turning over)
[0351]
[0352]
[0353] Total sun-drying time: 7.25 hours Uniformity of tea moisture content: poor (the upper layer of tea leaves is too dry, and the lower layer is relatively wet) Option 2: Sun-drying process with one flip
[0354] time Tea water content Ambient temperature Ambient humidity Light intensity operate 10:00 60.7% 29℃ 52% 46000 start 12:30 45.1% 35℃ 35% 77000 Flip 14:30 25% 36℃ 28% 74000 - 16:15 9.9% 35℃ 29% 52000 Finish
[0355] Total withering time: 6.25 hours, uniformity of tea moisture content: fair (turning once improved the uniformity, but there were still differences between the upper and lower layers)
[0356] Scenario three: withering process with turning every 2 hours
[0357] time Tea water content Ambient temperature Ambient humidity Light intensity operate 10:00 60.7% 29℃ 52% 46000 start 12:00 48.4% 35℃ 35% 75000 Flip 14:00 30.2% 36℃ 28% 78000 Flip 15:30 9.8% 35℃ 29% 62000 Finish
[0358] Total withering time: 5.5 hours, uniformity of tea moisture content: good (multiple turns significantly improved the uniformity of moisture content)
[0359] The optimized withering process is: total withering time: 4.25 hours, final moisture content: 9.8%, uniformity of tea moisture content: best
[0360] From the above comparison, the following conclusions can be drawn:
[0361] (1) The optimized withering scheme is still superior to other methods in terms of withering time and uniformity of tea moisture content;
[0362] (2) Compared with normal withering, the optimized scheme saves 2.88 hours (41.3%) of time, while significantly improving the uniformity of moisture content;
[0363] (3) Compared with the method of turning once, 2 hours (32%) of time is saved, and the uniformity of moisture content is also significantly better;
[0364] (4) Compared with the method of turning every 2 hours, 1.25 hours (22.7%) of time is saved, and the uniformity of moisture content is slightly improved;
[0365] (5) As can be seen from the data, with the increase of turning frequency, not only the withering time is gradually shortened, but also the uniformity of tea moisture content is gradually improved. This is because turning can make each part of the tea have the opportunity to directly contact the air, promoting the uniform evaporation of water;
[0366] (6) The optimized withering scheme achieves the best balance between efficiency and moisture content uniformity by precisely controlling the turning time and frequency. It not only saves time, but also ensures that the moisture content of each part of the tea is more uniform by turning at key time points.
[0367] 7.2 Multi-batch withering optimization
[0368] In order to improve production efficiency, based on the withering control model, the withering time is reasonably designed so that more than one batch of tea can be withered in a day. The comprehensive withering process of three batches in two days can be realized, while the original process can only wither one batch in a day. This multi-batch withering process is as follows:
[0369] The first batch: follow the optimization plan in Section 7.1, starting at 10:00 am and ending at 2:15 pm.
[0370] The second batch: Starting from 14:30, the algorithm dynamically adjusts the sun-drying parameters according to the current environmental conditions and the state of the tea leaves.
[0371] Multi-batch sun drying algorithm process:
[0372] (1) Input parameters: current time, ambient temperature, ambient humidity, initial moisture content of tea leaves, target moisture content;
[0373] (2) Predicted completion time: Based on historical data and current conditions, predict the time required for sun drying;
[0374] (3) Optimize the flipping strategy: dynamically calculate the optimal flipping times and time points based on the predicted time;
[0375] (4) Real-time monitoring: Continuously monitor tea status and environmental conditions and adjust forecasts and strategies when necessary;
[0376] (5) Completion judgment: When the tea leaves reach the target moisture content or approach sunset, the current batch is finished.
[0377] First day of drying process
[0378]
[0379] The second day of drying process
[0380] time batch Tea water content Ambient temperature Ambient humidity Light intensity (lux) operate 10:00 2 22% 28℃ 50% 58000 Continue with the second batch 11:00 2 18% 30℃ 45% 70000 Flip 12:00 2 9.9% 32℃ 40% 76000 End of the second batch 13:15 3 55.6% 33℃ 38% 77000 Start of the third batch 13:15 3 48.3% 34℃ 35% 78000 First flip 14:15 3 37.8% 35℃ 32% 78000 Second flip 15:15 3 25% 36℃ 30% 76000 Flip for the third time 16:15 3 9.8% 35℃ 31% 70000 End of the third batch
[0381] In summary, by introducing the sun-drying control model and the multi-day sun-drying process, three batches of tea can be processed in two days, significantly improving production efficiency, as shown in the following:
[0382] (1) Multi-batch optimization across multiple days: By introducing a machine learning algorithm that considers changes in light intensity and a multi-batch sun-drying process across multiple days, three batches of tea can be processed in two days, significantly improving production efficiency.
[0383] (2) Maximizing resource utilization: Through cross-day processing, the effective light hours of each day are fully utilized, thus improving the utilization rate of equipment and resources;
[0384] (3) Production plan flexibility: The cross-day processing solution provides greater flexibility for production planning and can better cope with weather changes and fluctuations in production demand.
Claims
1. A method for sun-drying Pu'er tea, characterized in that: The following steps are involved: S1, collects the drying environment data and sets the drying control parameters; S2, initializes the sun-drying environment data, builds and updates the meteorological feature database in real time; S3, calculates the average light intensity, average UV intensity, wind speed, temperature and humidity, moisture change rate, drying speed, remaining drying time and weighted weather condition index based on the drying environment data and meteorological feature database; S4, evaluation of sun drying effect, calculating the sun drying score based on drying speed and uniformity; S5, based on the drying environment data and weather forecast data, define the state space and action space and design the architecture of the drying control model; S6, dynamically optimizes the sun drying control model and optimizes the turning strategy to shorten the sun drying time; S7, predicting the sun-drying time according to the sun-drying control model and performing sun-drying control.
2. The method for sun-drying Pu'er tea according to claim 1, characterized in that: Step S1 further includes: The tea drying environment information includes the ambient light intensity I(t), ambient temperature T(t), ambient humidity H(t), wind speed W(t), tea temperature T(t), l (t) and tea moisture content M(t); The sun-drying control parameters include the initial turning frequency and the target moisture content.
3. The method for sun-drying Pu'er tea according to claim 1, characterized in that: The meteorological feature database in step S2 includes the time, location, season, tea variety, initial moisture content, target moisture content and short-term meteorological data for starting sun drying.
4. The method for sun-drying Pu'er tea according to any one of claims 1 to 3, characterized in that: Step S3 further includes: S3.1 Data cleaning: remove outliers and missing values, S3.2 Time series processing: Use sliding window method with a window size of 1 hour. S3.3 Feature Engineering, including calculations: (a) Average hourly light intensity As the main driving factors of drying rate: Among them, I i is the light intensity value every 15 minutes, and n is the number of sampling times; (b) The rate of change of temperature and humidity, ΔT(t) and ΔH(t), are used to monitor temperature changes during the sun-drying process and to optimize the turning strategy: ΔT(t)=T(t)-T(t-1) ΔH(t)=H(t)-H(t-1) Where T(t) is the temperature at the current moment, T(t-1) is the temperature at the previous moment, Δt is the time interval, H(t) is the humidity at the current moment, and H(t-1) is the humidity at the previous moment; (c) Mean wind speed Where: W i is the wind speed value at minute i, and N is the time window size for calculating the mean; (d) Tea moisture change rate (e) Tea temperature change rate Where: T l (t) is the current temperature of tea leaves, T l (t-1) is the tea temperature at the previous moment; (f) Tea drying speed is the rate of change of moisture content; (g) Remaining drying time Where: M(t) is the water content of tea leaves at the current moment, M target is the target moisture content; (h) Average temperature for the next 6 hours Among them, T f (j) is the temperature at hour j in the future; (i) Average humidity for the next 6 hours Among them, H f (j) is the humidity at the jth hour in the future; (j) Average wind speed for the next 6 hours Among them, W f (j) is the wind speed at the jth hour in the future; (k) Average UV intensity over the next 6 hours Among them, UV i is the UV intensity at hour i; (l) Weighted weather condition index for the next 6 hours The weather impact index, which comprehensively considers time and trends, provides an important reference indicator for optimizing the sun-drying process. Among them: Weather (j) is the weather condition code for the jth hour, w j is the weight of the jth hour, w j =e -β(j-1) +λ·(Weather(j)-Weather(j-1)), β is the time decay coefficient, λ is the trend influence coefficient; The weather condition codes include: Sunny: 0, Cloudy: 0.5, Overcast: 1, Light rain: 2, Moderate rain: 2.5, Heavy rain:
3.
5. The method for sun-drying Pu'er tea according to claim 1, characterized in that: The evaluation of the sun-drying effect in step S4 includes: S=w1·f(D)+w2·g(U) Where: S represents the overall sun-drying effect score, D and U represent the tea moisture content, drying speed and uniformity quantified on a 100-point scale, respectively, f(D) represents the nonlinear transformation function of the tea moisture content, drying speed D, g(U) represents the nonlinear transformation function of the uniformity; w1 and w2 both represent weight coefficients and w1+w2=1.
6. The method for sun-drying Pu'er tea according to claim 5, characterized in that: f(D)=100·(1-e -α ), where α is an adjustable parameter; Where: σ(M) is the standard deviation of the moisture content of the tea samples, μ(M) is the average moisture content of the tea samples, F uniformity is the improvement factor for the uniformity of the flip surface, Where: σ(M before ) and σ(M after ) are the standard deviations of moisture content before and after turning over; g(U)=100·U β , where β is an adjustable parameter.
7. The method for sun-drying Pu'er tea according to any one of claim 6, characterized in that: Step S5 further includes: S5.1 Define state space Where: M(t) represents the current moisture content of tea leaves; ΔT(t) represents the current ambient temperature change rate; ΔH(t) represents the current ambient humidity change rate; represents the average light intensity; Indicates the average value of the current ambient wind speed; ΔT l (t) represents the rate of change of tea temperature; t represents the current sun-drying time; Indicates the average temperature for the next 6 hours; Indicates the average humidity for the next 6 hours; Indicates the average wind speed for the next 6 hours; Indicates the average UV intensity in the next 6 hours; WeatherIndex indicates the weighted weather condition index; T r Indicates the estimated remaining drying time; T lastflip Indicates the time since the last flip; S5.2 Define action space A: Action space A is "no operation" or "flip"; S5.3 defines the reward function and uses the sun-drying effect evaluation S as the reward function; S5.4 Design the sun drying control model architecture, including: (1) Input layer: 14 neurons, each neuron corresponds to a variable in the state space, (2) LSTM layer: 128 units, used to process time series data, (3) Hidden layer 1: 64 neurons, activation function ReLU, (4) Hidden layer 2: 32 neurons, activation function ReLU, (5) Hidden layer 3: 16 neurons, activation function ReLU, (6) Output layer: 3 neurons, including: One neuron corresponds to the Q value of not operating or flipping in the action space, using softmax activation function; one neuron is used to predict the next flipping time, using linear activation function; one neuron is used to predict the remaining drying time, Use a linear activation function.
8. The method for sun-drying Pu'er tea according to claim 7, characterized in that: Step S6 further includes: S6.1 Initialize the experience replay pool D with a capacity of N. The experience replay pool D is used to store experience data for multiple time steps, including a four-tuple of state, action, reward, and next state. The capacity N indicates the number of experience records stored. S6.2 Initialize the action-value function Q and the target network Q', wherein the action-value function Q is used to estimate the state-action-value function, and the target network Q' calculates the target Q value and is used to improve training stability; S6.3 For each round, perform the following sub-steps: a. Get the current weather conditions and the weather forecast for the next 6 hours; b. Initialization sequence s1 = {x1} and preprocessing sequence Among them: s1 represents the initial state sequence, which includes a series of parameters; x1 represents the current tea moisture content, ambient temperature change rate, ambient humidity change rate, average light intensity, average wind speed, tea temperature change rate, current sun-drying time, average temperature in the next 6 hours, average humidity in the next 6 hours, average wind speed in the next 6 hours, average UV intensity in the next 6 hours, weighted weather condition index, estimated remaining sun-drying time, and last turning time; function Represents the state after preprocessing, normalizes and denoises the state data to improve the training effect of the model; c. For t = 1 to T, where the starting value t = 1 indicates the beginning of a round and the ending value T indicates the end of the round. The value of T depends on the total duration of the sun drying process. Each time step is 15 minutes. Execute: (1) Select a random action a with probability ε t Otherwise, select a t =argmax a Q(φ(s t ),a;θ)+σ(θ), where: ε represents the exploration rate, which controls the frequency of random exploration; a t Indicates the selected action; argmax a Q(φ(s t ),a;θ) selects the action corresponding to the maximum Q value output by the Q network in the current state, that is, the optimal action; σ(θ) represents parameterized noise, which is used to increase randomness and prevent the model from falling into local optimality; (2) If the "flip" action is selected, the predicted flipping time d t ; (3) Execute the selected action a t , observe the reward r t and the next state s t+1 , where: a t Indicates the currently selected action; if it is "flip", then perform the flip and adjust the predicted d t Control the turning time; t After executing the action, the system gives the reward; the reward function is related to the sun drying effect and drying uniformity goals; s t+1 Indicates the next state after executing the action, including the new environmental parameters and the moisture content of the tea leaves; (4) Update status information and set s t+1 =s t ,a t , and preprocess Update the state sequence and preprocessed state; (5) Transfer Store in D and calculate the priority; (6) Sample small batch transfers from D Use priority sampling to perform importance sampling based on priority and select more valuable experiences for learning; (7) Calculate the n-step return: Where: n-step return is an estimate of the long-term reward in reinforcement learning, which represents the discounted reward accumulated in the next n steps; γ discount factor, which indicates the decreasing importance of future rewards; R represents the reward accumulated in the next n steps from the current moment; (8) Set y j =R+γ n ·Q′(φ j+n ,argmax a Q9φ j+n ,a;θ);θ′), where y j is the target value, which represents the cumulative reward of n steps plus the estimate of the future Q value, and the future action value is calculated through the target network Q'; (9) Perform the gradient descent step to minimize the loss function: L = w·∑ i (y j -Q(φ j ,a j ;θ)) 2 , where: w is the importance sampling weight, which is used to weight different training samples to improve the training effect; y j -Q(φ j ,a j ;θ), the error loss of the Q network. ; (10) Update Q' = Q every C steps; S6.4 ends the loop.
9. The method for sun-drying Pu'er tea according to claim 8, characterized in that: In step S7, the sun-drying completion time of each batch of tea leaves is automatically predicted based on the sun-drying start time of each day, specifically including: S7.1 Control execution, including: (1) If "No Action" is selected, the status will continue to be monitored and the next evaluation time will be set; (2) When "Flip" is selected, the flipping operation is performed and the actual flipping time and the state of the tea leaves after flipping are recorded; S7.2 parameter output, including: current tea moisture content, estimated time to reach target moisture content <10%, and recommended next turning time; S7.3 Feedback loop, including: (1) After executing the action, new status information is collected, including the new moisture content of the tea leaves, the temperature of the tea leaves, and environmental parameters; (2) Calculate the deviation between the actual sun-drying effect and the predicted one; (3) Input new information into the model and make the next round of decision-making; (4) Dynamically adjust model parameters according to actual sun-drying effects and weather changes.
10. A Pu'er tea sun-drying system for realizing the method for sun-drying Pu'er tea according to any one of claims 1 to 9, characterized in that: include: Sensors are used to collect data on the sun-drying environment, tea temperature, and moisture content; The computer is used to set sun-drying control parameters, record sun-drying conditions, build and update the meteorological feature library in real time, calculate the average light intensity, average UV intensity, wind speed, temperature and humidity, moisture change rate, drying speed, remaining sun-drying time and weighted weather condition index, calculate the sun-drying score, define the state space, action space and design the architecture of the sun-drying control model, dynamically optimize the sun-drying control model, predict the sun-drying time according to the sun-drying control model and perform sun-drying control.
Citation Information
Patent Citations
Intelligent airing system and method based on image or machine vision recognition
CN110747611A
Hot air drying method and device for agricultural product drying control
CN117760190A
Airing and drying device for marine product processing
CN209639430U
Airing equipment
CN218955433U
Drying device
JP2021154049A