A method and system for sun-curing pu'er tea
Patent Information
- Application Number
- CN202411526861.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2026-09-08
- Estimated Expiration
- 2044-10-30
AI Technical Summary
[0010]本发明针对现有普洱茶晒青工艺中存在的设备利用率低、缺乏智能化调度以及受环境影响大的问题,提供一种能够根据实时天气状况和设备翻面能力合理安排晒青时间及翻面策略的技术方案,该方案一方面能够有效提高设备利用率,实现多批次茶叶的晒青,将日晒青批次提升到1.5-2批;另一方面通过更精准的晒青时间预测,工厂能够更好地安排生产前序工序与晒青环节的衔接,避免因等待晒青设备而影响生产进度;同时,通过动态调整翻面次数与时间间隔,进一步加速水分均与蒸发,显著缩短晒青时间,从而提高晒青工艺的效率,实现多批次茶叶的连续晒青,进一步提升生产效率,同时确保茶叶品质的稳定性
[0178] (1) By combining control technology and deep reinforcement learning technology, the problems of uneven drying and low efficiency of tea leaves in the traditional sun-drying process are effectively solved;
Smart Images

Figure CN120762358B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to an optimized method and system for sun-drying Pu'er tea, belonging to the field of tea sun-drying processing technology. Background Technology
[0002] The sun-drying process of Pu-erh tea has a significant impact on the quality and final taste of the tea, especially for large-leaf Pu-erh tea, where controlling the sun-drying time and turning frequency is particularly crucial. While existing sun-drying equipment can turn the tea leaves, its application typically relies on manual operation or simple timing mechanisms, lacking intelligent control. This results in significant variations in equipment efficiency and tea drying effectiveness under different environmental conditions.
[0003] Traditional sun-drying methods rely primarily on natural sunlight, making them highly susceptible to weather conditions and difficult to precisely control in terms of drying time and the number of times the leaves are turned. Under strong sunlight, delayed turning can lead to some tea leaves becoming over-dried and excessively dry; conversely, under weaker sunlight, excessive turning can prolong the drying time, reducing production efficiency. Furthermore, prolonged sun-drying may fail to achieve the target moisture content for the finished tea, necessitating a second sun-drying overnight, thus affecting the grade and quality of the tea. Therefore, in the sun-drying process of Pu-erh tea, it is crucial to rationally arrange the number of turnings and the drying time based on real-time 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 monitoring of temperature and humidity conditions.
[0005] Although these devices reduce labor input to some extent, the control of sun-drying remains 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 leaves at a time, failing to make full use of favorable conditions when the weather is good.
[0007] (2) Lack of intelligent scheduling: The existing turning operation and sun-drying time arrangement cannot be dynamically adjusted according to real-time weather data, resulting in low production efficiency;
[0008] (3) Greatly affected by the environment: Different weather conditions have a significant impact on the sun-drying process. Existing methods are not flexible enough to cope with changes in the external environment, which can easily lead to uneven sun-drying or insufficient drying.
[0009] (4) Production planning is difficult to optimize: Due to the uncertainty of the sun-drying time, it is difficult to accurately arrange the connection between the preceding process and the sun-drying process, which often leads to waiting or accumulation on the production line, affecting the overall production efficiency. Summary of the Invention
[0010] This invention addresses the problems of low equipment utilization, lack of intelligent scheduling, and high susceptibility to environmental influences in existing Pu'er tea sun-drying processes. It provides a technical solution that can rationally arrange sun-drying time and turning strategies based on real-time weather conditions and equipment turning capabilities. This solution effectively improves equipment utilization, enabling the sun-drying of multiple batches of tea, increasing the daily sun-drying batches to 1.5-2 batches. Furthermore, through more accurate sun-drying time prediction, factories can better coordinate the connection between pre-production processes and the sun-drying stage, avoiding production delays due to waiting for sun-drying equipment. Simultaneously, by dynamically adjusting the number of turnings and the time interval, it further accelerates moisture equalization and evaporation, significantly shortening the sun-drying time, thereby improving the efficiency of the sun-drying process, enabling continuous sun-drying of multiple batches of tea, further enhancing production efficiency, and ensuring the stability of tea quality.
[0011] The technical solution of this invention is as follows:
[0012] A method for sun-drying Pu-erh tea includes the following steps:
[0013] S1 collects sun-drying environment data and sets sun-drying control parameters;
[0014] S2 initializes the sun-drying environment data and builds and updates the meteorological feature database in real time;
[0015] S3 calculates average light intensity, average UV intensity, wind speed, temperature and humidity, moisture change rate, drying rate, remaining drying time, and weighted weather condition index based on sun-drying environment data and meteorological feature database.
[0016] S4 calculates the sun-drying score based on drying speed and uniformity;
[0017] S5 defines the state space and action space based on sun-drying environment data and weather forecast data, and designs the architecture of the sun-drying control model;
[0018] The S6 dynamic optimization sun-drying control model optimizes the turning strategy to shorten the sun-drying time.
[0019] S7 predicts the sun-drying time based on the sun-drying control model and performs sun-drying control.
[0020] Furthermore, step S1 also includes:
[0021] S1.1 Collect environmental data for sun-drying.
[0022] Environmental information collected during the sun-drying process, with data collection intervals of 15 minutes, includes:
[0023] ●Ambient light intensity I(t): Unit: lux, range: 0-100,000 lux.
[0024] ●Ambient temperature T(t): unit °C, range 20-45 °C.
[0025] ●Ambient humidity H(t): Unit %RH, range 20-80%,
[0026] ● Wind speed W(t): Unit m / s, range 0-8 m / s
[0027] ●Tea temperature t l (t): Unit: °C, range: 20-50 °C
[0028] ● Moisture content of tea leaves M(t): Unit %, range 50-70%;
[0029] S1.2 Set the sun-drying control parameters, including:
[0030] ●Initial flipping frequency: 0-3 times / hour
[0031] ●Target moisture content: less than 10%.
[0032] Furthermore, step S2 also includes:
[0033] S2.1 Initialize the sun-drying environment data, including:
[0034] ●Start time for sun-drying: accurate to the minute.
[0035] ●Location: Latitude and longitude coordinates,
[0036] ●Seasons: Spring, Autumn
[0037] ●Sun-drying conditions: Outdoor with rain shelter
[0038] ●Tea variety: Large-leaf Pu-erh tea
[0039] ●Initial moisture content: range 55-65%,
[0040] ●Height of the sun-dried greens spread out: 1-3cm.
[0041] S2.2 Establish a meteorological feature database to collect 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 also includes:
[0043] S3.1 Data Cleaning: Cleaning step S1.1 Sun-drying environment data, removing outliers that do not fall within the range, and supplementing missing values using linear interpolation.
[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 extract the following key features: calculate characteristic indicators such as light intensity, temperature, humidity, and wind speed, as input parameters for evaluating the sun-drying effect and the sun-drying control model, providing data support for optimizing the sun-drying process. This includes:
[0046] (a) Average light intensity: The average light intensity per hour was calculated as the main driving factor for the drying rate.
[0047]
[0048] Among them, I i This represents the light intensity value every 15 minutes, where n is the number of samples.
[0049] (b) Rate of change in temperature and humidity: Monitoring 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: hours), 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] Among them: W i is the wind speed value in the i-th minute, and N is the size of the time window for calculating the mean;
[0056] (d) Rate of change in tea moisture content:
[0057] (e) Tea temperature change rate
[0058] Among them, T l (t) represents the current temperature of the tea leaves, T l (t-1) represents the temperature of the tea leaves at the previous moment;
[0059] (f) Tea drying speed:
[0060] dM / dt is the rate of change of moisture content;
[0061] (g) Remaining sun-drying time: Where M(t) is the moisture content of the tea leaves at the current moment, M target The target moisture content;
[0062] (h) Average temperature for the next 6 hours:
[0063] Among them, T f (j) is the temperature in the j-th hour in the future;
[0064] (i) Average humidity for the next 6 hours:
[0065] Among them, H f (j) represents the humidity in the j-th hour in the future;
[0066] (j) Average wind speed for the next 6 hours:
[0067] Among them, W f (j) represents the wind speed in the j-th hour in the future;
[0068] (k) Average UV intensity over the next 6 hours:
[0069] Among them, UV i It is the UV intensity at the i-th hour;
[0070] (l) Weighted weather condition index for the next 6 hours: Taking into account both time and trend, the weather impact index provides an important reference indicator for optimizing the sun-drying process.
[0071] Among them: Weather (j) This is the weather condition code for the j-th hour, w j It is the weight for the j-th 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 condition codes are as follows:
[0076] Sunny: 0, Cloudy: 0.5, Overcast: 1, Light rain: 2, Moderate rain: 2.5, Heavy rain: 3.
[0077] Furthermore, step S4 also includes:
[0078] The evaluation of sun-drying effect is quantified by two dimensions: "drying speed (D)" and "uniformity (U)". These scores serve as the reward function for the sun-drying control model below to guide the turning decision, and are also used to evaluate sun-drying efficiency and effect.
[0079] S = w1·f(D) + w2·g(U)
[0080] Where: S: Overall sun-drying effect score (also serving as the reward function R), f(D): Nonlinear transformation function of drying speed, g(U): Nonlinear transformation function of uniformity, w1, w2: Weighting coefficients, and w1+w2=1. The tea companies can adjust the importance of each factor according to their production needs, using weighting coefficients w1 and w2.
[0081] Specifically, it includes:
[0082] Step 4.1 Calculation of Drying Rate Score
[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 a non-linear transformation.
[0084] Drying speed: dM / dt: Moisture change rate, in % / hour
[0085] Drying rate score f(D) = 100·(1-e -αD The scoring uses a 100-point scale for quantitative evaluation, where α is an adjustable parameter with a range of 0 < α < 1, and the sensitivity of the scoring is adjusted by the drying speed.
[0086] Step 4.2 Calculation of uniformity score
[0087] Uniformity is assessed by evaluating the dispersion of tea moisture content and the effect of turning the tea leaves over, with the aim of ensuring the consistency of tea drying.
[0088] Uniformity:
[0089] σ(M): Standard deviation of moisture content in tea samples
[0090] μ(M): Average moisture content of tea samples
[0091] F uniformity The factor that improves uniformity by flipping the dough measures the degree of improvement in uniformity after the flipping operation.
[0092]
[0093] Wherein, σ(M before ) and σ(M after These are the standard deviations of moisture content before and after turning over;
[0094] Uniformity score: g(U)=100·U β The scoring uses a 100-point scale for quantitative evaluation, where β is an adjustable parameter with a range of 0 < β < 1, which adjusts the weight of the uniformity score in the overall evaluation.
[0095] Furthermore, step S5 also 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 the state space
[0098]
[0099] in:
[0100] M(t): Current moisture content of tea leaves, in %;
[0101] ΔT(t): Rate of change of current ambient temperature, in °C / hour;
[0102] ΔH(t): Current ambient humidity change rate, in %RH / hour;
[0103] Average illuminance, measured in lux;
[0104] The average current ambient wind speed, in m / s;
[0105] ΔT l (t): Tea temperature change rate, in °C / hour;
[0106] t: Current sun-drying time, in hours;
[0107] The average temperature for the next 6 hours, in °C, is from a weather forecast.
[0108] Average humidity for the next 6 hours, in %RH, from weather forecast;
[0109] The average wind speed for the next 6 hours, in m / s, is from a weather forecast.
[0110] The 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 : Time since the last flip, in hours;
[0114] S5.2 Define action space A: [No operation, flip];
[0115] S5.3 defines the reward function, using the evaluation of the sun-drying effect as the reward function: S=w1·f(D)+w2·g(U)
[0116] The S5.4 design model architecture includes:
[0117] ○ Input layer: 14 neurons (each neuron corresponds to a variable in the state space),
[0118] ○LSTM layer: 128 units, used for processing 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] ■ One neuron corresponds to the Q-value of no operation or flipping in the action space (using softmax activation function).
[0124] ■ One neuron is used to predict the next flipping time (using a linear activation function).
[0125] ■ One neuron is used to predict the remaining drying time (using a linear activation function).
[0126] ○Network structure description:
[0127] ■ It adopts a feedforward neural network structure.
[0128] ■ Improve network performance using residual connections
[0129] ■ Use layer normalization between hidden layers.
[0130] ■Loss functions include:
[0131] ■Q-value loss: Huber loss,
[0132] ■ Flipping time prediction loss: Mean Absolute Error (MAE)
[0133] ■ Total Loss: Loss = Loss_Q + λ * Loss_time, where λ is the weighting coefficient of the time prediction loss, Loss_time is the time prediction loss, and Loss_Q is the Q-value loss (prediction error of the state-action function).
[0134] ■ Optimizer: Adam, learning rate 0.0001, using learning rate decay strategy.
[0135] Further, step S6 includes the following steps:
[0136] To address the complexity and uncertainty inherent in the sun-drying process of Pu'er tea, we designed an intelligent control system based on a Deep Q-Network (DQN). The choice of the DQN algorithm was based on three main considerations: the sun-drying process requires continuous decision-making in a changing environment; there exists a clear state-action-reward feedback loop (environmental state, turning action, effect evaluation); and the decision results exhibit delays and cumulative characteristics. Through the DQN algorithm, the system can learn the optimal turning strategy, ensuring uniform drying while shortening the sun-drying time. To achieve this goal, we designed a complete training process that includes experience playback, a dual-network architecture, and multi-step learning.
[0137] S6.1 Initialize the experience replay pool D with a capacity of N. The experience replay pool D stores experience data from multiple time steps, including a quadruple of state, action, reward, and next state. The capacity N of the experience pool represents the number of experiences that can be stored.
[0138] S6.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, representing the state φ(s) in the action state. t Q': The Q value of the selected action 'a' is approximated by a neural network represented by parameter θ; Q': the target network, used to calculate the target Q value to improve training stability.
[0139] S6.3 For each round, perform the following sub-steps:
[0140] a. Obtain current weather conditions and a 6-hour weather forecast.
[0141] b. Initialization sequence s1 = {x1} and preprocessing sequence Wherein, s1 represents the initial state sequence, which contains a series of parameters, and x1 represents the current tea moisture content, environmental temperature change rate, humidity, light intensity, and other data; State preprocessing function. This represents the preprocessed state, where the state data undergoes normalization, noise reduction, and other processing to improve the model's training performance.
[0142] c. For t = 1 to T (each time step is 15 minutes), where the initial value is t = 1, indicating the start of the round, and the ending value is T, indicating the end of the round (the specific value of T depends on the total duration of the sun-drying process), execute:
[0143] (1) Select random action a with probability ε t Otherwise, choose a. t =argmax a Q(φ(s t ),a;θ)+σ(θ), where, ε: exploration rate, controlling the frequency of random exploration; a t The action chosen; The Q function, based on the current state s t Feature representation And the Q function for 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, i.e., the optimal action; σ(θ) parameterizes the noise to increase randomness and prevent the model from getting trapped in local optima;
[0144] (2) If the flipping action is selected, predict the flipping time d. t ;
[0145] (3) Execute the selected action a t (If it's a flip, then use the predicted time d) t ), observe reward r t and the next state s t+1 , where a t The currently selected action. If it is a flipping action, then perform the flipping and adjust the time according to the predicted time d. t Control the flipping time. t The reward given by the system after the action is performed. The reward function is related to objectives such as the sun-drying effect and the uniformity of drying. t+1 This indicates the next state after an action is performed, including new environmental parameters, tea moisture content, etc.
[0146] (4) Update the status information and set s t+1 =s t ,a t and preprocessing Update the state sequence and the preprocessed state;
[0147] (5) Transfer Store in D and calculate priority;
[0148] (6) Sample small batch transfer from D Priority sampling is used to sample based on importance, selecting more valuable experiences 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;
[0149] (7) Calculate the return in n steps: Here, the n-step reward is an estimate of long-term reward in reinforcement learning, representing the discounted reward accumulated over the next n steps. γ is the discount factor, indicating the decreasing importance of future rewards. R represents the accumulated reward over the next n steps from the current moment.
[0150] (8) Set y j =R+γ n ·Q′(φ j+n argmax a Q(φ j+n ,a;θ);θ′)where y j The target value represents the cumulative reward over n steps plus an estimate of the future Q value, which is used to calculate the value of future actions through the target network Q'.
[0151] (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, used to weight different training samples to improve training performance; 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 ends the loop after 1000 rounds.
[0154] Furthermore, DQN algorithm optimizations include:
[0155] (1) Dual DQN: Uses two Q networks, one for action selection and the other for value estimation;
[0156] (2) Prioritize experience playback: Sampling is performed based on the magnitude of the TD error;
[0157] (3) Noise network: Add parameterized noise during action selection;
[0158] (4) Multi-step learning: Use n-step rewards instead of single-step rewards;
[0159] (5) Weather forecast correction: Adjust the weather forecast dynamically based on the historical forecast accuracy.
[0160] Furthermore, step S7 also includes:
[0161] The system automatically predicts the completion time of sun-drying for each batch of tea based on the start time of sun-drying each day, specifically including:
[0162] S7.1 control execution includes:
[0163] a) Select "Do nothing": a. Continue monitoring the status b. Set the next evaluation time (e.g., every 15 minutes)
[0164] b) Select "Flip": a. Perform the flipping operation b. Record the actual flipping time and the state of the tea leaves after flipping;
[0165] S7.2 parameter output, including:
[0166] c) Current moisture content of the tea leaves
[0167] d) The estimated time required to reach the target moisture content (<10%).
[0168] e) Suggested next flipping time;
[0169] The S7.3 feedback loop includes:
[0170] f) After executing the action, collect new status information: a. New moisture content of the tea leaves; b. Tea leaf temperature; c. Environmental parameters (temperature, humidity, light intensity, wind speed).
[0171] g) Calculate the deviation between the actual sun-drying effect and the prediction.
[0172] h) Input the new information into the model for the next round of decision-making.
[0173] i) Dynamically adjust model parameters based on actual sun-drying results and weather changes.
[0174] This invention also provides a sun-drying system for Pu'er tea, comprising:
[0175] Sensors are used to collect data on the sun-drying environment and the temperature and moisture content of the tea leaves;
[0176] The computer is used to set sun-drying control parameters, initialize sun-drying environment data construction and update the meteorological feature database in real time. It is also used to calculate average light intensity, average UV intensity, wind speed, temperature and humidity, moisture change rate, drying rate, remaining sun-drying time and weighted weather condition index. It is also used to calculate sun-drying score, define state space and action space and design the architecture of sun-drying control model, dynamically optimize sun-drying control model and predict sun-drying time based on sun-drying control model and perform sun-drying control.
[0177] The beneficial effects of this invention include:
[0178] (1) By combining control technology and deep reinforcement learning technology, the problems of uneven drying and low efficiency of tea leaves in the traditional sun-drying process are effectively solved;
[0179] (2) Improved the uniformity of tea moisture content: The intelligent turning strategy optimizes the frequency and timing of tea turning, making the moisture content of tea in different positions more consistent, avoiding the problem of insufficient or excessive drying in some areas.
[0180] (3) Improved drying efficiency: Based on the control algorithm optimized by deep Q-network (DQN), the drying time was reduced by making reasonable use of environmental conditions and weather forecast data, while ensuring accurate control of the target moisture content;
[0181] (4) Optimized 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 according to the drying time, reasonably arrange multiple batches of drying tasks every day, ensure seamless connection between the pre-drying process and the drying process, and improve the continuity of production and equipment utilization efficiency.
[0182] (5) Based on the predicted sun-drying time, when natural conditions are insufficient to dry the tea leaves in time, appropriate artificial intervention measures (such as combining drying and natural sun-drying) should be taken to reduce the risk of material degradation due to improper handling and ensure the stability of tea quality during the sun-drying process. Through precise drying control, the decline in tea quality can be avoided, the probability of downgrading can be reduced, and thus higher product value can be guaranteed. Attached Figure Description
[0183] Figure 1 This is a schematic diagram of the overall process of the present invention. Detailed Implementation
[0184] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.
[0185] Obviously, the accompanying drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the content of the embodiments of the present invention and the structures shown in these drawings without any creative effort.
[0186] To make the objectives, technical solutions, and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.
[0187] Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0188] Example 1
[0189] Example 1 mainly illustrates an optimized method for sun-drying large-leaf Pu'er tea provided by the present invention, such as... Figure 1 As shown.
[0190] Step 1: Collect sun-drying environmental data and set sun-drying control parameters
[0191] 1.1 Collecting environmental data for sun-drying.
[0192] The following are the parameter information collected during the sun-drying process. The data collection interval was 15 minutes. Some data are shown below:
[0193]
[0194] 1.2 Setting Sun-drying Control Parameters
[0195] ●Initial flipping frequency: 1 time / hour
[0196] ●Target moisture content: less than 10%
[0197] Step 2: Initialize the sun-drying environment data, construct the meteorological feature database, and update the meteorological feature database in real time.
[0198] 2.1 Initialize the sun-drying environment data
[0199] ●Start time for sun-drying: 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 rain shelter
[0203] ●Tea variety: Large-leaf Pu-erh tea
[0204] ●Initial moisture content: 60.7%
[0205] ●Height of the sun-dried greens spread out: 2cm.
[0206] 2.2 Meteorological Feature Database Update
[0207] Establish a meteorological feature database to collect 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.
[0208] The forecast includes hourly data for the next 6 hours, including temperature, humidity, wind speed, UV intensity, and weather conditions.
[0209] 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 rate, remaining drying time, and weighted weather condition index based on the sun-drying environment data and meteorological feature database.
[0211] 3.1 Data cleaning, removing outliers and missing values
[0212] The data for 13:00 is as follows:
[0213]
[0214] 3.2 Time Series Processing
[0215] Data was processed using a 1-hour sliding window, 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 rate of change of temperature and humidity: ΔT(t)=T(t)-T(t-1)=(36.0-35.0)=1.0℃ / 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 in tea moisture content:
[0224] f) Calculate the rate of temperature change of tea leaves:
[0225] g) Calculate the tea drying rate: D = -dM / dt = -(25.0 - 39.0) / 1 = 14.0% / h
[0226] h) Calculate the remaining sun-drying time for the tea leaves:
[0227] i) Average data for the next 6 hours (using previously given weather forecast data), including:
[0228] Average temperature over the next 6 hours
[0229] Average humidity over the next 6 hours
[0230] Average wind speed in the next 6 hours
[0231] Average UV intensity over the next 6 hours
[0232] Weighted Weather Conditions Index
[0233] w j =e -β(j-1) +λ·(Weather(j)-Weather(-1))
[0234] The time decay coefficient β = 0.2, and the trend influence coefficient λ = 0.1;
[0235] Specifically: β = 0.2 provides moderate historical data attenuation, ensuring that the model considers recent data while not completely ignoring long-term trends. λ = 0.1 imparts an appropriate influence to weather changes, capturing 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] Calculate the weighted sum:
[0244]
[0245] Calculate the weighted sum:
[0246] Calculate the weighted weather condition index:
[0247] 4. Calculate the sun-drying score based on drying speed and uniformity.
[0248] By combining two key dimensions—drying speed (D) and uniformity (U)—the quality of the sun-drying process is comprehensively assessed. Both indicators are quantitatively evaluated using a 100-point scale.
[0249] Tea companies can adjust the importance of each factor (w1, w2) according to their production needs. In this case, the weighting coefficients are set as follows: drying speed weight w1 = 0.6, uniformity weight w2 = 0.4, based on user preferences.
[0250] 4.1 Calculation of Drying Rate Score
[0251] Use the formula:
[0252] α = 0.1
[0253] f(D) = 100·(1-e -αD )≈75.34
[0254] 4.2 Calculation of Uniformity Score
[0255] Multiple samples were collected from various locations, both horizontally and vertically, including the surface, middle, and bottom layers of the tea leaves, to measure the moisture content of the tea.
[0256] The standard deviation of moisture content in tea samples, σ(M), is 2%.
[0257] The average moisture content of the tea samples, μ(M), is 25%.
[0258] Standard deviation σ(M) before flipping before ) = 3%
[0259] The standard deviation σ(M) after flipping 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 Score
[0265] Weights for equal drying rate 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 architecture of the sun-drying control model.
[0268] 5.1 Define the optimized state space
[0269]
[0270] Example calculation is as follows (taking 13:00 as an example):
[0271] a) M(t) - Current moisture content of tea leaves: 25.0%
[0272] b) ΔT(t) - Rate of change of ambient temperature: (36.0-35.0) / 1 = 1.0℃ / h
[0273] c) ΔH(t) - Rate of change of ambient humidity: (28-35) / 1 = -7%RH / h
[0274] d) - Average illuminance: 78,000 lux
[0275] e)W - (t) - Average wind speed: 2.58 m / s
[0276] f)ΔT l (t) - Tea temperature change rate: (38.0-36.0) / 1=2.0℃ / h
[0277] g)t - Sun-dried time: 3 hours
[0278] h) -Average temperature for the next 6 hours: 30.9℃
[0279] i) -Average humidity for the next 6 hours: 35% RH
[0280] j) - Average wind speed for the next 6 hours: 2.58 m / s
[0281] k) - Average UV intensity: 4
[0282] l)WeatherIndex - Weighted Weather Condition Index: = 0.5 / 3.8050 ≈ 0.1314
[0283] m)T r -Estimated remaining sun-drying time: (22.0-10.0) / 14.0≈0.86h
[0284] n)T last flip -Time since last flip: 1 hour (last flipped 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] The evaluation of the sun-drying effect is used as the reward function: S = w1·f(D) + w2·g(U)
[0290] 5.4 Design Model Architecture
[0291] Because of the added dimension 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 activated.
[0295] d) Hidden layer 2: 32 neurons, ReLU activated
[0296] e) Hidden layer 3: 16 neurons, ReLU activated.
[0297] f) Output layer: 3 neurons, including:
[0298] One neuron corresponds to the Q-value of no operation or flipping in the action space (using softmax activation function).
[0299] One neuron is used to predict the next flipping time (using a linear activation function).
[0300] One neuron is used to predict the remaining drying time (using a linear activation function).
[0301] a) Network structure description:
[0302] ● It adopts a feedforward neural network structure.
[0303] ● Improve network performance using residual connections.
[0304] ● Use layer normalization between hidden layers.
[0305] ●Loss functions include:
[0306] 1. Q-value loss: Huber loss,
[0307] 2. Flipping time prediction loss: Mean Absolute Error (MAE)
[0308] 3. Total loss: Loss = Loss_Q + 0.1 * Loss_time. Setting λ = 0.1 provides a good balance between the training of the two tasks.
[0309] Optimizer: Adam, learning rate 0.0001, using a learning rate decay strategy.
[0310] 6. Dynamically optimize the sun-drying control model and optimize the turning strategy to shorten the sun-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 stores experience data from multiple time steps, including a quadruple of state, action, reward, and next state. The capacity N represents the number of experiences that 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, representing the state φ(s) in the action state. t Q': The Q value of the selected action 'a' is approximated by a neural network represented by parameter θ; Q': the target network, used to calculate the target Q value to improve training stability.
[0313] (3) For each round, including:
[0314] a) Obtain current weather conditions and a 6-hour weather forecast.
[0315] b) Initialization sequence s1 = {x1} and preprocessing sequence Wherein, s1 represents the initial state sequence, which contains a series of parameters, and x1 represents the current tea moisture content, environmental temperature change rate, humidity, light intensity, and other data; State preprocessing function. This represents the preprocessed state, where the state data is normalized and denoised to improve the training effect of the model.
[0316] c) For t = 1 to T (each time step is 15 minutes), where the initial value is t = 1, indicating the start of the round, and the ending value is T, indicating 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, choose s t =argmax a Q(φ(s t ),a;θ)+σ(θ), where, ε: exploration rate, controlling the frequency of random exploration; a t The action chosen; The Q function, based on the current state s t Feature representation And the Q function for 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, i.e., the optimal action; σ(θ) parameterizes the noise to increase randomness and avoid the model from getting trapped in local optima.
[0318] ○ If the flipping action is selected, predict the flipping time d t
[0319] ○ Perform the selected action a t (If it's a flip, then use the predicted time d) t ), observe reward r t and the next state s t+1 , where a t The currently selected action. If it is a flipping action, then perform the flipping and adjust the time according to the predicted time d. t Control the flipping time. t The reward given by the system after the action is performed. The reward function is related to objectives such as the sun-drying effect and the uniformity of drying. t+1 This indicates the next state after an action is performed, including new environmental parameters, tea moisture content, etc.
[0320] ○ Update status information, set s t+1 =s t a t and preprocessing Update the state sequence and the preprocessed state.
[0321] ○ Will be transferred Store in D and calculate priority.
[0322] ○Sampling and transferring small batches from D Priority sampling is used to sample based on importance, selecting more valuable experiences 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 return in n steps: Here, the n-step reward is an estimate of long-term reward in reinforcement learning, representing the discounted reward accumulated over the next n steps. γ is the discount factor, indicating the decreasing importance of future rewards. R represents the accumulated reward 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 The target value represents the cumulative reward over n steps plus an estimated future Q value. The value of future actions is calculated using 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, used to weight different training samples to improve training performance; 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 optimizations include:
[0329] a) Dual DQN: Uses two Q-networks, one for action selection and the other for value estimation; b) Prioritizes empirical replay: Samples based on the magnitude of the TD error;
[0330] c) Noise network: Add parameterized noise during action selection;
[0331] d) Multi-step learning: Use n-step rewards instead of single-step rewards;
[0332] e) Weather forecast correction: Adjust weather forecasts dynamically based on historical forecast accuracy.
[0333] The training results are as follows (after 1000 rounds):
[0334] Average reward 65.2 91.7 Average sun-drying time (hours) 5.5 4.25 Average moisture content (%) 12.5 9.8 Number of times to flip 2 3 Q-value convergence error 0.82 0.10 Accuracy of flipping time prediction (%) 72.5 94.8 Remaining time prediction error (minutes) ±45 ±12 Moisture content prediction error (%) ±3.5 ±0.8
[0335] 7. Predict the sun-drying time based on the sun-drying control model and implement sun-drying control.
[0336] After multiple rounds of optimization, the optimal sun-drying scheme parameters output by the model are as follows:
[0337] 7.1 Optimization of single-batch sun-drying
[0338] a) Estimated total sun-drying time: 4.15 hours
[0339] b) Prediction process:
[0340] 11:15 First flip 50.5% 3 hours 12:30 12:30 Flip it over a second time 35.5% 1.75 hours 13:45 13:45 Third flip 19% 0.5 hours none 14:09 No operation 9.3% none none
[0341] c) Estimated final moisture content: 9.3%
[0342] The actual execution process is recorded as follows:
[0343]
[0344] Prediction accuracy analysis:
[0345] 1. After the model provides the predicted flipping time, the operation is strictly performed according to the predicted time.
[0346] 2. Moisture content prediction error: The average error is within ±0.5%.
[0347] 3. Total sun-drying time: The actual time was 6 minutes longer than predicted.
[0348] 4. Final moisture content: deviation 0.5%
[0349] To comprehensively evaluate the optimization effect of the sun-drying process, three different sun-drying schemes—no turning, turning once, and turning every 2 hours—were compared under the same conditions. Under the same conditions, all three schemes achieved a moisture content of less than 10%.
[0350] Option 1: Normal sun-drying (without turning over)
[0351]
[0352]
[0353] Total sun-drying time: 7.25 hours; Tea moisture content uniformity: poor (top layer of tea is too dry, bottom layer is relatively wet); Option 2: Sun-drying process with one turning.
[0354] 10:00 60.7% 29℃ 52% 46000 start 12:30 45.1% 35℃ 35% 77000 Flip over 14:30 25% 36℃ 28% 74000 - 16:15 9.9% 35℃ 29% 52000 Finish
[0355] Total sun-drying time: 6.25 hours; Moisture content uniformity of tea leaves: average (turning the leaves over once improved uniformity, but there are still differences between the upper and lower layers).
[0356] Option 3: Sun-drying process with the leaves turned over every 2 hours.
[0357] 10:00 60.7% 29℃ 52% 46000 start 12:00 48.4% 35℃ 35% 75000 Flip over 14:00 30.2% 36℃ 28% 78000 Flip over 15:30 9.8% 35℃ 29% 62000 Finish
[0358] Total sun-drying time: 5.5 hours; Moisture content uniformity of tea leaves: Good (multiple turnings significantly improved the uniformity of moisture content).
[0359] The optimized sun-drying process is as follows: total sun-drying time: 4.25 hours, final moisture content: 9.8%, tea moisture content uniformity: optimal.
[0360] Based on the above comparison, the following conclusions can be drawn:
[0361] (1) The optimized sun-drying scheme is still superior to other methods in terms of sun-drying time and uniformity of tea moisture content;
[0362] (2) Compared with normal sun-drying, the optimized scheme saves 2.88 hours (41.3%) of time and significantly improves the uniformity of moisture content;
[0363] (3) Compared with the method of flipping once, it saves 2 hours (32%) of time and the moisture content uniformity is also significantly better;
[0364] (4) Compared with the method of flipping every 2 hours, it saves 1.25 hours (22.7%) of time and slightly improves the uniformity of moisture content;
[0365] (5) The data shows that as the frequency of turning the tea leaves increases, not only does the sun-drying time gradually shorten, but the uniformity of the moisture content of the tea leaves also gradually improves. This is because turning the tea leaves allows all parts of the tea leaves to have direct contact with the air, promoting the uniform evaporation of moisture;
[0366] (6) The optimized sun-drying method achieves the best balance between efficiency and moisture content uniformity by precisely controlling the turning time and number of times. It is not only shorter in time, but also ensures that the moisture content of all parts of the tea leaves is more consistent by turning them at key time points.
[0367] 7.2 Optimization of multiple batches of sun-dried green vegetables
[0368] To improve production efficiency, based on the sun-drying control model, the sun-drying time is rationally designed so that more than one batch of tea can be sun-dried per day. After combining the two days, three batches can be sun-dried, whereas the original process could only sun-dry one batch per day. This multi-batch sun-drying process is as follows:
[0369] The first batch will be implemented according to the optimization plan in Section 7.1, starting at 10:00 AM and ending at 2:15 PM.
[0370] The second batch: Starting at 14:30, the algorithm dynamically adjusts the sun-drying parameters based on 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) Predict the 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 number of flips and the optimal time based on the predicted time;
[0375] (4) Real-time monitoring: Continuously monitor the condition of tea leaves and environmental conditions, and adjust forecasts and strategies as necessary;
[0376] (5) Completion judgment: When the tea leaves reach the target moisture content or are close to sunset, the current batch ends.
[0377] Day 1 sun-drying process
[0378]
[0379] The second day of sun-drying process
[0380] 10:00 2 22% 28℃ 50% 58000 Continue with the second batch 11:00 2 18% 30℃ 45% 70000 Flip over 12:00 2 9.9% 32℃ 40% 76000 End of the second batch 13:15 3 55.6% 33℃ 38% 77000 Start the third batch 13:15 3 48.3% 34℃ 35% 78000 First flip 14:15 3 37.8% 35℃ 32% 78000 Flip it over a second time 15:15 3 25% 36℃ 30% 76000 Third flip 16:15 3 9.8% 35℃ 31% 70000 End of the third batch
[0381] In summary, by introducing a sun-drying control model and a multi-batch sun-drying process spanning multiple days, three batches of tea can be processed in two days, significantly improving production efficiency. Specifically, this is reflected in:
[0382] (1) Multi-batch optimization across days: By introducing a machine learning algorithm that takes into account changes in light intensity and a multi-batch sun-drying process across days, three batches of tea can be processed in two days, which significantly improves production efficiency.
[0383] (2) Maximize resource utilization: By processing across days, the effective sunlight time of each day is fully utilized, thereby improving the utilization rate of equipment and resources;
[0384] (3) Production planning 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-erh tea, characterized in that, Includes the following steps: S1, collect sun-drying environment data and set sun-drying control parameters; S2, initialize the sun-drying environment data, build and update 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 sun-drying environment data and meteorological feature database. S4, Sun-drying effect evaluation, the sun-drying score is calculated based on drying speed and uniformity; S5. Based on the sun-drying environment data and weather forecast data, a state space consisting of 14 state variables is defined, and the action space is defined as "no operation" and "flipping". The sun-drying score calculated in step S4 is used as the reward function, and a DQN sun-drying control model is constructed. The DQN sun-drying control model includes an input layer with 14 neurons, an LSTM layer with 128 units, three hidden layers with 64, 32 and 16 neurons respectively and using the ReLU activation function, and an output layer with 3 neurons. S6. Dynamically optimize the DQN sun-drying control model and optimize the turning strategy to shorten the sun-drying time; S7. Predict the sun-drying time and perform sun-drying control based on the DQN sun-drying control model.
2. The method for sun-drying Pu-erh tea according to claim 1, characterized in that, Step S1 also includes: The environmental data for sun-drying tea leaves includes ambient light intensity I(t), ambient temperature T(t), ambient humidity H(t), wind speed W(t), and tea leaf temperature. Moisture content of tea leaves, M(t); The set sun-drying control parameters include the initial turning frequency and the target moisture content.
3. The method for sun-drying Pu-erh tea according to claim 1, characterized in that: The meteorological feature database mentioned in step S2 includes the start time of sun-drying, location, season, tea variety, initial moisture content, target moisture content, and short-term meteorological data.
4. A method for sun-drying Pu-erh tea according to any one of claims 1-3, characterized in that, Step S3 also includes: S3.1 Data Cleaning: Removing outliers and missing values. S3.2 Time Series Processing: Using the 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 factor of drying rate: ; in This is the light intensity value every 15 minutes; Number of samples; (b) Rate of change of temperature and humidity , It is used to monitor temperature changes during the sun-drying process to optimize the turning strategy. ; ; Where T(t) is the temperature at the current moment, T(t-1) is the temperature at the previous moment, H(t) is the humidity at the current moment, and H(t-1) is the humidity at the previous moment; (c) Mean wind speed ,in: is the wind speed value at the i-th minute, and n is the size of the time window for calculating the mean; (d) Rate of change in tea moisture content ; (e) Rate of temperature change of tea leaves ,in: The current temperature of the tea leaves. The temperature of the tea leaves at the previous moment; (f) Tea drying speed , It is the rate of change in moisture content; (g) Remaining sun-drying time Where: M(t) is the moisture content of the tea leaves at the current moment, Target moisture content; (h) Average temperature over the next 6 hours ,in, It is the temperature in the j-th hour from now; (i) Average humidity over the next 6 hours ,in, It is the humidity in the j-th hour in the future; (j) Average wind speed over the next 6 hours ,in, It is the wind speed in the j-th hour in the future; (k) Average UV intensity over the next 6 hours ,in, It is the UV intensity at hour i; (l) Weighted weather condition index for the next 6 hours Taking into account both time and trend, the weather impact index provides an important reference indicator for optimizing the sun-drying process. in: It is the weather condition code for the j-th hour. It is the weight at hour j. , It is the time decay coefficient. It 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-erh tea according to claim 1, characterized in that, The evaluation of the sun-drying effect in step S4 includes: ; Where: S represents the overall sun-drying effect score, D and U represent the drying speed and uniformity of tea moisture content quantified on a 100-point scale, f(D) represents the nonlinear transformation function of the drying speed D of tea moisture content, g(U) represents the nonlinear transformation function of uniformity; w1 and w2 both represent weighting coefficients and w1+w2=1.
6. The method for sun-drying Pu-erh tea according to claim 5, characterized in that: , where α is an adjustable parameter; Where: σ(M) is the standard deviation of the moisture content of the tea sample, and μ(M) is the average moisture content of the tea sample. As a factor that improves the uniformity of flipping, ; Where: σ( ) and σ( These are the standard deviations of moisture content before and after turning over; , where β is an adjustable parameter.
7. A method for sun-drying Pu-erh tea according to any one of claims 6, characterized in that, Step S5 also includes: S5.1 Define the state space ; in: This indicates the current moisture content of the tea leaves; This indicates the rate of change of the current ambient temperature; This indicates the rate of change of the current ambient humidity. Indicates average light intensity; This represents the average current ambient wind speed. Indicates the rate of temperature change of tea leaves; Indicates the current sun-drying time; This indicates the average temperature over the next 6 hours. This indicates the average humidity over the next 6 hours; This indicates the average wind speed over the next 6 hours; This indicates the average UV intensity over the next 6 hours; WeatherIndex represents a weighted weather condition index; This indicates the estimated remaining drying time; Indicates the time since the last flip; S5.2 Define action space A: Action space A is either "no operation" or "flip". S5.3 defines a reward function, using the sun-drying effect evaluation S as the reward function; S5.4 specifies the network structure configuration for the DQN sun-drying control model, 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 no operation or flipping in the action space, using the softmax activation function; one neuron is used to predict the next flipping time, using the linear activation function; and one neuron is used to predict the remaining drying time, using the linear activation function.
8. The method for sun-drying Pu-erh tea according to claim 7, characterized in that, Step S6 also includes: S6.1 Initialize the experience replay pool D and its capacity N. The experience replay pool D is used to store experience data for multiple time steps, including a quadruple of state, action, reward, and next state. The capacity N represents how many experiences to store. S6.2 Initialize the action value function Q and the target network Q', wherein the action value function Q is the main network, denoted as... Used to estimate the state-action value function, representing the state... The Q-value of the next selected action a is approximated by a neural network represented by parameter θ; 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. Obtain current weather conditions and a 6-hour weather forecast; b. Initialization sequence s1={x1} and preprocessing sequence = Where: s1 represents the initial state sequence, containing a series of parameters; x1 represents the current tea moisture content, rate of change of ambient temperature, rate of change of ambient humidity, average light intensity, average wind speed, rate of change of tea temperature, current sun-drying time, average temperature for the next 6 hours, average humidity for the next 6 hours, average wind speed for the next 6 hours, average UV intensity for the next 6 hours, weighted weather condition index, estimated remaining sun-drying time, and last turning time; function This represents the preprocessed state, and the state data is normalized and denoised to improve the training effect of the model. c. For t=1 to T, where the initial value t=1 represents the start of a round, and the ending value T represents the end of the round, the value of T depends on the total duration of the sun-drying process, with each time step being 15 minutes, execute: (1) Select random action a with probability ε t Otherwise choose Where: ε represents the exploration rate, controlling the frequency of random exploration; a t Indicates the action of selection; Select the current state Maximum network output The action corresponding to the value, i.e., the optimal action; This represents parameterized noise, used to increase randomness and prevent the model from getting trapped in local optima. (2) If the "flip" action is selected, predict the flipping time d. t ; (3) Perform the selected action a t Observe the reward r t and the next state s t+1 , where: a t This indicates the currently selected action; if it is "flip", then flipping is performed and the result is determined according to the predicted d. t Control the flipping time; r t The reward given by the system after the action is performed; the reward function is related to the sun-drying effect and the drying uniformity target; s t+1 This indicates the next state after the action is performed, including 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 preprocessing = Update the state sequence and the preprocessed state; (5) Transfer ( , a t , d t , r t , Store in D and calculate priority; (6) Sample small batch transfer from D ( , a j , d j , r j , Priority sampling is used to sample based on priority, selecting more valuable experiences for learning; (7) Calculate the return in n steps: Where: n-step reward is an estimate of long-term reward in reinforcement learning, representing the discounted reward accumulated over the next n steps; γ discount factor, representing the diminishing importance of future rewards; R represents the reward accumulated over the next n steps from the current moment; (8) Settings ,in The target value represents the cumulative reward over n steps plus an estimate of the future Q value, which is used to calculate the value of future actions through the target network Q'. (9) Perform gradient descent to minimize the loss function: Where w is the importance sampling weight, used to weight different training samples to improve training performance; The error loss of the Q network; (10) Update Q' = Q every C steps; S6.4 End the loop.
9. The method for sun-drying Pu-erh tea according to claim 8, characterized in that, In step S7, the drying completion time for each batch of tea is automatically predicted based on the daily start time of sun-drying, specifically including: S7.1 control execution includes: (1) When "Do nothing" is selected, continue monitoring the status and set the next evaluation time; (2) When "flip over" 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, which includes: current tea moisture content, estimated time required to reach target moisture content <10%, and suggested next turning time; The S7.3 feedback loop includes: (1) After the action is performed, new status information is collected, including: new moisture content of tea leaves, tea temperature and environmental parameters; (2) Calculate the deviation between the actual sun-drying effect and the prediction; (3) Input the new information into the model to make the next round of decisions; (4) Adjust the model parameters dynamically according to the actual sun-drying effect and weather changes.
10. A sun-drying system for Pu-erh tea that implements the sun-drying method for obtaining Pu-erh tea as described in any one of claims 1-9, characterized in that, include: Sensors are used to collect data on the sun-drying environment and the temperature and moisture content of the tea leaves; The computer is used to set sun-drying control parameters, record sun-drying conditions, build and update the meteorological feature database in real time, calculate average light intensity, average UV intensity, wind speed, temperature and humidity, moisture change rate, drying rate, remaining sun-drying time and weighted weather condition index, calculate sun-drying score, define state space and action space and design the architecture of sun-drying control model, dynamically optimize sun-drying control model and predict sun-drying time based on 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