Rice phenological period intelligent prediction method based on environmental data and deep learning
Through a deep learning method based on environmental data, combined with the Seq2Seq model and Bayesian neural network, the precise prediction of rice phenological period is achieved, and the high cost and low efficiency problems of traditional methods are solved, and it is suitable for large-scale applications and precise agricultural management. .
Patent Information
- Application Number
- CN202411538097.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-10-31
AI Technical Summary
Traditional rice phenological period prediction methods rely on manual observation and high-cost camera monitoring, and it is difficult to achieve large-scale application and precise management.
Using the Seq2Seq model architecture based on environmental data and deep learning, combining bidirectional long and short-term memory network (Bi-LSTM) and convolutional neural network (CNN), and introducing Bayesian neural network for uncertainty evaluation to build rice phenological intelligence Prediction method.
Accurate prediction of 9 key time nodes of the 8 major phenological periods of rice has been achieved, cost reduction, suitable for rice growth cycle management in different regions and years, and improved the efficiency and benefits of agricultural production.
Smart Images

Figure CN119398269A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of smart agriculture, and specifically relates to an intelligent prediction method for rice phenological period based on environmental data and deep learning. Background Art
[0002] As one of the most important food crops in the world, rice goes through a series of phenological stages during its growth process. The time nodes of these phenological stages can provide a basis for guiding production and managing disaster risks. Therefore, accurate prediction of each phenological stage is of great significance for precise management of rice and increasing production and efficiency.
[0003] Traditional phenological period prediction methods mainly rely on manual observation or camera-based monitoring technology. The manual observation method requires agricultural technicians to regularly observe the growth of rice in the field and record the start and end time of each phenological period. Although this method is simple, it is highly dependent on the experience of personnel, prone to subjective errors, and the observation frequency is limited, making it difficult to capture some important minor changes in the growth process of rice. In addition, manual observation is inefficient in large-scale farmland and cannot achieve refined management. Camera-based phenological period monitoring technology automatically detects the growth of rice through image processing and machine vision methods. Although it solves the limitations of manual observation to a certain extent, the installation and maintenance costs of cameras are high, and their monitoring range is limited and cannot cover large areas of farmland. Especially under severe weather conditions, the quality of images collected by the camera will be significantly reduced, thus affecting the recognition accuracy of the phenological period. In addition, the image processing method is easily affected by background lighting, camera angle, and crop planting density, further reducing the accuracy of the prediction.
[0004] In response to the above problems, some rice phenological period prediction methods based on mathematical statistical models and process models have emerged in recent years. These methods predict the growth stage of rice by fitting environmental data and growth models. However, traditional statistical models are limited by the accuracy of modeling and cannot fully capture the nonlinear relationship between complex environmental factors and the rice growth process. Process models rely on detailed biological mechanisms, the modeling process is complex, and a large amount of experimental data is required for verification, which makes them less adaptable between different regions and years and difficult to achieve large-scale application. Summary of the invention
[0005] The problem to be solved by the present invention is to realize accurate prediction of rice phenological period through environmental data, and propose an intelligent prediction method of rice phenological period based on environmental data and deep learning.
[0006] To achieve the above object, the present invention is implemented through the following technical solutions:
[0007] A method for intelligent prediction of rice phenological period based on environmental data and deep learning, comprising the following steps:
[0008] S1. Obtain the environmental data and phenological period data of rice growth throughout the year and construct a phenological model dataset;
[0009] S2, perform data preprocessing based on the phenological model dataset for subsequent model training and prediction;
[0010] S3. Build a rice phenological period prediction model based on the Encoder-Decoder architecture of the Seq2Seq model, introduce a Bayesian neural network for uncertainty assessment, and formulate a phenological model update judgment standard;
[0011] S4, training a rice phenological period prediction model based on the eight phenological periods divided into the rice growth cycle;
[0012] S5. Real-time prediction and update based on daily updated environmental data.
[0013] Furthermore, the specific implementation method of step S1 includes the following steps:
[0014] S1.1. Set up to obtain the environmental data and phenological period data of rice growth throughout the year, including maximum temperature, minimum temperature, daily average temperature, daily precipitation, daily sunshine duration, daily humidity, and daily wind speed;
[0015] S1.2. The entire growth cycle of rice is set to include 8 main phenological stages: seedling stage is from sowing to tillering, tillering stage is from tillering to jointing, jointing stage is from jointing to booting, booting stage is from booting to heading, heading stage is from heading to milky maturity, milky maturity stage is from milky maturity to waxy maturity, waxy maturity stage is from waxy maturity to full maturity, and full maturity stage is from full maturity to harvesting;
[0016] S1.3. Set the key time nodes of the phenological period, including sowing, tillering, jointing, heading, heading, milky maturity, waxy maturity, full maturity and harvesting;
[0017] S1.4. Collect the environmental data and phenological data of rice growth throughout the year for each phenological period, mark the phenological node time by establishing the timestamp date_ori, match and mark the environmental data with the corresponding rice phenological period, and construct a phenological model data set.
[0018] Furthermore, the specific implementation method of step S2 includes the following steps:
[0019] S2.1, organizing the data collected in step S1 into time series data in days, and normalizing each data sample;
[0020] S2.2. The annual environmental data is divided into seedling stage, tillering stage, jointing stage, booting stage, heading stage, milky stage, waxy stage and mature stage according to the growth cycle of rice. The seedling stage is marked as 1, the tillering stage is marked as 2, the jointing stage is marked as 3, the booting stage is marked as 4, the heading stage is marked as 5, the milky stage is marked as 6, the waxy stage is marked as 7, the mature stage is marked as 8 and other non-rice planting periods are marked as 0 for the training of the phenological period model. During the model training process, the prediction model of 9 phenological nodes is trained according to the phenological period marking of the annual data.
[0021] Furthermore, the specific implementation method of step S3 includes the following steps:
[0022] S3.1. Construct an Encoder using two bidirectional LSTM models and set the encoder input feature X to a three-dimensional tensor. Where B represents the batch size, T represents the time series length of 20 days, and F represents the number of daily features, i.e., 7 environmental features;
[0023] S3.2. First, use the fully connected layer to expand the input features and set the weight matrix to Bias The shape of the output tensor is batch_size, T, 256, and the expression of the output tensor X' is:
[0024] X′=ReLU(XW1+b1)
[0025] Among them, ReLU is the activation function;
[0026] S3.3, the output is input into a two-layer stacked bidirectional long short-term memory network Bi-LSTM structure. The first layer of bidirectional LSTM is used to process the input data and output the forward and reverse hidden states. The dimensions are 128 respectively, and the total dimension is 256. The output shape is The expression is:
[0027]
[0028] in, They represent the forward and reverse hidden states of the first time step t in Bi-LSTM, biLSTM1 represents the first layer of bidirectional long short-term memory network, and X' t represents the input features at time t;
[0029] The second layer of bidirectional LSTM receives the output of the first layer of bidirectional LSTM to further process the data, and the final encoded time series feature output is The output shape is [batch_size, T, 256], and the expression is:
[0030]
[0031] in, They represent the forward and reverse hidden states of the second-layer Bi-LSTM at time t, biLSTM2 represents the second-layer bidirectional long short-term memory network, and H represents the output of the first-layer bidirectional LSTM;
[0032] S3.4, the decoder receives the features output by the encoder and decodes them, decoding the encoded time series features into the future phenological period prediction value. The decoder contains two layers of convolutional neural network CNN and a fully connected layer. The first layer of CNN uses the convolution kernel Convert the input features from [batch_size, T, 16, 16] to [batch_size, T, 8, 8] using the expression:
[0033] C1=ReLU(Convld(H,W2))
[0034] Among them, C1 represents the output of the first layer of convolution, ReLU represents the activation function, H represents the input feature of the encoder, and W2 represents the weight matrix of the first layer of convolution kernel;
[0035] The second layer of CNN uses convolution kernel The features are further converted to batch_size,T,4,4, and the decoded feature output is The expression is:
[0036] C2=ReLU(Convld(C1,W3))
[0037] S3.5, flatten the decoder output C2 into a vector form to obtain the shape of batch_size,T×16. After flattening the output of the convolutional network into a two-dimensional vector, a fully connected layer is introduced for the final prediction processing, which is used to predict the 9 time nodes of the rice growth cycle;
[0038] S3.6. Use the Bayesian layer to introduce uncertainty assessment and calculate the confidence interval. Set the weight W4 and bias b4 to be random variables that satisfy the probability distribution. The expression is:
[0039]
[0040] y=C2W4+b4
[0041] Among them, W4 and b4 are represented as random variables in the Bayesian layer, representing the weight and bias of the model respectively, μ represents the mean, σ 2 represents the variance, y represents the output of the Bayesian layer, and C2 represents the output feature of the second convolutional layer in the decoder;
[0042] The output shape of the Bayesian layer is batch_size,1, which corresponds to the predicted value of each sample;
[0043] During the training process, the loss function is modified to a Bayesian loss function that includes uncertainty, and the optimization expression is maximized by maximizing the variational lower bound ELBO:
[0044]
[0045] Where q(w) is the estimated weight distribution, p(w) is the prior distribution of weights, and D is the training data;
[0046] S3.7. When making predictions, use Monte Carlo sampling (MC) to run the model and generate multiple different prediction values.
[0047] By sampling 100 times, 100 predicted values are obtained, and the predicted mean and standard deviation are obtained; the confidence interval of each predicted value is calculated by the standard deviation;
[0048] First, determine a confidence level of 95%, then calculate the corresponding z-score, and then use the following formula to calculate the upper and lower bounds of each predicted value:
[0049] CI=μ±z·σ
[0050] Where μ is the mean of the predicted values, σ is the standard deviation, and z is the corresponding z value. For a 95% confidence interval, z is 1.96;
[0051] S3.8. Set the judgment rules to ensure the accuracy of the prediction and whether to proceed to the next phenological period. When any two of the following conditions are met, stop updating the data, end the current phenological period prediction, and start the next phenological period prediction:
[0052] S3.8.1. Stability of Predicted Values: Setting is the predicted value for the tth day. If the predicted value for k consecutive days fluctuates little, it means that the prediction of the model has stabilized. The specific judgment conditions are:
[0053]
[0054] Among them, ∈1 is the set threshold, which is taken as 1 day, that is, ∈1 = 1;
[0055] S3.8.2. Confidence interval convergence: Set the confidence interval width CI if k consecutive days w Less than the threshold ∈2, it means that the model's prediction is stable enough. The judgment formula is:
[0056] CI w (t) = CIupper (t)-CI lower (t)
[0057] CI w (t)≤∈2&CI w (t-1)≤∈2&CI w (t-2)≤∈2&
[0058] Among them, ∈2 is the threshold of the confidence interval width, which is set to 2 days;
[0059] S3.8.3. Proximity between actual date and predicted date: When the predicted phenological period is approaching, the predicted date d pred With the current date current If the difference is less than the set threshold, the rule is satisfied:
[0060] |d pred -d current |≤∈3
[0061] Among them, ∈3 is the set threshold, which is taken as 10 days.
[0062] Furthermore, in the training of the independent prediction model described in step S4, the collected environmental data corresponds to the predicted 8 phenological periods, i.e., 9 time nodes, and training is performed for different time nodes to predict each phenological period respectively.
[0063] Furthermore, step S5 first obtains environmental data from January 1 to the current date, and introduces weather forecast data for the next few days. At the same time, the sequence padding technology is used to add a padding value of 0 at the end of the input sequence to fill the input sequence to the model fixed sequence length of 365;
[0064] During the prediction process, the uncertainty of the model output is evaluated to determine the credibility of the prediction results; the prediction results are updated every day, and when the judgment criteria are met, the sowing time node is determined; the prediction continues, and when the judgment criteria are met, the tillering time node is determined, and then the prediction of the rice seedling stage is completed, and the prediction of the tillering stage begins. Similarly, the subsequent predictions of jointing, heading, heading, milky maturity, waxy maturity, full maturity and harvesting time nodes are gradually completed, and finally a comprehensive prediction of the entire rice phenological period is achieved.
[0065] Beneficial effects of the present invention:
[0066] Compared with the traditional manual observation and camera-based phenological period monitoring methods, the method of intelligent prediction of rice phenological period based on environmental data and deep learning does not rely on expensive physical equipment. It reduces costs through the prediction of environmental data and can be widely applied to the management of rice growth cycle in different regions and different years.
[0067] The method for intelligent prediction of rice phenological period based on environmental data and deep learning described in the present invention uses the Seq2Seq model architecture in deep learning, combined with a bidirectional long short-term memory network (Bi-LSTM) and a convolutional neural network (CNN), to effectively capture the complex characteristics of meteorological data during rice growth. Through this model architecture, nine key time nodes of eight main phenological periods of rice can be accurately predicted.
[0068] The method for intelligent prediction of rice phenological period based on environmental data and deep learning described in the present invention can provide a credibility assessment for each prediction result by introducing a Bayesian neural network. By calculating the confidence interval, the system can quantify the accuracy of the prediction and provide users with a reliability reference for the prediction results, thereby ensuring the stability of the prediction and the scientific nature of the decision.
[0069] The intelligent prediction method of rice phenological period based on environmental data and deep learning described in the present invention can process and analyze daily meteorological data in real time, and dynamically update the prediction results of phenological period, providing efficient decision support for precision agricultural management of rice. By predicting the time nodes of each phenological period of rice in advance, agricultural producers can scientifically and reasonably arrange planting and management plans according to the needs of different growth stages, thereby improving the efficiency and benefits of agricultural production. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 This is a flow chart of a method for intelligent prediction of rice phenological period based on environmental data and deep learning according to the present invention;
[0071] Figure 2 It is a schematic diagram of rice phenological nodes and phenological periods of the present invention;
[0072] Figure 3 This is a working diagram of the intelligent prediction method for rice phenological period of the present invention;
[0073] Figure 4 This is the architecture diagram of the Encoder-Decoder model of the present invention;
[0074] Figure 5 It is a schematic diagram of data and model update of the present invention. DETAILED DESCRIPTION
[0075] In order to make the purpose, technical solution and advantages of the present invention more clear, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention, that is, the specific embodiments described are only part of the embodiments of the present invention, rather than all of the specific embodiments. The components of the specific embodiments of the present invention described and shown in the drawings herein can be arranged and designed in various different configurations, and the present invention can also have other embodiments.
[0076] Therefore, the following detailed description of the specific embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents the selected specific embodiments of the present invention. Based on the specific embodiments of the present invention, all other specific embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present invention.
[0077] In order to further understand the content, features and effects of the present invention, the following specific implementation methods are given as examples, and the attached Figure 1 -Attached Figure 5 The detailed instructions are as follows:
[0078] Embodiment 1:
[0079] A method for intelligent prediction of rice phenological period based on environmental data and deep learning, comprising the following steps:
[0080] S1. Obtain the environmental data and phenological period data of rice growth throughout the year and construct a phenological model dataset;
[0081] Furthermore, the specific implementation method of step S1 includes the following steps:
[0082] S1.1. Set up to obtain the environmental data and phenological period data of rice growth throughout the year, including maximum temperature, minimum temperature, daily average temperature, daily precipitation, daily sunshine duration, daily humidity, and daily wind speed;
[0083] S1.2. The entire growth cycle of rice is set to include 8 main phenological stages: seedling stage is from sowing to tillering, tillering stage is from tillering to jointing, jointing stage is from jointing to booting, booting stage is from booting to heading, heading stage is from heading to milky maturity, milky maturity stage is from milky maturity to waxy maturity, waxy maturity stage is from waxy maturity to full maturity, and full maturity stage is from full maturity to harvesting;
[0084] S1.3. Set the key time nodes of the phenological period, including sowing, tillering, jointing, heading, heading, milky maturity, waxy maturity, full maturity and harvesting;
[0085] S1.4. Collect the environmental data and phenological data of rice growth throughout the year for each phenological period, mark the phenological node time by establishing the timestamp date_ori, match and mark the environmental data with the corresponding rice phenological period, and construct a phenological model data set.
[0086] S2, perform data preprocessing based on the phenological model dataset for subsequent model training and prediction;
[0087] Furthermore, the specific implementation method of step S2 includes the following steps:
[0088] S2.1, organizing the data collected in step S1 into time series data in days, and normalizing each data sample;
[0089] S2.2. The annual environmental data is divided into seedling stage, tillering stage, jointing stage, booting stage, heading stage, milky stage, waxy stage and mature stage according to the growth cycle of rice. The seedling stage is marked as 1, the tillering stage is marked as 2, the jointing stage is marked as 3, the booting stage is marked as 4, the heading stage is marked as 5, the milky stage is marked as 6, the waxy stage is marked as 7, the mature stage is marked as 8 and other non-rice planting periods are marked as 0 for the training of the phenological period model. During the model training process, the prediction model of 9 phenological nodes is trained according to the phenological period marking of the annual data.
[0090] S3. Build a rice phenological period prediction model based on the Encoder-Decoder architecture of the Seq2Seq model, introduce a Bayesian neural network for uncertainty assessment, and formulate a phenological model update judgment standard;
[0091] Furthermore, the specific implementation method of step S3 includes the following steps:
[0092] S3.1. Construct an Encoder using two bidirectional LSTM models and set the encoder input feature X to a three-dimensional tensor. Where B represents the batch size, T represents the time series length of 20 days, and F represents the number of daily features, i.e., 7 environmental features;
[0093] S3.2. First, use the fully connected layer to expand the input features and set the weight matrix to Bias The shape of the output tensor is batch_size, T, 256, and the expression of the output tensor X' is:
[0094] X′=ReLU(XW1+b1)
[0095] Among them, ReLU is the activation function;
[0096] S3.3, the output is input into a two-layer stacked bidirectional long short-term memory network Bi-LSTM structure. The first layer of bidirectional LSTM is used to process the input data and output the forward and reverse hidden states. The dimensions are 128 respectively, and the total dimension is 256. The output shape is The expression is:
[0097]
[0098] in, They represent the forward and reverse hidden states of the first time step t in Bi-LSTM, biLSTM1 represents the first layer of bidirectional long short-term memory network, and X' t represents the input features at time t;
[0099] The second layer of bidirectional LSTM receives the output of the first layer of bidirectional LSTM to further process the data, and the final encoded time series feature output is The output shape is [batch_size, T, 256], and the expression is:
[0100]
[0101] in, They represent the forward and reverse hidden states of the second-layer Bi-LSTM at time t, biLSTM2 represents the second-layer bidirectional long short-term memory network, and H represents the output of the first-layer bidirectional LSTM;
[0102] S3.4, the decoder receives the features output by the encoder and decodes them, decoding the encoded time series features into the future phenological period prediction value. The decoder contains two layers of convolutional neural network CNN and a fully connected layer. The first layer of CNN uses the convolution kernel Convert the input features from [batch_size, T, 16, 16] to [batch_size, T, 8, 8] using the expression:
[0103] C1=ReLU(Convld(H,W2))
[0104] Among them, C1 represents the output of the first layer of convolution, ReLU represents the activation function, H represents the input feature of the encoder, and W2 represents the weight matrix of the first layer of convolution kernel;
[0105] The second layer of CNN uses convolution kernel The features are further converted to batch_size,T,4,4, and the decoded feature output is The expression is:
[0106] C2=ReLU(Convld(C1,W3))
[0107] S3.5, flatten the decoder output C2 into a vector form to obtain the shape of batch_size,T×16. After flattening the output of the convolutional network into a two-dimensional vector, a fully connected layer is introduced for the final prediction processing, which is used to predict the 9 time nodes of the rice growth cycle;
[0108] S3.6. Use the Bayesian layer to introduce uncertainty assessment and calculate the confidence interval. Set the weight W4 and bias b4 to be random variables that satisfy the probability distribution. The expression is:
[0109]
[0110] y=C2W4+b4
[0111] Among them, W4 and b4 are represented as random variables in the Bayesian layer, representing the weight and bias of the model respectively, μ represents the mean, σ 2 represents the variance, y represents the output of the Bayesian layer, and C2 represents the output feature of the second convolutional layer in the decoder;
[0112] The output shape of the Bayesian layer is batch_size,1, which corresponds to the predicted value of each sample;
[0113] During the training process, the loss function is modified to a Bayesian loss function that includes uncertainty, and the optimization expression is maximized by maximizing the variational lower bound ELBO:
[0114]
[0115] Where q(w) is the estimated weight distribution, p(w) is the prior distribution of weights, and D is the training data;
[0116] S3.7. When making predictions, use Monte Carlo sampling (MC) to run the model and generate multiple different prediction values.
[0117] By sampling 100 times, 100 predicted values are obtained, and the predicted mean and standard deviation are obtained; the confidence interval of each predicted value is calculated by the standard deviation;
[0118] First, determine a confidence level of 95%, then calculate the corresponding z-score, and then use the following formula to calculate the upper and lower bounds of each predicted value:
[0119] CI=μ±z·σ
[0120] Where μ is the mean of the predicted values, σ is the standard deviation, and z is the corresponding z value. For a 95% confidence interval, z is 1.96;
[0121] S3.8. Set the judgment rules to ensure the accuracy of the prediction and whether to proceed to the next phenological period. When any two of the following conditions are met, stop updating the data, end the current phenological period prediction, and start the next phenological period prediction:
[0122] S3.8.1. Stability of Predicted Values: Setting is the predicted value for the tth day. If the predicted value for k consecutive days fluctuates little, it means that the prediction of the model has stabilized. The specific judgment conditions are:
[0123]
[0124] Among them, ∈1 is the set threshold, which is taken as 1 day, that is, ∈1 = 1;
[0125] S3.8.2. Confidence interval convergence: Set the confidence interval width CI if k consecutive days w Less than the threshold ∈2, it means that the model's prediction is stable enough. The judgment formula is:
[0126] CI w (t) = CI upper (t)-CI lower (t)
[0127] CI w (t)≤∈2&CI w (t)-1)≤∈2&CI w (t-2)≤∈2&
[0128] Among them, ∈2 is the threshold of the confidence interval width, which is set to 2 days;
[0129] S3.8.3. Proximity between actual date and predicted date: When the predicted phenological period is approaching, the predicted date d pred With the current date current If the difference is less than the set threshold, the rule is satisfied:
[0130] |d pred -d current |≤∈3
[0131] Among them, ∈3 is the set threshold, which is taken as 10 days.
[0132] S4, training a rice phenological period prediction model based on the eight phenological periods divided into the rice growth cycle;
[0133] Furthermore, in the training of the independent prediction model described in step S4, the collected environmental data corresponds to the predicted 8 phenological periods, i.e., 9 time nodes, and training is performed for different time nodes to predict each phenological period respectively.
[0134] S5. Real-time prediction and update based on daily updated environmental data;
[0135] Furthermore, step S5 first obtains environmental data from January 1 to the current date, and introduces weather forecast data for the next few days. At the same time, the sequence padding technology is used to add a padding value of 0 at the end of the input sequence to fill the input sequence to the model fixed sequence length of 365;
[0136] During the prediction process, the uncertainty of the model output is evaluated to determine the credibility of the prediction results; the prediction results are updated every day, and when the judgment criteria are met, the sowing time node is determined; the prediction continues, and when the judgment criteria are met, the tillering time node is determined, and then the prediction of the rice seedling stage is completed, and the prediction of the tillering stage begins. Similarly, the subsequent predictions of jointing, heading, heading, milky maturity, waxy maturity, full maturity and harvesting time nodes are gradually completed, and finally a comprehensive prediction of the entire rice phenological period is achieved.
[0137] Furthermore, this implementation method solves the problem that the current traditional methods are subject to time, technology and regional restrictions and cannot achieve general inclusive and simplified services. The Encoder-Decoder architecture of the Seq2Seq model is adopted, which can effectively process time series data with mismatched input and output lengths. For data with different rice growth cycle lengths in different years and regions, data preprocessing is first performed, the environmental data is input into Encode, and then the encoded data is passed into Decoder for prediction. At the same time, the bidirectional long short-term memory network (Bi-LSTM) and the convolutional neural network (CNN) are combined. The Bi-LSTM can effectively capture the long-term dependencies in the time series, and the CNN improves the accuracy of the prediction by extracting local features from the environmental data. In addition, the Bayesian neural network (BNN) is introduced for uncertainty assessment. BNN can evaluate the prediction credibility of the model by giving the confidence interval of the prediction result, and quantify the uncertainty of the prediction through the Monte Carlo sampling technique to ensure the stability and reliability of the prediction. This innovative phenological period prediction method does not rely on traditional camera monitoring systems, which not only reduces costs, but also provides an efficient and scientific basis for guidance and recommendations for subsequent agricultural production tasks, promoting the development of smart agriculture.
[0138] It should be noted that relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0139] Although the present application has been described above with reference to specific embodiments, various modifications may be made thereto and parts thereof may be replaced with equivalents without departing from the scope of the present application. In particular, as long as there is no structural conflict, the various features in the specific embodiments disclosed in the present application may be used in combination with each other in any manner, and the fact that these combinations are not exhaustively described in this specification is only for the sake of omitting space and saving resources. Therefore, the present application is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.
Claims
1. An intelligent prediction method for rice phenological period based on environmental data and deep learning, characterized in that: The steps include: S1. Obtain the environmental data and phenological period data of rice growth throughout the year and construct a phenological model dataset; S2, perform data preprocessing based on the phenological model dataset for subsequent model training and prediction; S3. Build a rice phenological period prediction model based on the Encoder-Decoder architecture of the Seq2Seq model, introduce a Bayesian neural network for uncertainty assessment, and formulate a phenological model update judgment standard; S4, training a rice phenological period prediction model based on the eight phenological periods divided into the rice growth cycle; S5. Real-time prediction and update based on daily updated environmental data.
2. The method for intelligent prediction of rice phenological period based on environmental data and deep learning according to claim 1, characterized in that: The specific implementation method of step S1 includes the following steps: S1.
1. Set up to obtain the environmental data and phenological period data of rice growth throughout the year, including maximum temperature, minimum temperature, daily average temperature, daily precipitation, daily sunshine duration, daily humidity, and daily wind speed; S1.
2. The entire growth cycle of rice is set to include 8 main phenological stages: seedling stage is from sowing to tillering, tillering stage is from tillering to jointing, jointing stage is from jointing to booting, booting stage is from booting to heading, heading stage is from heading to milky maturity, milky maturity stage is from milky maturity to waxy maturity, waxy maturity stage is from waxy maturity to full maturity, and full maturity stage is from full maturity to harvesting; S1.
3. Set the key time nodes of the phenological period, including sowing, tillering, jointing, heading, heading, milky maturity, waxy maturity, full maturity and harvesting; S1.
4. Collect the environmental data and phenological data of rice growth throughout the year for each phenological period, mark the phenological node time by establishing the timestamp date_ori, match and mark the environmental data with the corresponding rice phenological period, and construct a phenological model data set.
3. The method for intelligent prediction of rice phenological period based on environmental data and deep learning according to claim 2, characterized in that: The specific implementation method of step S2 includes the following steps: S2.1, organizing the data collected in step S1 into time series data in days, and normalizing each data sample; S2.
2. The annual environmental data is divided into seedling stage, tillering stage, jointing stage, booting stage, heading stage, milky stage, waxy stage and mature stage according to the growth cycle of rice. The seedling stage is marked as 1, the tillering stage is marked as 2, the jointing stage is marked as 3, the booting stage is marked as 4, the heading stage is marked as 5, the milky stage is marked as 6, the waxy stage is marked as 7, the mature stage is marked as 8 and other non-rice planting periods are marked as 0 for the training of the phenological period model. During the model training process, the prediction model of 9 phenological nodes is trained according to the phenological period marking of the annual data.
4. The method for intelligent prediction of rice phenological period based on environmental data and deep learning according to claim 3, characterized in that: The specific implementation method of step S3 includes the following steps: S3.
1. Construct an Encoder using two bidirectional LSTM models and set the encoder input feature X to a three-dimensional tensor. Where B represents the batch size, T represents the time series length of 20 days, and F represents the number of daily features, i.e., 7 environmental features; S3.
2. First, use the fully connected layer to expand the input features and set the weight matrix to Bias The shape of the output tensor is batch_size,T,256, and the expression of the output tensor X' is: X′=ReLU(XW1+b1) Among them, ReLU is the activation function; S3.3, the output is input into a two-layer stacked bidirectional long short-term memory network Bi-LSTM structure. The first layer of bidirectional LSTM is used to process the input data and output the forward and reverse hidden states. The dimensions are 128 respectively, and the total dimension is 256. The output shape is The expression is: in, They represent the forward and reverse hidden states of the first time step t in Bi-LSTM, biLSTM1 represents the first layer of bidirectional long short-term memory network, and X' t represents the input features at time t; The second layer of bidirectional LSTM receives the output of the first layer of bidirectional LSTM to further process the data, and the final encoded time series feature output is The output shape is [batch_size, T, 256], and the expression is: in, They represent the forward and reverse hidden states of the second-layer Bi-LSTM at time t, biLSTM2 represents the second-layer bidirectional long short-term memory network, and H represents the output of the first-layer bidirectional LSTM; S3.4, the decoder receives the features output by the encoder and decodes them, decoding the encoded time series features into the future phenological period prediction value. The decoder contains two layers of convolutional neural network CNN and a fully connected layer. The first layer of CNN uses the convolution kernel Convert the input features from [batch_size, T, 16, 16] to [batch_size, T, 8, 8] using the expression: C1=ReLU(Convld(H,W2)) Among them, C1 represents the output of the first layer of convolution, ReLU represents the activation function, H represents the input feature of the encoder, and W2 represents the weight matrix of the first layer of convolution kernel; The second layer of CNN uses convolution kernel The features are further converted to batch_size,T,4,4, and the decoded feature output is The expression is: C2=ReLU(Convld(C1,W3)) S3.5, flatten the decoder output C2 into a vector form to obtain the shape of batch_size,T×16. After flattening the output of the convolutional network into a two-dimensional vector, a fully connected layer is introduced for the final prediction processing, which is used to predict the 9 time nodes of the rice growth cycle; S3.
6. Use the Bayesian layer to introduce uncertainty assessment and calculate the confidence interval. Set the weight W4 and bias b4 to be random variables that satisfy the probability distribution. The expression is: y=C2W4+b4 Among them, W4 and b4 are represented as random variables in the Bayesian layer, representing the weight and bias of the model respectively, μ represents the mean, σ 2 represents the variance, y represents the output of the Bayesian layer, and C2 represents the output feature of the second convolutional layer in the decoder; The output shape of the Bayesian layer is batch_size,1, which corresponds to the predicted value of each sample; During the training process, the loss function is modified to a Bayesian loss function that includes uncertainty, and the optimization expression is maximized by maximizing the variational lower bound ELBO: Where q(w) is the estimated weight distribution, p(w) is the prior distribution of weights, and D is the training data; S3.
7. When making predictions, use Monte Carlo sampling (MC) to run the model and generate multiple different prediction values. By sampling 100 times, 100 predicted values are obtained, and the predicted mean and standard deviation are obtained; the confidence interval of each predicted value is calculated by the standard deviation; First, determine a confidence level of 95%, then calculate the corresponding z-score, and then use the following formula to calculate the upper and lower bounds of each predicted value: CI=μ±z·σ Where μ is the mean of the predicted values, σ is the standard deviation, and z is the corresponding z value. For a 95% confidence interval, z is 1.
96. S3.
8. Set the judgment rules to ensure the accuracy of the prediction and whether to proceed to the next phenological period. When any two of the following conditions are met, stop updating the data, end the current phenological period prediction, and start the next phenological period prediction: S3.8.
1. Stability of Predicted Values: Setting is the predicted value for the tth day. If the predicted value for k consecutive days fluctuates little, it means that the prediction of the model has stabilized. The specific judgment conditions are: Among them, ∈1 is the set threshold, which is taken as 1 day, that is, ∈1 = 1; S3.8.
2. Confidence interval convergence: If the confidence interval width CIw is less than the threshold ∈2 for k consecutive days, it means that the model prediction is stable enough. The judgment formula is: CIw(t)=CIupper(t)-CIower(t) CIw(t)≤∈2&CIw(t-1)≤∈2&CIw(t-2)≤∈2& Among them, ∈2 is the threshold of the confidence interval width, which is set to 2 days; S3.8.
3. Proximity between actual date and predicted date: When the predicted phenological period is approaching, if the difference between the predicted date dpred and the current date dcurrent is less than the set threshold, the rule is satisfied: dpred-dcurrent|≤∈3 Among them, ∈3 is the set threshold, which is taken as 10 days.
5. The method for intelligent prediction of rice phenological period based on environmental data and deep learning according to claim 4, characterized in that: The independent prediction model trained in step S4 collects environmental data corresponding to the predicted 8 phenological periods, i.e., 9 time nodes. Training is performed for different time nodes to predict each phenological period respectively.
6. The method for intelligent prediction of rice phenological period based on environmental data and deep learning according to claim 5, characterized in that: Step S5 first obtains environmental data from January 1 to the current date, and introduces weather forecast data for the next few days. At the same time, the sequence padding technology is used to add a padding value of 0 at the end of the input sequence to fill the input sequence to the model fixed sequence length of 365; During the prediction process, the uncertainty of the model output is evaluated to determine the credibility of the prediction results; the prediction results are updated every day, and when the judgment criteria are met, the sowing time node is determined; the prediction continues, and when the judgment criteria are met, the tillering time node is determined, and then the prediction of the rice seedling stage is completed, and the prediction of the tillering stage begins. Similarly, the subsequent predictions of jointing, heading, heading, milky maturity, waxy maturity, full maturity and harvesting time nodes are gradually completed, and finally a comprehensive prediction of the entire rice phenological period is achieved.
Citation Information
Patent Citations
Plant key phenological period time point prediction method and system based on deep learning
CN112560633A
Multi-scale crop phenological period remote sensing dimensionality reduction prediction method
CN114529097A
Local air temperature prediction method based on seq2seq-attention model
CN115343784A
Method for assessment of spring wheat crop capacity depending on weather conditions
RU2733728C1
Cited By
Multi-source data fusion strong gluten wheat quality intelligent prediction and planting optimization system
CN120278319A